Notes On LaTeX

Why use LaTeX? LaTeX gives consistently stunning results. There is something of learning curve with LaTeX, so I hope this is helpful. The best reference for learning LaTeX is unquestionably the LaTeX Wikibook.

Bare minimum for a valid document:


Hello world.

Full featured example:

% specify paper size for fullpage package
% enable verbatimtab command
% wider margins
% characters 'eaten' by latex: fi fl ff ffi é “
% nicer paragraphs with whitespace between and no indent

\title{Main Title of Document}
\author{Joe Bloggs}
Hello world.
\subsection*{Big section}
A major section title is above. Note the asterisk to stop latex using
a numbering scheme.

\subsubsection*{Smaller heading}
More verbage.
\item The first numbered point
\item Another numbered point

\item This is a bullet point




\title[Main title]{Big Title:\\Blah blah}

\author{Joe Bloggs}

Hello world!

Going from good to great

The default font was created some time ago, and is not ideal. Consider using a newer font (code below). You can see a comparison of fonts with full maths support here.


For documents that are not laden with maths, you can go further. Using XeTex with the fontspec package you can use any TrueType font on the system (including typing unicode properly, useful for foreign text). I recommend the Gentium font for more attractive results.

Header for documents is now as follows:




\setmonofont[Scale=0.86]{Droid Sans Mono}
% newline between paragraphs, no indent

Simply feed this into the xelatex command to produce your pdf as you would with pdflatex.


To produce a pdf document with links (e.g. contents pages) then consider the package hyperref.

Redefining the numbering scheme for lists


Redefining the numbering scheme for subsubsections

% simple numbering scheme 1. 2. 3. etc
% or use (a) (b) (c) and so on instead

Other useful LaTeX tools

Including code samples

The verbatim environment stops you needing to escape LaTeX reserved characters and is formatted using a monospaced font. Sadly it ignores tabs, so you may instead want to use the verbatimtab environment from the moreverb package.

For proper language highlighting, there is a listings package but it uses rather strange fonts. A better solution is Pygments, a generic highlighter that can ouput LaTeX code.

Using IPA

See the tipa package

Parse trees

Linguistics style, using the parsetree package:

    ( .S. 
        (.NP.  `we')
        ( .VP.
            (.V.    `gave' )
            (.NP.   `them')
            (.NP. ~ `a toy')

Recent Posts

Difftastic, the Fantastic Diff

The Siren Song of Little Languages

How High Are Your Tests?

Helpful: One Year On

The Emacs Guru Guide to Key Bindings