A guide to writing mathematics

1. Writing mathematics

3. Whitespace

2. Typesetting text

4. Typesetting mathematics

2 Typesetting text

This page collects some common syntactic mistakes, as well as some issues that commonly arise when typesetting English texts.

2.1 Learn to punctuate

Before you write anything at all, you should refresh your knowledge of punctuation.

First of all, learn the difference between a period, comma, colon and semicolon. Colons and semicolons are grossly underused, and when they are used, they are often used incorrectly. Both colons and semicolons can substitute a period (and, with some restructuring, a comma); when used actively, they contribute to a more varied, free flowing text.

You should also know about the hyphens and dashes, and the correct usage of the apostrophe. Consult The Punctuation Guide for a great, authoritative source.

2.2 Color or colour?

Decide on whether to write British or American English (or Norwegian, for that matter). As you will see below, this will not only impact whether you write colour or color, but also have consequences for how you should typeset your document.

If you are in doubt about how to spell a word in your chosen English dialect, consult e.g. Lexico, Oxford International English or The British Council Foundation.

2.3 Don’t contract English words

Contractions – words such as it’s, can’t, that’ll and so on – make for an informal and easy flowing style of prose common in speech, but are out of place in academic texts. Therefore: Write do not instead of don’t, that will instead of that’ll, and so on.

Note that the genitive ending “-’s”, such as in Taylor’s theorem, is not a contraction, and is both appropriate and correct. Confer The Punctuation Guide for the correct usage of apostrophes.

2.4 Use dashes appropriately and correctly

2.4.1 The four different dashes

Our keyboards are equipped with a single dash symbol (“-”) which, when typed, usually produces a hyphen. There are at least three more dashes which you should know about.

- (a hyphen) typeset as - in TeX (text mode)
Hyphens are used to connect double names (such as Charles-Jean), to connect certain English words (such as part-time, well-known and one-half), and to divide words past the end of a line.
– (an en dash) typeset as -- in TeX (text mode)
The en dash (which is about the width of an N) is used to annotate ranges of numbers and to link names of distinct persons:
The proof of the Cauchy--Lipschitz theorem is found on pages 103--106.
— (an em dash) typeset as --- in TeX (text mode)
The em dash (which is about the width of an M) is used for a colon-like pause and in place of parentheses:
She had to stop typing---she was sick and tired of \TeX. Her keyboard---not exactly an ergonomical one---was very noisy.
Note that some style guides – mainly British, but also some US, Canadian, and all Norwegian ones – recommend a spaced en dash in place of the above unspaced em dash: She had to stop typing -- she was sick and tired of \TeX. Both The Chicago Manual of Style and the Oxford Guide to Style recommend the unspaced em dash, though.
− (a minus), typeset as - in TeX (math mode)
TeX treats minuses differently from the above dashes, and you should not interchange them.
-1 is a hyphen and a one, which is not the same as the negative number $-1$. We write ``$\sigma$-algebra'' and not ``$\sigma-$algebra''.

2.4.2 Automatic hyphenation

TeX automatically divides words at the end of a line according to a set of rules. The point at which a word is divided is also determined automatically, but sometimes you need to instruct TeX where to put a hyphen. The notation \- inserts a discretionary hyphen: For instance, auto\-matically will only divide the word “automatically” after “auto” (if at all). Putting the \- at the end of the word prohibits TeX from dividing the word at all.

2.5 Quotes and phrases

Your keyboard features several quotation marks, and only some of these will make TeX produce the correct output. Most languages also distinguish between opening and closing quotation marks (such as “ and ”, respectively), and these are encoded differently in TeX. For instance, single quotes are written as ` and ', and double quotes as `` and ''.

The actual usage of quotation marks differs widely between different languages. In British English, single quotes are used for quotations, and double quotes for nested quotations, like so:

`Listen, son', my father said, `don't cry ``wolf'' unless you mean it'.

Note that commas and periods that are not part of the original quote are placed outside of the quote – this is in contrast to American English (see below).

In American English, double quotes are used for quotations, and single quotes for nested quotations, like so:

``Listen, son,'' my father said, ``don't cry `wolf' unless you mean it.''

Note that commas and periods that are not part of the original quote are (somewhat illogically) placed inside of the quote – this is in contrast to British English (see above). All other marks, such as colons and semicolons, are placed outside of the quote (unless they are part of the original quote).

The \enquote command from the csquotes package automatically inserts the correct quotation marks based on the current language.