-
Notifications
You must be signed in to change notification settings - Fork 196
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
Parse labels in LaTeX Math #202
Comments
If you would like to see this feature implemented leave a 👍 reaction on the comment above (see https://executablebooks.org/en/latest/feature-vote/) |
I use amsmath environment and equation labeling via \label{name} a lot so I'm definitely interested in this 😀. Here are some observations that I would like to share. In Latex, if an environment line
is rendered as: If I add this So only the environment as a whole is numbered, not the individual equations. I am new to JB but if I understand well, this is how sphynx behaves and I have not found info (yet) on how to get the numbering as in the regular Latex output. For parsing the labels, this is where it can be tricky. In Latex, a label can be added to each equation in multiline environments and these may be used separately in \ref{} statements, like in the example above. In JB, if only the whole environment is numbered, this cannot work well, even if there is only one label as it can reference the second equation for example. To be able to use amsmath environments and labels in my jupyter notebooks, I currently use the following workaround:
Using a python script, I then parse the myst markdown files and change all amsmath environments to myst directives with proper labels. Here is an example:
becomes
The python script also changes in the markdown file all the statement like \ref{mylabel} to roles like {eq} |
This issue has a lot of votes, but lacks the enhancement-label, hence it's not in that list. |
Hi, I wonder if there are some news about this problem. |
Setting ward for any enhancements |
Any updates...? I also concur that it is an important feature. |
To do this "properly" you really need access to a latex parser. |
So, any updates? |
Any action on this? It's a real issue for me as I convert all of my work from Rmarkdown to Jupyter-book. Thanks |
I've added the |
When #201 is merged, direct parsing of latex amsmath environments will be supported 😄
Currently, though it will not do anything with any environments containing
\label{name}
.It would be good to parse these in a way that they can be referenced correctly by e.g.
{eq}`name`
The text was updated successfully, but these errors were encountered: