[OS X TeX] fontenc documentation...
Herbert Schulz
herbs at wideopenwest.com
Mon Feb 2 15:27:33 CET 2009
On Feb 2, 2009, at 1:01 AM, Jean-Christophe Helary wrote:
> Herbert,
>
> Thank you very much for your input.
>
> I understand the character set/encoding issue (independantly of TeX)
> and I understand the font issues in LaTeX. Well, I think I am
> starting to do.
>
> Now, let me reword my earlier question by showing you the following
> 3 documents:
>
>
> Environment: Texshop 2.20, LaTeX (MacTeX 2008)
> document saved in Western Latin-1
>
>
> 1) no preamble at all
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> \documentclass{article}
> \begin{document}
> all\'ee
> allée
> \end{document}
> ~~~~~~~~~~~~~~~~~~~~~~~~~
>
> displays: [allée alle]
>
> -> can't interpret the Latin-1 character "é"
>
> That was expected, but I am suprised to see that "\'e" is correctly
> interpreted because as you wrote, and as the FAQ at:
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=why-inp-font
> says, the fontenc package, T1 option, is supposedly required to
> properly interpret such sequences.
>
Howdy,
The proper display of the é, which you saved as Latin1, requires that
your editor either defaults to that encoding when opening files or you
added something that tells the editor that it is saved as Latin1.
In fact \'e tells LaTeX to execute a macro (\') that builds (i.e.,
fakes) the accent above the letter e. On the other hand LaTeX has no
idea what to do with the actual byte value corresponding to é so it
throws it out in this case.
There is always a default font encoding, OT1, just as there is a
default input encoding, ASCII. So not putting in fontenc package does
not omit a font encoding.
>
> 2) inputenc "latin1" added to the first document
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> \documentclass{article}
> \usepackage[latin1]{inputenc}
> \begin{document}
> all\'ee
> allée
> \end{document}
> ~~~~~~~~~~~~~~~~~~~~~~~~~
>
> displays: [allée allée]
>
> -> properly inteprets both the "\'e" and the "é" characters
>
> Here again, no fontenc package but the sequence "\'e" is properly
> interpreted.
>
The first part still works and now it is interpreting the é as a
character it understands it must construct just as though \'e was
entered. The two é should look identical.
>
> 3) fontenc "T1" added to the first document
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> \documentclass{article}
> \usepackage[T1]{fontenc}
> \begin{document}
> all\'ee
> allée
> \end{document}
> ~~~~~~~~~~~~~~~~~~~~~~~~~
>
> displays: [allée allée]
>
> -> properly inteprets both the "\'e" and the "é" characters
>
I'm not sure if the macro is still being expanded as before or has
been changed to substitute the é directly but the é alone is taken as
a glyph from the EC (or CM Super) font set.
> Here, fontenc would be expected to correctly intepret the "\'e"
> sequence but since there are no indications that the file is saved
> in Western Latin-1, I am surprised that the "é" is properly
> interpreted since the file is supposed to be "expected" in ascii by
> default as in the first document above...
>
Either you've set the default encoding of the saved file as Latin1 (if
it's TeXShop see TeXShop->Preferences->Document) or that information
is being stored somewhere and the code that reads the file in
``knows'' the encoding (e.g., it's in the, usually invisible,
``resource'' fork).
>
> Now, if you can give me explanations (and links to the
> documentation, that I still can't find in MacTex), that would
> greatly help my understanding !
>
>
>
>
> Jean-Christophe Helary
>
>
Sorry, I can't help with the documentation. This is stuff that has
taken a log time to gather together and sometimes interpret from what
I've read or heard. The latter part makes me worry a bit that I've got
it a bit wrong so I make no claim to being authoritative on the matter.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the macostex-archives
mailing list