LaTeX for the Modern Age

·

So I hadn't really given up on LaTeX. I was just confused by the huge amount of crustiness encoating all the antique TeX instructions that litter the web. I've tried just about everything now, in the quest for an editing and typesetting setup worthy of OS X, and finally have a system that works smoothly and natively.

  1. Some basic libraries that your system might need:
    zlib, libpng, jpegsrc and ghostscript, all available from the Ghostscript page - download, compile and install.
  2. Installing a TeX system
    The basic TeX installation is called teTeX. This provides the applications that do all the hard work behind the scenes. First you have to download and unzip tetex-texmf, and move the folder to /usr/local/tetex/share/texmf.
    Next download tetex-src itself, compile and install it (which will be in /usr/local/tetex).

    To make sure applications can always find the tetex binaries, do the following:

    cd /usr/local/tetex/bin
    mkdir powerpc-apple-darwin-current
    cd powerpc-apple-darwin-current
    lndir ../powerpc-apple-darwin7.2.0

    (Panther is 7.2.0 - the number might be different on your system)

    Then add setenv TEXMF "/usr/local/tetex/share/texmf" to your .tcshrc file
    Add /usr/local/tetex/bin/powerpc-apple-darwin-current to PATH in .tcshrc

    Run sudo texconfig confall to configure the system.
    Run sudo texhash to make sure all the new settings and files are found.

  3. There is a text editor that a) colours LaTeX syntax, b) automatically launches LaTeX processing and viewing applications and c) works smoothly in an OS X-like way:

    Download Enhanced Carbon Emacs into your Applications folder. Enhanced Carbon Emacs is a combination of Emacs (text editor), AucTeX (provides LaTeX commands in the menu) and RefTeX (for working with labels and citations).

    Controlling Emacs with key combinations is tricky to learn, so save this file as ~/.emacs and you'll be able to use Apple-X/C/V/Z/S/Q for cut/copy/paste/undo/save/quit.

    To open a file in Emacs, choose File->Open Directory, press Enter, then use the arrow keys to browse through files and directories. To create a new file, choose File->Open File and type the name of the new file, which will be created automatically. Yes, it would be nice if Emacs could use OS X's native file selector.
    So you don't have to start with a blank screen, download this default LaTex syntax template (it would be good if the menus included more templates). To typeset your LaTeX file, choose Command->'PDFLatex and View' and the finished PDF should open a few seconds later.

    emacs

  4. Adding the Latin Modern fonts, which look better on screen than the default Computer Modern fonts.
    Download the Type 1 Latin Modern Fonts
    Put the files in the appropriate folders in /usr/local/tetex/share/texmf following these instructions.
    Run sudo texhash
    Run sudo updmap --enable Map lm.map

    Add:
    \usepackage[T1]{fontenc}
    \usepackage{lmodern}

    to the beginning of your documents.

  5. Managing bibliographies
    Download BibDesk, and use HubMed to export citations in BibTex format. You'll keep your BibTeX file alongside your LaTeX document, and include citations in the document with a tag such as \cite{eaton04} (each citation in the BibTeX file has a unique key). When the document is typeset, the bibliography and in-text citations will be automatically created and formatted.
  6. Still needed: importing and labelling figures, formatting bibliographies, generating tables of contents and indexes, setting document styles. I think these are all quite straightforward and automated, I just haven't had enough practice to write about them yet.