Syntax and configuration to render math elements with the theme
# Enable Math Rendering
In your FrontMatter for the page set
math=true
# Choose your math library
In your configuration file you can switch between mathjax
or katex
as your favourite math rendering library by changing the string value of math_library
in the params
section.
# Insert math code in your post
You can use the standard Latex syntax for inline mode and display mode:
This code:
When \\(a \\ne 0\\), there are two solutions to \\(ax^2 + bx + c = 0\\) and they are:
renders as:
When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are:
While this:
...and they are: $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
renders as:
…and they are: $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
Comments
Nothing yet.
Say something