Here are four of the most common typesetting errors I see in books and articles created with LaTeX.
1) Quotes
Quotation marks in LaTeX files begin with two back ticks, ``, and end with two single quotes, ''.

The first “Yes” was written as
``Yes.''
in LaTeX while the one with the backward opening quote was written as
"Yes."
2) Differentials
Differentials, most commonly the dx at the end of an integer, should have a little space separating them from other elements. The “dx” is a unit and so it needs a little space to keep from looking like the product of “d” and “x.” You can do this in LaTeX by inserting \, before and between differentials.

The first integral was written as
\int_0^1 f(x) \, dx
while the second forgot the \, and was written as
\int_0^1 f(x) dx
The need for a little extra space around differentials becomes more obvious in multiple integrals.

The first was written as
dx \, dy = r \, dr \, d\theta
while the second was written as
dx dy = r dr d\theta
3) Multi-letter function names
The LaTeX commands for typesetting functions like sin, cos, log, max, etc. begin with a backslash. The command \log keeps “log,” for example, from looking like the product of variables “l”, “o”, and “g.”

The first example above was written as
\log e^x = x
and the second as
log e^x = x
The double angle identity for sine is readable when properly typeset and a jumbled mess when the necessary backslashes are left out.

The first example was written
\sin 2u = 2 \sin u \cos u
and the second as
sin 2u = 2 sin u cos u
4) Failure to use math mode
LaTeX uses math mode to distinguish variables from ordinary letters. Variables are typeset in math italic, a special style that is not the same as ordinary italic prose.

The first sentence was written as
Given a matrix $A$ and vector $b$, solve $Ax = b$.
and the second as
Given a matrix A and vector b, solve Ax = b.
Related posts:
Microsoft equation editor
Converting Excel tables to LaTeX
Typesetting music in LaTeX
Contrasting Word and LaTeX
Things that work best when you don’t notice them


{ 1 trackback }
{ 14 comments… read them below or add one }
Robert Talbert 02.15.10 at 08:27
I’d have to say the #1 LaTeX mistake is none of the above, but simply mismatching delimiters — whether it’s failing to match a parenthesis or other delimiter altogether, or matching it with the wrong kind. Example: \frac{1}{x).
I also am repeatedly guilty of forgetting to close off an environment properly, such as when I have nested enumerate environments (happens a lot to teachers who do this sort of thing for creating tests).
John 02.15.10 at 08:43
I recommend typing closing delimiters immediately after opening delimiters, then backing up to fill in the content in between. I almost always work this way, unless there is very little content between the delimiters.
I also recommend aligning LaTeX delimiters vertically, the way one would when writing C code, especially for delimiters like
\left(and\right)that might have a lot of content inside.mjm 02.15.10 at 08:45
The “double-backtick-double-apostrophe solution” to (1) has always bothered me. It looks just as irritating and amateurish as the problem it ”solves”. It was fine for a time when curly quotes were exotic, but today it feels like a hack.
A better way is to use real curly quotes. On the mac US keyboard layout, they’re option-[ and option-shift=[ (single quotes are under ]). I haven’t used windows in a while but the US-International keyboard layout used to be almost as usable as the mac layout.
If you use Emacs, AUCTeX lets you use the inch-mark ” just as you would in word-processing software and contextually switches it to “ before text and ” after (” with a second press if you are talking about inches). The config group tex-quote lets you configure this behavior and more. The csquotes package is helpful if you use different languages with different quoting habits – your source can contain “” and the result in French for example be typeset using «».
Is there any other TeX-authoring software that does this?
John 02.15.10 at 08:51
mjm: Certainly some TeX-authoring software will fix the quotes for you. My impression is that nearly all TeX software will do this for you. That doesn’t mean the mistake isn’t still common. Maybe people using a general-purpose text editor rather than software (or context-sensitive mode) specialized for TeX.
Jason Dyer 02.15.10 at 09:20
I’m guilty of #2, but I wasn’t writing a book or article either. Can you point me to a place to see this error “in the wild”?
Panos Ipeirotis 02.15.10 at 09:52
My own pet peeve is the incorrect use of the non-breaking space (the ~ character). I have seen countless times users putting a space before ~. For example, ‘in Section ~\ref{sec:blah}, we see…’ instead of ‘in Section~\ref{sec:blah}, we see…’. Or ‘John Smith ~\cite{smith}’ instead of the correct ‘John Smith~\cite{smith}’.
MATLABician 02.15.10 at 11:12
A number of mistakes come to my mind—some common and some subtle—too many to mention in the comments. I’ve put together some of them in a “LaTeX niceties” document here: http://matlabician.wordpress.com/latex-niceties.
Elton Carvalho 02.15.10 at 12:09
The problem with putting “the real” curly quotes in a .tex source would be portability. Not all editors use UTF-8, you see?
About differentials, aside the \, spacing, I prefer to write the d uptight, so I usually define a \newcoomand{\ud}{\mathrm{d}} and use it whenever I need a differential.
Matthias 02.15.10 at 22:27
The quotes problem can be solved by using the excellent package “csquotes” (see http://www.ctan.org/tex-archive/macros/latex/contrib/csquotes/ ). The basic command \enquote{text} typesets the correct quotation marks for the selected language automagically.
Dave Richeson 02.17.10 at 10:18
Great list.
I have my students write in Latex all the time. If I had to come up with my own list of mistakes my students make all the time I would definitely have included (3) and (4).
Two others that I would add are to use the letter x instead of \times, and the dual to your (4)—writing text in math mode. For example, \{x\in S: x>2 and x<4\} (the "and" should be plain text).
David Brown 02.17.10 at 12:43
One of my latex pet peeves: \colon vs. : (e.g. $f:X \to Y$ vs. $f\colon X \to Y$; the second moves the colon slightly to the left).
Mario 05.13.10 at 13:42
In my country we write quotes as ,,text” (here I used double comma and double apostrofe).
Integrals should be written as “\int_0^1f(x)\,\mathrm{d}x” for the d to be not italics.
John 05.13.10 at 15:00
Mario: One advantage of HTML over LaTeX in this context is that I assume browsers would render the HTML markup
Bob Carpenter 07.01.10 at 16:33
My biggest peeve is when people use math mode for italics. I’m currently reading Robert and Casella’s book’ Monte Carlo Methods in R, so I have to add using bit-mapped graphics (the graphics in that book are the worst I’ve ever seen in a book I’ve paid for).
When I wrote my first book in LaTeX (The Logic of Typed Feature Structures), the good folks at Cambridge University Press gave me a clinic on typesetting, with everything from kerning to laying out bottoms of spreads to be even. Once you learn more about typesetting, almost everything out there looks terrible. Especially egregious is all the wasted white space in most docs, especially vertically; CUP’s LaTeX cleanup crew actually reduced the length of my book substantially by tightening everything up.