Fix hyperref options clash (#3847)

Avoids an options clash when loading a package (e.g. `tufte-latex`) that uses `hyperref` settings different from those in the template (introduced in <feffd7c64a>).
This commit is contained in:
Andrew Dunning 2017-08-14 20:33:46 +01:00 committed by John MacFarlane
parent 64ff86514b
commit ceda566a5e

View file

@ -1,3 +1,9 @@
\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere
\PassOptionsToPackage{hyphens}{url}
$if(colorlinks)$
\PassOptionsToPackage{usenames,dvipsnames}{color}
$endif$
%
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
$if(beamerarticle)$
\usepackage{beamerarticle} % needs to be loaded first
@ -78,14 +84,10 @@ $else$
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
$endif$
\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
$if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$
\usepackage[unicode=true]{hyperref}
$if(colorlinks)$
\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
$endif$
\usepackage{hyperref}
\hypersetup{
$if(title-meta)$
pdftitle={$title-meta$},