Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this document

Formatting Information — An introduction to typesetting with LATEX

### Chapter 1: Writing documents

For accented letters in Latin-alphabet languages, use the accented keys from your keyboard. If you don’t have any, use your computer’s or editor’s character map (usually under the InsertSpecial Characters menu) to pick them from the pop-up window.

• If you are using XƎLATEX with biblatex/biber, no further configuration is needed, as XƎLATEX handles UTF-8 character encoding as the default;

• If you are using PDFLATEX with BIBTEX you SHOULD always start your Preamble with these two lines to handle accents and other UTF-8 characters:

\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

• If you are using PDFLATEX with biblatex/biber, you SHOULD do the same, but use the utf8 option (no x) instead of utf8x:

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}


That takes care of telling LATEX what character repertoire (inputenc, the input encoding) your system is using, and which set of fonts (fontenc, the ‘font encoding’) to find the extra characters in. XƎLATEX needs no telling, except for one extra package for font-handling (see the listitem ‘If you are using XƎLATEX with …’).

You also need to make sure your computer’s operating system is set to UTF-8, and that your editor is set the same way. Most are — with most modern systems, Unicode compatibility will let you use almost any letter or symbol from any writing system encoded in UTF-8 (the multibyte 8–bit encoding), for which LATEX has extensible support.

For language-specific hyphenation and cultural adaptation (including the correct language headings for all the parts of your document) use the babel package (see § 1.9.6). For non-Latin typefaces you will also need the relevant font packages and typefaces (see § 6.2).

Failing all this, if you don’t have accented letter keys on your keyboard, or you can’t find the codes to type, or if you need additional accents or symbols which are not in any of the keyboard tables, you can use the symbolic notation in Table 1.2. In fact this can be used to put any accent over any letter (Welsh users can get a ŵ with \^w), even for combinations which don’t actually exist in any language: if you particularly want a g̃, for example, you can have one with the command \~g.

If you use this symbolic method only, you do not need to use the inputenc package described above.

### Table 1.2: Symbolic notation for accents

 Accent Example Characters to type Acute (fada) é \'e Grave è \e Circumflex ê \^e Umlaut or diæresis ë \"e Tilde ñ \~n Macron ō \=o Bar-under o \b o Dot-over (séıṁıú) ṁ \.m Dot-under ṣ \d s Breve ŭ \u u Háček (caron) ŭ \v u Long umlaut ő \H o Tie-after o͡o \t oo Cedilla ç, Ç \c c, \c C O-E ligature œ, Œ \oe, \OE A-E ligature æ, Æ \ae, \AE A-ring å, Å \aa, \AA O-slash ø, Ø \o, \O Soft-l ł, Ł \l, \L Ess-zet (scharfes-S) ß \ss

Before the days of keyboards and screens with their own real accented characters, the symbolic notation was the only way to get accents, so you may come across a lot of older documents (and users!) using this method all the time: it does have the advantage in portability that the LATEX file remains plain ASCII, which will work on all machines everywhere, regardless of their internal encoding, and even with very old TEX installations.

Irish and Turkish dotless-ı can be done with the special command \i, so an í (which is normally typed with í) may require \'\i{} if you need to type it in the long format — remembering that dummy pair of curly braces if there is no punctuation, because of the rule that LATEX control sequences which end in a letter (see § 1.5.1) always absorb any following space. So what you might see as Rí Teaṁraċ would have to be R\'\i\ Tea\.mra\.c when typed in full (there are not usually any dedicated keyboard keys for the dotless-ı or for aspirated or lenited characters). A similar rule applies to dotless-ȷ and to uppercase Í.

Note that modern versions of LATEX can compensate for this when used with the utf8x option of the inputenc package and the T1 option of the fontenc package (as shown above). In that case you can just type f\'is` to get ‘fís’. If you use XƎLATEX you don’t even need those packages and options, and you just type ‘fís’.

1. Note for MacTEX users: the TEXShop editor that comes with MacTEX is not set for UTF-8 by default: see the step ‘Set the LATEX processor to XƎLATEX …’ for how to set it.

2. Remember not everyone is lucky enough to be able to install new software: many users on business and academic networks still use old versions of TEX because they or their system managers don’t know how to update them. Local user groups may be able to provide help and support here.