diff options
author | Xavier Olive <xavier@xoolive.org> | 2015-08-20 23:58:07 +0200 |
---|---|---|
committer | Xavier Olive <xavier@xoolive.org> | 2015-10-04 21:03:26 +0200 |
commit | f73de97de9a96fdbcea0f6d41427e3d6d137a99f (patch) | |
tree | 30b7a7e802e46c3cfa8ae3985e6f33bb18cb8e25 /default.latex | |
parent | 229ec44bb6ae116d5cf613bba0486f3757f9cd0d (diff) | |
download | pandoc-f73de97de9a96fdbcea0f6d41427e3d6d137a99f.tar.gz |
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).
Diffstat (limited to 'default.latex')
-rw-r--r-- | default.latex | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/default.latex b/default.latex index 2deebfecc..92cfbc737 100644 --- a/default.latex +++ b/default.latex @@ -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$}, |