Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alignat LaTeX environment #1020

Closed
blegat opened this issue Apr 26, 2023 · 2 comments
Closed

alignat LaTeX environment #1020

blegat opened this issue Apr 26, 2023 · 2 comments

Comments

@blegat
Copy link

blegat commented Apr 26, 2023

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

@fkastner
Copy link
Contributor

fkastner commented Apr 26, 2023

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.

@blegat
Copy link
Author

blegat commented Apr 26, 2023

Indeed, thanks for the help!

@blegat blegat closed this as completed Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants