1
votes

I have a Rmarkdown file where I include figures with

knitr::include_graphics

The figures show up in the knitted document nicely. However, when I'm reading the knitted document, if I want to focus on one figure, I use the zoom option of the browser, which is not ideal.

Is it possible to add open the figure in a larger window when clicked on it?

PS: I use gitbook and/or bookdown::html for the output format of my Rmd files.

1

1 Answers

1
votes

You can try out the themes from rmdformats package which implement this feature. They call it lightbox. To enable,you just need to set lightbox to true in the RMD yaml.

Example:

---
title: "My document"
output:
  rmdformats::downcute:
    lightbox: true
---