Time for action – using accents directly
We will modify the previous example daring to enter accented letters directly in the editor.
Create a new document:
\documentclass{article} \usepackage[utf8]{inputenc} \begin{document} Não compreendo. Há aqui alguém que fale inglês? Comment çava? Où se trouve l'aéroport? \end{document}
Typeset and compare to the previous output:
What just happened?
We loaded the inputenc package. The option utf8
tells the package to use Unicode input encoding, which provides many more symbols than just the ASCII code. Now we just need to find the symbol on the keyboard and to type it.
TeXworks supports Unicode/UTF-8. Depending on operating system and editor, you might need to use another option when loading inputenc
. A rule of thumb: utf8
works on most Linux and Unix systems, like Mac OS X, and latin1
works with most Windows editors.
Note
Today, many Windows editors move to UTF-8. This is seemingly becoming the cross-platform standard.