Code
Consider the following MWE:
\documentclass{article}
\usepackage{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[sc]{mathpazo}
\usepackage{microtype}
\DisableLigatures[f]{encoding = T1}
\usepackage{hyperref} % Used in alot of my documents.
\begin{document}
Test.
\end{document}
Assume I compile using pdflatex
(with an up-to-date TeX Live distribution), I then use the setup above.
Questions
I have a few questions:
- Is
\usepackage{inputenc}
needed at all when compiling usingpdflatex
? - When kind of packages should I load and how do I setup the font properly if I want to compile using
lualatex
?
Is the following correct and if not, how do I do it in a correct way?
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{danish}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures = TeX}
\usepackage{mathpazo}
\setmainfont[
BoldFont = texgyrepagella-bold.otf,
ItalicFont = texgyrepagella-italic.otf,
BoldItalicFont = texgyrepagella-bolditalic.otf
]{texgyrepagella-regular.otf}
\usepackage{hyperref} % Used in alot of my documents.
\begin{document}
Test.
\end{document}
Also, is the loading-order of the packages of any importance? (I know that hyperref
should almost always be loaded as the last package but apart from that?)
Update
In case I want to remove all ligatures, is the following then the correct way to do it?
\addfontfeature{
Ligatures = {
RequiredOff,
CommonOff,
ContextualOff,
RareOff,
HistoricOff,
TeXOff
}
}
instead of
\defaultfontfeatures{Ligatures = TeX}
I found it in Table 11 at the bottom of page 42 of the fontspec
manual.
inputenc
is only needed forpdflatex
if you use an old encoding, likelatin1
. `utf8' is the default.