Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Latest commit

 

History

History
57 lines (42 loc) · 1.36 KB

2015-08-10-mathjax-example.md

File metadata and controls

57 lines (42 loc) · 1.36 KB
title date
MathJax Example
2015-08-10 08:08:50 -0400

MathJax is a simple, yet powerful, way of including Tex/LaTex/MathML based mathematics in HTML webpages.

Usage

To enable MathJax support configure your _config.xml to:

  • Set kramdown as the Markdown parser.
  • Enable MathJax.

The version of MathJax enabled is v3.

An example setting for _config.xml is shown below:

markdown: kramdown
mathjax:
  enable: true
  combo: "tex-svg"
  tags: "ams"

Use $$ as delimiters to enable TeX math mode, both for inline and display (i.e. block) rendering.

Here is an example equation that is inline: $$a^2 + b^2 = c^2$$, where $$a$$, $$b$$, and $$c$$ are variables.

Here is a block rendering with no default equation numbering:

$$ \frac{1}{n^{2}} $$

And, below is a block using the \begin{equation} and \end{equation} LaTeX delimiters. This equation will be numbered in the ams and all setting for mathjax.tags.

$$ \begin{equation} \mathbf{X}{n,p} = \mathbf{A}{n,k} \mathbf{B}_{k,p} \label{test} \end{equation} $$

If equation numbering is turned on, we should see an equation number here: $$\eqref{test}$$.

An example using the {align} LaTeX environment is below. The first equation has a \notag directive.

$$ \begin{align} (x + y) (x - y) &= x^2 + xy - xy + y^2 \notag \\ &= x^2 - y^2 \end{align} $$