5

for typsetting particles from physics the hepnames package is often used. After an upgrade to a win10 PC, I found that the symbols are not printing anymore - no error messages.

I use pdfLatex and found relating topics for

Here is my minimal example:

  \documentclass{report}
  \usepackage{hepnames}

  \begin{document}  

    \begin{itemize}
      \item $\Pneutron$ should give $\mathrm{n}$   %does not print
      \item $\Pfermion$ should give an $f$         %prints 
      \item $\APnue$ should give $\bar{\nu}$       %does not print
    \end{itemize}   

\end{document}

enter image description here

This is likely related to the italic font style. Using

\usepackage[italic]{hepnames}

will print all of the above examples.

This is however hardly a good fix for the package and will typeset all particle symbols in italic. Unfortunately pdflatex does not throw an error or a warning during compilation.

Any suggestions?

Best, Marc

6
  • your example works in texlive 2018 but not 2019 or 2020, so it should be possible to trace the differences and see what changed. I'll look later if no one else has answered (welcome to the site by the way and thanks for the nice minimal example) Apr 28 '20 at 8:51
  • @DavidCarlisle It's the change of NFSS: the detection code in hepnames doesn't 'know' up as a shape
    – Joseph Wright
    Apr 28 '20 at 8:51
  • @JosephWright that was my guess but was confused by it working in 2019, or perhaps my tl2019 install is not exactly standard anymore:-) Apr 28 '20 at 8:53
  • @DavidCarlisle we changed that already in tl2019. Apr 28 '20 at 9:04
  • @UlrikeFischer that would explain it... Apr 28 '20 at 9:09
8

The hepnames package relies on \updefault being n, but this has changed to up and n is now \shapedefault.

Fix:

\documentclass{report}
\usepackage{hepnames}
\usepackage{xpatch}

\makeatletter
\xpatchcmd\@HepConStyle
 {\edef\@upcode{\updefault}}
 {\ifdefined\shapedefault\edef\@upcode{\shapedefault}\else\edef\@upcode{\updefault}\fi}
 {}{}
\makeatother

\begin{document}

\begin{itemize}
\item $\Pneutron$ should give $\mathrm{n}$   %does not print

\item $\Pfermion$ should give an $f$         %prints

\item $\APnue$ should give $\bar{\nu}$       %does not print
\end{itemize}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.