I'm new to LaTeX, like really really new.
From what I've read, the default font encoding of LaTeX is OT1. Now, if I'm not mistaken, in order to change the default encoding to Type 1, I have to put \usepackage[T1]{fontenc}
in the preamble. However, what will happen if I put \renewcommand{\encodingdefault}{T1}
instead, or both?
Best Answer
When you do
the file
<encoding>enc.def
is loaded (the encoding name is converted to lowercase for reasons due to uniformity in the various file systems). For instancewill load
t1enc.def
. The start of this file isand
\ProvidesFile
ensures the file is never loaded twice. On the other hand,fontenc.sty
is basically a wrapper around\input{<encoding>enc.def}
. It also defines some addition to the lowercase and uppercase settings when the requested encoding is in the list of Cyrillic encoding.At format creation, the following encodings are also loaded
(the last two are for math). This is the reason why just doing
works: the encoding is already known and
t1enc.def
has been loaded in memory.For any other encoding, the
\renewcommand
you propose will issuebecause the first duty of
<encoding>enc.def
is to saywhere the arguments specify code to execute as soon as the encoding is activated (for text and math modes respectively).
So the complete answer is:
Note also that the last encoding loaded with
fontenc
will become the default encoding for the document. More precisely, whenis processed, LaTeX will do
(actually executing
\let\encodingdefault\CurrentOption
).