Skip to content

bookdown 0.22

Compare
Choose a tag to compare
@yihui yihui released this 22 Apr 13:59

NEW FEATURES

  • New bs4_book() theme - see ?bs4_book for details about this new format (thanks, @hadley, #996).

  • render_book() can now take a directory as input, i.e render_book("book_dir"), to render in this directory by using the index.Rmd file if it exists. The default is now to look for input.Rmd is the current working directory. Previously, filename must have been provided (render_book() is now equivalent to render_book("index.Rmd")) (#990).

  • hypothesis environment is now supported among Theorems and Proof (thanks, @shirdekel, #1102).

  • In _bookdown.yaml, label fields fig, tab and eq can now take a function as ui fields chapter_name and appendix. This function takes the reference number as only argument and must return a character to be used as full label. The default is a string prepended before the reference number. This new feature gives more flexibility to change the default for other language, e.g append the label name after the number. See updated doc about Internationalization(thanks, Tamás Ferenc, #1114)

  • Using the 'Knit' button now also works with a Rmd file in a sub-directory of the book project (when rmd_subdir is used in _bookdown.yml) (#1122)

  • WhatsApp sharing feature has been added for gitbook() using sharing key in config. This enables sharing the bookdown URL in Whatsapp on Mobile and on Desktop (thanks, @prdm0, #1125).

BUG FIXES

  • Adapt CSS in gitbook() and html_book() for correct diplaying of <details><summary> content (thanks, @maelle, #971)

  • When split_bib = TRUE, references in footnotes are now also correctly relocated in the chapter (thanks, @jimhshen, #952)

  • In pdf_book(), toc_bib = TRUE now works with natbib and biblatex as citation_package (thanks, @qifei9, @umarcor, #450).

  • CSS dependencies like url('truetype/Spectral-ExtraLight.ttf') (with single quotes) are now correctly identified and moved (thanks, @RLesur, #991).

  • fenced_theorems() now correctly transforms implicit label in chunk header to a fenced divs id. (thanks, @Enixam, #982)

  • References are now correctly relocated with Pandoc 2.11 when split_bib = TRUE in gitbook(). New citation processing in Pandoc 2.11 will also add new classes to the divs, and these are preserved when relocating. This allows for references styling using CSS (#981).

  • The new syntax for theorem and proof environments introduced in bookdown requires Pandoc >= 2.3 instead of 2.0 (thanks, @markhymers, #979 #980).

  • serve_book() will refresh correctly now when using subdirectories with rmd_subdir (thanks, @shenfei, #834).

  • Added the same CSS as in default Pandoc's template for when a CSL is used (#1045).

  • Properly support multiple authors in the gitbook() output format (thanks, @adamvi, #1095).

  • No more warnings are thrown when passing several input files to render_book(preview = TRUE) (#1091).

  • Correctly remove reference IDs of tables (e.g (#tab:lab)) generated by custom function (like gt::gt()) (#1099).

  • In sepia or night mode, the background color during sidebar transition is now correct and no more white (#1100).

  • Fix an issue in bs4_book() with encoding on system non-UTF8 by default (#1027).

MINOR CHANGES

  • anchor_sections = TRUE becomes the default for bookdown::gitbook().