Notes on using LaTeX for manuscripts: Difference between revisions

From csml-wiki.northwestern.edu
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 7: Line 7:
# Understand the difference between an end-of-sentence period and a period used in an abbreviation, and how LaTeX distinguishes these. A period after a lower-case letter is assumed to be the end of a sentence, and LaTeX needs to be told if this is ''not'' the case. So, 'et al.' must be typed as 'et al.\' unless it occurs at the end of a sentence. This is typically not true for 'i.e.' and 'e.g.' because those two abbreviations (at least in American English) are always followed by a comma: 'i.e.,' and 'e.g.,'<br>On the other hand, a period after a capital is assumed to be ''not'' the end of a sentence, and only needs special treatment if it actually is. Those cases are rare; a typical example would be the sentence 'See model A.' which must be entered as 'See model A\@.'<br>Note that the bibliography environment is exempt from these rules, so it is not necessary to write the '\' in 'Phys.\ Rev.\ Lett.\' (unless you use such a journal reference in the main text of your document). Of course, in practice, you should use [http://www.bibtex.org/ BibTeX] (see [[#bibtex|below]]) instead of creating a bibliography environment by hand.
# Understand the difference between an end-of-sentence period and a period used in an abbreviation, and how LaTeX distinguishes these. A period after a lower-case letter is assumed to be the end of a sentence, and LaTeX needs to be told if this is ''not'' the case. So, 'et al.' must be typed as 'et al.\' unless it occurs at the end of a sentence. This is typically not true for 'i.e.' and 'e.g.' because those two abbreviations (at least in American English) are always followed by a comma: 'i.e.,' and 'e.g.,'<br>On the other hand, a period after a capital is assumed to be ''not'' the end of a sentence, and only needs special treatment if it actually is. Those cases are rare; a typical example would be the sentence 'See model A.' which must be entered as 'See model A\@.'<br>Note that the bibliography environment is exempt from these rules, so it is not necessary to write the '\' in 'Phys.\ Rev.\ Lett.\' (unless you use such a journal reference in the main text of your document). Of course, in practice, you should use [http://www.bibtex.org/ BibTeX] (see [[#bibtex|below]]) instead of creating a bibliography environment by hand.
# For labels of equations, figures, tables, choose names that start with 'eq:', 'fig:', 'tab:', respectively. Also, use descriptive labels rather than labels of the form <tt>\label{eq:3}</tt> or <tt>\label{fig:1}</tt>.
# For labels of equations, figures, tables, choose names that start with 'eq:', 'fig:', 'tab:', respectively. Also, use descriptive labels rather than labels of the form <tt>\label{eq:3}</tt> or <tt>\label{fig:1}</tt>.
# Placement of labels: In a single displayed equation, put the <tt>\label</tt> command on the line immediately before the <tt>\end{equation}</tt> command. In a figure environment, place the label command immediately ''after'' the <tt>\caption{}</tt> command (not ''within'' the caption).
# Placement of labels: In a single displayed equation, put the <tt>\label</tt> command on the line immediately before the <tt>\end{equation}</tt> command. In a figure environment, place the label command immediately ''after'' the <tt>\caption{}</tt> command (not ''within'' the caption, and certainly not before it).


* <span id="bibtex">BibTeX</span>
* <span id="bibtex">BibTeX</span>

Revision as of 13:59, 16 May 2014

This is not a LaTeX manual. Instead, it's a list of topics that have come up repeatedly within our lab in the preparation of manuscripts.


  • Formatting
  1. Use a LaTeX-aware editor. A particularly powerful combination is Emacs + AUCTeX.
  2. Make sure to keep your LaTeX file cleanly formatted (i.e., human readable). When using AUCTeX (see above), take advantage of the LaTeX-aware paragraph rewrapping command (alt-q).
  3. Understand the difference between an end-of-sentence period and a period used in an abbreviation, and how LaTeX distinguishes these. A period after a lower-case letter is assumed to be the end of a sentence, and LaTeX needs to be told if this is not the case. So, 'et al.' must be typed as 'et al.\' unless it occurs at the end of a sentence. This is typically not true for 'i.e.' and 'e.g.' because those two abbreviations (at least in American English) are always followed by a comma: 'i.e.,' and 'e.g.,'
    On the other hand, a period after a capital is assumed to be not the end of a sentence, and only needs special treatment if it actually is. Those cases are rare; a typical example would be the sentence 'See model A.' which must be entered as 'See model A\@.'
    Note that the bibliography environment is exempt from these rules, so it is not necessary to write the '\' in 'Phys.\ Rev.\ Lett.\' (unless you use such a journal reference in the main text of your document). Of course, in practice, you should use BibTeX (see below) instead of creating a bibliography environment by hand.
  4. For labels of equations, figures, tables, choose names that start with 'eq:', 'fig:', 'tab:', respectively. Also, use descriptive labels rather than labels of the form \label{eq:3} or \label{fig:1}.
  5. Placement of labels: In a single displayed equation, put the \label command on the line immediately before the \end{equation} command. In a figure environment, place the label command immediately after the \caption{} command (not within the caption, and certainly not before it).
  • BibTeX
  • Journal-specific notes