bookdown icon indicating copy to clipboard operation
bookdown copied to clipboard

Confusing Documentation for Specifying Themes

Open kputschko opened this issue 2 years ago • 1 comments

https://github.com/rstudio/bookdown/blob/23d5a4c76605b8ca0f5b4bde04f60276e4ab6046/inst/examples/03-formats.Rmd#L230

I'm trying to edit the theme of a bs4_book, but the documentation doesn't make it clear how I am supposed to alter the default theme. You mention this function, but there is no example of this function being used in the YAML header of the index.Rmd file.

bs4_book(theme = bs4_book_theme(), repo = NULL, ...,
  lib_dir = "libs", pandoc_args = NULL, extra_dependencies = NULL,
  template = "default", split_bib = FALSE, footnotes_inline = TRUE)

I try something like this, and it does work, but I'm not sure why it does. And I'm not sure where I would put a bs_lib() theme definition to modify the theme more generally.

output:
  bookdown::bs4_book: 
    theme:
      font_scale: .90

kputschko avatar Mar 31 '22 16:03 kputschko

Thanks for the report. We'll try to update the documentation to be more precise in Bookdown.

Most documentation for styling with bslib are on its website: https://pkgs.rstudio.com/bslib/ If you have not look at it yet, you could find useful information maybe.

cderv avatar Apr 01 '22 09:04 cderv