Deal with conflicts with tufte-handout.cls

There are several conflicts that are raised when you use tufte-handout
layout with the default.latex template, namely hyperref and color, which
are already loaded by the class.

This commit enables to only load `hyperref` and `color` packages if they
are not already loaded (by Tufte).
This commit is contained in:
Xavier Olive 2015-08-20 23:58:07 +02:00
parent 229ec44bb6
commit f73de97de9

View file

@ -53,6 +53,8 @@ $endif$
$if(geometry)$
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
$endif$
\makeatletter
\@ifpackageloaded{hyperref}{}{%
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
@ -60,7 +62,13 @@ $endif$
\else
\usepackage[unicode=true]{hyperref}
\fi
}
\makeatother
\makeatletter
\@ifpackageloaded{color}{}{%
\usepackage[usenames,dvipsnames]{color}
}
\makeatother
\hypersetup{breaklinks=true,
bookmarks=true,
pdfauthor={$author-meta$},