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.
This commit is contained in:
John MacFarlane 2018-08-16 20:48:51 -07:00
parent 13dea94a91
commit fe312b0a7a
3 changed files with 10 additions and 6 deletions

View file

@ -1526,12 +1526,14 @@ LaTeX variables are used when [creating a PDF].
: options to pass to the microtype package
`colorlinks`
: add color to link text; automatically enabled if any of `linkcolor`, `citecolor`,
`urlcolor`, or `toccolor` are set
: add color to link text; automatically enabled if any of
`linkcolor`, `filecolor`, `citecolor`, `urlcolor`, or `toccolor` are set
`linkcolor`, `citecolor`, `urlcolor`, `toccolor`
: color for internal links, citation links, external links, and links in table of contents:
uses options allowed by [`xcolor`], including the `dvipsnames`, `svgnames`, and `x11names` lists
`linkcolor`, `filecolor`, `citecolor`, `urlcolor`, `toccolor`
: color for internal links, external links, citation links, linked
URLs, and links in table of contents, respectively: uses options
allowed by [`xcolor`], including the `dvipsnames`, `svgnames`, and
`x11names` lists
`links-as-notes`
: causes links to be printed as footnotes

View file

@ -183,6 +183,7 @@ $endif$
$if(colorlinks)$
colorlinks=true,
linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$,
citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
$else$

View file

@ -248,7 +248,8 @@ pandocToLaTeX options (Pandoc meta blocks) = do
defField "biblatex" True
_ -> id) $
defField "colorlinks" (any hasStringValue
["citecolor", "urlcolor", "linkcolor", "toccolor"]) $
["citecolor", "urlcolor", "linkcolor", "toccolor",
"filecolor"]) $
(if null dirs
then id
else defField "dir" ("ltr" :: String)) $