# Latex Support

## Inline Math

Orgajs supports inline math with latex math delimiters.

.css-1eexste{font-family:Menlo,monospace;font-size:14px;}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 $a^2=b$ and $b=2$, then the solution must be either $a=+\sqrt{2}$ or $a=-\sqrt{2}$.

## Latex Block

It also supports \begin commands.

$$x=\sqrt{b}$$

Will be rendered

$$$x=\sqrt{b}$$$

## 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">