Eliot's LaTeX Notes for Science Writing   [ACTIVE work in progress as of 2017 May 01!]

Potentially useful things to remember when typesetting/writing scientific documents in LaTeX


  • Units:
    • Always place a space between the unit and its number. Use a tilde (~) instead of a space character to make sure the unit always appears RIGHT NEXT to its number (not marooned on the other side of a line break).

    • Always match the italicization of your units to the surrounding text. In other words, DO NOT italicize units unless they are part of a section/region/line where all the text is italicized.
      → This means that if your units are in math mode (e.g., inside $$), you need to enclose them in something like \mathrm{} to make sure they are not italicized.
      → If you need math mode for superscripts/subscripts on your units, enclose the unit names in \mathrm{} (discussed above) or use math mode for those superscripts/subscripts. Example: kg m$^2$ s$^{-2}$

    • Angstrom units can be written with their own command: \AA. Don't place this one in math mode unless you want awkward italicized Angstroms.
      → WATCH OUT: For some reason, \AA eats the space after it, so insert one manually with a tilde (~) or thin space (\,). Example: ``6563~\AA~is my favorite wavelength.''

  • Numbers:
    • Put big numbers in math mode ($$) even in the middle of your text (not equation lines). Math mode does a better job of spacing sets of numbers (especially zeroes) so they are easier to read.

    • If you want a comma inside a number in math mode, place it inside curly brackets (like this: 1{,}000) to avoid the auto-space that would otherwise appear after it.

  • Chemistry:
    • Avoid italicizing chemical species (element symbols). If you need subscripts or superscripts on a letter, use math mode on ONLY the part you want subscripted/superscripted.
      Example: C$_2$H$_6$ or $\mathrm{C}_2 \mathrm{H}_6$.

  • Miscellaneous:
    • Use \textasciitilde to make a nice tilde (~).

    • For quotation marks, DO NOT use the typical double-quote character (shift-apostrophe or shift-' on most keyboards), as it will make opening quotes facing the wrong direction (and sometimes other awkward effects). Instead, place two graves in a row for opening quote (same key as tilde (~) on most keyboards, to the left of 1: `), and place two apostrophes (single quote marks, or ') for the closing quote.

    • Use a tilde (~) between "Figure" and its number or "Table" and its number to make sure those words do not get separated from their numbers by awkward line breaks: Figure~1 or Table~1