DO’s and DON’Ts when typesetting a document

The following rules apply when using LaTeX2e…

  • In display math mode, use \[ ... \] instead of $$ ... $$.

$$... $$ is simply obsolete.

  • Use \textbf, \textit instead of \bf, \it.

\bf, \it are obsolete font selection commands. Under New Font Selection Scheme (NFSS), they should be replaced with \textbf, \textit. One immediate difference is that {\it\bf blabla} will not generate the composite effect of italic shape and bold series, while \textit{\textbf{blabla}} indeed produces bold italic fonts.

  • Put a tilde before references or citations, e.g., Jie~\cite{habit06}.

This prevents LaTeX from putting a line break between the word and the citation. Similar cases are: length~$l$, function~$f(x)$, etc.

  • Be cautious when changing the page margin and page layout.

Studies show that articles with approximately 66 characters per line are the most readable. Reading would become difficult if putting more and more texts into each line. That’s why you see articles are typeset in multiple columns in a newspaper.

  • Differentiate between text comma and math comma, e.g., type “for $x=a$, $b$, or~$c$” instead of “for $x=a,b$, or $c$”.

A line will not break at math comma. That is why sometimes you see an ugly math expression exceeding the right margin of your texts. Also there will not be a white space after the math comma. Hence, in $x=a,b$, the “b” character is so close to the comma, which is unpleasant.

  • Use \emph more often than \textit when you mean to emphasize a term or a phase.

You can easily change the layout of the emphasized content (such as to bold fonts instead of italic fonts) by redefining the \emph command. However, if you use \textit, you will meet a lot of hassles when you want to change the layout.

  • Put a backslash after a dot if the dot does not mean full stop.

Example: “Please see p.\ 381 for an illustration.” The backslash after “p.” reminds LaTeX that the dot does not mean the end of a sentence, so LaTeX will put a correct white space between the dot and the number 381. Usually the width of the white space is shorter than that between a full stop and the beginning character of the next sentence. More examples are “Mr.\ Xing”, “e.g.\”, and “i.e.\”.

(Corrected: Well, none of the above examples are correct… They should be: “p.~381”, “Mr.~Xing”, “e.g.,”, “i.e.,”. But I am sure that the principle itself is ok. Anyone has a good example?)

  • Note the difference between hyphen, en dash, em dash, and a minus sign.

Hyphen (-) connects the two parts of a compound word, such as in “anti-virus”. En dash (--) connects two numbers that define a range, such as in “pages 1--10”. Em dash (---) is a punctuation dash. And remember that when you write a negative number, embrace it by the dollar signs, e.g., $-40$.

  • Write ellipsis using \ldots instead of three dots.

The \ldots commands correctly typeset the spaces between two consecutive dots.


