TeX - LaTeX Asked on August 11, 2021
When using newpxmath
, the accents in math mode are always bold, regardless of whether the letter underneath is bold or not:
documentclass{article}
usepackage[T1]{fontenc}
usepackage{newpxtext}
usepackage{newpxmath}
begin{document}
centering
$hat{a}$ $tilde{a}$ $bar{a}$ $check{a}$ $dot{a}$ $acute{a}$ $grave{a}$ $breve{a}$
^a ~a =a v a .a 'a `a u a
textbf{^a ~a =a v a .a 'a `a u a}
end{document}
In the image above, the first line is math mode (medium), the second line is text mode (medium) and the third line is text mode (bold). It can be clearly seen that the accents in math mode are bold.
Is this a bug in newpxmath
or am I missing something?
Edit: It seems that the symbol font npxsy
is corrupt. If you create a font table with
documentclass{article}
usepackage[T1]{fontenc}
usepackage{newpxtext}
usepackage[scaled=1.042]{zlmtt}
usepackage{newpxmath}
usepackage{fonttable}
begin{document}
xfonttable{LMS}{npxsy}{m}{n}
pagebreak
xfonttable{LMS}{npxsy}{b}{n}
end{document}
you can see that the accents in slots 158–168 look the same in medium and bold weight. The other characters, however, have different medium and bold variants (as it should be).
(There is another unrelated bug: the symbol in slot 11 is mirrored in bold.)
Update: This issue has been fixed since newpx
version 1.423.
Version 1.423 (released 2021-05-31) of NewPX fixes the issue. From the README file
Changes in version 1.423
- Corrected weight of regular math accents, which were rendering in bold weight.
- Corrected the bold symbol circledivide in bold weight. (It was inexplicably mirrored.)
The OP's example now produces
(I've only added a couple of missing accents.)
The characters are taken from the font pxsys
(via a virtual font). Some time between 2019 and 2020, probably due to an error in assembling the fonts, the accents in pxsys
have become boldface.
While you wait for a fix, you can redefine the accents to use the operators
font (which newpx
tries to avoid for good reasons, but we're in an emergency here).
documentclass{article}
usepackage[T1]{fontenc}
usepackage{newpxtext}
usepackage{newpxmath}
usepackage{amsmath}
makeatletter
re@DeclareMathAccent{grave}{mathalpha}{operators}{"12}
re@DeclareMathAccent{acute}{mathalpha}{operators}{"13}
re@DeclareMathAccent{check}{mathalpha}{operators}{"14}
re@DeclareMathAccent{breve}{mathalpha}{operators}{"15}
re@DeclareMathAccent{bar}{mathalpha}{operators}{"16}
re@DeclareMathAccent{mathring}{mathalpha}{operators}{"17}
re@DeclareMathAccent{hat}{mathalpha}{operators}{"5E}
re@DeclareMathAccent{dot}{mathalpha}{operators}{"5F}
re@DeclareMathAccent{tilde}{mathalpha}{operators}{"7E}
re@DeclareMathAccent{ddot}{mathalpha}{operators}{"7F}
makeatother
begin{document}
centering
$hat{a}$ $tilde{a}$ $bar{a}$ $check{a}$ $dot{a}$ $acute{a}$
$grave{a}$ $breve{a}$ $ddot{a}$ $mathring{a}$
^a ~a =a v a .a 'a `a u a "a r a
textbf{^a ~a =a v a .a 'a `a u a "a r a}
end{document}
Correct answer by egreg on August 11, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP