Bold and italic at the same time (beamer)
Load a font that has the combination bf+it
, e.g.
\usepackage{lmodern}
\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}
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}
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).