LaTeX error "Encoding scheme `t1' unknown": cause and fix
A font encoding was selected that LaTeX has not loaded. A font encoding such as T1 or OT1 decides which characters a font offers and at which positions; it has to be declared before a font can be selected in it.
Why it happens
- The encoding name is written in lower case:
\usepackage[t1]{fontenc}. The names are upper case. utf8is given tofontenc. UTF-8 is an input encoding and belongs toinputenc;fontencthen also reports that it cannot findutf8enc.def.- A command such as
\fontencoding{LGR}\selectfontor\fontencoding{T2A}\selectfontswitches to an encoding that was never loaded withfontenc.
How to fix it
- Write
\usepackage[T1]{fontenc}with an upper-case T. - Remove
utf8fromfontenc. LaTeX has read UTF-8 source without any package since 2018. - Load every encoding the document switches to. The last one in the list becomes the default:
\usepackage[LGR,T1]{fontenc}.
A document that produces the message
\documentclass{article}
\usepackage[t1]{fontenc}
\begin{document}
Text with umlauts: ä, ö, ü.
\end{document}The corrected document
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
Text with umlauts: ä, ö, ü.
\end{document}Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.
Finding the line in the editor
The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.
Related pages
- Package
fontenc - Package
inputenc - Error Font shape `OT1/cmr/bx/sc' undefined
- How-to Umlauts and accents in LaTeX