git.iko.soy/typeable/pandoc
on master help sign in
Make LaTeX/ConTeXt link colour optional.

Prevents a conflict when base text is not black. This makes the `hidelinks` option redundant.

commit3ed48ae68f628b787e4ba98a34e6c51834378bc9 authorAndrew Dunning <andunning@gmail.com> dateMon 9 Nov 2015, 11:10 (11 years ago) parente7f2258
2 files changed+13−9
default.context+2−2 default.latex+11−7
default.context+2−2
@@ -21,8 +21,8 @@ $if(keywords)$
2121 keyword={$for(keywords)$$keywords$$sep$; $endfor$},
2222$endif$
2323 style=$if(style)$$style$$else$normal$endif$,
24− color=$if(linkcolor)$$linkcolor$$else$black$endif$,
25− contrastcolor=$if(linkcolor)$$linkcolor$$else$black$endif$]
24+ color=$linkcolor$,
25+ contrastcolor=$linkcolor$]
2626% make chapter, section bookmarks visible when opening document
2727\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
2828\setupinteractionscreen[option=bookmark]
default.latex+11−7
@@ -54,8 +54,7 @@ $if(geometry)$
5454$endif$
5555\usepackage{hyperref}
5656\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
57−\hypersetup{breaklinks=true,
58− unicode=true,
57+\hypersetup{unicode=true,
5958$if(title-meta)$
6059 pdftitle={$title-meta$},
6160$endif$
@@ -68,12 +67,15 @@ $endif$
6867$if(keywords)$
6968 pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$},
7069$endif$
70+$if(colorlinks)$
7171 colorlinks=true,
72− citecolor=$if(citecolor)$$citecolor$$else$black$endif$,
73− urlcolor=$if(urlcolor)$$urlcolor$$else$black$endif$,
74− linkcolor=$if(linkcolor)$$linkcolor$$else$black$endif$,
75− pdfborder={0 0 0}$if(hidelinks)$,
76− 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}
7779\urlstyle{same} % don't use monospace font for urls
7880$if(lang)$
7981\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
@@ -206,7 +208,9 @@ $include-before$
206208$endfor$
207209$if(toc)$
208210{
211+$if(colorlinks)$
209212\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
213+$endif$
210214\setcounter{tocdepth}{$toc-depth$}
211215\tableofcontents
212216}