Emphasis (\emph)

Emphasize one word inside an already-emphasized sentence and it does not lean further — it stands up straight. Nest \emph{...} in LaTeX and the shape flips at every level: italic, then upright (roman), then italic again. Do the same with \textit and nothing happens; stack as many layers as you like and every one stays italic. The difference is not a matter of taste. \emph records the meaning “stress this”, not the instruction “slant this”, and what that meaning looks like is decided afterwards. This page follows the toggle through its machinery, the surprising gap between \em and \emph, the italic correction \/, and why underlining in LaTeX is harder than it should be — with numbers taken from real compilations.

The difference between \emph and \textit

\emph looks at its context and switches; \textit slants unconditionally. In upright surroundings \emph sets its argument in italic, but inside text that is already italic the very same \emph sets it back upright. The goal is to stay distinguishable from the running text, so when the running text leans, standing straight is what serves that goal. \textit makes no such judgement. Use it inside an italic passage and nothing changes visually — the word you meant to stress disappears into its surroundings. That is the single biggest reason emphasis should use \emph rather than \textit.

latex
% nesting the two commands, side by side
\emph{outer \emph{inner \emph{deepest}}}

\textit{outer \textit{inner \textit{deepest}}}

Typeset those two lines and print the shape attribute NFSS is holding at each level, and the difference is unmistakable. \emph flips itnitn, one reversal per level; \textit reports ititit and never moves. And what \emph inspects is not “is this italic” but “is this currently slanted at all”. Inside \textsl{...} (slanted) an \emph still comes back to n, upright; inside \textbf{...} the weight bx is preserved and only the shape becomes it, so a bold italic — cmbxti10 in Computer Modern — is loaded. Because the axes are independent, emphasis rides on top without destroying the weight.

ContextShape from \emphShape from \textit
upright body textitalic (it)italic (it)
inside \emphback to upright (n) — the stress showsstays italic — the stress vanishes
inside \textitback to upright (n)stays italic (no change)
inside \textslback to upright (n) — any slant countsoverwritten to italic (it)
inside \textbfitalic, weight bx preserveditalic, weight bx preserved
italic correctioninserted automaticallyinserted automatically (the \itshape declaration does not)
when to usestress within a sentence — whenever meaning is what you meanbook titles, species names, foreign words — when the slant itself is the point

Why nesting turns emphasis upright

The answer sits in the definition itself. Line 11172 of latex.ltx, the core of LaTeX, is a single line: \DeclareTextFontCommand{\emph}{\em}. Ten lines above it, line 11162 reads \DeclareTextFontCommand{\textbf}{\bfseries}. So \emph is not a font command at all — it is the switching declaration \em wrapped into a form that takes an argument, a product of exactly the same factory that turns \bfseries into \textbf. The ability to reverse belongs to \em, not to \emph, and \em decides where to go by first looking at the current shape. That decision is taken independently at every level of nesting.

The design is the same idea as the division of labour between <em> (emphasis) and <i> (italic) in web HTML — and LaTeX2e has implemented it since 1994. <em> carries the meaning “emphasized” and the CSS decides how it looks; in LaTeX you likewise write only the meaning in the body with \emph and let the class file or preamble decide the appearance. The practical payoff is concrete. If you later decide that emphasis should be bold rather than italic, you change the one place that defines it and the whole document follows, without touching the manuscript. Scatter \textit{...} through the text instead, and every change of policy means hunting down and rewriting each occurrence — and since \textit is also the right command for book titles, you cannot even separate the two cases by search-and-replace.

Designing the levels of emphasis (\DeclareEmphSequence)

Alternating italic and upright is only the default, and the preamble can replace it wholesale. The command for that is \DeclareEmphSequence, introduced in LaTeX News 31 (2020). Its argument is a comma-separated list of font declarations, taken in order for the first level of emphasis, the second, and so on. Until then LaTeX could only shuttle between italic and upright; with this mechanism you can decide, say, that the first level is italic, the second small capitals, and the third italic small capitals.

latex
% in the preamble: italic, then small caps, then italic small caps
\DeclareEmphSequence{\itshape,%
  \upshape\scshape,\itshape}
  • If nesting runs deeper than the list\emreset is used (by default \ulcshape\upshape, i.e. ordinary upright), and from the level after that the list starts again from the beginning. With the two-entry list above, five levels measure as itscnitsc: the reset lands on level three and the cycle resumes at level four.
  • A “smart” check is applied — LaTeX verifies that the given declaration really changes the current font; if it would not, that level is skipped and the next is tried, on the assumption that the font was already switched by hand.
  • Use \emforce to bypass the check — for an entry that changes only the colour, say, the font attributes do not move even though the appearance clearly does, and the check misfires. Adding \emforce to that entry forces it to be applied anyway.

\em or \emph: which one to use

Use \emph{...} in a manuscript. \em performs the same switch but does not add the italic correction. \em is a declaration that takes no argument; you scope it with braces, as in {\em just this}. The reversal logic is identical to \emph — or rather, as we just saw, \em is what is inside \emph. The difference lies in the wrapper: only the argument-taking form built by \DeclareTextFontCommand slips a correction into the seam between a slanted glyph and the next one. Measured, \textit{f}h is 10.74167pt wide while {\itshape f}h is 8.62222pt; \emph{f}h is 10.74167pt while {\em f}h is 8.62222pt. The whole 2.11945pt simply goes missing. If you use a declaration, you write the trailing \/ yourself.

What the italic correction \/ actually is

The italic correction is a number that says how far a character overhangs to the right, and it is stored character by character in the font metric file. A slanted glyph juts up and to the right, but its typesetting width (3.06665pt for f) does not account for that. So when an upright letter follows immediately, the overhang collides with it. TeX's font metrics (TFM) have carried this overhang as CHARIC from the start. In cmti10, f has CHARIC R 0.211945 — 2.11945pt at the 10pt design size, matching to the last decimal the gap measured in the previous section between \textit{f}h and {\itshape f}h. \/ is nothing more than the instruction “insert the CHARIC of the preceding character as space”. Even upright cmr10 gives f a non-zero CHARIC of 0.077779 — the hook overhangs there too.

Saying that \emph and \textit insert the correction automatically does not mean they always do. If the next character is a comma or a period, the correction is skipped. Line 11250 of latex.ltx holds the list — \def \nocorrlist {,.} — because those marks sit low and tuck neatly under the overhang, so adding space would only make them look detached. The measurement agrees: \textit{f}. and {\itshape f}. both come to exactly 5.84444pt. Conversely, when you want to suppress the correction, put \nocorr inside the argument: \textit{\nocorr text} suppresses the leading one, \textit{text\nocorr} the trailing one. \nocorrlist itself can be replaced with \renewcommand, but the default comma and period rarely cause trouble.

latex
% argument form: the correction is added for you
He was \emph{very} clever.

% declaration form: add \/ at the end of the slanted run
He was {\em very\/} clever.

% before a comma or period nothing is added anyway
He was \emph{very}, and cheerful too.

% to suppress it explicitly
\textit{slanted\nocorr}text

Why \underline cannot break across lines

\underline is not a text command at all; it merely makes the mathematical underline usable in prose. That is why its contents become one indivisible box that cannot break. The definition begins at line 13309 of latex.ltx, and in text mode it expands to $\@@underline{\hbox{#1}}\m@th$. An \hbox is atomic, so TeX's line breaker cannot reach inside it. Put \underline{alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu} into a 150pt-wide paragraph and the run reports Overfull \hbox (170.25879pt too wide): the underlined phrase juts 170pt into the right margin. One or two words are fine; the moment you underline a sentence it falls apart. Hyphenation stops inside it as well.

Underlining was never a tool of metal typesetting; it is a substitute invented for the typewriter. On a machine with no slanted and no bold type, the only way to say “I stressed this” was to roll the platen back and strike a row of underscores. In a print shop setting real type there is no such need, so books do not underline — and the standard LaTeX classes accordingly offer no underline as a means of emphasis. When you feel like underlining, first check whether you really need a rule or whether you mean emphasis. For emphasis use \emph, for a book title \textit, for a level of the document \section and its relatives; in nearly every case a better tool already exists. What genuinely calls for a rule is the case where the rule itself is prescribed: a reviewer's instruction, the house style of a legal document, a fill-in blank in language-teaching material.

Underlining that breaks across lines: ulem and soul

When you need underlining that breaks across lines, load ulem or soul. Both ship with TeX Live 2024, so nothing has to be installed. In the same 150pt paragraph where \underline overflowed by 170.26pt, ulem's \uline{...} and soul's \ul{...} both overflow by just 0.30pt — that is, they wrap like ordinary text. ulem is Donald Arseneau's package, maintained since 1989; besides \uline it offers \uuline (double underline), \uwave (wavy), \sout (strike out) and \xout (scratch out). soul was released by Melchior Franz in 1998 and is now maintained by the Oberdiek Package Support Group; alongside \ul it handles forms of emphasis that are not rules at all — \so (letterspacing), \st (strike out) and \hl (highlighting).

Here lies a famous trap: merely loading ulem turns every emphasis in the document into an underline. The header of ulem.sty states plainly that in LaTeX the package replaces italics with underlining in emphasized text, and line 313, \def\ULforem{\useunder{\uline}{\em}{\emph}}, hijacks \em and \emph wholesale. Measured: with ulem loaded plainly, the box for \emph{word} has a depth of 2.9pt — the rule hanging below the baseline — while the same \emph{word} right after a \normalem declaration is back to a depth of 0.0pt. In other words, the instant you write \usepackage{ulem}, every \emph in the manuscript becomes underlined. To keep ordinary emphasis and still use the underlining commands, write \usepackage[normalem]{ulem}. This is a classic way to turn pale while checking the PDF just before submission, so re-read every page after adding ulem.

latex
% keep \emph italic; take only the rule-drawing commands
\usepackage[normalem]{ulem}   % \uline \uuline \uwave \sout \xout
% \usepackage{soul}           % \ul \so \st \hl

\uline{this underline breaks across lines just like ordinary text}

\sout{deleted} \quad \uwave{doubtful}

How much emphasis is too much

As a rule of thumb, two or more emphasized spans in one paragraph is a signal to fix the prose, not the font. Emphasis works because its surroundings are not emphasized. The more of it there is on a page, the more every instance looks the same weight, until nothing stands out at all. Emphasis pays off during revision rather than during composition. Mark important words with \emph while drafting if you like, but read the draft again before submitting and ask whether definitions, contrasts, cautions and conclusions could be separated by sentence structure instead. In prose where the structure does that work, emphasis survives only on the one point the reader must not miss. In Japanese body text, incidentally, italics often sit badly as a typeface, and a switch to a gothic face or the traditional emphasis dots may match reader expectations better; follow the conventions of your field and class.

  • Use it for a term at first mention. Marking a term you have just defined with \emph lets you harvest those spots mechanically into an index or glossary later.
  • Keep appearance separate. Italics for book titles, species names and foreign words belong to \textit. Mixed in with emphasis, they get dragged along the day you change how emphasis looks.
  • Do not bulk-replace with \textbf. If only the look should change, change it in the preamble with \DeclareEmphSequence. A replacement that erases the meaning in the body cannot be undone.
  • Decide the policy per document. If emphasis looks different from chapter to chapter, readers misjudge the importance itself.
  • Search for \textit{ before submitting. Check that none of them is standing in for emphasis, and that \emph has not multiplied inside headings and captions.