6

I need to typeset some variables in math mode that are bold and slanted. I tried to use \boldsymbol (\usepackage{amsbsy}) and \bm (\usepackage{bm}). However, neither of them work.

MWE:

\documentclass{beamer}
\usepackage[utf8x]{inputenc}
\usepackage[english]{babel}

\usepackage{amsbsy}

\usepackage{bm}

\begin{document}

\frame{
  \frametitle{Bold}

    \begin{itemize}
     \item $\boldsymbol{R}$ versus $R$
     \item $\bm{R}$ versus $R$
    \end{itemize}

}

\end{document}

The output is as following:

enter image description here

Any suggestions? What did I do wrong?

6
  • 1
    Are you getting any missing font shape warnings? Maybe there is no slanted bold – MaxNoe Jun 17 '15 at 7:07
  • @MaxNoe You're right. I get LaTeX Font Warning: Font shape `OT1/cmss/bx/it' undefined (Font) using `OT1/cmss/bx/n' instead on input line 20. This seems to be the problem. However, is there a work around? – phx Jun 17 '15 at 7:09
  • 3
    Which TeX distribution, and which version of beamer, do you use? (I have no problem with bold-italics under MikTeX2.9.) – Mico Jun 17 '15 at 7:10
  • 2
    Please update your packages. Both versions run for me, too. – LaRiFaRi Jun 17 '15 at 7:11
  • 2
    You did nothing wrong; the problem is that you have an outdated TeX Live. You can work around the problem by adding \usepackage{lmodern}. – egreg Jun 17 '15 at 7:52
6

I can reproduce the issue with TeX Live 2012, not with 2013.

Upgrading to a current TeX Live would be best. A workaround is available anyway:

\documentclass{beamer}
\usepackage[utf8x]{inputenc} % but utf8 would be better
\usepackage[english]{babel}

\usepackage{lmodern}
\usepackage{bm}

\begin{document}

\begin{frame}
\frametitle{Bold}

    \begin{itemize}
     \item $\boldsymbol{R}$ versus $R$
     \item $\bm{R}$ versus $R$
    \end{itemize}

\end{frame}

\end{document}

Loading amsbsy is useless, as bm clobbers the \boldsymbol command making it equivalent to \bm.

Avoid the \frame{...} syntax and favor

\begin{frame}
...
\end{frame}
2
  • Splendid. This works well. Concerning the TeX live distribution, I definitively have the 2013 version installed: This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian). – phx Jun 17 '15 at 8:03
  • But maybe not all the fonts! TeX Live is scattered into multiple sub packages in the ubuntu repos. Just install the current TeX Live from tug: tug.org/texlive – MaxNoe Jun 17 '15 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.