# Problem with bold Greek font in math mode

I've searched and haven't found anything relevant to my particular question. Fonts and font management are complete mysteries to me and I'm working to learn more. I'm trying to improve the math fonts in mandi especially for vectors and tensors in accordance with ISO notation recommendations using the isomath package. The problem I'm having is that something, possibly in mandi, keeps me from simultaneously getting a correct \mathbf{\pi} and upright units, which are defined with \mathrm in mandi. I have no idea what's going on. Can someone explain what's causing this and suggest a fix? The units must be in upright \mathrm and I need the vector, tensor, and matrix letters from isomath.

Here is my MWE:

\documentclass{article}
\usepackage{mandi}
%\usepackage[OMLmathrm,OMLmathbf]{isomath} % This gives me correct \mathbf{\pi}, but italic \mathrm
\usepackage{isomath}                     % This gives me correct \mathrm in units, but incorrect \mathbf{\pi}

\begin{document}
\begin{align*}
\alpha              &= \lambda \\
\boldsymbol{\alpha} &= \boldsymbol{\lambda}
%\mbfitsansalpha     &= \mbfitsanslambda
\end{align*}

%\lipsum[1]
\begin{align}
&\tensorsym{T} \cdot \vectorsym{a} \\
&\mathbf{\pi}{\pi} \\
&\matrixsym{T} \\
&\mathbfit{I} \\
&\mathsfbfit{g}\left(\_,\_ \right)
\end{align}

$\mathsfbfit{a} = a^i \mathbf{e}_i = a^1\mathbf{e}_1 + a^2\mathbf{e}_2 + a^3\mathbf{e}_3$

Vector Symbols
$$\vectorsym{abcdefghijklmnopqrstuvwxyz}$$

Vector Symbols
$$\vectorsym{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$$

Tensor Symbols
$$\tensorsym{abcdefghijklmnopqrstuvwxyz}$$

Tensor Symbols
$$\tensorsym{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$$

Matrix Symbols
$$\matrixsym{abcdefghijklmnopqrstuvwxyz}$$

Matrix Symbols
$$\matrixsym{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$$

Galileo found that $$\mathsfbfit{g} \approx \acceleration{9.8}$$.

The magnitude of the ball's velocity is \velocity{5}.

\end{document}


The output is this (note the problem in equation (2):

My example was based on code from this answer:

https://tex.stackexchange.com/a/551063/218142

• Is there a reason for writing \mathbf{\pi} instead of \boldsymbol{\pi}? I ask this because your posting contains \boldsymbol{\alpha} and \boldsymbol{\lambda}, which is correctl; \mathbf{\alpha} and \mathbf{\lambda} would output something very different (and almost certainly entirely unwanted).
– Mico
Jul 4, 2020 at 5:54
• Not being an expert, I had no reason to think of that. The font situation is so confusing for me that I don't even know which options are native and which require third party packages. And while \boldsymbol{\pi} certainly works as I just discovered, I still can't explain why the other options break upright \mathrm letters in mandi. I can't seem to find an understandable explanation. Jul 4, 2020 at 15:18

One solution is to write

\usepackage[OMLmathbf]{isomath}


This will load an OML math alphabet, containing both Latin and Greek letters, for the \mathbf alphabet, but leave \mathrm unchanged. The OMLmathrm option would “work” if you actually load an upright OML-encoded font as \mathrm, but if your document has commands such as \mathrm{iff}, you might not like what it does.

As Mico brought up in the comments, you could also use \boldsymbol{\pi} rather than the commands from isomath. This would not give you an upright symbol for a constant vector, although it would be unusual to name a constant vector π.

Here is where I would ordinarily talk about how it’s better to use the modern toolchain, with Unicode instead of legacy 8-bit fonts, but unfortunately, as of July 2020, mandi is broken and does not compile with LuaLaTeX or XeLaTeX at all. (It uses \newcommand for certain names defined in the kernel, which should be renamed or changed to \DeclareRobustCommand.)

Another option is to typeset your units as \textnormal rather than \mathrm. Instead of dropping into math mode, you would use something like \textmicro if you need a Greek letter.

• I will try your solution. Thank you for letting me know about the problem with mandi. I'm currently revising it and will make the requested changes. I have no experience with either LuaLaTeX or XeLaTeX but I'm happy to provide compatibility. Jul 5, 2020 at 3:30
• @LaTeXereXeTaL Revising a package as a newbie is a challenge! One word of advice: avoid single-letter commands such as \C. They’re inherently ambiguous (Celsius? Coulombs?) and highly likely to cause conflicts with other packages. Jul 5, 2020 at 4:20
• @LaTeXereXeTaL I’d also like to request that you make a test case that uses unicode-math, and keep the package compatible. Jul 5, 2020 at 4:20
• I have zero knowledge of unicode anything but I'll research it. Commands such as \C may be non-negotiable because of the package's intended goals and audience. It's designed to teach as well as to aid productivity. While I'm not a TeX expert, I developed mandi over several years specifically to accomplish certain goals. An informed physics student knows C always stands for Coulomb and never for Celsius. There is no unit named Celsius; a deg symbol always accompanies a C or F temp. I checked with other similar packages and packages I use in my work to avoid the conflicts you note. Jul 5, 2020 at 4:40
• Okay I'm pretty sure I can fix the \C issue. Jul 5, 2020 at 5:30