1

I'm using almost default settings, with Computer Modern as the main font; I have to stick to it as much as possible, and keep the preamble as short and simple as possible.
Up to now, I've been using (slanted) sans serif greek letters in math mode, in cmbright font-family, exactly as suggested in this answer (I copied my settings from it, then I somehow sorted out the uppercase problem).
Everything works great, I'm very happy with the results, but now I need to add also (slanted) bold sans serif greek letters (at least some of them).
I've been able to do this with cmss, following this other answer, but I'm not happy with the results; a MWE comparing the results:

\documentclass{article}
\usepackage[LGR,T1]{fontenc}
\usepackage{amsmath,etoolbox}

\DeclareSymbolFont{sfletters}{OML}{cmbrm}{m}{it}
\DeclareMathSymbol{\salpha}{\mathord}{sfletters}{"0B}
\DeclareMathSymbol{\sbeta}{\mathord}{sfletters}{"0C}
\DeclareMathSymbol{\sLambda}{\mathord}{sfletters}{'3}

\newcommand{\declaresfgreek}[2]{%
    \protected\csdef{sf#1}{\mathord{\text{\sfgreekfont#2}}}%
}
\newcommand{\sfgreekfont}{\usefont{LGR}{cmss}{m}{it}}% change the family
\declaresfgreek{alpha}{a}
\declaresfgreek{beta}{b}
\declaresfgreek{Lambda}{L}

\newcommand{\declarebsfgreek}[2]{%
    \protected\csdef{bsf#1}{\mathord{\text{\bsfgreekfont#2}}}%
}
\newcommand{\bsfgreekfont}{\usefont{LGR}{cmss}{bx}{it}}% change the family
\declarebsfgreek{alpha}{a}
\declarebsfgreek{beta}{b}

\begin{document}

\begin{equation*}
\salpha\ne\alpha\ne\sfalpha\ne\bsfalpha
\end{equation*}

\begin{equation*}
{\sLambda^\salpha}_\sbeta\ne{\varLambda^\alpha}_\beta%
\ne{{\sfLambda}^{\sfalpha}}_{\sfbeta}
\end{equation*}

\end{document}

One should get:

enter image description here

In my opinion:

  1. the greek fonts of cmss and cmbright are too different from one another; they can't be used together; I tried to show this fact in the first equation (cmbright ≠ cm ≠ cmss ≠ bold cmss);
  2. cmss doesn't cope well with superscripts and subscripts (because it's too thick!), while cmbright is great; actually, I find that cmbright gives an optimal sans-serif "translation" of the CM serif expression, while cmss is very far from it (cmbright ≠ cm ≠ cmss).

For some reason, I cannot simply "change the family" (as it is suggested in the comment to the code above; that bit has been copied from the second link) in \sfgreekfont and \bsfgreekfont to cmbright; my guess is that cmbright has not bold greek letters, but I'm no expert here, quite the opposite; by the way, in the cmbright package documentation they explain how to get bold greek, but I've not been able to sort things out for my specific needs.
So is there is any way to add a bold sans serif greek alphabeth in cmbright (or some other font family producing very similar results: not too heavy font-weight, fit for indexing, not messing too much with CM) to be used along with the default math settings?

0
4

MWEs

Since you significantly revised your question, I’ll significantly rewrite my answer.

The default sans-serif bold italic, Latin Modern Math, in LuaLaTeX:

\documentclass{article}
\tracinglostchars=2
\usepackage[math-style=ISO]{unicode-math}

\newcommand\mathvec[1]{\symbfit{#1}}
\newcommand\mathtensor[1]{\symbfsfit{#1}}

\begin{document}
\[ \alpha\beta\Gamma \ne \mathvec{\alpha\beta\Gamma} \ne \mathtensor{\alpha\beta\Gamma} \]
\end{document}

Latin Modern Math sample

Computer Modern Unicode Bright Bold Oblique in LuaLaTeX:

\documentclass{article}
\tracinglostchars=2
\usepackage[math-style=ISO]{unicode-math}

\setmathfont{Latin Modern Math}
\setmathfont{cmunbxo.otf}[range=bfsfit, Scale=MatchUppercase]

\newcommand\mathvec[1]{\symbfit{#1}}
\newcommand\mathtensor[1]{\symbfsfit{#1}}

\begin{document}
\[ \alpha\beta\Gamma \ne \mathvec{\alpha\beta\Gamma} \ne \mathtensor{\alpha\beta\Gamma} \]
\end{document}

CMU Bright sample

Sans Math fonts in PDFLaTeX:

\documentclass{article}
\tracinglostchars=2
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[OMLmathsfit,sfdefault=cmssm]{isomath}

\newcommand\mathvec[1]{\mathbfit{#1}}
\newcommand\mathtensor[1]{\mathsfbfit{#1}}

\begin{document}
\[ \alpha\beta\Gamma \ne \mathvec{\alpha\beta\Gamma} \ne \mathtensor{\alpha\beta\Gamma} \]
\end{document}

Sansmathfonts sample

Computer Modern Bright in PDFLaTeX:

\documentclass{article}
\tracinglostchars=2
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[OMLmathsfit,sfdefault=cmbr]{isomath}

\newcommand\mathvec[1]{\mathbfit{#1}}
\newcommand\mathtensor[1]{\mathsfbfit{#1}}

\begin{document}
\[ \alpha\beta\Gamma \ne \mathvec{\alpha\beta\Gamma} \ne \mathtensor{\alpha\beta\Gamma} \]
\end{document}

Computer Modern Bright font sample

Original Answer

You can use the \symbfsfit alphabet in unicode-math. This gets you the Mathematical Alphanumeric symbols 𝞪, 𝞫, 𝞬, etc. from your math font. You can also use \mathbfsfit, which gets you the Greek letters α, β, etc. from your bold italic sans-serif text font, unless you change it. (Since the default font does not contain Greek letters, you would need to pick one that does, such as CMU Sans.) The \sym... alphabets are really intended for single-letter symbols and the \math... alphabets for words in math mode.

The unicode-math package lets you change the \mathbfsfit font with \setmathsf[BoldItalicFont=cmunbxo.otf]{CMU Bright} and the \symbfsfit alphabet with \setmathfont[range=bfsfit]{cmunbxo.otf}. You can change only the Greek bold sans-serif italic letters with \setmathfont[range=bfsfit/{Greek,greek}]{cmunbxo.otf}. You could also declare new math font faces if you wanted.

In PDFLaTeX, you can use the \mathsfbfit command from isomath. This allows you to select the handful of sans-serif math fonts with a legacy 7-bit OML encoding. Other than CM Bright, these include Arev, Iwona, Kepler and LX fonts. See section 2.1.2 of the manual.

The mathastext package allows you to define a math version that loads Greek letters from an 8-bit LGR-encoded font. These are mostly from the Greek Font Society, and only Complutum is sans-serif.

You might also try \boldsymbol with the sans-serif italic symbol.

Without using a package, you could load an OML or LGR alphabet with \DeclareMathAlphabet, or load fontspec/LGR and use a wrapper such as

 \newcommand\mathbfsfit[1]{\textnormal{\sffamily\bfseries\upshape\selectfont #1}}
 \newcommand\mbfsfalpha{\mathbfsfit{α}}
7
  • Thanks for your answer, but I'm afraid I'm not able to fully understand it. It would be great to have a deeper understanding (thanks by the way for explaining the difference between \sym… and \math…), but I wouldn't know where to start. I will try to edit my question in order to be more clear. – atlantropa Sep 14 '20 at 20:56
  • @atlantropa If you can use LuaLaTeX, I recommend you load unicode-math and use \mbfsfitalpha or \symbfsfit{\alpha}. This will use the symbol from your math font, which should use the same weight as the other bold letters. – Davislor Sep 14 '20 at 21:00
  • 1
    @atlantropa If you need to use PDFLaTeX, the simplest solution is to load isomath. You might try \usepackage[OMLmathsfit, sfdefault=iwona]{isomath}. You might also try iwonal, iwonac, iwonalc, or zavm (Arev) for iwona. Add scaled= if you need it. – Davislor Sep 14 '20 at 21:04
  • Thank you very much for your help, I see you have understood the result I would like to achieve, and this last suggestion almost nails it. The problem is that I'm not sure I'm allowed to use this font-style; for the sake of style homogeneity, I have to stick to Computer Modern as much as possible; that's why I was thinking of Computern Modern Bright; btw, here they explain how to do bold greek, but unfortunately I'm not skilled enough to understand their explanation… – atlantropa Sep 14 '20 at 22:15
  • 1
    @atlantropa It’s good that you made the extra effort for clarity! I can relate. I wouldn’t worry about the question being closed. – Davislor Sep 15 '20 at 19:05

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