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

v4 textmacros extension crash #3082

Open
pkra opened this issue Aug 10, 2023 · 3 comments
Open

v4 textmacros extension crash #3082

pkra opened this issue Aug 10, 2023 · 3 comments
Labels
Accepted Issue has been reproduced by MathJax team Merged Merged into develop branch Test Not Needed v4
Milestone

Comments

@pkra
Copy link
Contributor

pkra commented Aug 10, 2023

[Here's hoping I didn't (again) overlook an existing open issue.]

Using just https://cdn.jsdelivr.net/npm/mathjax@4.0.0-beta.3/tex-mml-chtml.js (or in my case, a basic nodejs setup), I get a crash for, e.g., \text{hello} (or \(\require{textmacros} \text{hello}\) on the client).

While the error is caught client-side as "Math Input error", the context menu lets me spy e.getProperty is not a function which seems to match nodejs where I get

TypeError: node.getProperty is not a function
          at Object.getProperty (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/NodeUtil.js:69:21)
          at ParseOptions.addNode (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/ParseOptions.js:51:39)
          at TextParser.copyLists (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/textmacros/TextParser.js:29:30)
          at TextParser.mml (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/textmacros/TextParser.js:19:14)
          at Object.internalMath (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/textmacros/TextMacrosConfiguration.js:40:100)
          at Object.internalMath (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/ParseUtil.js:127:49)
          at BaseMethods.HBox (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/base/BaseMethods.js:654:30)
          at CommandMap.parse (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/SymbolMap.js:108:22)
          at SubHandler.parse (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/MapHandler.js:33:32)
          at TexParser.parse (file:///[snip]/node_modules/mathjax-full/mjs/input/tex/TexParser.js:44:54)
@dpvc
Copy link
Member

dpvc commented Aug 10, 2023

Here's hoping I didn't (again) overlook an existing open issue

Nope, this is a new one. I can reproduce, and will look into it.

@dpvc dpvc added Accepted Issue has been reproduced by MathJax team Investigate v4 labels Aug 10, 2023
@pkra
Copy link
Contributor Author

pkra commented Aug 10, 2023

Thanks, Davide.

@dpvc
Copy link
Member

dpvc commented Aug 11, 2023

Found it. It was a bad last-minute edit on my part. The PR listed above fixes it.

dpvc added a commit to mathjax/MathJax-src that referenced this issue Aug 17, 2023
Fix bug with \text{} in textmacros package. (mathjax/MathJax#3082)
@dpvc dpvc added Test Not Needed Merged Merged into develop branch and removed Ready for Review labels Aug 17, 2023
@dpvc dpvc added this to the v4.0 milestone Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Merged Merged into develop branch Test Not Needed v4
Projects
None yet
Development

No branches or pull requests

2 participants