Skip to content

Commit

Permalink
fix rstudio/rmarkdown#2526 by reverting bebf117 since the cairo_pdf
Browse files Browse the repository at this point in the history
… device has been explicitly supported in chunk_device(); now all possible `pdf()` arguments are supported, including `family`
  • Loading branch information
yihui committed Oct 31, 2023
1 parent ce8cf77 commit c520211
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: knitr
Type: Package
Title: A General-Purpose Package for Dynamic Report Generation in R
Version: 1.45.2
Version: 1.45.3
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
person("Abhraneel", "Sarma", 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 @@

- `write_bib()` generated empty entries for packages without URLs (thanks, @bastistician, #2304).

- The `family` argument was not passed to the `pdf` device (thanks, @sebkopf, rstudio/rmarkdown#2526).

# CHANGES IN knitr VERSION 1.45

## NEW FEATURES
Expand Down
2 changes: 1 addition & 1 deletion R/block.R
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ chunk_device = function(options, record = TRUE, tmp = tempfile()) {
} else if (identical(getOption('device'), pdf_null)) {
if (!is.null(dev.args)) {
dev.args = get_dargs(dev.args, 'pdf')
dev.args = dev.args[intersect(names(dev.args), c('pointsize', 'bg'))]
dev.args = dev.args[intersect(names(dev.args), names(formals(pdf)))]
}
do.call(pdf_null, c(list(width = width, height = height), dev.args))
} else dev.new(width = width, height = height)
Expand Down

0 comments on commit c520211

Please sign in to comment.