Hyperref doesn't work in rmarkdown

Hi!

I'm sorry for not responding as fast as before.

In summary, you were right! I think they wanted us to use the pandoc variables; here's the recipe that worked:

  1. In header-includes write: \usepackage{hyperref}

  2. In the YAML, or at some point in the document, set: colorlinks: true

  3. Specify the colors of your links with latex in header-includes or with pandoc variables:

    • \hypersetup{ urlcolor = blue, citecolor = blue}
    • linkcolor: black
  4. By using pandoc variables in the YAML, the links changed their color. The latex specification of the linkcolordoesn't work

Overall, as @cderv stated, let's leverage pandoc's variables

Thank you so much for your support!

1 Like