git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer/template: be sensitive to `filecolor` variable.

`linkcolor` only affects internal links, and `urlcolor` only affects linked URLs. For external links, the option to use is `filecolor`. Closes #4822.

commitfe312b0a7a0e63e307162da47dc9f1ca8f47737f authorJohn MacFarlane <jgm@berkeley.edu> dateThu 16 Aug 2018, 20:48 (8 years ago) parent13dea94
3 files changed+11−7
MANUAL.txt+8−6 data/templates/default.latex+1 src/Text/Pandoc/Writers/LaTeX.hs+2−1
MANUAL.txt+8−6
@@ -1526,12 +1526,14 @@ LaTeX variables are used when [creating a PDF].
15261526: options to pass to the microtype package
15271527
15281528`colorlinks`
1529−: add color to link text; automatically enabled if any of `linkcolor`, `citecolor`,
1530− `urlcolor`, or `toccolor` are set
1531−
1532−`linkcolor`, `citecolor`, `urlcolor`, `toccolor`
1533−: color for internal links, citation links, external links, and links in table of contents:
1534− uses options allowed by [`xcolor`], including the `dvipsnames`, `svgnames`, and `x11names` lists
1529+: add color to link text; automatically enabled if any of
1530+ `linkcolor`, `filecolor`, `citecolor`, `urlcolor`, or `toccolor` are set
1531+
1532+`linkcolor`, `filecolor`, `citecolor`, `urlcolor`, `toccolor`
1533+: color for internal links, external links, citation links, linked
1534+ URLs, and links in table of contents, respectively: uses options
1535+ allowed by [`xcolor`], including the `dvipsnames`, `svgnames`, and
1536+ `x11names` lists
15351537
15361538`links-as-notes`
15371539: causes links to be printed as footnotes
data/templates/default.latex+1
@@ -183,6 +183,7 @@ $endif$
183183$if(colorlinks)$
184184 colorlinks=true,
185185 linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
186+ filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$,
186187 citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
187188 urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
188189$else$
src/Text/Pandoc/Writers/LaTeX.hs+2−1
@@ -248,7 +248,8 @@ pandocToLaTeX options (Pandoc meta blocks) = do
248248 defField "biblatex" True
249249 _ -> id) $
250250 defField "colorlinks" (any hasStringValue
251− ["citecolor", "urlcolor", "linkcolor", "toccolor"]) $
251+ ["citecolor", "urlcolor", "linkcolor", "toccolor",
252+ "filecolor"]) $
252253 (if null dirs
253254 then id
254255 else defField "dir" ("ltr" :: String)) $