yihui / bookdown-crc

A minimal example of using bookdown to write a book for Chapman & Hall/CRC
https://yihui.name/en/2018/08/bookdown-crc/
MIT License
72 stars 66 forks source link

\href{} applied to \includegraphics{} doesn't appear to work for pdf #4

Closed cpsievert closed 4 years ago

cpsievert commented 4 years ago

To reproduce, try adding a fig.link="https://google.com" to this code chunk (or any chunk that produces an image):

https://github.com/yihui/bookdown-crc/blob/f91226b1df87164c5030c9f51197df0ce920596a/01-introduction.Rmd#L9

Interestingly, the appropriate \href{} is generated in the resulting tex file (so knitr/bookdown isn't the problem here), but clicking on the image in the pdf does nothing. Any idea why that might be? Perhaps a problem with the krantz.cls file?

yihui commented 4 years ago

You need to put this hack back: e18620b45abcf73935a88e204452c8d5c1b3b4f3

cpsievert commented 4 years ago

Ah, yes, thank you!