\TeX\ is the best way to typeset mathematics. Donald Knuth designed \TeX\ 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.
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}$
.
\noindent Exponent or Superscript: $\mathrm{O^-}$
\noindent 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.
\noindent Bullet: CuCl $\bullet$ $\mathrm{7H_{2}O}$
\noindent Delta: $\Delta$
\noindent Reaction Arrows: $\longrightarrow$ or $\xrightarrow{solution}$
\noindent Resonance Arrows: $\leftrightarrow$
\noindent Reversible Reaction Arrows: $\rightleftharpoons$
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} (#eq:reaction) \end{equation}
We can reference this combustion of glucose reaction via Equation \@ref(eq:reaction).
$\mathrm{NH_4Cl_{(s)}}$ $\rightleftharpoons$ $\mathrm{NH_{3(g)}+HCl_{(g)}}$
\noindent $\mathrm{MeCH_2Br + Mg}$ $\xrightarrow[below]{above}$ $\mathrm{MeCH_2\bullet Mg \bullet Br}$
Many of the symbols you will need can be found on the math page https://web.reed.edu/cis/help/latex/math.html and the Comprehensive LaTeX Symbol Guide (https://mirror.utexas.edu/ctan/info/symbols/comprehensive/symbols-letter.pdf).
You will probably find the resources at https://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 (https://homepages.uni-tuebingen.de/beitz/txe.html). Be sure to read the proceeding chapter on graphics and tables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.