# [Tex/LaTex] Lualatex and bm package

bmboldluatexmath-mode

I've updated my latex packages yesterday and have now issues with lualatex. One problem arising for me now is, that lualatex does not print bold characters using the bm package.

When I compile the following MWE with pdflatex everything looks okay, but for lualatex it doesn't:

\documentclass{article}
\usepackage{bm}
\begin{document}
%
Bold $\bm{E}$
\\
Normal $E$
%
\end{document}


Output using pdflatex

using lualatex

Also trying to fall back to an earlier version of lualatex by using \RequirePackage{luatex85} does not work for me.

When having a look at the log file, there are the suspicious messages

LaTeX Font Info:    Redeclaring math alphabet \mathbf on input line 142.
LaTeX Info: Redefining \bm on input line 208.
[...]
Missing character: There is no х (U+0445) in font cmmi10!


Can anyone tell me, what is going on here and what I need to do to solve this problem, since I am quite sure lualatex and bm worked before?

UPDATE

The patch below has been incorporated into the distributed bm.sty 2016/07/07 v1.2b

Here is an update for bm in luatex using classic math font setup. It does not do the right thing for opentype math fonts with unicode-math (where it is not always clear what the right thing should be as most such setups do not include a bold font)

\documentclass{article}
\usepackage{bm}

\makeatletter
\def\bm@test@token#1{%
\let\bm@next\@empty
\ifx#1\@@end
\else\ifx#1\mathchoice
\let\bm@next\bm@mathchoice
\else\ifx#1\mathchar
\afterassignment\bm@mathchar\count@
\else\ifx#1\mathaccent
\afterassignment\bm@mathaccent\count@
\else\ifx#1\delimiter
\afterassignment\bm@delimiter\count@
\else\ifx#1\mkern
\bm@register#1{\muskip\z@}%
\else\ifx#1\kern
\bm@register#1\skip@
\else\ifx#1\penalty
\bm@register#1\count@
\else\ifx#1\unvcopy
\else\ifcat\noexpand#1\relax
\xdef\meaning@{\meaning#1}%
\expandafter\bm@mchar@test\meaning@""""\@nil#1%
\else\ifcat.\ifcat a#1.\else#1\fi
\count@\mathcode#1\relax
\ifnum\count@=\mathcode\'%
\begingroup\uccode\~#1\uppercase{\endgroup
\def\bm@next{\bm@expand~}}%
\else
\ifx\bm@previous\left
\count@\delcode#1\relax
\bm@delimiter
\else
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifnum\count@>"8000
\Umathcharnumdef\@tempa\count@
\xdef\meaning@{\meaning\@tempa}%
\expandafter\bm@mchar@test\meaning@""""\@nil\@tempa
\else
\bm@mathchar
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fi
\fi
\else
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\bm@next}
\makeatother

\begin{document}
%
Bold $\bm{E\left(\frac{A}{B}\right)}$
\\
Normal $E\left(\frac{A}{B}\right)$
%
\end{document}
`