In the following example, the \em is applied to the entire text "Hello, world!", although it should only be applied to "Hello":
\documentclass{article}
\begin{document}
\underline{\em Hello}, world!
% Can be fixed by adding an extra group:
% \underline{{\em Hello}}, world!
\end{document}
In the following example, the
\emis applied to the entire text "Hello, world!", although it should only be applied to "Hello":