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

Macro \class fails to assign compound class to an element #2185

Closed
dainiak opened this issue Sep 5, 2019 · 3 comments
Closed

Macro \class fails to assign compound class to an element #2185

dainiak opened this issue Sep 5, 2019 · 3 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3.0

Comments

@dainiak
Copy link
Contributor

dainiak commented Sep 5, 2019

Using tex-svg.js, I’m trying to do this type of command: \class{reddish boldish}{e=mc^2} where say reddish and boldish are two CSS classes. That works fine in MathJax v2, but results in Math output error in MathJax v3. Trying \class{reddish}{\class{boldish}{e=mc^2}} results in an error as well. Trying \class{reddish}{{\class{boldish}{e=mc^2}}} produces an output, though it does not achieve what I want as it does not create a single element with two CSS classes simultaneously applied to it. Great overall work on v3 though, keep going!

@zorkow
Copy link
Member

zorkow commented Sep 6, 2019

Thank you!
And thanks for reporting this. I can confirm this. I get a Missing close brace error during TeX parsing.

In addition when switching on the a11y extension both expressions during semantic enrichment.

@zorkow zorkow self-assigned this Sep 6, 2019
@zorkow zorkow added Accepted Issue has been reproduced by MathJax team Upstream labels Sep 6, 2019
@zorkow
Copy link
Member

zorkow commented Sep 6, 2019

There's a couple of issues:

  • Parse error for \class{reddish}{\class{boldish}{e}}
  • Enrichment error for \class{reddish}{{e}} (but not for \class{reddish}{e}). SREs output is fine so it has to be in semantic-enrich.ts.
  • \class{reddish}{{e}} produces multiple class entries.

@dpvc
Copy link
Member

dpvc commented Sep 11, 2019

I added a pull request that addresses the original issue with multiple classes in the \class{} and nested \class{} calls, as well as the three issues Volker reported.

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 Fixed Test Needed v3.0
Projects
None yet
Development

No branches or pull requests

3 participants