Releases: rstudio/bookdown
bookdown 0.21
NEW FEATURES
-
Add the
number_sections
argument tomarkdown_document2()
and its family. This allows to have now figure references numbered by chapters in these formats, likeword_document2()
orodt_document2()
for example. This argument default toTRUE
likehtml_document2()
andpdf_document2()
. Set it tonumber_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 functionbookdown::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 ofbookdown::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 usingbookdown::calibre()
instead if you want.mobi
output (#973).
MINOR CHANGES
- Updated documentation for
render_book()
to make it clearer how options are set for theoutput_format
parameter (thanks, @jonathan-g, #958 #930).
bookdown 0.20
NEW FEATURES
-
If
delete_merged_file
is set tofalse
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 settingoptions(bookdown.render.file_scope = FALSE)
.
BUG FIXES
MINOR CHANGES
- Removed the
encoding
argument frombookdown::render_book()
. This argument has always been ignored in bookdown.
bookdown 0.19
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
andrmd_files
are provided in the config file_bookdown.yml
, only the files specified inrmd_files
are now selected in addition to files underrmd_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 inrmd_subdir
(thanks, @Rothdyt, #736).
MAJOR CHANGES
- Files with a leading
_
in their names are always ignored, even if they are specified inrmd_files
in_bookdown.yml
. Such files under subdirectories are also always ignored (#886).
bookdown 0.18
NEW FEATURES
- Added an output format
context_document2
, based on the newly developedrmarkdown::context_document
(see rstudio/rmarkdown#1713, rstudio/rmarkdown#1715, and rstudio/rmarkdown#1725; thanks @jooyoungseo, @atusy, and @RLesur).
BUG FIXES
-
render_book()
works correctly withoutput_dir = "."
now (thanks, @julianre, @cderv, #857). -
Cross-referencing works correctly now with
gitbook
when usingsplit_by: section
orsplit_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 fieldsbefore_chapter_script
and/orafter_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 inbefore/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
NEW FEATURES
- Added an output format
github_document2
, which is a wrapper function based onmarkdown_document2
usingrmarkdown::github_document
as the base format (thanks, @jooyoungseo, #831).
BUG FIXES
-
Fixed cross-reference issues with Pandoc 2.9+. Note that Pandoc 2.8 is not supported since it had a fairly short lifespan, but Pandoc below v2.8 or above v2.9 is still supported (thanks, @N0rbert @RLesur, #832; @jooyoungseo #845).
-
For output formats like
pdf_book
, unused arguments passed tobase_format
will be discarded (thanks, @jooyoungseo, #790). -
For the sake of backward-compatibility, prevent the commands
\frontmatter
,\mainmatter
, and\backmatter
from being automatically added to the LaTeX output when the Pandoc version is higher than 2.7, because bookdown users may have added these commands by themselves (thanks, @remlapmot, rstudio/rmarkdown#1721). -
Fixed the issues yihui/bookdown-chinese#29 and yihui/bookdown-chinese#30. Such issues can occurr on Windows when there are multibyte characters in the section headers, and users will run into the error "Error in file.exists(f): file name conversion problem - name too long?" (thanks, @kongdd @JiaxiangBU @gaospecial and other users who reported the same issue such as https://twitter.com/matsuchiy/status/1186653559405727744 and https://d.cosx.org/d/420961).
MINOR CHANGES
- The default value of
base_format
in themarkdown_document2
format isrmarkdown::md_document
now. Previously the default value is missing.
bookdown 0.16
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 viafontsettings: false
in theconfig
option. Similarly, the info button can be removed byinfo: false
inconfig
(thanks, @mnazarov, #788). -
It is possible to customize the prefixes of appendix titles in
gitbook
output now (the default is stillA
,B
,C
, ..., and now you can change them to something likeAppendix 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
, andbeamer_presentation2
for cross-referencing capabilities on top of rmarkdown output formats (thanks, @jooyoungseo, #789 #823).
BUG FIXES
-
For the
gitbook
output format, disabling thesharing
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
, andodt_document2
,$$
is no longer added to equation environments when they are inside fenced code blocks (thanks, @N0rbert, #814).
bookdown 0.15
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
NEW FEATURES
-
Added
rtf_document2
(thanks, @jooyoungseo, #768). -
Added copy to clipboard buttons to code blocks in the
gitbook
output format (thanks, @behrman #775, @RLesur #776).
BUG FIXES
- Images specified in
toc: before:
of thegitbook
format are not copied to the output directory (thanks, @dcossyleon, #763).