Rob's LaTeX Page

Rob's favorite links to all things LaTeX.

Evangelism: Why Use LaTex

Basic Documentation

Documentation and Resources on the Internet

Getting the Software

There are many sources for LaTeX, almost all of them free. Here are some I, or people I respect, have used:

BibTex

Graphics, Equations, and the WWW

Support tools for LaTeX

Tips and Tricks (table of contents)

PdfLaTeX

I have not used classix LateX in years but rather pdfLaTeX. The advantages include:

Change marking

Resubmitting documents like papers and grant applications often requires the authors to mark those sections that have changed since a previous version. LaTeX has support for this through the changebar package, typically part of a standard installation of LaTeX but also available via a Google search.

Once you have installed the package, perform the following steps to create a vertical bar in the right margin of the page next to sections that you have changed.

  1. In the header, add the line
      \usepackage{changebar}
    
  2. Then around every piece of the text that has changed, place these two commands:
      \cbstart
      \cbend
    
  3. For example,
      \cbstart
      Each year, there are changes in the Handbook and we mark such changes from
      the previous edition with a vertical bar in the right margin, as with this
      paragraph.   Such markings may not be visible in the HTML version of the
      handbook---please see the pdf edition for clarification.
      \cbend
    

Citation commands

Things have changed recently so that it is now easier to control how citations appear in the document. To get some control over citations, use the cite.sty package (i.e.,

    \usepackage{cite}
To have citation numbers appear as superscripts, change this to be
    \usepackage[super]{cite}
and that may be all you ever need to know. For more info, read the cite.sty file.

San Serrif fonts for grant applications

With the requirement of many granting agencies to submit applications using a san serrif font like Helvetica or Arial, there are several tricks in LaTeX.

Mine looks like this and gives an 11-point like font that NIH has accepted without problem on several occasions.

    \usepackage{times}
    % This command somehow makes Helvetica fonts
    \renewcommand\rmdefault{phv}

Typsetting Units

To get complex units to look good needs some math mode but without the math fonts, which requires the use of
    \mathrm
for example
   $\mathrm{\mu A / cm ^ 2}$
creates "micro-Amps per cm squared" with the correct fonts.

Wrapping Text around figures and other space saving tricks

LaTeX is not always efficient in the way it uses space on a page, sometimes leaving large white spaces and big gaps between elements of the document. There are several packages that support text wrapping and other tricks to getting better use of page space in LaTeX. Here are some pointers to a few.

Underlining

LaTeX folks (at least Leslie Lamport) seem to frown on the use of underlining but if you do like to use it, the package ulem.sty is your friend. With \usepackage{ulem}, you have the following new commands: Note that this package changes \em and \emph to be underline. To change this behavior back to normal, use the \normalem command, for example
    \usepackage{ulem}
    \normalem

LaTeX for thesis writing

The thesis is often one of the first major projects for a student in LaTeX (it sure was for me) and there are some nice tools specific to that task.

Setting up Auctex

Getting and setting up Auctex is easy, either for a sysadmin type or a mere mortal. If you do not have local support, here are the steps:

  1. Go to here and get the latest stable version (who needs to live dangerously when writing is already hard enough)
  2. Put the folder in your local emacs lisp folder, typically something like ~/emacs/lisp
  3. Read the INSTALLATION file, where you will find the commands
    make
    make lispdir=$HOME/emacs/lisp install
  4. The nasty part of installing this yourself is the need to put the info files somewhere and set up your own info directory. You can ignore this and just read the PDF version of the manual I have prepared.
  5. Add the following lines to your .emacs file:
    (setq load-path (cons "~/emacs/lisp" load-path))
    (require 'tex-site)
    (setq TeX-auto-save t)
    (setq TeX-parse-self t)
    (setq-default TeX-master nil)
    (setq LaTeX-indent-level 4)
    (setq LaTeX-item-indent -2)

    Note: the first 2 lines are required; the rest are some useful settings you can alter at will.

  6. Run emacs on your latest LaTeX document and have a real blast!

Colourization of Emacs text

One of the mysteries of Emacs version 21 is how to set up colors for the different elements of a document. This used to happen with highlight packages but now it is built in and hence more powerful and sometimes more difficult to use. Here are some points to note in fumbling around with this feature.


Last modified: Mon May 26 07:39:06 MDT 2014