# \emph breaks soul's underline

\emph within soul's \ul leaves small gaps in the underline, their size varying depending on the font and whether there is a space after \emph.

\documentclass{article}

\usepackage{soul}

\begin{document}

\ul{a \emph{b} c}

%smaller
\ul{a\emph{b}c}

%tiny
\textsf{\ul{a \emph{b} c}}

%canceled
\ul{a \emph{b{\kern-.01em}} c}

\ul{a \emph{b }c}

\end{document}


It can be avoided by adding a kern or by moving the space, but this is quite impractical in real-life texts.

Is there any way to avoid the breaking of the line in these cases globally?

• It concerns the italic correction..Compare \ul{a {\itshape b} c} and \ul{a \textit{b} c}. – Steven B. Segletes Sep 18 '17 at 15:37
• See the documentation, page 14. You must set the italic correction explicitly: \ul{a \emph{b\/} c}. – Ulrike Fischer Sep 18 '17 at 15:46
• Thanks, I've found it now. But I don't understand it nonetheless: a \emph{b\/} c and a \emph{b} c are rendered completely identical in LaTeX (with Plain TeX there is a clear difference between a {\it b} c and a {\it b\/} c) -- can you explain what is happening here? And ideally how I get around it? I would have a lot of these cases to correct manually otherwise… – Florian Sep 19 '17 at 11:57