# MathJax Formulas

Add beautifully rendered math formulas to any slideshow presentation using the following:

1. MathJax Support
2. LaTeX & AsciiMath Widget

This guide documents MathJax Support via the MathJax plugin. MathJax is a JavaScript display engine for mathematics with support for LaTeX, MathML and other equation markup.

By default, this plugin is disabled. To enable this plugin for your presentation, see MathJax plugin activation.

#### Learn By Example

This PITCHME.md markdown snippet:

---

##### The Cauchy-Schwarz Inequality

$\left( \sum_{k=1}^n a_k b_k \right)^{\!\!2} \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$


Results in the rendering of the following slide:

#### Learn By Example within Snap Layouts

This PITCHME.md markdown snippet:

---

@snap[north span-100]
##### The Cauchy-Schwarz Inequality
@math
$\left( \sum_{k=1}^n a_k b_k \right)^{\!\!2} \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$
@mathend
@snapend


Note the addition of the @math and @mathend tags that wrap the standard MathJax syntax. These tags are required when rendering MathJax formulas within Snap Layouts.

#### MathJax Plugin Activation

mathjax : TeX-MML-AM_HTMLorMML-full


This setting not only enables the plugin, it also customizes the MathJax Configuration for your presentation. For example, the above setting activates the TeX-MML-AM_HTMLorMML-full configuration.

MathJax comes with a number of pre-defined and pre-compiled configurations that are supported by GitPitch. The list of configurations can be found here.

Once this property has been enabled, math formulas can be included on any slide.

#### MathJax Backticks Syntax

Sometimes the processing of certain math formula within PITCHME.md can result in incorrect rendering on slides. This is a known issue, see the following Reveal.js issue threads here and here for further details.

If a formula does not render as expected on your slides, try enclosing your formula in backticks. This will give the Markdown processor a better chance of rendering your formula correctly.