[Tex/LaTex] Beamer does not restore roman style for emph inside emph

beameremphasis

It seems that \em and \emph do not alternate between itshape and normal shape. How can this be restored?

Test case:

\documentclass{beamer}
\begin{document}
\frame{\em abc \emph{def \emph{ghi} jkl} mno}
\end{document}

With "article" it works as expected.

This is beamer 2011/09/12 development version 3.20.

Best Answer

beamerbaseoverlay.sty contains

\newcommand<>{\emph}[1]{{\only#2{\itshape}#1}}

so \emph only produces italic shape. However, \em is not changed and you can write

\documentclass{beamer}

\begin{document}
\frame{\em abc {\em def {\em ghi} jkl} mno}
\end{document}

giving

Sample output

which produces the shapes you expect, but is not overloaded with the overlay options beamer provides in its modified \emph. The overlay options mean that you can write \emph<3>{text} to print the text on all slides but italise it only on slide 3. If you are willing to forego this functionality and just want \emph to behave like {\em ...} then you can put

\renewcommand<>{\emph}[1]{{\em #1}}

in your preamble. Added: As you comment, the above may be combined to get the overlay behaviour via:

\renewcommand<>{\emph}[1]{{\only#2{\em}#1}}

As other posters note, often one would prefer to use beamer commands such as \alert for extra contrast in presentations.