diff options
author | Andrew Dunning <andunning@gmail.com> | 2015-11-09 11:10:47 -0500 |
---|---|---|
committer | Andrew Dunning <andunning@gmail.com> | 2015-11-09 11:10:47 -0500 |
commit | 3ed48ae68f628b787e4ba98a34e6c51834378bc9 (patch) | |
tree | a4235f064dfe6a39f4de5296d84f2b43e1cb531b | |
parent | e7f2258c8999561012479841687858870c8e3216 (diff) | |
download | pandoc-3ed48ae68f628b787e4ba98a34e6c51834378bc9.tar.gz |
Make LaTeX/ConTeXt link colour optional.
Prevents a conflict when base text is not black. This makes the
`hidelinks` option redundant.
-rw-r--r-- | default.context | 4 | ||||
-rw-r--r-- | default.latex | 18 |
2 files changed, 13 insertions, 9 deletions
diff --git a/default.context b/default.context index 519311256..cba3f28b7 100644 --- a/default.context +++ b/default.context @@ -21,8 +21,8 @@ $if(keywords)$ keyword={$for(keywords)$$keywords$$sep$; $endfor$}, $endif$ style=$if(style)$$style$$else$normal$endif$, - color=$if(linkcolor)$$linkcolor$$else$black$endif$, - contrastcolor=$if(linkcolor)$$linkcolor$$else$black$endif$] + color=$linkcolor$, + contrastcolor=$linkcolor$] % make chapter, section bookmarks visible when opening document \placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] \setupinteractionscreen[option=bookmark] diff --git a/default.latex b/default.latex index 305ae9dee..33277c053 100644 --- a/default.latex +++ b/default.latex @@ -54,8 +54,7 @@ $if(geometry)$ $endif$ \usepackage{hyperref} \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref -\hypersetup{breaklinks=true, - unicode=true, +\hypersetup{unicode=true, $if(title-meta)$ pdftitle={$title-meta$}, $endif$ @@ -68,12 +67,15 @@ $endif$ $if(keywords)$ pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$}, $endif$ +$if(colorlinks)$ colorlinks=true, - citecolor=$if(citecolor)$$citecolor$$else$black$endif$, - urlcolor=$if(urlcolor)$$urlcolor$$else$black$endif$, - linkcolor=$if(linkcolor)$$linkcolor$$else$black$endif$, - pdfborder={0 0 0}$if(hidelinks)$, - hidelinks$endif$} + linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, + citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, + urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, +$else$ + pdfborder={0 0 0}, +$endif$ + breaklinks=true} \urlstyle{same} % don't use monospace font for urls $if(lang)$ \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex @@ -206,7 +208,9 @@ $include-before$ $endfor$ $if(toc)$ { +$if(colorlinks)$ \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} +$endif$ \setcounter{tocdepth}{$toc-depth$} \tableofcontents } |