9

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}

accents with newpx in math mode and text mode

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.

4
  • Something must have gone wrong in recent times, because an older version shows the expected output.
    – campa
    May 31, 2021 at 9:30
  • The characters are taken from the pxsys font. Some time between 2019 and 2020, the font has started to sport boldface accents. I guess an error in assembling the fonts.
    – egreg
    May 31, 2021 at 10:00
  • @egreg The accents are taken from the npxsy symbol font. But you are right, the font itself is corrupt, I have created font tables and the accents look the same in medium and bold weight. See my updated question.
    – user227621
    May 31, 2021 at 10:09
  • @user227621 npxsy is a virtual font.
    – egreg
    May 31, 2021 at 10:16

1 Answer 1

9

Update 2021-06-02

Version 1.423 (released 2021-05-31) of NewPX fixes the issue. From the README file

Changes in version 1.423

  1. Corrected weight of regular math accents, which were rendering in bold weight.
  2. Corrected the bold symbol circledivide in bold weight. (It was inexplicably mirrored.)

The OP's example now produces

enter image description here

(I've only added a couple of missing accents.)

Original answer

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}

enter image description here

6
  • Thanks! For the sake of completeness: I think the \dddot accent in slot 168 is also broken, but there is no similar accent in the operators font. (This is not a problem for me as I do not need this symbol.) Concerning the \ddddot accent in slot 222: It actually looks slightly different in medium and bold, but I'm not sure whether it is correct.
    – user227621
    May 31, 2021 at 10:56
  • Have you already notified the package author? If so, you could add that the symbol in slot 11 is also corrupt, it is mirrored in bold.
    – user227621
    May 31, 2021 at 13:16
  • @user227621 I'll do ASAP
    – egreg
    May 31, 2021 at 13:17
  • Thanks! (No need to rush, the workaround is fine for now.)
    – user227621
    May 31, 2021 at 13:25
  • @user227621 Maintainer notified. He's usually quite fast in replying and fixing bugs.
    – egreg
    May 31, 2021 at 13:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .