无法让粒子命名包显示粗体字体。mwe 如下。有点长,以显示排列。
\documentclass{article}
\usepackage{multicol,color,heppennames}
\usepackage{fontspec}
%
\setmainfont{STIX2Text}[Extension={.otf},
UprightFont={*-Regular},
BoldFont={*-Bold},ItalicFont={*-Italic},
BoldItalicFont={*-BoldItalic}]
%
\usepackage[math-style=ISO,mathrm=sym,mathit=sym,mathsf=sym,mathbf=sym,mathtt=sym]{unicode-math}
\setmathfont{STIX2Math}[Extension={.otf}]
\newcommand{\texcmd}[1]{\textcolor{red}{\texttt{\char`\\#1}}}
\begin{document}
Bold fonts in heppennames/hepparticles fail with \texttt{fontspec/unicode/lualatex}.
Using \texttt{symXXX} works:
$\symup B^\pm$, $B^\pm$, $\symsf B^\pm$,
$\symbfup B^\pm$, $\symbfit B^\pm$, $\symbfsf B^\pm$,
$\symsfit B^\pm$, $\symbfsfit B^\pm$, also greek works:
$\symbf\gamma$, $\symbfup\gamma$,
$\symbf{\widetilde{\chi}^0_1}$, and $\symbfup{\widetilde{\chi}^0_1}$.
No bold $\ell$: $\symbf\ell$ or upright $\ell$: $\symup\ell$. Below
are heppennames/hepparticles versions. Also looks like sans greek is not upright in
heppennames/hepparticles.
\section{\normalfont Normal font}
\begin{multicols}{2}{
\begin{itemize}
\item charged B meson\newline \texcmd{PBpm} $\Rightarrow$ \PBpm
\item photon\newline \texcmd{Pgg} $\Rightarrow$ \Pgg
\item lepton\newline \texcmd{Pl} $\Rightarrow$ \Pl
\item lightest neutralino\newline \texcmd{PSgxzi} $\Rightarrow$ \PSgxzi
\end{itemize}}
\end{multicols}
\section{\normalfont\itshape Italic font}
{\itshape
\begin{multicols}{2}{
\begin{itemize}
\item charged B meson\newline \texcmd{PBpm} $\Rightarrow$ \PBpm
\item photon\newline \texcmd{Pgg} $\Rightarrow$ \Pgg
\item lepton\newline \texcmd{Pl} $\Rightarrow$ \Pl
\item lightest neutralino\newline \texcmd{PSgxzi} $\Rightarrow$ \PSgxzi
\end{itemize}}
\end{multicols}}
\section{\normalfont\sffamily Sans font}
{\sffamily
\begin{multicols}{2}{
\begin{itemize}
\item charged B meson\newline \texcmd{PBpm} $\Rightarrow$ \PBpm
\item photon\newline \texcmd{Pgg} $\Rightarrow$ \Pgg
\item lepton\newline \texcmd{Pl} $\Rightarrow$ \Pl
\item lightest neutralino\newline \texcmd{PSgxzi} $\Rightarrow$ \PSgxzi
\end{itemize}
}\end{multicols}}
\section{Bold font}
{\bfseries
\begin{multicols}{2}{
\begin{itemize}
\item charged B meson\newline \texcmd{PBpm} $\Rightarrow$ \PBpm
\item photon\newline \texcmd{Pgg} $\Rightarrow$ \Pgg
\item lepton\newline \texcmd{Pl} $\Rightarrow$ \Pl
\item lightest neutralino\newline \texcmd{PSgxzi} $\Rightarrow$ \PSgxzi
\end{itemize}
}\end{multicols}}
\section{\itshape Bold italic font}
{\itshape\bfseries
\begin{multicols}{2}{
\begin{itemize}
\item charged B meson\newline \texcmd{PBpm} $\Rightarrow$ \PBpm
\item photon\newline \texcmd{Pgg} $\Rightarrow$ \Pgg
\item lepton\newline \texcmd{Pl} $\Rightarrow$ \Pl
\item lightest neutralino\newline \texcmd{PSgxzi} $\Rightarrow$ \PSgxzi
\end{itemize}
}\end{multicols}}
\section{\sffamily Bold sans font}
{\sffamily\bfseries
\begin{multicols}{2}{
\begin{itemize}
\item charged B meson\newline \texcmd{PBpm} $\Rightarrow$ \PBpm
\item photon\newline \texcmd{Pgg} $\Rightarrow$ \Pgg
\item lepton\newline \texcmd{Pl} $\Rightarrow$ \Pl
\item lightest neutralino\newline \texcmd{PSgxzi} $\Rightarrow$ \PSgxzi
\end{itemize}
}\end{multicols}}
\section{\normalfont\sffamily\itshape Italic sans font}
{\itshape\sffamily
\begin{multicols}{2}{
\begin{itemize}
\item charged B meson\newline \texcmd{PBpm} $\Rightarrow$ \PBpm
\item photon\newline \texcmd{Pgg} $\Rightarrow$ \Pgg
\item lepton\newline \texcmd{Pl} $\Rightarrow$ \Pl
\item lightest neutralino\newline \texcmd{PSgxzi} $\Rightarrow$ \PSgxzi
\end{itemize}
}\end{multicols}}
\section{\sffamily\itshape Bold italic sans font}
{\itshape\sffamily\bfseries
\begin{multicols}{2}{
\begin{itemize}
\item charged B meson\newline\texcmd{PBpm} $\Rightarrow$ \PBpm
\item photon\newline \texcmd{Pgg} $\Rightarrow$ \Pgg
\item lepton\newline \texcmd{Pl} $\Rightarrow$ \Pl
\item lightest neutralino\newline \texcmd{PSgxzi} $\Rightarrow$ \PSgxzi
\end{itemize}
}\end{multicols}}
\end{document}
修改了一些字体选择逻辑(并系统地输入 \symXXX)后......除了 \ell 以外都正常工作: