1 of 2
cfr
• 181.2k
• 12
• 248
• 480

If you don't mind cheating slightly, you can leverage bm's support for a second extra-bold maths version, heavy. Then you can use \hm rather than \bm as applicable. You could also set things up so that \bm is switched to be equivalent to \hm within the scope of some other font switch. But I'm not clear whether you want that or not.

The documentation for bm is a bit misleading. It says \hm will work if a heavy version is defined, adding that it is usually accessed as \heavymath. However, it does not also add that \hm will work only if this usual condition actually holds. So you need a \heavymath command for it to work. However, once you've sorted that, it just... works.

For example:

\documentclass{article}
%%% text fonts
\renewcommand\rmdefault{txr}
\newcommand\gmfamily{\fontfamily{mdugm}\selectfont}

%%% New math versions
\DeclareMathVersion{varnormal}
\DeclareMathVersion{heavy}
\newcommand\txmath{\mathversion{normal}}
\newcommand\txboldmath{\mathversion{bold}}
\newcommand\mdmath{\mathversion{varnormal}}
\newcommand\mdboldmath{\mathversion{heavy}}
\newcommand\heavymath{\mathversion{heavy}}

%%% Math symbol fonts
%%% some examples only
% Math letters from txfonts and mdugm
\SetSymbolFont{letters}{normal}{OML}{txmi}{m}{it}
\SetSymbolFont{letters}{bold}{OML}{txmi}{bx}{it}
\SetSymbolFont{letters}{varnormal}{OML}{mdugm}{m}{it}
\SetSymbolFont{letters}{heavy}{OML}{mdugm}{b}{it}
% Math operators
\SetSymbolFont{operators}{normal}{OT1}{txr}{m}{n}
\SetSymbolFont{operators}{bold}{OT1}{txr}{bx}{n}
\SetSymbolFont{operators}{varnormal}{OT1}{mdugm}{m}{n}
\SetSymbolFont{operators}{heavy}{OT1}{mdugm}{b}{n}
% Math symbols
\SetSymbolFont{symbols}{normal}{OMS}{txsy}{m}{n}
\SetSymbolFont{symbols}{bold}{OMS}{txsy}{bx}{n}
\SetSymbolFont{symbols}{varnormal}{OMS}{mdugm}{m}{n}
\SetSymbolFont{symbols}{heavy}{OMS}{mdugm}{b}{n}
% Large symbols
\SetSymbolFont{largesymbols}{normal}{OMX}{txex}{m}{n}
\SetSymbolFont{largesymbols}{bold}{OMX}{txex}{bx}{n}
\SetSymbolFont{largesymbols}{varnormal}{OMX}{mdugm}{m}{n}
\SetSymbolFont{largesymbols}{heavy}{OMX}{mdugm}{b}{n}

%%% Math alphabets, at most 16 families
%%% some examples only
\SetMathAlphabet{\mathrm}{normal}{OT1}{txr}{m}{n}
\SetMathAlphabet{\mathrm}{bold}{OT1}{txr}{bx}{n}
\SetMathAlphabet{\mathrm}{varnormal}{OT1}{mdugm}{m}{n}
\SetMathAlphabet{\mathrm}{heavy}{OT1}{mdugm}{b}{n}

\SetMathAlphabet{\mathit}{normal}{OT1}{txr}{m}{it}
\SetMathAlphabet{\mathit}{bold}{OT1}{txr}{bx}{it}
\SetMathAlphabet{\mathit}{varnormal}{OT1}{mdugm}{m}{it}
\SetMathAlphabet{\mathit}{heavy}{OT1}{mdugm}{b}{it}

\usepackage{bm}

\begin{document}

This is Times font. $a^2 + b^2 = c^2$. Math font
$\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0$
and bold math font
{\txboldmath$\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0$}
$\bm{\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0}$

\gmfamily\mdmath
This is Garamond font. $a^2 + b^2 = c^2$. Math font
$\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0$
and bold math font
{\mdboldmath$\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0$}
$\hm{\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0}$

\end{document}


cfr
• 181.2k
• 12
• 248
• 480