[Tex/LaTex] Understanding cryptic latex errors: font shape undefined

fontslatin-modernxetex

I have a couple of errors in my log about LatinModernMath fonts.

LaTeX Font Warning: Font shape `TU/LatinModernMath(1)/bx/n' undefined
(Font)              using `TU/LatinModernMath(1)/m/n' instead on input line 225

LaTeX Font Warning: Font shape `TU/LatinModernMath(2)/bx/n' undefined
(Font)              using `TU/LatinModernMath(2)/m/n' instead on input line 225

How do I find out which file those lines belong to? It's a really big document with lots of math split in several files (merged with \include), I'd like to check if the shape it's falling back to is ok, but I have no idea what to look for.

I'm using xelatex with unicode-math, main font Minion, math font Latin Modern Math.

Best Answer

The warning is telling you that there is no bold latin modern math and so it's using the normal weight one instead. Note that math fonts need to be set up in advance so you will get this warning even if you do not use any bold fonts in math unless you explicitly disable setting up of bold math

Bold symbols accessed via \symbf does not require a bold font, it instead takes the bold characters from the bold mathematical characters in the Unicode mathematical characters block. That's the main reason a new command was introduced instead of \mathbf which does require a bold font. \symbf changes the character number of the character to be accessed rather than changing the font. So the warning does not affect \symbf but would for example mean that \boldmath (or the AMS \boldsymbol) will produce normal weight not bold.