3

Please consider the output of the following code in book class:

\documentclass{book}
\begin{document}
\thispagestyle{empty}
\Huge

\noindent \emph{Emphasized Text} \[10pt] \textit{Italicized Text} \[25pt] What is the difference? \end{document}

enter image description here

To me, there appears to be no difference in the typography of the displayed text when, in the first case \emph is used, versus the second case, \textit was used.

QUESTION: Is my observation correct here; if so, then why would any one of the two commands be preferred over the other? But if there is a difference in the two commands, perhaps someone would point out what it is.

Thank you.

DDS
  • 8,816
  • 4
  • 9
  • 36
  • Also \emph can be nested, so in \emph{This or \emph{that} word} "that" would actually switch back to roman (upright) type. – musarithmia Oct 28 '21 at 15:08
  • 1
    This is effectively a duplicate of the question @campa linked, but the answers here are better in that they discuss \DeclareEmphSequence. – dedded Oct 28 '21 at 16:00

2 Answers2

9

By default, the difference in output between \textit{some text} and \emph{some text} is none. \emph by default does \textit internally.

The difference between them is about their meaning: \textit means literally "text in italic font" while \emph means "emphasize this text". Again, by default in LaTeX, emphasis is done with italics, but you can change that by doing:

\DeclareEmphSequence{\bfseries}

to get \emph to make bold text.

Another difference is that \textit{some \textit{italic} text} typsets "some italic text", all in italics. \emph{some \emph{emphasized} text} typesets "some emphasized text", with "emphasized" in upright font (by default, \emph alternates between italics and upright font).

You can change the default set of font change commands for emphasis using \DeclareEmphSequence:

\documentclass{article}
\begin{document}

\DeclareEmphSequence{\itshape,\scshape,\itshape\bfseries,\normalfont} \emph{one \emph{two \emph{three \emph{four}}}}

\DeclareEmphSequence{\tiny,\scriptsize,\footnotesize,\small,\normalsize,\large,\Large,\LARGE,\Huge} \emph{one \emph{two \emph{three \emph{four \emph{five \emph{six \emph{seven \emph{eight \emph{nine \emph{ten \emph{eleven}}}}}}}}}}}

\end{document}

enter image description here

7

The difference is when you nest them. Also the font for \emph can be adjusted:

\documentclass{book}
\begin{document}

\emph{blub \emph{inner}}

\DeclareEmphSequence{\bfseries,\itshape}

\emph{blub \emph{inner}}

\end{document}

enter image description here

Ulrike Fischer
  • 327,261