Because of deficiencies of the
OT1 encoding I also recommend
T1 font encoding:
OT1 contains inconsistencies in the encoding for different families, typewriter is different, …
is useful for getting other symbols (Euro, …). Instead of
Computer Modern/EC I would use the new
Latin Modern fonts that are a further development of the former:
Of course there are advantages using plain ASCII for the texts and using commands for the other characters. This way the text is quite independent from the encoding and can be more easily be used in different environments with different encodings.
But sometimes characters outside of ASCII might slip through. In case of
OT1 the file compiles fine, but the characters are missing:
% Default font encoding: OT1
Umlauts via LICR: \"a\"o\"u\ss
Umlauts directly: äöüß
There is no warning or error, only the
.log file says:
Missing character: There is no ä in font cmr10!
Missing character: There is no ö in font cmr10!
Missing character: There is no ü in font cmr10!
Missing character: There is no ß in font cmr10!
T1 encoding helps to make more characters available. However I do not know an editor that supports
T1 encoding. Some positions match the slots in
latin1, for example. But other characters are different or have other positions. The following example uses the ^^-notation to avoid problems with editing and copy&pasting, because the example uses two different encodings at the same time:
% Umlauts/Euro: äöüß/€
Umlauts/Euro via LICR: \"a\"o\"u\ss/\texteuro
Umlauts/Euro directly (latin9): ^^e4^^f6^^fc^^df/^^a4
Umlauts/Euro directly (UTF-8): ^^c3^^a4^^c3^^b6^^c3^^bc^^c3^^9f/^^e2^^82^^ac
This time, there is no hint even in the
Therefore I recommend using package
inputenc with encoding
Then non-ASCII input characters generate errors:
! Package inputenc Error: Keyboard character used is undefined
(inputenc) in inputencoding `ascii'.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
l.10 Umlauts/Euro directly (latin9): ä
After fixing the input lines this helps to ensure that the file is indeed ASCII.