[Tex/LaTex] Why are the hyper references pink


I have this in the heading of my document:


Yet the links look like this:

enter image description here

Why the pink color when it says blue in the preamble?

There are a number of other things in the full .tex document; I used Pandoc to create this from the original .Rmd file, so perhaps that helps explain it. In any case, I want a more conventional blue link color!

Best Answer

If you check the LaTeX-template of pandoc via pandoc -D latex, you'll see

            pdfborder={0 0 0}



Everything between to $ is preprocessed by pandoc, mostly expanded to the respective variable except for the $if...$s etc., which means the variables citecolor, urlcolor, linkcolor and toccolor (the linkcolor in the TOC only) are used. So in your case you have to put

linkcolor: blue

into your document's YAML-header or provide one of -M|V linkcolor=blue or --metadata|variable=linkcolor:blue. Whether you use M/metadata or V/variable depends on whether you only want to affect the template (via V) or truly set/replace the metadata (via M) which might also influence any filters used or (though not in this case) be output in the resulting document.

Concerning unicode=true, the template has

  \usepackage[setpagesize=false, % page size defined by xetex
              unicode=false, % unicode breaks when used with xetex

in it, i.e. unicode is set to true unless you're compiling with XeLaTeX. If you don't want this, you'd have to modify the template itself, or the generated TeX-file.

Related Question