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

\newenvironment should allow unmatched groups in the begin and end substitutions #793

Closed
dpvc opened this issue Apr 19, 2014 · 2 comments

Comments

Projects
None yet
1 participant
@dpvc
Copy link
Member

commented Apr 19, 2014

Currently, \newcommand{env}{begintext}{endtext} checks if the \end{env} matches the \begin{env} before processing the endtext. That means that

\newenvironment{broken}{\left(}{\right)}

will throw an error because the \end{broken} will try to match the \begin{broken} but will see the \left( instead. The \right) should be performed first, then the check to see if the \end matches the \begin.

@dpvc dpvc added the Accepted label Apr 19, 2014

dpvc pushed a commit to dpvc/MathJax that referenced this issue Apr 20, 2014

Davide P. Cervone
Make \newenvironment perform the end substitution BEFORE testing if \…
…end matches the corresponding \begin. This allows \newcommand to use \begin and \end in the substititions. Resolves issue mathjax#793.

@dpvc dpvc added this to the Bugfix Version milestone Apr 20, 2014

dpvc pushed a commit to dpvc/MathJax that referenced this issue Apr 21, 2014

@dpvc

This comment has been minimized.

Copy link
Member Author

commented Apr 21, 2014

=> Merged.

@dpvc dpvc added Merged and removed Ready for Review labels Apr 21, 2014

@dpvc dpvc closed this Apr 21, 2014

dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Apr 22, 2014

@dpvc

This comment has been minimized.

Copy link
Member Author

commented Apr 22, 2014

=> In Test Suite.

LaTeXToMathML/macro/issue793.html

@dpvc dpvc added v2.4 and removed Merged labels Jun 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.