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

Generated configuration is unusable #404

Closed
Travel9527 opened this issue Dec 10, 2019 · 1 comment
Closed

Generated configuration is unusable #404

Travel9527 opened this issue Dec 10, 2019 · 1 comment
Labels

Comments

@Travel9527
Copy link

Travel9527 commented Dec 10, 2019

MathJax.Hub.Config({
        extensions: ["tex2jax.js"],
        jax: ["input/TeX", "output/HTML-CSS"],
        tex2jax: {inlineMath: [ ['$','$'], ["\\(","\\)"] ],displayMath: [ ['$$','$$'], ["\\[","\\]"] ],processEscapes: true},
        "HTML-CSS": { availableFonts: ["TeX"] },
        TeX: {equationNumbers: {autoNumber: ["AMS"], useLabelIds: true}},
        "HTML-CSS": {linebreaks: {automatic: true}},
        SVG: {linebreaks: {automatic: true}}
    });

config=TeX-AMS-MML_HTMLorMML
@dpvc
Copy link
Member

dpvc commented Dec 10, 2019

If you mean the configuration created by the configuration conversion tool produces an error in MathJax v3, that is because your original configuration is also in error. The

autoNumber: ["AMS"]

property should be

autoNumber: "AMS"

(not an array). The converter tries to maintain your original values, and so has copied the array to the v3 configuration, as your original configuration indicated. In version 2, it turns out that the only checks on autoNumber where whether it was equal to "none" or equal to "all" (and anything else defaulted to "AMS"), so your incorrect configuration "worked", but only accidentally. In version 3, the value of the tags property (which is the v3 equivalent of autoNumber) is used as an index into an array of classes for the various numbering options, and so not using the correct value in v3 leads to an error. There should be a better error message, however.

In any case, the source of the problem is the error in your original configuration. If you remove the brackets form the original (or the converted configuration) it should work for you.

dpvc added a commit that referenced this issue Dec 10, 2019
dpvc added a commit that referenced this issue Jan 3, 2020
Better handling of undefined tag class.  #404
@dpvc dpvc added the fixed label Jan 17, 2020
@dpvc dpvc closed this as completed Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants