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

Latex comment after "\end{equation}" ignored. #3210

Open
buhtz opened this issue Mar 30, 2024 · 1 comment
Open

Latex comment after "\end{equation}" ignored. #3210

buhtz opened this issue Mar 30, 2024 · 1 comment
Labels
Expected Behavior This is how MathJax works

Comments

@buhtz
Copy link

buhtz commented Mar 30, 2024

Issue Summary

Using your demo with this piece of code:

\begin{equation}                        % arbitrary environments,
x=\sqrt{b}                              % even tables, figures
\end{equation}                          % etc

Is rendered like this:

grafik

You see the "lost" % etc after the equation?

Technical details:

Your demo with current Firefox from latest Debian 11.

@dpvc
Copy link
Member

dpvc commented Mar 30, 2024

MathJax only processes TeX that is within math delimiters. In your case, those are the \begin{equation} and \end{equation}, so the % etc is outside of the mathematics, and MathJax does not handle that. It is part of the rest of the HTML document, so follows HTML rules, not TeX rules.

So that is the expected behavior from MathJax.

@dpvc dpvc added the Expected Behavior This is how MathJax works label Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expected Behavior This is how MathJax works
Projects
None yet
Development

No branches or pull requests

2 participants