Bold slanted \lambda symbol not bold enough in Stix font family
Consider the following screenshot. In the upper half, the math-mode greek letters are shown first in normal, i.e., slanted and non-bold, form, followed by bold, upright, and bold-upright, for the XITS Math
math font. The normal and bold slanted variants of \lambda
do look very similar.
In the lower half, the same set of four math-greek letters is shown, but now for the Stix Two Math
math font. You'll notice right away that the regular and bold slanted-lambda glyphs look quite different.
\documentclass{article}
\usepackage{unicode-math}
\newcommand\blurb{\alpha\beta\gamma\delta\epsilon\zeta\eta%
\theta\iota\kappa\lambda\mu\nu\xi\pi\rho%
\sigma\tau\upsilon\phi\chi\psi\omega}
\begin{document}
\obeylines
\setmainfont{XITS}
\setmathfont{XITS Math}
XITS Math glyphs
$\blurb$
$\symbf{\blurb}$
$\symup{\blurb}$
$\symbfup{\blurb}$
\bigskip
\setmainfont{Stix Two Text}
\setmathfont{Stix Two Math}
Stix Two Math glyphs
$\blurb$
$\symbf{\blurb}$
$\symup{\blurb}$
$\symbfup{\blurb}$
\end{document}
There is no need to load bm
with stix
; the fonts come with bold letters that works with the standard \mathversion{bold}
and \boldsymbol
from amsmath
.
With PDFLaTeX, you can load a bold sans-serif math alphabet with isomath
. There are several options, including Computer Modern Bold and Arev.
\documentclass{article}
\usepackage{iftex}
\ifTUTeX
\usepackage{unicode-math}
\setmainfont{XITS}[Scale=1.0]
\setmathfont{XITS Math}[Scale=MatchLowercase] % Also loads STIX Math Bold.
\else
\usepackage{amsmath}
\usepackage{stix}
% sfdefault=zavm is Arev. sfdefault=cmbr is Computer Modern Bright.
\usepackage[sfdefault=cmbr]{isomath} % For \mathsfbfit
\newcommand{\mbfitsansalpha}{\mathsfbfit{\alpha}}
\newcommand{\mbfitsanslambda}{\mathsfbfit{\lambda}}
\fi
\pagestyle{empty} % For convenient cropping of the MWE.
\begin{document}
\begin{align*}
\alpha &= \lambda \\
\boldsymbol{\alpha} &= \boldsymbol{\lambda} \\
\mbfitsansalpha &= \mbfitsanslambda
\end{align*}
\end{document}
Compiled with PDFLaTeX, this gives:
With unicode-math
, this is even simpler: the package supports both \symbfit
and \symbfsfit
alphabets out of the box. The XITS Math font by Khaled Hosny additionally comes in a bold version.
The same MWE compiled with LuaLaTeX or XeLaTeX produces:
The range=
option of unicode-math
allows you to substitute the sans-serif math alphabet from any other math or Greek font. Here is an example of how to substitute the Greek sans-serif italic alphabet from STIX Two Math.
Unfortunately, as of 2020, range=
is not compatible with math versions, so you would have problems with \boldsymbol
. I therefore switch to \symbfit
.
\documentclass{article}
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{XITS}[Scale=1.0]
\setmathfont{XITS Math}
\setmathfont{STIX Two Math}[range=bfsfit/{Greek,greek}]
\pagestyle{empty} % For convenient cropping of the MWE.
\begin{document}
\begin{align*}
\alpha &= \lambda \\
\symbfit{\alpha} &= \symbfit{\lambda} \\
\symbfsfit{\alpha} &= \symbfsfit{\lambda}
\end{align*}
\end{document}
You're more likely to want to substitute a different bold italic lambda () symbol here, though, with range=\mbfitlambda
. This example adds a bit of FakeBold
to this one symbol:
\documentclass{article}
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{XITS}[Scale=1.0]
\setmathfont{XITS Math}
\setmathfont{XITS Math}[range=\mbfitlambda, FakeBold=1.1]
\pagestyle{empty} % For convenient cropping of the MWE.
\begin{document}
\begin{align*}
\alpha &= \lambda \\
\symbfit{\alpha} &= \symbfit{\lambda} \\
\symbfsfit{\alpha} &= \symbfsfit{\lambda}
\end{align*}
\end{document}
If you genuinely care about portability between isomath
and unicode-math
, \mathbfit
works in both packages if you give unicode-math
the option bfit=sym
, but the equivalent of \symbfsfit
in unicode-math
is \mathsfbfit
in isomath
.