Sample Mathjax Post

MathJax Test article

HMFAYSAL OMEGA theme supports both inline and displayed equations via MathJax. The theme keeps MathJax turned off by default to improve page load speed. MathJax can be turned on from the post’s Front Matter YAML. Simply put the following statement in the post’s Front Matter YAML:

mathjax: true


Here are some examples collected from the MathJax page:

The Lorenz Equations

The Cauchy-Schwarz Inequality

A Cross Product Formula

The probability of getting (k) heads when flipping (n) coins is:

An Identity of Ramanujan

A Rogers-Ramanujan Identity

Maxwell’s Equations


Finally, while display equations look good for a page of samples, the ability to mix math and text in a paragraph is also important. This expression $(\sqrt{3x-1}+(1+x)^2)$ is an example of an inline equation. As you see, MathJax equations can be used this way as well, without unduly disturbing the spacing between lines.

In MathJax I use $$...$$ or (\begin{equation(*)}...\end{equation(*)} also works) for displayed equations and $....$ for inline equations. Take care of >,< and &, because they have special meanings in .html files. If your post/page is not displaying the equations properly, try to wrap the equations between {% raw %}...{% endraw %} tags.