Normally, only {\em foo} works, but that is ugly and can add whitespace
in some cases (such as at the start of a line). The solution for the
latter, {\em{}foo} is even uglier.
{\bgroup
\setbox\scratchbox\hbox{#1}%
\expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}
{\bgroup
\setbox\scratchbox\hbox{#1}%
\expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}
+
+% Allow \emph{foo} (and {\emph foo}, but that's not really needed).
+\definealternativestyle[emph][\em][]