Skip to content

Commit

Permalink
fix rstudio/tufte#75: restore the custom blocks before resolving text…
Browse files Browse the repository at this point in the history
… references
  • Loading branch information
yihui committed May 6, 2020
1 parent 682f96d commit 826076b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bookdown
Type: Package
Title: Authoring Books and Technical Documents with R Markdown
Version: 0.18.2
Version: 0.18.3
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
person("JJ", "Allaire", role = "ctb"),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

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

# CHANGES IN bookdown VERSION 0.18

## NEW FEATURES
Expand Down
5 changes: 3 additions & 2 deletions R/latex.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ pdf_book = function(
config$post_processor = function(metadata, input, output, clean, verbose) {
if (is.function(post)) output = post(metadata, input, output, clean, verbose)
f = with_ext(output, '.tex')
x = resolve_refs_latex(read_utf8(f))
x = read_utf8(f)
x = restore_block2(x, !number_sections)
x = resolve_refs_latex(x)
x = resolve_ref_links_latex(x)
x = restore_part_latex(x)
x = restore_appendix_latex(x, toc_appendix)
if (!toc_unnumbered) x = remove_toc_items(x)
if (toc_bib) x = add_toc_bib(x)
x = restore_block2(x, !number_sections)
if (!is.null(quote_footer)) {
if (length(quote_footer) != 2 || !is.character(quote_footer)) warning(
"The 'quote_footer' argument should be a character vector of length 2"
Expand Down

0 comments on commit 826076b

Please sign in to comment.