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

Have physics package match nested parentheses, fix spacing issues (mathjax/MathJax#2760, mathjax/MathJax#2831) #773

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Feb 7, 2022

This PR causes nested delimiters to be handled properly (not closing the delimiters until the inner ones are also closed). It also fixes the spacing issue around the delimiters (the physics package prevents the stretchy delimiters from getting TeX class INNER, so I've removed the properties that cause setTeXclass() to mark it as INNER so that it will be handled as a normal mrow with an OPEN at the front and a CLOSE at the end). Also, some operators were being enclosed in mi rather than mo, producing the wrong spacing (e.g., in \div and \curl), so I've changed that as well to match the LaTeX output. Finally, an expression that is missing its final delimiter would produce a math input error, so I've added the missing error message so that the missing close delimiter will be reported.

This resolves issues mathjax/MathJax#2760 and mathjax/MathJax#2831.

@dpvc dpvc requested a review from zorkow February 7, 2022 17:01
@dpvc dpvc added this to the 3.2.1 milestone Feb 22, 2022
Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine. Only one minor request on a comment.

ts/input/tex/physics/PhysicsItems.ts Outdated Show resolved Hide resolved
@dpvc dpvc merged commit db04605 into develop Mar 10, 2022
@dpvc dpvc deleted the issue2760 branch March 10, 2022 14:29
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

Successfully merging this pull request may close these issues.

2 participants