1

I use the package newpx with pdflatex (on Ubuntu 20.04, texlive installation), and I'm seeing a "glyph `section' undefined" error. Here's a minimal working example and the output:

\documentclass{article}

\usepackage{newpx}
\showoutput
\begin{document}
a b \S a b § a b

Palatino
\end{document}

enter image description here

Error log:

pdfTeX warning: pdflatex (file /usr/local/texlive/2023/texmf-dist/fonts/type1/public/newpx/zplr.pfb): glyph `section' undefined

I'm seeing many questions here reporting this problem (example 1, example 2). Some answers suggest to use \pdfinclusioncopyfonts=1 in the preamble. In my case this doesn't solve the problem. Moreover this comment says

\pdfinclusioncopyfonts is a work-around. [...] The real solution would be to correct the internal font names.

How to correct the internal font names, or how to check if they have any problems?

In my system I see only one installation of TeXGyrePagella and the fonts zplr used by newpx, so I don't understand what's meant with "internal font names".

Should I submit a bug to the maintainer of newpx?

For the record, this also happens with the newpxtext package, but I don't remember it happening a year ago.

6
  • 1
    I think this is a bug in the type1 version of the font and should be reported to the maintainer (lualatex works on your test file using the opentype font) Oct 3, 2023 at 14:50
  • Thank you @DavidCarlisle, I'll report the bug then.
    – pglpm
    Oct 3, 2023 at 14:53
  • 1
    @DavidCarlisle it is a bug. In ntx-ec-tlf.enc /section must be replaced by /uni00A7. Oct 3, 2023 at 15:25
  • 1
    To confirm what @UlrikeFischer wrote if you copy /usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/newtx/ntx-ec-tlf.enc to the directory with your document and change /section to /uni00A7 on line 163 then your document works as expected Oct 3, 2023 at 15:32
  • Thank you @UlrikeFischer ! I also confirm that the correction works. I wrote to M. Sharpe, the maintainer, to report the bug. I'll PS this detail.
    – pglpm
    Oct 3, 2023 at 15:34

1 Answer 1

1

When running pfbtopfa on zplr.pfb a low level PostScript error is raised.

So it's definitely a bug in the last version of zplr.pfb.

As a temporary workaround:

\documentclass{article}
\usepackage{newpx}

\ExplSyntaxOn
\NewCommandCopy\latextextsection\textsection
\RenewDocumentCommand{\textsection}{}
 {
  \str_if_eq:eeTF { \use:c { f@family } } { \familydefault }
   {
    {\fontfamily{qpl}\selectfont\latextextsection}
   }
   {\latextextsection}
 }
\ExplSyntaxOff


\begin{document}

a b \S a b § a b

Palatino

\textsf{a b \S a b § a b}

\end{document}

This uses TeX Gyre Pagella for the missing glyph, but only if the font family is the default one.

enter image description here

1
  • Thank you! I modified the ntx-ec-tlf.enc file directly as suggested by @ulrikefischer, and that solved the problem. But this is useful for people who don't have access to the texlive directory.
    – pglpm
    Oct 3, 2023 at 15:52

You must log in to answer this question.

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