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?

  • 1
    Welcome to TeX.SX! Nothing different with T1, actually, because the encoding is known in advance. Other encodings such as T5 must be loaded with fontenc. – egreg Apr 16 '15 at 11:03

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 instance


will load t1enc.def. The start of this file is

 [2005/09/27 v1.99g
         Standard LaTeX file]

and \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 issue

! LaTeX Error: Encoding scheme `<ENCODING>' unknown.

because the first duty of <encoding>enc.def is to say


where the arguments specify code to execute as soon as the encoding is activated (for text and math modes respectively).

So the complete answer is:

the method with \renewcommand only works for OT1 and T1; don't use it.

Note also that the last encoding loaded with fontenc will become the default encoding for the document. More precisely, when


is processed, LaTeX will do


(actually executing \let\encodingdefault\CurrentOption).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.