bookdown 0.22
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.erender_book("book_dir")
, to render in this directory by using theindex.Rmd
file if it exists. The default is now to look forinput.Rmd
is the current working directory. Previously, filename must have been provided (render_book()
is now equivalent torender_book("index.Rmd")
) (#990). -
hypothesis
environment is now supported among Theorems and Proof (thanks, @shirdekel, #1102). -
In
_bookdown.yaml
,label
fieldsfig
,tab
andeq
can now take a function asui
fieldschapter_name
andappendix
. 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()
usingsharing
key inconfig
. This enables sharing the bookdown URL in Whatsapp on Mobile and on Desktop (thanks, @prdm0, #1125).
BUG FIXES
-
Adapt CSS in
gitbook()
andhtml_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 ascitation_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
ingitbook()
. 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 withrmd_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 (likegt::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 forbookdown::gitbook()
.