engine: \pmb is amsbsy's poor man's bold, and there is a real one here - #155
Merged
Conversation
\pmb does not switch font. It typesets its argument THREE times, offset by a fraction of an ex, so the ink looks heavier: \def\pmb@#1#2{\setbox8\hbox{$\m@th#1{#2}$}… \mkern-.8mu\copy8 \kern\dimen@\mkern.4mu\raise\pmbraise@\copy8 …} (amsbsy.sty:40-57) It is the fallback the package offers when no bold math version exists. One exists here: the maths layer renders \boldsymbol, which is amsbsy's own real bold (\mathversion{bold}, amsbsy.sty:28). Aliasing \pmb to it gives the formula the thing \pmb was imitating instead of dropping it — 348 of the 4172 formulas the arXiv corpus drops are this one command. Measured over 200 arXiv papers and 200 beamer talks: 4 documents change and 2 repaginate (one closer to tectonic, one further) for +3373 glyphs of formulas that were absent. The page error against the 157 tectonic renders is 670 → 669. beamer does not move.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
\pmbdoes not switch font. It typesets its argument three times, offset by a fraction of an ex, so the ink looks heavier:It is the fallback the package offers when no bold math version exists. One exists here: the maths layer renders
\boldsymbol, which is amsbsy's own real bold (\mathversion{bold}, amsbsy.sty:28) and whichgo-tex/mathknows (parse.go:443).So
\pmb{x}now expands, on the maths retry path, to the thing\pmbwas imitating rather than costing the formula. 348 of the 4172 formulas the arXiv corpus drops are this one command.Measured — 200 arXiv papers, 200 beamer talks
4 documents change and 2 repaginate — one closer to tectonic (27 → 29 against 33), one further (17 → 18 against 17) — for +3373 glyphs of formulas that were simply absent. The page error against the 157 tectonic renders is 670 → 669. beamer does not move by one glyph.
Test
Added to
mathaliases_test.gobeside\mathdsand\Tilde:$\pmb{\alpha}+\pmb{x}$must render with neitherpmbnor\pmbin the skip tally. Fails onmainwithmap[\pmb:1].