Showdown extension to display math using KaTeX and LaTeX or AsciiMath
Special characters do not need escaping. katex-latex currently depends on jquery, but is intended to become independent.
intended to work alongside bootmark
You can customize what gets passed to the katex renderer by using the window.katex.config
object.
These are the dafault
{
displayMode: true,
throwOnError: false, //allows katex to fail silently
errorColor: '#00c2c9'
}
Maybe you want to disable displayMode
:
window.katex.config = {
displayMode: false
};
Check katex for more options.
in asciimath
```asciimath
x = (-b+-sqrt(b^2-4ac))/(2a)
```
x = (-b+-sqrt(b^2-4ac))/(2a)
in latex
```latex
\displaystyle{x}=\frac{{-{b}\pm\sqrt{{{b}^{2}-{4}{a}{c}}}}}{{{2}{a}}}
```
\displaystyle{x}=\frac{{-{b}\pm\sqrt{{{b}^{{2}}-{4}{a}{c}}}}}{{{2}{a}}}
They will both render the exact same thing. The examples will render correctly here.