LaTeX Style Tips

Information on this page covers two topics: general aspects of style,
and particular stylistic issues that arise in the use of LaTeX. In a
previous incarnation of this page, there was big list encompassing
both areas; this has now
been split into two, and will eventually become two separate pages.
Information in each section is arranged alphabetically.

Some of the points listed here might be considered to border on the
subjective, but buy me a beer and I will attempt to give you a
convincing argument as to why they are, nonetheless, The Right Way To
Do Things.

This is not, of course, a comprehensive guide to
the mechanics of style.
If this kind of thing interests you, you
should consider buying a decent style guide. The grandaddy of them
all is the University of Chicago Manual of Style; for
something smaller and cheaper,
you could do worse than
treat yourself to a copy of the pocket-sized Hart's Rules for
Compositors. If you're interested in writing style more generally,
rather than the low level mechanical issues, you might want to have a
look at Strunk and White's The Elements of Style.

General Style Tips

Ampersand: In general, don't use the '&' character; use and
instead. The ampersand is deemed to be pretty ugly by many style
guides. The only places where you should use the ampersand is in a
small number of particular forms where it is conventionally used, including
R&D, AT&T, P&P, and M&S. Some style guides suggest that
it should be used in citations (as in Smith & Jones 1982), but this
convention isn't used by most professional journals or book
publishers.

If you feel you must use the '&' character, then do so consistently.

Captions: When you put a caption on a figure, it's best not
to put a full stop at the end of the caption: after all, it's probably
a noun phrase, not a sentence, since the caption probably describes an
object, and objects are typically referred to by noun
phrases. Captions in newspapers are a different kind of beast
entirely.

Casing: Make sure you are using casing consistently in
titles and section headings; see Punctuation in Section Headings for
some suggested conventions. A good way to check that you're being
consistent is to produce a table of contents for the document and scan
that.

Also make sure you are using casing consistently in figure and table
captions; and make sure that, when you use the words Chapter, Section,
Figure, and Table in cross-references, you case those words
consistently.

Citations: When you cite scholarly works in the text, don't
use citations which refer to elements of the bibliography by means of
numbers, as in '[13]': citations of this form are extremely
frustrating, since they require the reader to keep referring back to
the bibliography to see what particular work you are referring
to. Some publishers still request that you use this form: that's
because it saves them space, and it makes it much easier for them to
check that your bibliography is complete. Resist them! You're writing
for your reader, not for the publisher. It's much better to provide
(Author, Date) pairs, as in '[Chomsky 1957]'.

Also, when you cite a particular point made by someone, try to give
the page reference as part of the citation: it's unfair to claim that
Chomsky thinks the language acquisition device is square rather than
rectangular, and to expect the reader to wade all the way through a
tome of several hundred pages in length to verify your claim, when you
could simply have pointed them to the page, or at least the chapter,
where the evidence lies.

E.g. and i.e.: Never use these at the beginning of a
sentence: use the non-Latinate forms (for example and that
is)
instead, and even then be cautious, because if you are starting a
sentence with these expressions, then you probably don't have a
sentence at all.

Notice the punctuation:
both require a full stop after each letter. Some more recent style
guides suggest dropping the full stops.

Some people prefer to follow each of the forms by a comma, since
that's what you'd do if you used the English translations.

Don't italicize either form in its standard use.

Etc: There are very few situations where the word etc is a good
idea. It usually means you either can't think of anything else or
can't be bothered to write anything else. So try to avoid it.
Definitely don't use it in conjunction with expressions like for
example, e.g., and so on: think carefully what such a use
means — it's
redundant.

If you really must use etc, then at least punctuate it
properly. At the very most it should have a terminating full stop, but
definitely nothing more.

List Punctuation: The items in an itemized list should each
be of the same syntactic type. They are usually:

noun phrases;

instances of some other phrasal constituent, such as verb phrases; or

sentences.

There are a number of things to note here.

When the elements of the list are noun phrases or verb
phrases, only the last should
be terminated by a full stop (see the example immediately above);
consider terminating each except the last with a semicolon (or, on
rare occasions, a comma); and
place an and or an or after the penultimate element, depending upon whether the
list is conjunctive or disjunctive. Imagine how you would punctuate the material
if the bullets and indenting were removed.

