Editing LaTeX with Aquamacs

by Coen de Roover

img/general-screenshot.png

Most old-school Mac users would never think of using something for their LaTeX editing needs that brings up so many images of command-line hacking as Emacs does. In my personal opinion however, Emacs (with the help of the preview-latex and flyspell extensions) is one of the most advanced LaTeX editing environments available for the Mac. This is especially true for some of the open source projects such as Aquamacs that try to integrate Emacs more into the Mac operating system.

As a picture says more than a thousand words, this page collects screenshots showcasing some of the advanced LaTeX editing features I miss in other OS X offerings.

Aquamacs offers a tight integration with Mac OS X

Many potential Emacs users might be scared away by the seemingly complex keyboard shortcuts. The Aquamacs Emacs distribution however implements the standard OS X keyboard shortcuts and other interface conventions, integrating Emacs into the Aqua environment. Installation is also a breeze as the entire distribution comes in a single-click installer package.

You can continue using the keyboard shortcuts for copy-pasting you're accustomed to.

img/menu_shortcuts.png

The file menu even has a recent items entry.

img/menu_shortcuts_recent.png

And the Aquamacs menu icon is of course blessed with a more Mac-like look.

img/icon_menu.png

AUCTeX is already included

AUCTeX offers extra menus and shortcuts to make your LaTeX (and TeX) editing experience a breeze.

Advanced syntax coloring

This screenshot shows the default syntax coloring applied to LaTeX documents. Note that the coloring goes beyond simply highlighting a predefined set of LaTeX commands. The argument of the \emph command is for instance set in italics. Also, the font size and weight of subsections varies according to their nesting.

img/syntax_color_thumb.png

While you're typing, paren matching will help you close all kinds of parens and braces correctly.

img/paren_matching.png

Text in a verbatim environment and arguments of the verb command are typeset in a typewriter font.

img/syntax_color_verb.png

Superscripts and subscripts are also rendered with the proper fonts. img/syntax_color_super_sub.png

LaTeX-aware spell checking

On-the-fly spell checking is available as you type. The spell checker is LaTeX-aware: it ignores the spelling of LaTeX commands, but will check arguments that are supposed to contain text. For instance, it will not mark the error in \documentclass[a4paper]{artiIcle}, but it will underline both errors in \section[Short tiXtle]{Longer tiXtle}.

img/flyspell.png

Note that some words are underlined in orange instead of red. These words are available in the British English dictionary, but not in the current one that is set to American English.

img/flyspell_menu.png

Navigate through LaTeX errors

In case of a LaTeX error, you can easily see the error message and the line on which the error occured side by side. A simple click of the button brings you to the next error.

img/navigate_latex_errors.png

Inline preview of LaTeX formulas and images

My favourite feature is the inline preview of LaTeX formulas and images. It takes a while to generate all the previews for a large document, but the authors were kind enough to display these little work-in-progress triangles to keep you entertained.

img/preview_working.png

You can continue editing your document as usual. The previews for formulas and images will move along with the other text. This feature truly makes editing complicated documents a breeze.

img/preview_finished.png

For quick feedback about any change you made, you can easily toggle between the inline preview and the LaTeX code of an image or formula.

img/preview_expanded.png

Navigate through your labels and references

The right-most window was displayed after clicking on the \ref{fuzzyresolution} reference while the bottom window was obtained by clicking on the \label{fuzzyresolution} label.

img/navigate_references.png