# [OS X TeX] fontenc documentation...

Jean-Christophe Helary fusion at mx6.tiki.ne.jp
Mon Feb 2 02:01:51 EST 2009

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.

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.

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

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...

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

On lundi 02 févr. 09, at 01:58, Herbert Schulz wrote:

>
> On Feb 1, 2009, at 10:47 AM, Jean-Christophe Helary wrote:
>
>> Basically, my problem is that according to:
>>
>> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=why-inp-font
>>
>> The area covered by fontenc is pretty much also covered by inputenc.
>>
>> Also, the FAQ says that "only fontenc has the means to convert
>> [\'e] into the T1 character", but I just found that in Texshop I
>> could type \'e without _any_ fontenc preamble and LaTeX was still
>> able to process that...
>>
>> Considering that I'm thinking about people who _won't_ type such
>> sequences, but rather "é" directly, what is the preferred/more
>> modern/more intuitive choice. fontenc or inputenc ? I'd personally
>> go for inputenc if I understood all the implications...
>>
>
>
> Howdy,
>
>
> I assume you are talking about the whole encoding mess.
>
> The problem is that once you get past the basic 128 character ASCII
> set there have been multiple, INCOMPATIBLE ways of representing
> (encoding) the extended character set; e.g., Mac Roman, Latin 1,
> UTF-8. The last encoding is the first that seems to have universal
> acceptance. TeX got around this problem by only using ASCII
> characters and macros to construct accented character, etc. In LaTeX
> the inputenc package allows for a translation from the stored
> encoding to something LaTeX can understand.
>
> There are actually three things that must cooperate. The Editor must
> save and read the source file in a known encoding so that it can
> display the extended character set correctly. In TeXShop this is
> done with a line such as
>
> %%!TEX encoding = UTF-8 Unicode
>
> near the top of the file before saving the file (or changing the
> default encoding to UTF-8 in TeXShop->Preferences). The second is to
> tell LaTeX how to interpret the extended character set (i.e.,
> understand the a certain character number means é) using a line like
>
> \usepackage[utf8]{inputenc}
>
> for UTF-8 encoding. Finally the font you are using must have that
> character in a certain location in the font file. To do this a line
> like
>
> \usepackage[T1]{fontenc}
>
> tells LaTeX how to map the particular input code to an actual glyph
> to be printed with ink onto the paper. Oh, one more thing, the font
> itself must have the character or a blank glyph will be printed;
> e.g., the Latin Modern fonts, an extended version of Computer
> Modern, does have the character while Computer Modern doesn't.
>
> Hope that I've got that right and it's comprehensible.
>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest dot com)
>
>
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>