Configuration
To enable MathJax support, just set plugins.mathjax = true
in your theme _config.yml
file.
1
2
3
4# Plugins
plugins:
...
mathjax: true # options: true, false
TeX and LaTeX input
Please be noted that when you write Tex/LaTeX in Markdown files, you need to use escape characters to prevent certain signs from being processed by Markdown interpreter.
Input
1
2When $a \ne 0$, there are two solutions to \\(ax^2 + bx + c = 0\\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
Result
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
MathML input
Attention: please be noted that newline characters will be transformed to
<br>
tag by Markdown interpreter and this will interfere with MathML notation. Please write all MathML inline.
Input
1
2When<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>a</mi><mo>≠</mo><mn>0</mn></math>, there are two solutions to <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>a</mi><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo> <mi>b</mi><mi>x</mi><mo>+</mo> <mi>c</mi> <mo>=</mo> <mn>0</mn></math> and they are
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi>x</mi> <mo>=</mo><mrow><mfrac><mrow><mo>−</mo><mi>b</mi><mo>±</mo><msqrt><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></msqrt></mrow><mrow> <mn>2</mn><mi>a</mi> </mrow></mfrac></mrow><mtext>.</mtext></math>
Result
When , there are two solutions to and they are
AsciiMath input
Attention: please be noted that when you write AsciiMath in Markdown files, you need to use escape characters to prevent certain signs from being processed by Markdown interpreter.
Input
1
When \`a != 0\`, there are two solutions to \`ax^2 + bx + c = 0\` and they are<p style="text-align:center">\`x = (-b +- sqrt(b^2-4ac))/(2a) .\`</p>
Result
When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and they are
`x = (-b +- sqrt(b^2-4ac))/(2a) .`
Comments