I currently have a few bookdown projects which are hosted as Github.io projects. Across these projects I use custom defined css styling for chunks, which allow for code folding boxes and coloured notes.
I'd like to be able to render these projects in a pdf version as well as the html. Clearly this would require changing the chunk options for a large number of code chunks so doing it manually would not be feasible.
For example a chunk such as
```{r, engine=block2, type='fold'}
Some uninspired R code ```
Is unable to be rendered to pdf due to the html required for styling. Therefore if there a way to change this, and chunks like these, to a format which allows for pdf rendering.
I was wondering if anybody has a good system in place for doing this?