With R Markdown, you can embed LaTeX and MathML equations directly into your document.
To embed a LaTeX equation inline, wrap it insdie dollar signs with a latex denotation such as: $latex equation $
For example, the following sentence:
Is produced by:
To display an equation and place it on it's own line (centered), use two dollar signs such as: $$latex equation $$
For example, to display the Taylor Series nicely:
Enter the following:
To insert MathML equations, wrap your equation inside a <math ...> </math> tag.
For example to display the Quadratic Formula:
Enter the following:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>x</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mo>−</mo>
<mi>b</mi>
<mo>±</mo>
<msqrt>
<mrow>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
<mo>−</mo>
<mn>4</mn>
<mi>a</mi>
<mi>c</mi>
</mrow>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mi>a</mi>
</mrow>
</mfrac>
</mrow>
</math>