KaTex Shortcode

KaTeX shortcode let you render math typesetting in markdown document.

See KaTeX for more.

Code Example #

// Simple One

{{< katex [display] >}}\pi(x){{< /katex >}}

// Let's do formula

{{< katex [display] >}}
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
{{< /katex >}}

// Let's get complicated

{{< katex [display] >}}
\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }
{{< /katex >}}

Simple One

\[\pi(x)\]

Let’s do formula

\[f(x) = \int\_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi\]

Let’s get complicated

\[\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }\]

Display Mode #

The default display mode is inline. You can put any katex inline witht the text. Taking \(\pi(x)\) for example.

When display attribute is set. The katex element itself will be set with a display: block CSS style.

KaTex Shortcode was last edited on 2021-01-13 @16a6725 : update formatting