Releases: rstudio/bookdown
bookdown 0.31
- This package requires R >= 3.5.0 now.
bookdown 0.30
-
Support specific markdown content like list or code chunk inside Theorem and Proof special environments (#1371).
-
Fix regression about special usage of bookdown project not using
index.Rmd
as main file. It is recommended to useindex.Rmd
in all projects, but workflow has been improved for other cases (thanks, @otoomet, #1349).
bookdown 0.29
bookdown 0.28
bookdown 0.27
-
Fix
fence_theorems()
so thatoutput
is not ignored anymore. With previous version, whenoutput
was different thanNULL
, the result was written toinput
, ignoringoutput
value. From now on, setinput
andoutput
to the same file if you want to overwrite (thanks, @Scinawa, #1342). -
Tweak
bs4_book()
default CSS for better support of python chunk highlighting (thanks, @briandk, #1333). -
Fix an issue with guessing output format when no
output_format
is provided inrender_book()
for files in armd_subdir
folder (thanks, @shivam7898, #1331). -
Fix the issue of the invisible
gitbook
toolbar on iPad (thanks, @mpereira-dev, #60).
bookdown 0.26
-
Fix issues with TOC in
gitbook()
and Pandoc 2.18 (thanks, @avraam-inside, #1326, #1329). -
Fix an issue with per-format
rmd_files
config when nooutput_format
was provided inrender_book()
(thanks, @ellessenne, #1323). -
Added support for theorem/proof environments back for Word/EPUB/ODT output (thanks, @N0rbert, #1313).
-
kindlegen()
is defunct now.
bookdown 0.25
NEW FEATURES
-
Set option
bookdown.theorem.enabled = FALSE
to opt-out bookdown special Theorem and Proof environment syntax.options(bookdown.theorem.enabled = FALSE)
must be called before the function to render the book, e.g in a project's.Rprofile
. This can be useful for advanced users who only want PDF output and needs to handle themselves the environment using LaTeX directly, or Custom Blocks syntax without bookdown interfering (thanks, @finkelshtein, #1285). -
bs4_book()
gains afootnotes_inline
argument. Set toFALSE
to opt-out the default behavior of moving footnotes inline to show on hover (thanks, @Pindar777, #1253).
BUG FIXES
-
Fix styling of bibliography for
bs4_book()
(thanks, @Selbosh, #1277). -
Fix an issue with Pandoc 2.17 and internationalization of Proof-like environment (#1302).
-
Fix an issue with Pandoc 2.17 and cross referencing sections in non HTML format (thanks, @N0rbert, #1301).
-
Fix an issue with Pandoc 2.15 and footnote relocation in each chapter (#1275).
-
Fix an issue with
html_book()
andtoc.css
not working correctly with recent pandoc (thanks, @florisvdh, #1268). -
Fix an issue with unneeded
header-attr.js
inserted by rmarkdown while bookdown already cleans attributes (thanks, @salim-b, #865).
MAJOR CHANGES
-
The
theorem
andproof
knitr engines no longer use theblock2
knitr engine to create theorem/proof environments, but write out fencedDiv
s instead, which is the new syntax for these environments. Note that this means these environments are no longer supported in EPUB output (they work only in HTML and PDF), but hopefully the support will be back in the future (thanks, @deleeuw, #1178). -
The tag
<meta property="og:url">
has been removed from the default HTML template and thegitbook
template (thanks, @jtbayly, #970).
bookdown 0.24
MAJOR CHANGES
-
The default search engine for
gitbook
has been changed fromlunr
tofuse
. If you want to switch back tolunr
, you may set:output: bookdown::gitbook: config: search: engine: lunr
MINOR CHANGES
-
Reverted the fix for #1223 since it only affects a specific version of Pandoc (2.14.1). If this issue affects you, please see #1223 for workarounds.
-
bs4_book()
now has thetemplate
argument likegitbook()
(thanks, @shinneuro, #1247).
BUG FIXES
-
extra_dependencies
ingitbook()
will now be appended after Gitbook's dependencies so that it does not get overridden (thanks, @ThierryO, @linogaliana, #1101, #1248). -
Fix an issue with Fenced Divs for Theorem & Proof environments in the Lua filter (thanks, @tchevri, #1233).
-
gitbook(self_contained = TRUE)
was slow when the output contains base64-encoded images (thanks, @king2bob, #1236). -
The search config
search: true
orsearch: false
forgitbook
throws a misleading error (thanks, @GegznaV, #1238).
bookdown 0.23
NEW FEATURES
-
This version has included a new RStudio template project to start an HTML book in
bookdown::gitbook
orbookdown::bs4_book
. Template projects can be created using the RStudio IDE menu "New Project", or using one of the two new functions,create_gitbook()
orcreate_bs4_book()
, to easily create the template that you want to start with from within the R console (#225, #1123, #1201). -
Added an argument
global_numbering
to most output format functions in this package to control the figure/table numbering scheme (thanks, @elfunesto #948, @Kodiologist #1057). IfTRUE
, number figures and tables globally throughout a document (e.g., Figure 1, Figure 2, ...). IfFALSE
, number them sequentially within sections (e.g., Figure 1.1, Figure 1.2, ..., Figure 5.1, Figure 5.2, ...). Previously, this numbering scheme was hard-coded internally according to thenumber_sections
argument (global_numbering = !number_sections
). Now the two arguments have become independent, e.g., you can useglobal_numbering = TRUE
withnumber_sections = TRUE
. -
For HTML book formats, a default
404.html
page will now be created if none exists already. This page can be customized by adding a_404.md
or_404.Rmd
file which will be rendered to HTML and inserted in the book. Most web serving platforms (e.g. Netlify, GH Pages, etc.) will use this file named404.html
in the root as a custom error page. Otherwise, like browsers do, a default 404 page is shown. For context, a 404 error indicates that the file can’t be found, and it happens when a browser can’t find a requested web page. This could happen with your online book if you shared a link to a section but change the name of this section leading to a change in url (#1035). -
The
bookdown::gitbook
output format now supports an alternative search engine, namelyfuse.js
, which has several advantages overlunr.js
, the previous search engine forgitbook
. Usingfuse.js
will fix a number of long-standing issues such as #734, #735, and #792. To enablefuse.js
, set the search engine to befuse
ingitbook
's config in YAML, e.g.,output: bookdown::gitbook: config: search: engine: fuse
Depending on user feedback, we may set
fuse
to be the default search engine in a future version of bookdown. We will appreciate your testing and feedback! -
bs4_book(splib_bib = TRUE)
can now be specified to have the same effect as ingitbook()
. References will be shown at the end of each chapter and not only at the end of the book. This is useful withbs4_book()
when a citation style not supporting footnotes is used because in that case, references are not shown inline in popups (thanks, @shirdekel, #1185). -
In
bs4_book()
, improvement regarding copy button:- It has now a light icon instead of a text with white background (#1192).
- It will no more show on output block code when knitr's option is
collapse = FALSE
(#1197). - It will now be placed correctly on the right side of the code block, with a light color which gets darker on hover so that it is less obtrusive when overlapping text in block with long lines (#1204). If you want to customize part of the UI to change this default behavior, you can do it using a custom css with
bs4_book()
.
-
In
bs4_book()
, copy button has now a light icon instead of a text with white background (#1192). -
bs4_book()
has now some<meta>
tags that allows sharing a published book on social media.cover-image
,url
,title
anddescription
set in YAML will be used inindex.html
and then modified to be adapted per HTML page (#1034). -
repo
specification inbs4_book()
can now be done in a more flexible way: base url, branch name, subdir and icon can be specify. See?bookdown::bs4_book()
for details (thanks, @maelle, #1036). -
epub_version
argument inepub_book()
can now be set toepub2
to create EPUB book of version 2. This follows an old change for default behavior in Pandoc 2.0 where the aliasepub
defaults toepub3
and no moreepub2
(thanks, @jtbayly, #1150). -
Theorem and Proof environment can now be used with
beamer_presentation2()
using fenced Div syntax like this::: {.theorem #label name="My Theorem"} Content :::
However, as beamer defines its own LaTeX theorem environments, bookdown won't add any definition in preamble as it is doing with
pdf_book()
. This means user will have to define the ones supported by bookdown and not yet defined by beamer. Special environment from beamer (likefact
) needs to be used with usual Custom Blocks syntax. See related issues for examples in their discussions thread (thanks, @XiangyunHuang, #1143, #1145).This change comes with several small improvements in
custom-enviromnent.lua
forlatex
andbeamer
format, including a new optionbookdown.theorem.preamble
to opt-out bookdown addition of theorems and proofs definitions in LaTeX preamble. Set it toFALSE
if you have conflict with some specific format for example (like #1001).
MINOR CHANGES
- Updated the jQuery library to v3.x, which is now imported from the R package jquerylib (thanks, @mterente #693, @cooknl #882).
BUG FIXES
-
Removed the requirement for
.html
filenames to be alphanumeric, which fixes a common error "Automatically generated filenames contain duplicated ones: -" (thanks, @psychelzh #605, @AzureRabbit #902, @carloslederman #1000, Ritsu Kitagawa https://stackoverflow.com/q/60014350/559676, Shrek Tan). -
Fix an issue with
bookdown_site()
where the comment insite:
line key was not supported (thanks, @LDSamson, #1194). -
Figure reference links now point correctly to the top of figures (thanks, @GuillaumeBiessy, #1155).
-
When the
site
field is quoted inindex.Rmd
's YAML data (i.e.,site: "bookdown::bookdown_site"
), bookdown fails to identify the root directory of the book (thanks, @dchiu911, #1160). -
The figure/table labels are no longer duplicated in Word output generated from Pandoc 2.14.1 (thanks, @dewittpe, #1223).
-
When a book has multiple authors, the CSS styles for each author were inlined in the
<p>
tags, and hence are hard to override. Now the classmulti-author
is applied to each individual author's<p>
tag, and the CSS rules are defined on this class instead (thanks, @robjhyndman, #1170). -
Style change in
bs4_book()
where code block inside callout blocks will have their background fill the whole width of the bordered block (#1175). -
In
bs4_book()
, math in footnotes is now rendered (@mine-cetinkaya-rundel, #1026) -
Fix an issue with
bs4_book()
where text written using Line Block was not found in search (thanks, @dmklotz, #1141).
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()
.