14

How can I make some text bold and italic at the same time (in the beamer class)? This example does not seem to work:

\documentclass{beamer}
\usetheme{Copenhagen}
\begin{document}
\frame{
    A number is \textbf{\textit{x}-smooth} if ...\\
    A number is \textbf{\emph{x}-smooth} if ...
}
\end{document}
14

Load a font that has the combination bf+it, e.g.

\usepackage{lmodern}

MWE

\documentclass{beamer}
\usetheme{Copenhagen}
\usepackage{lmodern}
\begin{document}
\frame{
    A number is \textbf{\textit{x}-smooth} if ...\\
    A number is \textbf{\emph{x}-smooth} if ...
}
\end{document} 

enter image description here

6

LaTeX gives you a hint:

LaTeX Font Warning: Font shape `OT1/cmss/bx/it' undefined
(Font)              using `OT1/cmss/bx/n' instead on input line 7.

and in fact if you use T1 the combination is available, add

\usepackage[T1]{fontenc}
3

The font shape combination bold/italic is also available if you use \usepackage{lmodern}.

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{bm}
\usetheme{Copenhagen}
\begin{document}
\frame{
    A number is \textbf{x-smooth} if ...\\
    A number is \textbf{\emph{x}-smooth} if ...\\
    A number is \textbf{$\bm{x}$-smooth} if ...
}
\end{document}

Note though, that if you write x-smooth the x should probably better be in math mode (imagine you need $x^2$-smooth or $\sin(x)$-smooth), so you could use \textbf{$\bm{x}$-smooth} for bold math (variables in math mode are automatically set in italics).

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.