Is there a way to set global knitr options for ALL chapters in bookdown?
Currently, I'm setting global knitr options for each chapter (Rmd file) to specify a figure width and length. I was wondering if there's a easier way to set global knitr options for ALL the chapters at once.
How are you setting those options ?
Which configuration are you changing in your project (in _bookdown.yaml for example) ?
You should be able to change knitr option once using a chunk in index.Rmd when you are using new_session = FALSE. You need to apply them per file if you are using new_session = TRUE because each file is knitted independently. However, in that case, you can create a file with the common R code and load this file in each document (for example using this 16.2 Read external scripts into a chunk | R Markdown Cookbook)
For figure width and length, you should be able to pass the option as argument to the function as with usual HTML format