------------------- Jed LaTeX Mode Help ------------------- Installing ---------- Copy latex.sl to $JED_ROOT/lib, then add these lines to your .jedrc: add_mode_for_extension ("latex", "tex"); enable_dfa_syntax_for_mode ("LaTeX"); You'll also want to create the DFA cache table. As root, add "latex.sl" to the list in the file preparse.sl, then run the command: jed -batch -n -l preparse CAVEAT: by default, latex mode is incompatible with folding mode because of clashing ^Cf key binding. Unless you're prepared to change the key bindings in folding.sl, you can solve the problem setting this variable in your .jedrc: variable LaTeX_Font_Key = "n"; which will make all font operations start with ^Cn (^Zn for IDE mode). Customising ----------- You customise LaTeX mode changing the value of its predefined variables. Insert lines like the following in your .jedrc. The values shown are the default: variable LaTeX_Default_Output = "dvi"; % or: "ps", "dvipdf", "pdf" variable LaTeX_Indent = 2; variable LaTeX_Article_Default_Options = "a4paper,12pt"; variable LaTeX_Book_Default_Options = "twoside,11pt"; variable LaTeX_Letter_Default_Options = "a4paper,12pt"; variable LaTeX_Report_Default_Options = "twoside,12pt"; variable LaTeX_Slides_Default_Options = "a4paper,landscape"; variable LaTeX_Prosper_Default_Options = "pdf,slideColor,colorBG,azure"; variable LaTeX_Default_Language = "italian,english" % for Babel #ifdef IBMPC_SYSTEM variable LaTeX_View_Dvi_Command = "yap"; variable LaTeX_View_Ps_Command = "gsview32"; variable LaTeX_View_Pdf_Command = "gsview32"; variable LaTeX_Print_Command = "gsview32"; #else variable LaTeX_View_Dvi_Command = "xdvi"; variable LaTeX_View_Ps_Command = "gv"; variable LaTeX_View_Pdf_Command = "acroread"; variable LaTeX_Print_Command = "lpr"; #endif Make sure that all helper programs are in the PATH. Editing LaTeX Documents ----------------------- Loading files with the '.tex' extension will turn LaTeX mode on. The 'Mode' menu system is fairly complete, and it also indicates the key bindings when available. Most commands are region or word aware. For example, if a region is defined and you select Mode/Environments/center, that region will be included in a 'center' environment. If the cursor is positioned on a word and you select Mode/Font/\emph, the word will be included in a \emph command. Indentation ----------- LaTeX mode uses a sort of 'preventive indentation' scheme. Normally, a new line starts at the same column as the previous, but lines within environments are indented. If you start an environment with ^Ce (see the list of supported environments from Mode/Environments), the text will be indented by the amount specified by the variable LaTeX_Indent. The default is 2 columns. An alternative way to start a new environment is press ^C[. You'll be prompted for the environment name. When you're done, close the environment with ^C]. Another useful key binding used in itemize environments is ^C, which starts a new \item line. Templates --------- Templates for standard LaTeX document classes (article, book, letter, report, slides) are provided. In addition, a template for notices and for Prosper presentations (http://prosper.sourceforge.net) have been added for your convenience. The latter lets you write a presentation in minutes! Using a Master File ------------------- When you work on complex documents, you can set a buffer as "master file". This means that although you may be working on several LaTeX files at the same time, all operations of conversion, previewing etc. will be performed on the master file. This is useful, for example, when you have a main file that \includes several parts. If you disable the master file, all operations will be performed on the current buffer. Document Outline ---------------- Use this feature to navigate through complex documents. The *Outline* buffer shows the document structure, listing all \parts, \sections, etc. and the line where they appear. Press or double click on a section to move to the relative line in the LaTeX buffer, or 'q' to quit. Converting ---------- LaTeX documents are converted using four output profiles: dvi, ps, pdf using pdflatex, and pdf using dvipdf. Default output is dvi. Select 'Compose' to convert the buffer using the current output profile. If errors are detected, an error message appears and you can choose whether to inspect the LaTeX log. If you do, a new window pops up and the line that explains the problem is highlighted. Now press 'g' to move to the line in the LaTeX source that caused the error, or "Ctrl-X '" ("Ctrl-Z '" for IDE mode) to move to the next error, or 'q' to quit the log. Notes on BiBTeX --------------- LaTeX mode doesn't provide any support for writing BiBTeX files. There's an excellent BiBTeX mode already. Edit a file with .bib extension to turn BiBTeX mode on. To Do ----- It seems to me that LaTeX mode is very complete. However, I'll be glad to receive suggestions and requests from you. If you find a bug or would like me to add new features, feel free to contact me at guido dot gonzato at univr dot it. =8-)