rstudio / bookdown

Authoring Books and Technical Documents with R Markdown
https://pkgs.rstudio.com/bookdown/
GNU General Public License v3.0
3.78k stars 1.27k forks source link

Confusing Documentation for Specifying Themes #1322

Open kputschko opened 2 years ago

kputschko commented 2 years ago

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
cderv commented 2 years ago

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.