tlienart/Franklin.jl

alignat LaTeX environment

blegat opened this issue · 2 comments

Is it be possible to have something similar to the alignat LaTeX environment working in Franklin pages ?
It works on Jupyer notebook but if I write

$$
\begin{alignat}{7}
3x_1 &&\; + \;&& 2x_2 &&\; - \;&&  x_3 &&\; = \;&& 1 & \\
2x_1 &&\; - \;&& 2x_2 &&\; + \;&& 4x_3 &&\; = \;&& -2 & \\
\end{alignat}
$$

it renders as

\[ \begin{alignat}{7} 3x_1 &&\; + \;&& 2x_2 &&\; - \;&& x_3 &&\; = \;&& 1 & \\ 2x_1 &&\; - \;&& 2x_2 &&\; + \;&& 4x_3 &&\; = \;&& -2 & \\ -2x_1 &&\; + \;&& 1x_2 &&\; - \;&& 2x_3 &&\; = \;&& 0 & \end{alignat} \]

hence as it seems giving up on rendering it with LaTeX

Do you have an error like the following in your browser console:

KaTeX auto-render: Failed to parse `
\begin{alignat}{7}
    3x_1 &&\; + \;&& 2x_2 &&\; - \;&&  x_3 &&\; = \;&& 1 & \\
    2x_1 &&\; - \;&& 2x_2 &&\; + \;&& 4x_3 &&\; = \;&& -2 &
\end{alignat}
` with  ParseError: KaTeX parse error: No such environment: alignat at position 8: 

Then that would suggest that your KaTeX version is too old.
You can check with (in your browser console):

> katex.version
"0.11.0"

(this is e.g. for the Franklin docs)

From the KaTeX Changelog it seems that alignat was introduced in v0.13.0.

Indeed, thanks for the help!