Accented characters in LaTeX
For accented letters to display, copy and hyphenate correctly, add input encoding, the T1 font encoding and the babel package with your document language to the preamble. Babel also translates captions such as "Figure", "Table" and "Contents".
Preamble for an English document with accented names
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{lmodern}Common mistakes
- No T1 fontenc: accented letters are built from two glyphs and cannot be searched or copied from the PDF.
- Captions in the wrong language: babel is missing or set to a different language than the document.
See also
Don't want to memorize commands?
Draw a formula or paste a screenshot, and CamteX turns it into ready LaTeX.