MicroEmacs / LaTexMode


LaTeX is an powerful textprocessing tool which allows you to generate larege books, containing table of contents, table of figures, indexes, a bibliography and so more with the aid of a simple text editor on very slow machines running DOS or Linux without X-Windows.

If you still not an LaTeX-processor installed on your system you seems to run Windows. You can obtain a the MikTeX-LaTeX distribution for Windows either at the ftp-server of Tex user group or at the MikTex-Homepage.

Which LaTeX-dialect:

My generell advice is to use the PdfTeX-package instead of the original LaTeX because it allows you to use small PNG-graphics which are easy to handle andit has nice hypertext-facilities.

To convert the various other graphic formats you have (like gif, jpg and so on you can use a nice tool like IrfanView which is freeware or Xnview. By the way PNG-is a graphic-format which can be recognized by modern browsers so you can write pdf- and html-documents at the same time using the same graphics.

For a generell LaTeX-introduction see at http://www.dante.de or at http://www.tug.org and the documentation supplied with your LaTeX-distribution.

Getting started

A starting template for PDFTeX:

% main.tex
\usepackage{a4} % standard packages
% some special or downloaded packages

\tableofcontents  \setcounter{secnumdepth}{3} 
\bibliography{biblio/dgroth} % pointer to dgroth.bib the bibtex-file

You can now write various tex.files (title.tex, latex.tex in the example above) which will be processed if invoking the pdftex-compiler. I can't give more infos on TeX here, please see the various web-pages and newsgroups.


The MicroEmacs-Editor is a very powerful choice for editing TeX-documents, because of its following features for TeX-documents: <ul> <li>folding </li> <li>hypertext-movement (ref->label, cite->bibitem; back etc.)</li> <li>list of sections </li> <li>list of labels </li> <li>various templates </li> <li>LaTeX-clipbook/abbreviation </li> <li>support of BibTeX-files </li> <li>shortcut-switch of hilighting between pseudo-pdf (compiled-like for easy reading and correcting tex-documents) and normal hiligthing </li> <li>TeX-specific spelling </li> </ul>


Folding means to make certain regions of text, which are currently not edited, invisible for the user. So you can fold a document by the headers (sections) of the documents, allowing you only to see the header and move fast through the document. Try F3 and F2 keys. To fold also the beginning of a file you should add the following lines at the beginning at the end of the files.

%% \section\{begin-of-file\}
%% \section\{end-of-file\}

These lines are commented out for the latex-processor but visible for the folding mechanism.


The macros in the file hklatex.emf, und textags.emf are providing some hypertext capabilites. You can use the F7-Key to put a list of the sections on a new window and to browse to different sections with the aid of the mouse. The same is possible for labels.

You can furthermore browse from a ref-item to the corresponding label-item using the macro textags.emf (Tools, LaTeX Tools, Create Tags File). Please be aware that textags.emf only works if all tex and bbl files are in one directory.

After generation of the Tags file mark the whole label-name in the tex-file and press the right mouse button: find-tag.

Alternativly jump into ref-brackets and choose Tools, LaTeX-Tools, GoTo-Ref-Label.

You can also jump from a cite references to the corresponiding bbl-file (generated by BibTeX) or the correspondig tex-file if editing bibitems manually. This is useful to citation into your bibliography.


As any modern editor ME supports customizable syntax-hilighting for various file types. However there are advanced features regarding these hilighting mechanism. So you can higlight certain regions of text in an other way then the rest of the document. So it is possible to hilight C-code inside html-documents with the C-hilighting, but the rest of the html-document with the html-hilighting.

Regarding LaTeX-hilighing you can switch fast between compile-like hiligthing and normal hiligthing just by pressing "C-c C-h" just allowing easy reading and correcting your document. The compile-like hiligthing-scheme hids certain special symbols, like german umlauts, spelling-helps, latex-commands and so on. You can adjust all this to your personal needs.

LaTeX-abbreviation files

Beside of your normal abbreviation files there are abbreviation-files for latex-commands. You use the abbreviations by writing the abbreviation and pressing Esc Esc. To use this you my have to add to your mylatex.emf file the following line: buffer-abbrev-file "latex"

Put the latex.eaf into your user directory.

If you are changing the abbreviation file, you have to save it and to execute the following command:

define-macro latex-reload-eaf
    0 buffer-abbrev-file "latex"

this reloads the abbreviation file.


MicroEmacs provides sophisticated spelling support ignoring special latex-commands like hyphenation-tokens and so on. So you can also spell these divided words correctly.

BibTeX and ME

ME supports also supports special editing of BibTeX-files. You can fold the BibTeX-files by each seperate cite-abbreviation (like author99), allowing fast movement between different items and searching for bibitem-entries.

Since MicroEmacs'2000 it is also possible to cut and insert items in Block mode, try "Esc C-w" for blockwise killing, "Esc C-y" for blockwise inserting. This ueful for inputting special formats like Medline citations.

If you wan't to convert medline-format into BibTeX you can write a macro using the MicroEmacs-macro language. If you have done this thing please let me know. (Addition in 2003 normally it would better to use a true scripting language like perl or tcl!)