Skip to content

Commit 51e7ff1

Browse files
committed
fix rstudio/rmarkdown#1721: use the meta variable has-frontmatter=false to disable the automatic addition of \frontmatter, \mainmatter, and \backmatter
1 parent 09c6bb9 commit 51e7ff1

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: bookdown
22
Type: Package
33
Title: Authoring Books and Technical Documents with R Markdown
4-
Version: 0.16.2
4+
Version: 0.16.3
55
Authors@R: c(
66
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
77
person("JJ", "Allaire", role = "ctb"),
@@ -78,5 +78,5 @@ URL: https://github.com/rstudio/bookdown
7878
BugReports: https://github.com/rstudio/bookdown/issues
7979
SystemRequirements: Pandoc (>= 1.17.2)
8080
LazyData: TRUE
81-
RoxygenNote: 7.0.1
81+
RoxygenNote: 7.0.2
8282
Encoding: UTF-8

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
- For output formats like `pdf_book`, unused arguments passed to `base_format` will be discarded (thanks, @jooyoungseo, #790).
1010

11+
- 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).
12+
1113
## MINOR CHANGES
1214

1315
- The default value of `base_format` in the `markdown_document2` format is `rmarkdown::md_document` now. Previously the default value is missing.

R/latex.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ pdf_book = function(
8080
# always enable tables (use packages booktabs, longtable, ...)
8181
pre = config$pre_processor
8282
config$pre_processor = function(...) {
83-
c(if (is.function(pre)) pre(...), '--variable', 'tables=yes', '--standalone')
83+
c(
84+
if (is.function(pre)) pre(...), '--variable', 'tables=yes', '--standalone',
85+
if (rmarkdown::pandoc_available('2.7.1')) '-Mhas-frontmatter=false'
86+
)
8487
}
8588
config$bookdown_output_format = 'latex'
8689
config = set_opts_knit(config)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy