Chapter 2 Mathematics and Science

2.1 Math

 is the best way to typeset mathematics. Donald Knuth designed  when he got frustrated at how long it was taking the typesetters to finish his book, which contained a lot of mathematics. One nice feature of R Markdown is its ability to read LaTeX code directly.

If you are doing a thesis that will involve lots of math, you will want to read the following section which has been commented out. If you’re not going to use math, skip over or delete this next commented section.

2.2 Chemistry 101: Symbols

Chemical formulas will look best if they are not italicized. Get around math mode’s automatic italicizing in LaTeX by using the argument $\mathrm{formula here}$, with your formula inside the curly brackets. (Notice the use of the backticks here which enclose text that acts as code.)

So, \(\mathrm{Fe_2^{2+}Cr_2O_4}\) is written $\mathrm{Fe_2^{2+}Cr_2O_4}$.

Exponent or Superscript: \(\mathrm{O^-}\)

Subscript: \(\mathrm{CH_4}\)

To stack numbers or letters as in \(\mathrm{Fe_2^{2+}}\), the subscript is defined first, and then the superscript is defined.

Bullet: CuCl \(\bullet\) \(\mathrm{7H_{2}O}\)

Delta: \(\Delta\)

Reaction Arrows: \(\longrightarrow\) or \(\xrightarrow{solution}\)

Resonance Arrows: \(\leftrightarrow\)

Reversible Reaction Arrows: \(\rightleftharpoons\)

2.2.1 Typesetting reactions

You may wish to put your reaction in an equation environment, which means that LaTeX will place the reaction where it fits and will number the equations for you.

\[\begin{equation} \mathrm{C_6H_{12}O_6 + 6O_2} \longrightarrow \mathrm{6CO_2 + 6H_2O} \label{eq:reaction} \end{equation}\]

We can reference this combustion of glucose reaction via Equation (??).

2.2.2 Other examples of reactions

\(\mathrm{NH_4Cl_{(s)}}\) \(\rightleftharpoons\) \(\mathrm{NH_{3(g)}+HCl_{(g)}}\)

\(\mathrm{MeCH_2Br + Mg}\) \(\xrightarrow[below]{above}\) \(\mathrm{MeCH_2\bullet Mg \bullet Br}\)

2.3 Physics

Many of the symbols you will need can be found on the math page http://web.reed.edu/cis/help/latex/math.html and the Comprehensive LaTeX Symbol Guide (http://mirror.utexas.edu/ctan/info/symbols/comprehensive/symbols-letter.pdf).

2.4 Biology

You will probably find the resources at http://www.lecb.ncifcrf.gov/~toms/latex.html helpful, particularly the links to bsts for various journals. You may also be interested in TeXShade for nucleotide typesetting (http://homepages.uni-tuebingen.de/beitz/txe.html). Be sure to read the proceeding chapter on graphics and tables.