Skip to content

Releases: rstudio/bookdown

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

bookdown 0.12

11 Jul 18:36
Compare
Choose a tag to compare

MINOR CHANGES

  • Reverted #706 and removed the clean_highlight_tags argument in html_document2(); bookdown will no longer clean up the HTML tags of the syntax-highlighted code blocks.

BUG FIXES