14 Responses to “DO’s and DON’Ts when typesetting a document”

  1. 1 mbork February 7, 2009 at 7:29 pm


    thanks for a nice post – it’s very good to educate people to use LaTeX correctly;). But I can’t completely agree with your hint about “Mr.\ Xing”, “e.g.\”, and “i.e.\”: you should rather write: “Mr.~Xing”, “e.g.,”, and “i.e.,”. This way, there won’t be a line break after “Mr.”, and e.g. & i.e. should be always followed by a comma.

    And one more hint: when you write down a theorem (which is usually typeset in italics), don’t write just “(“, “)”, “,”, “:” etc.; set all these punctuation signs in _Roman_ type, i.e., \textup{(}, \textup{,} etc. (When the argument of a command is just one non-letter character, you can write just \textup(, \textup, etc.). This way the punctuation in text will not be different from this in formulae, which looks rather ugly.


    • 2 Jie February 7, 2009 at 8:54 pm

      Hey, you are right. I messed up with \ and ~. I’ll have to correct my post. Thank you for pointing this out.

      As to the second issue: I am not sure if the punctuations in the theorems need specially typeset. So first of all, I myself don’t think, e.g., an italic parenthesis, ugly. Second, I have consulted a number of authoritative tutorials, such as lshort, and the examples are just typeset using the punctuation characters as is instead of \textup. So I suppose a Roman punctuation instead of italic punctuation is just a personal taste?

  2. 3 Swift Arrow February 8, 2009 at 1:12 am

    Another comment on the ~ and \. while using “.\ ” preserves the short space after the period, “.~ ” stops it from breaking. However, the unbroken space is still longer after the period, which is what we try to avoid by using .\ So which one’s better?

  3. 4 josephwright February 8, 2009 at 5:55 am

    Note that i.e. and e.g. are NOT always followed by a comma in UK English usage, and that it is also acceptable to write “Mr~However” with no full stop (at least in the UK).

  4. 5 mbork February 8, 2009 at 8:38 am

    Well, as for the Roman vs. italic punctuation—this is what I’ve found in AMS tutorials (and it agrees with my personal taste—an italic parenthesis itself is ok, but set just next to a Roman one looks really weird).

    As for the example of “\ “, a good one is bibliographies, where you often have things like “Proc.\ Amer.\ Math.\ Soc.” etc.—and you don’t want to prohibit linebreaking, nor to have huge spaces. An interesting thing is that TeX does _not_ make the space wider after a dot etc. after a _capital letter_. Therefore, when typesetting a sentence ending with, e.g., “… launched by NASA.” (example from The TeXbook, p.~74, Exercise 12.6), one should say, e.g., “… launched by NASA\null.” (the \null cancels the effect of the capital `A’) or “… launched by \mbox{NASA}.”


  5. 6 Stefan February 8, 2009 at 12:53 pm

    Shouldn’t it be “i.\,e.” and “e.\,g.”? In german typography, there is a small space between the parts of an abbreviation. How is this in english?

  6. 7 Jie February 8, 2009 at 3:41 pm

    Swift Arrow,

    Both “Mr.~Xing” and “Mr.\ Xing” yield the same result: The white space between “Mr.” and “Xing” has the normal width between two words in a sentence. The white space between two sentences has a longer width. The only difference between “Mr.~Xing” and “Mr.\ Xing” is that a line break may happen to the latter while it may never happen to the former.

  7. 8 Jie February 8, 2009 at 3:45 pm


    Thank you for pointing this out. At a matter of fact I don’t have too much knowledge on UK English. So basically what I am speaking and writing conforms to the American convention…

  8. 9 Jie February 8, 2009 at 4:34 pm


    I can not find an AMS tutorial talking about the punctuation issue. It would be good if you can provide a reference.

    The backslash in bibliography: I don’t know why, but I just don’t see any difference whether a backslash is there or not. I suspect that latex does something different for the thebibliography environment. My theory is that latex would never think a dot as the end of a sentence. Hence the width between a dot and the next character is just a normal white space width. That may also be the reason why bibtex explicitly puts the \newblock command when it typesets the bibliographies. The \newblock command adds some width there.

    The NASA case is good. Thanks.

  9. 10 Jie February 8, 2009 at 4:41 pm


    I am sorry I don’t know German. In English (at least American English), “e.g.” and “i.e.” are just like this—no extra space between the first dot and the next character.

    However, I am advised from somewhere else that I’d better avoid using “e.g.” and “i.e.” in academic writing, or make them into a latex macro in case I really need to. In the latter case I can easily change the layout of “e.g.” or “i.e.” in the macro, such as what you said, putting a small space between the first dot and the next character.

  10. 11 mbork April 14, 2009 at 10:09 am


    and sorry for answering a bit;) late.

    You can read about Roman punctuation in “Instructions for Preparation of Papers and Monographs. AMS-LaTeX”, in section entitled “Roman type”.


  11. 12 oxc November 3, 2010 at 7:17 am

    A good example for a non-ending dot would be a citation with multiple authors: “XY et al.\ propose …”

  12. 13 Yannai August 21, 2014 at 7:40 am

    Indeed, LaTeX assumes that dots end sentences, and so places a larger space after them; to avoid this (when a dot does not end a sentence), indeed a backslash should be placed before the space. “XY et al.\ prove…” is indeed a great example, and so it “i.e.\ bla” and “e.g.\ bla” in US English. Additional examples are “XYZ received his Ph.D.\ degree from …”, and “5th ACM Conf.\ on …”.

  1. 1 Consistent typography | Q&A System Trackback on December 9, 2011 at 3:10 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


Blog Stats

  • 264,575 hits

%d bloggers like this: