1

Can't get bold versions of fonts for the particle naming package to appear. mwe below. A bit long, to show the permutations.

\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}

Page 1 Page 2

After modifying some font selection logic (and systematically putting in \symXXX) am here... all but \ell kinda working: Kinda fixed Page 1 Kinda fixed Page 2

HNN
  • 85
  • 1
    There is no bold version for STIX2 Math. – egreg Feb 11 '18 at 08:59
  • I'm confused, then, by why $\symbf \gamma$ and $\symbfup\gamma$ are rendered as bold. One avenue I tried was in this post.... https://tex.stackexchange.com/questions/241382/how-can-i-set-the-boldmath-font-with-unicode-math ... somehow setting ranges of characters in the mathfont with text fonts. My attempts at parallel construction with the STIX 2.0 fonts generated a lot of error messages. – HNN Feb 11 '18 at 18:49
  • 1
    That’s a different thing. What you seem to want is respecting \boldmath, which can’t happen because STIX2 lacks a boldface version. – egreg Feb 11 '18 at 20:44
  • I used \bfseries, not \boldmath. I was able to modify some logic in hepparticles.sty to make everything but \ell work... somehow I feel like a clever unicode trick or two would get \ell working too... somewhere deep under the superficial commands all the font variations are getting mapped by unicode but the system fails for \ell. Wish I could get \ell following along with other stuff. – HNN Feb 11 '18 at 22:56
  • 3
    \bfseries has no influence on math typesetting. – egreg Feb 11 '18 at 22:58
  • Yes. Additionally, neither did \symbf on the hepparticles.sty aliases, because internal logic was overriding. I modified the internal logic, replacing \mathbf with \symbf etc, seems to kind of work. But \ell remains peculiar. – HNN Feb 11 '18 at 23:02
  • @HNN The package uses \boldmath internally. You aren't using it explicitly, maybe, but you'd need it to work for what you want here and it can't. More specifically, the package does \g@addto@macro\bfseries{\boldmath}, so that your use of \bfseries attempts also to switch to the bold version of maths. But there isn't one. – cfr Feb 12 '18 at 00:32
  • @cfr thanks, yes, in the end I've commented out that line, and then down a few lines I've re-worked the logic so that if \bfdefault is set, then commands like \symbf are used. For an innocent like myself, that STIX 2.0 can achieve bold math without a bold math font is confusing... that deep in the math glyphs are many bold characters, but, I guess, not a full set of math glyphs (like \ell, but I suppose, \pm, \neq, etc) is the learning experience of this exercise. – HNN Feb 13 '18 at 01:24
  • 1
    I'm voting to close this question as solved in comments – samcarter_is_at_topanswers.xyz Sep 26 '18 at 21:10

0 Answers0