mitchelloharawild / vitae

R Markdown Résumés and CVs
https://pkg.mitchelloharawild.com/vitae/
1.22k stars 237 forks source link

Support for `urlcolor:` in YAML #175

Open Aariq opened 3 years ago

Aariq commented 3 years ago

Links appear formatted the same as the rest of the text (at least in moderncv). It would be nice if they (optionally) were formatted blue. For pdf_document this is controlled by the YAML options urlcolor and linkcolor.

CarlosPoses commented 2 years ago

Hi, a workaround around this is to add links using: "\\href{https://github.com/mitchelloharawild/vitae/}{\\textcolor{blue}{Text}" . At least working for me. Still, support in the YAML header would surely be nice.

acircleda commented 2 years ago

I add this to my YAML and it works:

header-includes:
  - \definecolor{linkscolor}{HTML}{026dbb}
  - \hypersetup{colorlinks=true, linkcolor=linkscolor, filecolor=linkscolor, urlcolor=linkscolor, urlbordercolor=linkscolor}

image

Aariq commented 2 years ago

Hmm, doesn't work for me still. I get

! Undefined control sequence.
l.41 \hypersetup
                {colorlinks=true, linkcolor=linkscolor, filecolor=linkscolor... 

and if I add -\usepackage{hyperref} then I get ! LaTeX Error: Option clash for package hyperref.

rikudoukarthik commented 1 year ago

@acircleda's workaround works for me (thanks!). Having the option to directly set it in the YAML would still be a useful feature, I think.