Using the LaTeX Editor (LEd) to edit LaTeX source files

The LEd window looks like this:

Here are the most important things to note.  The main editor window (small in this snapshot, but you can resize it to be large enough) is where you edit the .tex source file.  The current file is called 1.tex; you can see the name in the tab above the editor window.  If you have several files open, there will be several tabs.  Inside the editor window, LaTeX commands are highlighted in blue.  Comments are colored green.  Matching parentheses are colored so that you can more easily find mismatches.

Below the editor window is a window which shows diagnostic output when latex processes the .tex file.  This is where any error messages will appear.  They refer to line numbers in the source .tex file, so it is useful to have the editor display line numbers.  To do that, click Configuration, Options, Editor to get a dialog window like the one below.  Check the box "show row numbers at the margin" to turn on line numbers.

The other options shown here are useful.  After clicking OK, the LEd window will look like this:

Above the editor window are many useful buttons.  The green triangle on the upper right will cause latex to process the current .tex source file and create a .dvi file in the same folder as the .tex file.  Then you can go to that folder and double click the .dvi file to preview it.  (If double clicking it does not run YAP, right click the .dvi file and hope that Yet Another Previewer (YAP) is an option.  If not, try to choose the program to use from a list, then Browse, etc.  I'll need to update these instructions if we are having trouble with this.)

The blue triangle will run pdflatex to directly produce a .pdf file.  The blue PDF button will run dvipdf to convert the .dvi file to a .pdf file.

Finally, you can have LEd insert the LaTeX code for many symbols by finding them under the many buttons with strange symbols and selecting what you want.


One of the most useful things for any LaTeX editor is to help you find spelling mistakes without getting caught up on all the of the special LaTeX symbols.  Here is how to get the LEd spellchecker working.  Pull down Configuration, Add-ons, to get a window like this:

Click for the dictionary you want to use; for me, it's English (Amerian) - huge.  (None of the dictionaries are all that large.)  Click Download, and it will connect to the internet and download the file.  Next, pull down Configuration, Options, click on Spellchecking, Dictionaries, and make sure something sensible is checked.  It appears to be necessary to click the + next to English and click (unclick, then click) to make sure the two dictionaries there are checked.

To check the spelling in your LaTeX document, pull down Tools, Spellcheck, or just press Control-F7.  Whenever it finds a word it doesn't recognize, it gives a little dialog box like this one:

Here, it is telling you that it doesn't recognize the word "amsmath", which is a package I am trying to use.  I want to teach it to recognize this word, so I click Insert, which apparently inserts the word amsmath into the dictionary.  Be careful about doing this, so you don't quickly add something like "teh" to the dictionary, because it will no longer tell you when you typed "teh" instead of "the".  If the word is correct but you don't want to add it to the dictionary, click Next.  If you want to use the correction it suggests to you, click Make a correction.