# Issues

Issue #213 resolved

# bm command does not work in beamer+texlive2012

Anonymous created an issue

I have Fedora 17 box with texlive-2012 installed. Everything works fine, but I have noticed one really annoying thing. All bold selections in math equations are gone from my beamer presentation!

Below is the simplest example

\documentclass{beamer} \usepackage{bm} \begin{document} \begin{frame}{} $\bm{j} \quad j$ \end{frame} \end{document}

There is no bold selection in the resulting PDF file.

At the same time boldmath works fine with article class

\documentclass{article} \usepackage{bm} \begin{document} $\bm{j} \quad j$ \end{document} Above code generate bold "j" as expected.

Any suggestions?

Did this used to work? I'm not sure it ever has, but before I dig backward through the versions would like your take.

The code

\documentclass{beamer}
\usepackage{bm}
\begin{document}
\begin{frame}{}
$\bm{j} \quad j$
\end{frame}
\end{document}


works with old versions of the TeX distribution and beamer. For instance I have PC with texlive 2007 and beamer 3.06 where above code produces correct output.

But in texlive 2012 with recent beamer bm command does not work.

I have compared the font list embedded in the pdf file obtaind after pdflatexing above example. For the texlive 2007 and beamer 3.06 file contains CMSSBX10 and CMSSI10, but for texlive 2012 with recent beamer it contains only CMSSI10.

1. Load accent-kerned CMSS directly (fixes issue #213)

The sansmathaccent package delays this until \AtBeginDocument, but this breaks the bm package.

Open question: should I fix the fact that the resulting output is upright not slanted in bold?

Thanks for fix. It works!

Upright is OK for me. In old beamer package bm command makes the letters upright too.

I think I would prefer slanted---otherwise documents would differ in their looks depending on whether it is beamer class articlw, which seems bad (think slides and exercises based on these slides).

And a stupid question: how do I "Load accent-kerned CMSS directly"?

and something else: is it expected that bm still works for Greek letters? Consider

\documentclass{beamer}
\usepackage{bm}
\begin{document}
\begin{frame}{}
$\bm{j} \quad j$\\
$\bm{\alpha} \quad \alpha$\\
\end{frame}
\end{document}


Sigh: I still need to work on this a bit more, I suspect.

OK, I've double-checked on this. I have backed-out loading sansmathaccent at all, as while it's a good idea the issue with bm is non-trivial. So I have to priorities existing documents: for people not using bm, loading sansmathaccent should be no issue.

I am the package author for sansmathaccent. I'm trying to rewrite it to be compatible with bm. I think I can do it in such a way that we end up with bold slanted letters. Were there any particular issues you noticed doing this that I should be aware of?

Provided bm works I am happy: as I've indicated in the comments, I had to back out the change because loosing bm may alter semantics, and I couldn't really risk that.

All right, I'm going to upload a corrected version of sansmathaccent in a couple of days.

A few notes:

The only way to get bm+sansmathaccent to really do what we want is to load the {pureletters} alphabet before we load the bm package. However, I don't want to do this if we're using the {professionalfonts} theme, because TeX only allows you sixteen math alphabets and this wastes one. So:

(1) I need to check to see if we are using pureletters in the middle of the preamble (right before bm is loaded). At present, this means that sansmathaccent contains a copy of lines 180-196 of beamerbasefont. Could these lines be moved into a command, so that we don't have to update beamerbasefont and sansmathaccent every time someone writes a new fonts package?

(2) The code that checks for {professionalfonts} just before bm is loaded needs the package filehooks; if filehooks.sty doesn't exist then sansmathaccent just loads {pureletters} right away. If we make beamerbasefont load sansmathaccent, then it's possible that someone using {professionalfonts} who doesn't have filehooks installed might find themselves with fewer free math alphabets than they expect. Is this worth worrying about?

I've moved the requested line to a new command \beamer@font@check. On the second item, the problem only arises if someone uses beamer with an updated sansmathaccent but no filehooks. That sounds like a pretty small subset of users, and you can always issue a warning to the log

\IfFileExists{filehooks.sty}
{\RequirePackage{filehooks}}
{\PackageWarning{sansmathaccent}{Could not find 'filehooks' package:
one math family may be consumed}%
}


or similar.

I just got the email from Rainer Sch\"opf that the new version of sansmathaccent has been uploaded to CTAN.

So once it is in TL I can switch back to auto-loading it?

That should work, yes.

One thing to be aware of: based on the bm package documentation it's clear that \bm{A} is supposed to produce a bold slanted A. So this is what happens under the new sansmathaccent. In beamer without sansmathaccent, \bm{A} produces a bold upright A--sansmathaccent will change the appearance of some documents, it's just we think it will change it to what it should have been all along.