When producing documents with pdflatex that may contain special utf-8 characters, it is recommended to add the following to the preamble
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
I know that with lualatex the inputenc line is not necessary, since everything is set up to use utf-8 encoding by default. But I don't know what to do about that fontenc line. Do I need to include it or not if I am using lualatex?
Best Answer
If you want to use
pdflatex
, you should use in your preamble:If you want to use
lualatex
orxelatex
, you should use in your preamble:If you want to compile your document time to time with
lualatex
or withpdflatex
without changing preamble, you can useifluatex
package. Typical preamble for this purpose can looks like: