Accents at Modifiers

Hats, tildes, dots, bars, vectors, at text decorations.

Accent marks and special letters in LaTeX

In text, LaTeX builds accented letters from a command and the base letter: the acute \'e (é), grave \`e (è), circumflex \^e (ê), umlaut or diaeresis \"o (ö), tilde \~n (ñ), cedilla \c{c} (ç), caron \v{s} (š), breve \u{a} (ă), Hungarian double acute \H{o} (ő), dot above \.z (ż), macron \=a (ā), dot below \d{a}, bar below \b{a}, ring \r{a} (å) and ogonek \k{e} (ę). Whole letters have their own commands: \l (ł), \o (ø), \ae (æ) and \ss (ß). To accent an i or j, use the dotless forms \i and \j, as in \'{\i} for í, so the accent does not collide with the dot.

Math mode uses a separate set that sits over a variable rather than a letter: \hat{x}, \bar{x}, \vec{v}, \tilde{x}, \dot{x} and \ddot{x} for derivatives, \acute, \grave, \breve and \check. For more than one character, base LaTeX has the stretching \widehat{xy} and \widetilde{xy}, plus \overline{z} for conjugates and \overrightarrow{AB} for vectors; none of them needs amsmath.

Since 2018 LaTeX reads UTF-8 by default, so you can type é, ö or ñ directly in the source (older setups need \usepackage[utf8]{inputenc}). Add \usepackage[T1]{fontenc} so accented letters are single glyphs that hyphenate and copy correctly instead of being composed from two pieces. For a worked example see our guide to Spanish characters and accents in LaTeX, or the overview of special characters in LaTeX. Click any card below to copy its command.

x^\hat{x}

Hat

\hat{x}
xyz^\widehat{xyz}

Wide Hat

\widehat{xyz}
x~\tilde{x}

Tilde

\tilde{x}
xyz~\widetilde{xyz}

Wide Tilde

\widetilde{xyz}
x˙\dot{x}

Dot

\dot{x}
x¨\ddot{x}

Double Dot

\ddot{x}
x...\dddot{x}

Triple Dot

\dddot{x}
xˉ\bar{x}

Bar

\bar{x}
xyz‾\overline{xyz}

Overline

\overline{xyz}
xyz‾\underline{xyz}

Underline

\underline{xyz}
x⃗\vec{x}
AB→\overrightarrow{AB}

Wide Vector

\overrightarrow{AB}
AB←\overleftarrow{AB}

Left Vector

\overleftarrow{AB}
AB↔\overleftrightarrow{AB}

Double Arrow

\overleftrightarrow{AB}
xˊ\acute{x}

Acute

\acute{x}
xˋ\grave{x}

Grave

\grave{x}
x˘\breve{x}

Breve

\breve{x}
xˇ\check{x}

Check

\check{x}
x˚\mathring{x}

Ring

\mathring{x}
x+y⏞sum\overbrace{x+y}^{\text{sum}}

Overbrace

\overbrace{x+y}^{\text{sum}}
x+y⏟sum\underbrace{x+y}_{\text{sum}}

Underbrace

\underbrace{x+y}_{\text{sum}}
x\cancel{x}

Cancel

\cancel{x}
x\boxed{x}

Box

\boxed{x}