[latexrefman] Added fontenc

Karl Berry karl at freefriends.org
Sun Oct 28 23:46:38 CET 2018


    I wanted to start with something about fontenc.

A scary topic. Glad you're tackling it.

Under "Output files" doesn't seem right to me. I suggest a new @section
in the Fonts chapter. Since fontenc is about fonts.

Regarding the content, I think it's important to say that what the
optional arg in \usepackage[...]{fontenc} specifies is the encoding used
for the *fonts* in the document, not "the output". It applies to latex
as well as pdflatex.

It is not necessary to use \usepackage{lmodern}. One can certainly do
so, but that's an independent choice. If you don't, [T1]{fontenc}
switches the latex world to using the cm-super fonts, which have the
same attributes as lm wrt pre-accented chars. Probably cm-super and
lmodern are both supersets and subsets of each other as far as how many
characters they cover, but I don't know for sure. Lmodern has a few
accent-placement and kerning improvements lacking in cm-super, but this
would not be noticeable to any normal user. (And, unfortunately, render
lm technically incompatible with cm. Oh well.)

Perhaps there should be an additional short section on choosing fonts
before fontenc. Besides mentioning lmodern, it could reference
http://www.tug.dk/FontCatalogue/, which gives the LaTeX recipes for all
the fonts it uses. On the other hand, that is not truly reference
material, so maybe we should not discuss it.

In the last paragraph, I would say that xe/lualatex "work differently"
than pdflatex, rather than "offer advantages". They have advantages.
They also have disadvantages. We don't need to make a value judgement.

Also, 
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}

works with both lualatex and xelatex, as far as I know. I don't think
one needs to, or necessarily should, switch to luatextra.

Also, Ligatures=TeX has (thankfully) been the default for a while,
afaik. So I think all we need to say is:
\usepackage{fontspec}

--thanks, karl.



More information about the latexrefman mailing list