I am having problems getting correct pdf output of figure legends that contain a url. It works as bookdown::gitbook
but not as bookdown::pdf_book
Here is an example:
---
output: bookdown::pdf_book
---
## Reference with URL doesn't work
In this experiment, we will use a [spectrophotometer] (https://en.wikipedia.org/wiki/Spectrophotometry) to measure the absorption of light of different wavelength by colored solutions.
(ref:spectrum) [Spectrum of light. V, violet; B, blue; G, green Y, yellow; O, orange; R, red](https://commons.wikimedia.org/wiki/File:Linear_visible_spectrum.svg)
```{r spectrum, fig.cap='(ref:spectrum)', echo=FALSE, message=FALSE, warning=FALSE}
knitr::include_graphics("./figures/photosynthesis/spectrum.png")
```
## Reference without URL does work
In this experiment, we will use a [spectrophotometer] (https://en.wikipedia.org/wiki/Spectrophotometry) to measure the absorption of light of different wavelength by colored solutions.
(ref:spectrumNOurl) Spectrum of light. V, violet; B, blue; G, green Y, yellow; O, orange; R, red.
```{r spectrumNOurl, fig.cap='(ref:spectrumNOurl)', echo=FALSE, message=FALSE, warning=FALSE}
knitr::include_graphics("./figures/photosynthesis/spectrum.png")
```
What I want is the figure legend appearing like in the example without url but with a superscript to the url in a footnote.
Additional Information
I am using bookdown (0.7.8), rstudio (1.1.423) with Pandoc 2.1.3 on a docker container (rocker/rstudio) on OS X (10.13.5 Beta) on MacBook Pro 13.
I have tried everything I could but cannot solve this problem. I downgraded all Pandoc to the 1.x version that comes with bookdown but get the same problem. It doesn't matter whether I use pdflatex or xelatex as engine.