-
-
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
valign not working on mglyph #2360
Comments
OK, it turns out that the In the meantime, you can use the following code <script>
MathJax = {
startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.input[1].postFilters.add((args) => {
args.data.walkTree((node) => {
if (node.isKind('mglyph')) {
const attributes = node.attributes;
if (attributes.isSet('valign')) {
const y = attributes.get('valign');
attributes.set('voffset', y.charAt(0) === '-' ? y.slice(1) : '-' + y);
}
}
});
});
}
}
}
</script> to post-filter the MathML input to look for |
I've made a pull request to resolve the issue. |
FYI |
Yes, the error occurred during the v3 rewrite. The name of the attribute was incorrectly entered in the v3 code. |
Fix mglyph attribute from offset to align. (mathjax/MathJax#2360)
I am using an svg (also tried an .png) as mglyph and it has to align with the descender line of the preceding character. Whatever value or unit I use, the glyph stays on the base line.
Ubuntu 19.10
Firefox 73.0.1
Chrome Version 80.0.3987.87 (Official Build) (64-bit)
See attached html and svg file. Note: I had to rename the files toto .txt because .svg and .html are not accepted as type. Please remove the .txt extension.
bugTest0.svg.txt
bugtest0.html.txt
The text was updated successfully, but these errors were encountered: