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

Input like "${t_2}^\circ\ce C$}" renders failed #2580

Closed
wkh1234 opened this issue Dec 9, 2020 · 2 comments
Closed

Input like "${t_2}^\circ\ce C$}" renders failed #2580

wkh1234 opened this issue Dec 9, 2020 · 2 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3 v3.1
Milestone

Comments

@wkh1234
Copy link

wkh1234 commented Dec 9, 2020

use https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

render:
image

I want render:

image

@dpvc
Copy link
Member

dpvc commented Dec 9, 2020

Thanks for the report. It turns out that this is due to an issue with autoloading tex extensions. When the mhchem extension is loaded to process the \ce, the space between \ce and C is lost, and the macro becomes \ceC, which is not defined. That is the source of the issue, here.

One solution would be to use \ce{C} rather than \ce C, and another would be to force mhchem to be loaded initially rather than autoloaded via

MathJax = {
  loader: {load: ['tex/mhchem']},
  tex: {packages: {'[+]': ['mhchem']}}
};

@dpvc
Copy link
Member

dpvc commented Dec 9, 2020

I have made a pull request to resolve the issue.

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 v3.1
Projects
None yet
Development

No branches or pull requests

2 participants