Inputting accented characters

By default, LaTeX works with simple ASCII characters. For accented characters, such as in the German word "schön", you need to type sch\"on into your editor. The babel command with the ngerman option simplifies the syntax to sch"on. But there is an easier way.

How to do it...

We will activate extended input character support as follows:

  1. Check your editor's configuration and find out its input encoding setting. utf8 (UTF-8 means Unicode) is standard for Linux, Mac OS X, and some Windows editors. However, some Windows editors still work with latin1 or cp1250/cp1252, while some older Macs use applemac.
  2. Load the inputenc package with the corresponding option, like so:
    \usepackage[utf8]{inputenc}
  3. Now you can directly type characters ...

Get LaTeX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.