Latex Support

Inline Math

Orgajs supports inline math with latex math delimiters.

If $$a^2=b$$ and \( b=2 \), then the solution must be either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].

With be rendered as follows.

If a2=ba^2=b and b=2 b=2 , then the solution must be either a=+2 a=+\sqrt{2} or a=2 a=-\sqrt{2} .

Latex Block

It also supports \begin commands.

\begin{equation}
x=\sqrt{b}
\end{equation}

Will be rendered

x=b\begin{equation} x=\sqrt{b} \end{equation}

Styling

@orgajs/rehype-latex is the plugin for handling latex. It uses katex underneath, so you will have to add the css link yourself in your website. Add the following to the head.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.css" integrity="sha384-ysFyB7Is//Q1JNgERb0bLJokXKM8eWJsjEutGvthoHtBilHWgbdmbYkQZdwCIGIq" crossorigin="anonymous">