Skip to content

Releases: rstudio/bookdown

bookdown 0.22

22 Apr 13:59
Compare
Choose a tag to compare

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().

bookdown 0.21

13 Oct 05:20
Compare
Choose a tag to compare

NEW FEATURES

  • Add the number_sections argument to markdown_document2() and its family. This allows to have now figure references numbered by chapters in these formats, like word_document2() or odt_document2() for example. This argument default to TRUE like html_document2() and pdf_document2(). Set it to number_sections = FALSE to get the same output as previous version without numbered chapters (thanks, @atusy, #756).

  • Provided an alternative way to create theorem and proof environments using Pandoc's fenced Divs. Previously, bookdown supports theorems and proofs in special code chunks like ```{theorem}. Now you can use the new syntax ::: {.theorem}. You may use the helper function bookdown::fence_theorems() to convert the former syntax to the latter. The main benefit of using fenced Divs is that you can write arbitrary content in a theorem environment (here "theorem" includes other environments such as lemma, corollary, and definition, etc.), such as R code chunks and inline R code, which was not possible previously. Note that this feature is only supported for LaTeX and HTML output formats at the moment. To learn more about the fenced Divs in general, you may read this section in R Markdown Cookbook: https://bookdown.org/yihui/rmarkdown-cookbook/custom-blocks.html (thanks, @tchevri #924, @cderv #940).

BUG FIXES

  • Correctly encode the document title when creating the Twitter sharing link from a bookdown chapter (thanks, @maelle, #934).

  • Make sure search_index.json contains valid characters for the JSON format (thanks, @wlandau, #913).

MAJOR CHANGES

  • The --file-scope behavior introduced in bookdown v0.20 is now disabled by default. This is due to broken TOC links for duplicate section names (e.g., "Exercises"; see #909) that have automatically generated identifiers.

  • The clean_envir argument of bookdown::render_book() has been deprecated and will be removed in the future (thanks, @jenslaufer, #932).

  • The function kindlegen() has been deprecated, since Amazon no longer provides KindleGen. Please consider using bookdown::calibre() instead if you want .mobi output (#973).

MINOR CHANGES

  • Updated documentation for render_book() to make it clearer how options are set for the output_format parameter (thanks, @jonathan-g, #958 #930).

bookdown 0.20

23 Jun 21:05
Compare
Choose a tag to compare

NEW FEATURES

  • If delete_merged_file is set to false in _bookdown.yml, the merged (Rmd or md) file will not be deleted after the book is rendered (thanks, ilse pit, https://stackoverflow.com/q/61973608/559676).

  • Numeric footnotes duplicated across chapters are now automatically renumbered. This is done by passing the --file-scope argument to pandoc (and having it operate on split out individual chapters of the target .md file rather than a combined file). This behavior can be toggled off by setting options(bookdown.render.file_scope = FALSE).

BUG FIXES

  • Fixed a JS issue in gitbook when it is used with jQuery 3.x (thanks, @afkegel, #895).

MINOR CHANGES

  • Removed the encoding argument from bookdown::render_book(). This argument has always been ignored in bookdown.

bookdown 0.19

15 May 14:58
Compare
Choose a tag to compare

BUG FIXES

  • Multiline footnotes are now correctly rendered in HTML output (thanks, @jtbayly, @cderv, #876).

  • Text references do not work for theorem environments (thanks, @ssp3nc3r, rstudio/tufte#75).

  • When both rmd_subdir and rmd_files are provided in the config file _bookdown.yml, only the files specified in rmd_files are now selected in addition to files under rmd_subdir. In the previous version, all files under the root directory are selected (thanks, @Gnossos #885, @cderv #886).

  • When rmd_subdir is provided in _bookdown.yml, the subdirectories were always alphabetically ordered instead of following the order of elements in rmd_subdir (thanks, @Rothdyt, #736).

MAJOR CHANGES

  • Files with a leading _ in their names are always ignored, even if they are specified in rmd_files in _bookdown.yml. Such files under subdirectories are also always ignored (#886).

bookdown 0.18

05 Mar 15:02
Compare
Choose a tag to compare

NEW FEATURES

BUG FIXES

  • render_book() works correctly with output_dir = "." now (thanks, @julianre, @cderv, #857).

  • Cross-referencing works correctly now with gitbook when using split_by: section or split_by: section+number (thanks, @ThierryO, @cderv, #787).

  • When using the Knit-and-Merge approach to compile a book (new_session: true in _bookdown.yml) and the fields before_chapter_script and/or after_chapter_script are configured in _bookdown.yml, the original Rmd files are no longer touched (thanks, @clauswilke #405 and @bob-carpenter https://stackoverflow.com/q/50554196/559676), and the scripts specified in before/after_chapter_script are no longer inserted into the Rmd files (they are read and evaluated separately), so the line numbers will be correct in case of knitr errors (thanks, @arencambre, #852).

bookdown 0.17

12 Jan 04:17
Compare
Choose a tag to compare

NEW FEATURES

  • Added an output format github_document2, which is a wrapper function based on markdown_document2 using rmarkdown::github_document as the base format (thanks, @jooyoungseo, #831).

BUG FIXES

MINOR CHANGES

  • The default value of base_format in the markdown_document2 format is rmarkdown::md_document now. Previously the default value is missing.

bookdown 0.16

22 Nov 23:37
Compare
Choose a tag to compare

NEW FEATURES

  • You can also add a "view" button on the GitBook toolbar, similar to the "edit" and "history" buttons, which shows the page's .Rmd source file on GitHub. Unlike "edit", "view" does not require the reader to login to GitHub and fork the repo (thanks, @jtr13, #806).

  • For gitbook output, the font setting button can be removed via fontsettings: false in the config option. Similarly, the info button can be removed by info: false in config (thanks, @mnazarov, #788).

  • It is possible to customize the prefixes of appendix titles in gitbook output now (the default is still A, B, C, ..., and now you can change them to something like Appendix A, Appendix B, ...); see the documentation at https://bookdown.org/yihui/bookdown/internationalization.html (thanks, @WerthPADOH, #783).

  • Added html_fragment2, html_notebook2, html_vignette2, ioslides_presentation2, slidy_presentation2, and beamer_presentation2 for cross-referencing capabilities on top of rmarkdown output formats (thanks, @jooyoungseo, #789 #823).

BUG FIXES

  • For the gitbook output format, disabling the sharing menu or buttons works again (thanks, @lwjohnst86, #812).

  • For the gitbook output format, toc collapsed by section now works with accents in chapter titles (thanks, @glimmerphoenix, @cderv, #819)

  • For output formats word_document2, powerpoint_presentation2, and odt_document2, $$ is no longer added to equation environments when they are inside fenced code blocks (thanks, @N0rbert, #814).

bookdown 0.15

12 Nov 18:25
Compare
Choose a tag to compare

BUG FIXES

  • Sharing to Facebook and Twitter is possible again. Google+ sharing has been disabled (with a warning) as this service no longer exists (thanks, @cderv, #802).

  • When using Pandoc 2.7.3 or later, footnotes are now placed again at the end of each chapter (#798, #801, thanks @cderv).

  • gitbook toolbar is not missing any more when rendering books with Pandoc 2.x and using self_contained = TRUE (thanks, @Pindar777, @RLesur, @cderv, #739).

bookdown 0.14

01 Oct 20:17
Compare
Choose a tag to compare

NEW FEATURES

BUG FIXES

  • Images specified in toc: before: of the gitbook format are not copied to the output directory (thanks, @dcossyleon, #763).

bookdown 0.13

21 Aug 15:07
Compare
Choose a tag to compare

NEW FEATURES

  • Added odt_document2 and powerpoint_presentation2 (thanks, @atusy, #742).

  • Added markdown_document2 which enables to use cross references in an arbitrary format specified in base_format argument (e.g., markdown_document2(base_format = prettydoc::html_pretty)) (thanks, @atusy, #742).