Make sure that the syntactic constituent preceding the list (in the example above,
that's the sequence of words The items in an itemized list are usually:) is missing
(from a syntactic point of view) precisely what each element of the list provides.

If the elements are sentences, as in this example, the syntactic constituent preceding
the list (in the current example, There are a number of things to note here.) should
be a complete sentence, and each element in the list should be terminated by a full
stop.

If the elements are not sentences, and you find you want to put a full stop in the
middle of an element because it's getting rather big to be one clause or phrase,
then you should probably think about restructuring the whole thing to improve its
readability.

It's usually more helpful to use the enumerate environment than the
itemize environment, since this makes it easier for people to refer to
specific parts of your document.

Number Ranges:
To present a number range, you should type,
for example, 110–117, not 110-7. Notice the former is preferable
in two respects: it uses an en-dash (see Dashes), and it makes
it absolutely clear what the range is by providing all the digits of
both the lower and upper bounds.

in subsection headings and below, only capitalize the first word and any proper
names.

Again, whatever convention you adopt, stick to it.

Don't put full stops at the end of section headings at any level.

Quotes: Use single quotes in preference to double
quotes. Make sure your opening quotes are truly opening quotes, rather
than closing quotes (i.e., apostrophes). These may look okay on a
terminal screen, but, depending on the font you use, they may not give you what you expect on the
printed page.

In fact, think hard about why you are using quotes at all: in the best
traditions of Declarative Formatting, perhaps you should define a
macro with a meaningful name which expands out as quotes.

References: Ideally you should use software that formats
your references automatically: see Bibliographic References. If
you must format your references by hand, make them consistent and
complete. If someone's name has multiple initials, separate them by a
space: use Smith, J E rather than Smith, JE.

Structure: Help your reader as much as possible. Here are
three rules of thumb, which, like all rules, deserve to be broken
sometimes; but far less often than you might think.

Tell them what you're going to tell them, tell them it, then tell them you've told
them it.

Break your text into edible chunks, and make them into sections, subsections or
subsubsections as appropriate.

Use numbered units as much as possible, to make it easy for the reader to identify parts of your text.

LaTeX-specific Style Tips

Angle Brackets: Angle brackets in LaTeX are not the same as
the inequality symbols: the angle bracket characters are '〈' and '〉',
not ''. You get the angle brackets using the following
commands in math mode: \langle and \rangle.

Bibliographic References: Whatever you do, don't construct
the bibliographies at the end of your documents by hand. Use BibTeX.

Code, Laying out: It's best to use a monospaced font (i.e.,
a font where all the characters are the same width) for examples of
program code. You can achieve this in LaTeX by using the \tt type
style or putting the relevant material into verbatim mode; better
still, in the best traditions of Declarative Formatting, define a
macro for program code.

Note that a TAB character gets treated as a single space in verbatim
mode. This means that you should make sure that you use spaces rather
than tabs to perform indenting in program code, or things will not
line up as you had intended. Many editors (such as emacs)
provide a basic untabify command that will convert tabs into strings
of spaces.

Dashes: If you want to uses dashes as punctuation, be
consistent about their size and surrounding spacing. There are three
kinds of dashes: hyphens, en-dashes and em-dashes, created in LaTeX by
sequences of one, two and three keyboard minus signs respectively
(i.e., by typing '-', '--', or '---'), The single minus — the
hyphen — appears within words; use the double minus — the
en-dash — in
number ranges; and use the treble dash, or em-dash, as in the previous
clauses here. Some people put a space either side of each
em-dash. Whatever you do, be consistent.

Note that a proper minus sign is not a hyphen, so you can't get it
with a single keyboard minus. To get a proper minus, you need to do it
in math mode: a single keyboard minus embedded in math mode does the
job (i.e., type '$-$' to get a '−').

By way of summary, here are the different kinds of dashes and how you
produce them.

Name

LaTeX Input

Output

Hyphen

-

-

Minus

$-$

−

en-dash

--

–

em-dash

---

—

Dates: It's a good idea to always date your documents. It
can be very frustrating to read a document that has no date,
especially when you have two versions of that document in front of
you; with no dates, you have no easy way of telling which is the newer
one. It goes without saying that you should also specify authorship on
all your documents too.

Be consistent about the format you use for dates. Remember that LaTeX
provides the \today command for today's date, but don't overuse
this — it's probably best to use it only for drafts of a document, and
not for the final version. You wouldn't be the first person to
reformat and reprint a conference paper you had published six years
ago and have it come out, misleadingly, with today's date on it.

Ellipsis: If you want to get '...' then use the command
\ldots; don't just type three full stops, because the spacing comes
out incorrectly.

Example Numbering: For linguistically-oriented papers, as
opposed to mathematically-oriented ones, don't try to hack something
out of the equation environment. Use any of the various excellent
example.sty files floating around on the net instead;
these produce examples formatted like the following:

(1)

Me, I'm just a humble example.

(2)

a.

I'm a sub-example; I know my place.

b.

Me too.

These macros generally support full cross-referencing, so that you can
refer to examples without knowing what their numbers will be.

Figures: In some documents, it can be hard for the reader
to work out where figures start and end. One solution is to bound them
with horizontal lines. The following shows how you might do this.

