-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Strange bug with using \tag after \color #2643
Comments
I can reproduce the result, and yes, it does seem to be a bug. Thanks for the report. I will investigate further. |
OK, I figured it out. The tagging module keeps a stack of tagging information (as different environments are started and stopped), and it turns out that during the autoload of the Here is a configuration that I think will fix the issue for you. MathJax = {
startup: {
ready() {
const {AbstractTags, TagInfo} = MathJax._.input.tex.Tags;
const clearTag = AbstractTags.prototype.clearTag;
const startEquation = AbstractTags.prototype.startEquation;
AbstractTags.prototype.clearTag = function () {
clearTag.call(this);
this.currentTag.tagId = '';
}
AbstractTags.prototype.startEquation = function (math) {
this.history = [];
this.stack = [];
this.clearTag();
this.currentTag = new TagInfo('', undefined, undefined);
startEquation.call(this, math);
}
MathJax.startup.defaultReady();
}
}
} I will make a pull request that makes these changes for the next release. |
Thank you for the fix! |
Fully clear tagging on equation start. (mathjax/MathJax#2643)
This is with MathJax version 3.
In the source webpage, after this math display
I have this math display
On the rendered webpage, the second display shows a strange error
This seems a bug in MathJax.
The text was updated successfully, but these errors were encountered: