Accents

The é in café, the ß in Gauß, the ñ in señor. Western text is full of accents (diacritical marks) that sit above or below a letter. LaTeX can set them with commands: write \'{o} for ó, or \~{n} for ñ. This page tabulates the text-mode accent commands, then covers a crucial modern point — with today’s LaTeX you can usually type é or ñ directly — and the fontenc setup that makes accented words behave.

How accent commands work

A text-mode accent takes the form of a one-character command with the letter you want to accent as its argument. The acute accent, for example, is \' and its argument is {o}, so \'{o} gives ó. When the argument is a single letter the braces are optional — \'o works too — but wrapping it explicitly, as in \'{o}, removes any ambiguity about where the argument ends and is the safer habit.

There are two kinds. Some are named by the punctuation mark itself\', ` \ `, \^, \~, \" — and some are named by a **single letter**, such as \c, \v, \u, \H. Because the second kind is a letter, you must either follow it with a **space**, as in \c c (cedilla on c → ç), or use braces; otherwise \cc reads as a different command. Writing \c{c}` with braces avoids the problem entirely.

Note that these are text-mode only. To put a mark over a symbol *in math*, you use the math accents \hat{x}, \tilde{x}, \bar{x}, and so on (covered on the “Over/under decorations” page). The text \^ and the math \hat are different things — do not mix them up.

The accent commands

Here are the main text-mode accent commands, each with an example and the name of the mark. Each row is headed by the command itself (e.g. the acute accent is \'), followed by the result of applying it to {o} (etc.) and the name of the diacritic.

CommandExampleName
\'óAcute
\`òGrave
\^ôCircumflex (hat)
\"öUmlaut / dieresis
\~ñTilde
\=ōMacron
\.ȯDot over
\uŏBreve
\včCaron / háček
\HőDouble acute (Hungarian umlaut)
\cçCedilla (below)
\kąOgonek (below)
\råRing over
\bBar under
\dDot under
\to͡oTie-after (spans two letters)

The last three are a little special. \b is a bar under and \d is a dot under — both sit below the letter. \t is a tie that spans two letters and so takes a two-character argument, as in \t{oo} (used in romanizing Cyrillic, for instance). The marks that go below or are otherwise unusual — \c, \k, \b, \d, \t — are most reliable when the T1 fontenc encoding (below) is loaded.

Dotless i and j

Putting an accent on i or j needs one extra step. Those letters already carry a dot on top, so stacking an accent above it collides with the dot. For this, LaTeX provides the dotless i \i (ı) and the dotless j \j (ȷ); you place the accent on these instead.

An i with an acute accent, for example, is written \'{\i} and yields í (whereas \'{i} would sit on top of the dot). Here the command’s argument is itself the command \i. If instead you type í directly in modern LaTeX, the engine handles the dot for you and this concern disappears (next section).

latex
% accenting i and j: use the dotless forms
Na\'{\i}ve, \^{\j}   % gives  Naíve  and  ĵ

% compare: plain \'{i} would stack on the dot

In modern LaTeX, just type it

This is the most important point. Modern LaTeX defaults to UTF-8 (since TeX Live 2018), so if you simply type é, ñ, ö, or ß straight into your source file, they typeset as-is. You usually need not memorize the accent commands at all — just enter the character from your keyboard or input method. Before 2018 you had to write \usepackage[utf8]{inputenc} explicitly; today that is unnecessary (though harmless if present).

When you use pdfLaTeX, however, loading \usepackage[T1]{fontenc} is strongly recommended, for two reasons. First, the default OT1 encoding has no accented letters as single glyphs, so they are built with \accent — and any word using such a constructed accent will not be hyphenated (broken correctly at line end). With T1, an accented letter is a single glyph and hyphenates properly. Second, because it is emitted as one glyph, copy-paste and search in the resulting PDF behave as expected.

By contrast, LuaLaTeX and XeLaTeX assume Unicode and system fonts from the start, so fontenc is essentially unneeded — pick a font with fontspec and accented characters just work. For the bigger picture of mixing Japanese with Western text, see “TeX/LaTeX and Japanese.” In short: with pdfLaTeX, load T1; with Lua/XeLaTeX, don’t worry about it.

document.tex
\documentclass{article}
\usepackage[T1]{fontenc}   % pdfLaTeX: glyphs + hyphenation
% (UTF-8 input is the default since 2018; no inputenc needed)
\begin{document}
Un café à Montréal, señor Gauß.
\end{document}

Language-specific letters

Some marks are not accents placed on a letter but letters in their own right. These take no argument — the command itself is the character. Here are the common ones.

CommandLetterUsed in
\oeœFrench ligature (cœur)
\aeæLatin / Nordic ligature
\oøDanish / Norwegian
\aaåScandinavian
\ssßGerman eszett
\lłPolish barred L

The capitals are \OE (Œ), \AE (Æ), \O (Ø), \AA (Å), \L (Ł). With T1 (or another suitable fontenc encoding) loaded, you also get letters such as \dh (ð), \th (þ), \dj (đ), and \ng (ŋ) for Icelandic, Croatian, and the like (these are unavailable in the default OT1). Here too the shortcut is the same: in a UTF-8 source, just type œ or ß directly.

Worked examples

Let us set a few words with accent commands. The command form is on the left and the comment shows the output. Where direct typing is available, the same results come from simply writing résumé, naïve, Gauß.

latex
r\'{e}sum\'{e}        % résumé
na\"{\i}ve            % naïve   (dotless i under the dieresis)
se\~{n}or             % señor
G\"{o}del, Gau\ss{}   % Gödel, Gauß
\^{a}ge, \c{c}a va     % âge, ça va
\H{o}r\'{a}n          % őrán    (Hungarian double acute)

In sum: put a mark on a letter by passing it as the command’s argument (use the dotless \i/\j for i and j); use the dedicated command for standalone letters (\ss, etc.); and above all, in modern LaTeX direct typing is the shortest path — just remember \usepackage[T1]{fontenc} with pdfLaTeX. That is all you need in practice.