# What is the canonical way to redefine the \emph command

Question says it all. What is the best way to redefine the \emph command to be bold font and upright?

-

Since \emph uses \em, I would redefine \em.

Here's such a redefinition which preserves the ability to toggle between bold and normal, if nested:

\makeatletter
\DeclareRobustCommand{\em}{%
\@nomath\em \if b\expandafter\@car\f@series\@nil
\normalfont \else \bfseries \fi}
\makeatother


Test of nesting behavior of \emph:

Question: \emph{What is the way to redefine the \emph{\textbackslash emph} command?}


-
@Stefan: +1 for reminding me of \em's toggling ability. –  lockstep Dec 8 '10 at 19:41
I'm not sure if it makes any sense to use normal font to emphasise something inside bold text... –  Jukka Suomela Dec 8 '10 at 19:48
Note that the toggling is somewhat modified by fixltx2e so that in an italic context, \em produces \eminnershape (by default this is \upshape to give the original behaviour, but it can be redefined to, eg, \scshape to give small caps). –  Lev Bishop Dec 9 '10 at 5:51
@Philippe: just a thought: it is also possible to do \begingroup\def\protect{\global\let\oldem}\em\endgroup. –  Bruno Le Floch Jul 29 '11 at 1:04
@Manuel \makeatletter\DeclareRobustCommand\em{\@nomath\em \ifdim \fontdimen\@ne\font >\z@\upshape \else \slshape \fi}\makeatother –  Stefan Kottwitz Nov 30 '12 at 23:37

According to p. 194 of the LaTeX2e sources, \emph is defined as

\DeclareTextFontCommand{\emph}{\em}


So I suggest to redefine it as follows:

\DeclareTextFontCommand{\emph}{\bfseries}

-
This won't toggle like \emph does, though, correct? I don't know if that's part of the OP's idea of "canonical." –  Matthew Leingang Dec 8 '10 at 20:43
@Matthew: It won't, and I already admitted as much. –  lockstep Dec 8 '10 at 20:44
@Matthew I normally use the word canonical to mean ...how do you think Lamport would have written it? Not exactly from the Oxford Dictionary :) –  Yiannis Lazarides Dec 8 '10 at 21:01