@@ -1,6 +1,6 @@
11\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
22$if(fontfamily)$
3−\usepackage[$fontfamilyoptions$]{$fontfamily$}
3+\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
44$else$
55\usepackage{lmodern}
66$endif$
@@ -26,20 +26,20 @@ $endif$
2626 \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
2727 \newcommand{\euro}{€}
2828$if(mainfont)$
29− \setmainfont[$mainfontoptions$]{$mainfont$}
29+ \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
3030$endif$
3131$if(sansfont)$
32− \setsansfont[$sansfontoptions$]{$sansfont$}
32+ \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
3333$endif$
3434$if(monofont)$
35− \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$monofontoptions$$endif$]{$monofont$}
35+ \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
3636$endif$
3737$if(mathfont)$
38− \setmathfont(Digits,Latin,Greek)[$mathfontoptions$]{$mathfont$}
38+ \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
3939$endif$
4040$if(CJKmainfont)$
4141 \usepackage{xeCJK}
42− \setCJKmainfont[$CJKoptions$]{$CJKmainfont$}
42+ \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
4343$endif$
4444\fi
4545% use upquote if available, for straight quotes in verbatim environments
@@ -54,23 +54,35 @@ $if(geometry)$
5454$endif$
5555\usepackage{hyperref}
5656\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
57−\hypersetup{breaklinks=true,
58− unicode=true,$if(title-meta)$
59− pdftitle={$title-meta$},$endif$$if(author-meta)$
60− pdfauthor={$author-meta$},$endif$$if(subtitle)$
61− pdfsubject={$subtitle$},$endif$$if(keywords)$
62− pdfkeywords={$keywords$},$endif$
57+\hypersetup{unicode=true,
58+$if(title-meta)$
59+ pdftitle={$title-meta$},
60+$endif$
61+$if(author-meta)$
62+ pdfauthor={$author-meta$},
63+$endif$
64+$if(subtitle)$
65+ pdfsubject={$subtitle$},
66+$endif$
67+$if(keywords)$
68+ pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$},
69+$endif$
70+$if(colorlinks)$
6371 colorlinks=true,
64− citecolor=$if(citecolor)$$citecolor$$else$black$endif$,
65− urlcolor=$if(urlcolor)$$urlcolor$$else$black$endif$,
66− linkcolor=$if(linkcolor)$$linkcolor$$else$black$endif$,
67− pdfborder={0 0 0}$if(hidelinks)$,
68− hidelinks$endif$}
72+ linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
73+ citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
74+ urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
75+$else$
76+ pdfborder={0 0 0},
77+$endif$
78+ breaklinks=true}
6979\urlstyle{same} % don't use monospace font for urls
7080$if(lang)$
7181\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
72− \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$$sep$,$endfor$,main=$babel-lang$]{babel}
82+ \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
83+$if(babel-newcommands)$
7384 $babel-newcommands$
85+$endif$
7486\else
7587 \usepackage{polyglossia}
7688 \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
@@ -196,7 +208,9 @@ $include-before$
196208$endfor$
197209$if(toc)$
198210{
211+$if(colorlinks)$
199212\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
213+$endif$
200214\setcounter{tocdepth}{$toc-depth$}
201215\tableofcontents
202216}