Via KaTeX server side, oh yes!
Inline math is done with the dollar sign (and block math is done with two or more dollar signs (
$
) insane macro shortcut:My inline $\sqrt{1 + 1}$ is awesome.
which renders as:
My inline is awesome.
$$
):$$
\sqrt{1 + 1} \\
\sqrt{1 + 1}
$$
which renders as:
The sane version of inline math is a lower case and the sane version of block math is with an upper case
m
:My inline \m[[\sqrt{1 + 1}]] is awesome.
which renders as:
My inline is awesome.
M
:\M[[
\sqrt{1 + 1} \\
\sqrt{1 + 1}
]]
which renders as:
The capital vs lower case theme is also used in other elements, see: block vs inline macros.
In the sane syntax, as with any other argument, you have to either escape any closing square brackets or with the equivalent double open and close:
]
with a backslash \
:My inline \m[1 - \[1 + 1\] = -1] is awesome.
which renders as:
My inline is awesome.
My inline \m[[1 - [1 + 1] = -1]] is awesome.
Equation IDs and titles and linking to equations works identically to images, see that section for full details. Here is one equation reference example that links to the following insane syntax equation: Equation 7. "My first insane equation":
$$
\sqrt{1 + 1}
$$
{title=My first insane equation}
which renders as:
and the sane equivalent Equation 8. "My first sane equation":\M{title=My first sane equation}[[
\sqrt{1 + 1}
]]
which renders as:
Here is a raw one just to test the formatting outside of a
ourbigbook_comment
:Here is a very long math equation: