2

In my R Markdown PDFs I want to cross-reference citations with the auto-generated bibliograpy at the end of the document. In addition, in the PDF the links should appear colored and it should be possible to jump back to the previous text position.

Does anyone have a clue how I could accomplish this?

---
output: pdf_document
bibliography: bibliography.bib
fig_caption: yes
---
```{r setup, include=FALSE, tidy=TRUE}
library(knitr)
opts_chunk$set(echo = TRUE)
```
# Chapter
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy 
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam 
voluptua [@smith2017]. At vero eos et accusam et justo duo dolores et ea 
rebum. Einstein [-@einstein1935] stet clita kasd gubergren, no sea 
akimata sanctus est Lorem ipsum dolor sit amet.

The expected output could be something like this: enter image description here

jay.sf
  • 60,139
  • 8
  • 53
  • 110

1 Answers1

1

Ok, I have this checked out by myself now and it was quite easy: We have to set this render options in the YAML:

urlcolor: blue
linkcolor: blue

By this time I've discarded the jump-back option.

jay.sf
  • 60,139
  • 8
  • 53
  • 110