Intro to Scientific Computing

PHYS 27/193

Physics Department
University of the Pacific

The LaTeX Plugin for jEdit

There is a powerful Plugin for jEdit which allows you to click a dropdown menu to Compile and View your Latex documents, without having to open a command window, etc.

First, to install this plugin, you need to have a 4.3+ version of jEdit installed. To see what version you have, start jEdit. When the splash box (the jEdit box, showing that jEdit is starting) pops up, look at the lower right. There will be a number like: 4.3pre9 which says that you have a version higher than 4.3. If yours says 4.2xxx, visit www.jedit.org and upgrade to the latest version.

To install the plugin, click the Plugin Manager

This will bring up the Plugin Dialog Box:

Click the Install Tab, scroll down to LateX Tools, check it, and click the Install Button at the bottom. It's likely that it will prompt you to install some other plugins, like Console and one or two others.

Once the plugin is installed, Open any Latex file. Click the Plugins menu. In the lower panel will be an item for Latex Tools

Click this to get the submenu, then click Compile.

This should bring up a Console window which will run pdflatex on your file.
If all goes well, you should see this

ending with:
Process pdflatex exited with code 0

Code 0 is good. Code 1 or more is bad (it means there were errors).

If your latex file compiled correctly, you should be able to view it.
Click Plugins->Latex Tools->View Output
and see if Acrobat Reader fires up on your new document.

If so, Yay for You! You can now edit, compile, and view latex files all from the comfortable environment of jEdit.

Troubleshooting the Latex Tools Plugin

Compiling

On my computer, there was no problem with the Compile process. If you get errors, be sure to copy the text as exactly as you can and email it to me. I will try to help you fix the problem. Often the problem is something simple which I can tell you how to fix.

Viewing

On my PC, the View Output process failed, with the error message "AcroRd32.exe": command not found" (or something very similar.

Basically XP is saying that it doesn't know how to run this program, or more specifically, doesn't know where to find it. You can fix this (what I did). Windows (and Unix systems too) have a system variable, called the PATH which is a long string containing a series of directories, which looks like this:

PATH C:\Program Files\SomeProgram;C:\SomeOtherFolder\Program2;C:\...

In the above, I've highlighted the ; so that you don't miss it. This semicolon separates the different folders in the PATH. When you type a program name at the prompt in a command window, or when jEdit passes a command to the Console window (which is essentially the same thing), Windows searches each of the Folders in the PATH string to see if the requested program is there. If found, it is executed.

If you get the command not found error from the Console window, as I did, all you have to do is add the AcroRead32.exe folder to the PATH. This is easy.

BUT, be careful to do as I say below. If you whack your PATH variable, it could mean that some programs on your computer won't work, and I won't be able to help you reset your PATH.

First, we need to verify where the Acrobat Reader program lives.
It is usually in

C:\Program Files\Adobe\AcrobatX.X\Reader

and is called AcroRd32.exe.

Explore your C: drive (Start->My Computer->C:->Program Files->Adobe->AcrobatX.X

Here X.X is something like 7.2, the version of Acrobat Reader that you have.

Once you have found AcroRd32.exe, make a note of the Folder in which you found it. It's this folder that you have to add to your PATH variable.

Now, Click Start, then RIGHT Click on "My Computer->Properties":

Next bring forward the Advanced Tab

On the next-to-bottom row, Click Environment Variables
and highlight the PATH variable:

Below this Variable, Click Edit

The PATH string will appear highlighted. Be careful here.

BE SURE TO CLICK (and use the right arrow to move to) THE END OF THE STRING
so that you can INSERT a new folder at the END
.
If you don't do this, you could OVERWRITE and/or ERASE your PATH varible, which would be a bad thing!
In other words, the PATH string SHOULD NOT BE HIGHLIGHTED, and you should have a blinking cursor line to insert text at the end of the string.

If you are nervous, you can Copy/Paste your PATH variable string into a jEdit buffer so that you have saved it in case you whack it.

To the end of your PATH variable, add

;C:\Program Files\Adobe\AcrobatX.X\Reader

Be sure to get the semicolon (;) after the last folder and before this one that you are adding.

Click OK until you are out, and you should be ready to go. Probably you should close jEdit and reopen it on a Latex file. Then try things as described above under View Output.

If you have further problems, let me know and I'll try to sort it out with you.