LaTeX's default behaviour is to place figures at the top of the
page. This is a sensible default, which you alter at your peril:
unless you know what you are doing, trying to force specific locations
for some figures can result in all your figures being pushed to the
end of the document.

Make sure you put the \label declaration for a figure after the
caption of that figure, but before the \end{figure}; otherwise your
label will pick up what seems like an unrelated number (typically the
number of the most recent section heading). If you don't use labels
and references, then you're making life hard for yourself: see pages
186–187 in the LaTeX User's Guide and Reference Manual.

Font Changes: In general, you should use Declarative
Formatting rather than explicit font changes in the
text.

Whenever you have a font change, don't include any associated
punctuation marks unless you really mean to: few of us can truly tell
the difference between an italicized full stop and a standard Roman
one, but commas in the two faces are much more obviously different. A
common occurence is to have a sequence of comma-separated italicized
words, and to lazily place the entire sequence, commas and all, in the
scope of the italicize command. Don't do this; italicize the words
individually, and leave the commas (and the spaces!) in Roman face.

Footnotes: Don't put a space before a \footnote
command. Put the footnote after the punctuation mark it is next to,
not before it. Note that this means you shouldn't have a \footnote
command as the first thing on an input line, since the preceding line
feed will be treated as a space. If there isn't a local punctuation
mark then you're probably putting the footnote in the wrong place:
footnotes typically apply to propositional elements, so there will
usually be a full stop, colon or semi-colon around to mark the end of
that propositional element.

Make sure you include a full stop at the end of the footnote text. And
make sure your footnotes are complete sentences.

Foreign Words: Foreign words which have not yet been fully
adopted into the English language should be set in a distinguishing
font. Give yourself a macro called \foreign, in the best traditions of
Declarative Formatting.

Inequalities: You may have noticed that, if you want
a '' character
produces an upside-down question mark.

So, if you want to write '2 < 3', your input should look like the following: $2<3$.

Upside-down question marks often magically appear in the output of
LaTeX files you've received by email; this is because some mailers
prepend a '>' character to any lines that begin with the word From, so
that the mail handling software doesn't get confused.

Italics: When using italic or slanted font, you may notice
that the last character leans over the following upright text. You can
get around this by adding a very small space at the end of the
italicised or slanted text: you do this by preceding the bracket that
terminates the italicised or slanted text by the pair of characters
'\/' like this:

Some {\it italicised text\/}; some {\sl slanted text\/}.

Of course, any such overhang is much more noticeable if the character
following the italicised or slanted text is not a space.

Page Layout: The default formats in LaTeX are designed for
US paper sizes. For printing on A4 paper, a good style option is
a4wide, since this makes sensible use of the page; and a good base
point size is 11 point, since this reads quite well if you reduce a
document to get two pages per A4 page. So, the first line of your
document source file might look like the following:

\documentstyle[a4wide,11pt]{article}

Paragraph Indenting and Spacing: By default,
LaTeX indents each paragraph. If you don't like this and want to
suppress paragraph indenting, you also have to increase the spacing
between paragraphs so that paragraph boundaries are clear. Putting the
following two lines in the preamble of your document (i.e., between
the \documentstyle line and the \begin{document} line) will get you
what you want:

\setlength{\parindent}{0.0in}\setlength{\parskip}{0.1in}

Small Caps: In some fonts, sequences of capital letters can look overbearing. Some people
think this is true of Computer Modern, the default font used in LaTeX. You might
consider putting words which are all upper case into small caps, like
this: PC, PROLOG, ...

Notice that to get these in LaTeX you have to type

like this: {\sc pc}, {\sc prolog}, \ldots

If you type upper case characters inside the \sc environment, they
come out as big caps.

Smileys: You can generate a smiley face by doing the following:

$\ddot\smile$

There are various ways of doing smileys around. I learned this one from Ivan Derzhanski.

Unnumbered Headings: If you want the behaviour of a section heading at
any level without the LaTeX-provided numbering, don't try to construct
your own headings using bold face and explicit spacing commands:
instead, use the asterisked versions of the sectioning commands. For
example, \subsection* behaves just like \subsection in all respects
except that it doesn't produce a number, and it doesn't get added to
the table of contents.

If there are particular things you think this document doesn't contain
that it should, or if you disagree strongly with something it contains,
or if you think there's something that isn't clear or could be expressed
in a better way, please
let me know.
This document has benefitted from input from Sophia
Cormack, Ivan Derzhanski, Dawn Griesbach, Masato Ishizaki,
Ewan Klein, Alex Lascarides and Sandy Nelson. It was last
significantly
revised on 27th March 1993, and since then has only suffered
conversion into HTML.