[texhax] \emph in
Heiko Oberdiek
heiko.oberdiek at googlemail.com
Sat Apr 9 00:54:07 CEST 2011
On Fri, Apr 08, 2011 at 11:48:35PM +0200, Wolfgang Lorenz wrote:
> While writing some kind of saving mechanism using the \edef macro I
> came to a point, at which I do not know further:
>
> Here is a rather minimal example of my problem:
>
> %%% edeftest.tex %%%
> \documentclass{book}
> \begin{document}
> \edef\e{\emph{text}}
> \end{document}
> %%% EOF %%%
>
> This short document gives an error message at line 3:
> > l.3 \edef\e{\emph{text}
Use \protected at edef\e{\emph{test}}, then LaTeX's
protecting mechanisms (\DeclareRobustCommand, \protect, ...)
have a chance.
Perhaps there is a better solution, but I don't know the
purpose of this exercise.
Yours sincerely
Heiko Oberdiek
More information about the texhax
mailing list