-
-
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
\ncong and \overrightarrow not typeset properly #2497
Comments
Thanks for the report. The first issue (with <script>
MathJax = {
startup: {
ready() {
if (MathJax.version === '3.0.5') {
const MapHandler = MathJax._.input.tex.MapHandler.MapHandler;
const Symbol = MathJax._.input.tex.Symbol.Symbol;
MapHandler.getMap('AMSsymbols-mathchar0m0').add('ncong', new Symbol('nconfg', '\u2247'));
MathJax.startup.defaultReady();
}
}
}
};
</script> before the script that loads the MathJax component you are using in order to fix the errant definition. The second issue, with <script>
MathJax = {
startup: {
ready() {
if (MathJax.version === '3.0.5') {
MathJax.startup.defaultReady();
delete MathJax.startup.output.font.remapChars.accent[0x2192];
}
}
}
};
</script> Of course, you can combine these two into one configuration: <script>
MathJax = {
startup: {
ready() {
if (MathJax.version === '3.0.5') {
const MapHandler = MathJax._.input.tex.MapHandler.MapHandler;
const Symbol = MathJax._.input.tex.Symbol.Symbol;
MapHandler.getMap('AMSsymbols-mathchar0m0').add('ncong', new Symbol('nconfg', '\u2247'));
MathJax.startup.defaultReady();
delete MathJax.startup.output.font.remapChars.accent[0x2192];
}
}
}
};
</script> |
Fix mapping of \ncong (mathjax/MathJax#2497)
Don't remap stretchy characters (mathjax/MathJax#2497)
Thank you! |
OK, here is an updated configuration that takes care of that as well. <script>
MathJax = {
startup: {
ready() {
if (MathJax.version === '3.0.5') {
const MapHandler = MathJax._.input.tex.MapHandler.MapHandler;
MapHandler.getMap('AMSsymbols-mathchar0m0').lookup('ncong')._char = '\u2247';
MapHandler.getMap('macros').lookup('vec')._args = ['20D7'];
MathJax.startup.defaultReady();
delete MathJax.startup.output.font.remapChars.accent[0x2192];
}
}
}
};
</script> It is slightly simpler than the earlier one as well. |
Fixed in v3.1 released today. |
Issue Summary
Mathjax typesets \ncong and \overrightarrow{ab} differently from Latex.
\ncong: in Latex whole \cong is crossed out, while in Mathjax only = is crossed out (which has different meaning)
\overrightarrow{ab}: the arrow above is short, equivalent to \vec{ab}, Latex would make the arrow span from left to right boundary of the (imaginary) box containing ab
Note: if the argument of the command gets longer, it will start working properly
Mathjax:


Latex:
Technical details:
The text was updated successfully, but these errors were encountered: