-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix \pmb #1924
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
Fix \pmb #1924
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1924 +/- ##
=======================================
Coverage 93.17% 93.17%
=======================================
Files 79 79
Lines 4892 4892
Branches 861 861
=======================================
Hits 4558 4558
Misses 294 294
Partials 40 40
Continue to review full report at Codecov.
|
|
Thanks for investigating this! Does this mean that |
|
I agree that the long term solution is to fix When PR #768 rewrote It's possible that And we need to remember why PR #768 was written in the first place. Prior to that PR, in math that contained a tall element, the HTML font ascent and line height distances would occasionally create something that looked like a large margin above the KaTeX rendering. PR #768 fixed that problem by putting the math into a If CSS flex doesn't work, I have one more idea to try. Remember I said that "Safari refused to render a zero-width span". That may be fixable by declaring |
src/macros.js
Outdated
| // The version in ambsy.sty works by typesetting three copies of the argument | ||
| // with small offsets. We use two copies. We omit the vertical offset because | ||
| // of rendering problems that makeVList encounters in Safari. | ||
| defineMacro("\\pmb", "\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about MathML output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ronkok Currently MathML is used for accessibility, and I think it'd be better to render only once, maybe with \mathbf like before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, MathML is currently used only for accessibility, but that will only be true until #1928 is resolved. More importantly, \mathbf is currently ineffective in KaTeX MathML. You can verify this by looking at the entry for \pmb in http://webmathcomparison.net/#p.
I haven't yet investigated why this occurs, but I suspect some sort of bug similar to what I address in PR #1929, which applies classes such as \mathbin in MathML.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ylemkimon I have revised the MathML as you requested, using \mathbf. So this PR can be merged. But I consider the larger matter unfinished at least until \mathbf works in MathML.
Fixes issue #1873.