Skip to content

Commit

Permalink
allow fig_caption to be modified in html_letter
Browse files Browse the repository at this point in the history
this fixes #234
  • Loading branch information
RLesur committed Aug 11, 2021
1 parent f63b780 commit 7daf1c0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: pagedown
Type: Package
Title: Paginate the HTML Output of R Markdown with CSS for Print
Version: 0.15.1
Version: 0.15.2
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
person("Romain", "Lesur", role = c("aut", "cph"), comment = c(ORCID = "0000-0002-0721-5595")),
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGES IN pagedown VERSION 0.16

## MINOR CHANGES

- Document that the `html_letter()` output format modifies the default value of the `fig_caption` parameter and allow the user to change it (thanks, @NewGraphEnvironment, #234).

# CHANGES IN pagedown VERSION 0.15

Expand Down
13 changes: 7 additions & 6 deletions R/paged.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ html_paged = function(

#' Create a letter in HTML
#'
#' This output format is similar to \code{html_paged}. The only difference is in
#' the default stylesheets. See \url{https://pagedown.rbind.io/html-letter/} for
#' an example.
#' @param ...,css Arguments passed to \code{\link{html_paged}()}.
#' This output format is similar to \code{html_paged}. The only differences are
#' in the default stylesheets and the default value of the \code{fig_caption}
#' parameter which is set to \code{FALSE}. See
#' \url{https://pagedown.rbind.io/html-letter/} for an example.
#' @param ...,css,fig_caption Arguments passed to \code{\link{html_paged}()}.
#' @return An R Markdown output format.
#' @export
html_letter = function(..., css = c('default', 'letter')) {
html_paged(..., css = css, fig_caption = FALSE)
html_letter = function(..., css = c('default', 'letter'), fig_caption = FALSE) {
html_paged(..., css = css, fig_caption = fig_caption)
}

#' Create a book for Chapman & Hall/CRC
Expand Down
11 changes: 6 additions & 5 deletions man/html_letter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7daf1c0

Please sign in to comment.