From 8cda18b54dc9db2273abcfd0862dccc19119cf09 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Mon, 16 Aug 2021 16:01:50 -0500 Subject: [PATCH 01/16] pin the jquery version to 3: https://github.com/rstudio/rmarkdown/pull/2197#discussion_r689584655 --- DESCRIPTION | 2 +- NEWS.md | 1 + R/html_dependencies.R | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4536543fa7..44f149f237 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rmarkdown Type: Package Title: Dynamic Documents for R -Version: 2.10.1 +Version: 2.10.2 Authors@R: c( person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"), person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), diff --git a/NEWS.md b/NEWS.md index 218bed8be2..348daf2c0f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ rmarkdown 2.11 ================================================================================ +- It is possible to specify the version of jQuery via a global option now, e.g., `options(rmarkdown.jquery.version = 2)` (note that the default major version is `3`). This is mainly for advanced users and developers to test different versions of jQuery. rmarkdown 2.10 diff --git a/R/html_dependencies.R b/R/html_dependencies.R index 87d25fdbc2..af0ecbbdb1 100644 --- a/R/html_dependencies.R +++ b/R/html_dependencies.R @@ -16,7 +16,7 @@ NULL #' @rdname html-dependencies #' @export html_dependency_jquery <- function() { - jquerylib::jquery_core() + jquerylib::jquery_core(major_version = getOption('rmarkdown.jquery.version', 3)) } # Create an HTML dependency for jQuery UI From 122ca543f98fc4fa75dbb6f286dd452a6ff31db9 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Mon, 16 Aug 2021 16:01:50 -0500 Subject: [PATCH 02/16] Resolve conflicts with new updates to RStudio main branch. --- DESCRIPTION | 2 +- NEWS.md | 2 ++ R/html_dependencies.R | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4536543fa7..44f149f237 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rmarkdown Type: Package Title: Dynamic Documents for R -Version: 2.10.1 +Version: 2.10.2 Authors@R: c( person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"), person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), diff --git a/NEWS.md b/NEWS.md index 236df81594..3a6a90aca9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,8 @@ rmarkdown 2.11 ". This makes it possible to have a directory structure for HTML output where there is a shared master library with css, javascript, etc. and separate child directories with RMarkdown files. #146 and #1859. +- It is possible to specify the version of jQuery via a global option now, e.g., `options(rmarkdown.jquery.version = 2)` (note that the default major version is `3`). This is mainly for advanced users and developers to test different versions of jQuery. + rmarkdown 2.10 ================================================================================ diff --git a/R/html_dependencies.R b/R/html_dependencies.R index 82275d0296..802cb4e06b 100644 --- a/R/html_dependencies.R +++ b/R/html_dependencies.R @@ -16,7 +16,7 @@ NULL #' @rdname html-dependencies #' @export html_dependency_jquery <- function() { - jquerylib::jquery_core() + jquerylib::jquery_core(major_version = getOption('rmarkdown.jquery.version', 3)) } # Create an HTML dependency for jQuery UI From 7ea61230bec6f2c233a2e6aa7631861761782c51 Mon Sep 17 00:00:00 2001 From: Jonathan Gilligan Date: Tue, 17 Aug 2021 00:05:03 -0500 Subject: [PATCH 03/16] Add self (JG) as a contributor in DESCRIPTION. --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index 44f149f237..9907ad7e57 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,6 +25,7 @@ Authors@R: c( person("Devon", "Ryan", role = "ctb", email = "dpryan79@gmail.com", comment = c(ORCID = "0000-0002-8549-0971")), person("Frederik", "Aust", role = "ctb", email = "frederik.aust@uni-koeln.de", comment = c(ORCID = "0000-0003-4900-788X")), person("Jeff", "Allen", role = "ctb", email = "jeff@rstudio.com"), + person("Jonathan", "Gilligan", role = "ctb", email = "jonathan.gilligan@gmail.com", comment = c(ORCID = "0000-0003-1375-6686")), person("JooYoung", "Seo", role="ctb", comment = c(ORCID = "0000-0002-4064-6012")), person("Malcolm", "Barrett", role = "ctb"), person("Rob", "Hyndman", role = "ctb", email = "Rob.Hyndman@monash.edu"), From a9a441acd9b1aa559a9b1d3dd131cdb0d06f92b5 Mon Sep 17 00:00:00 2001 From: Jonathan Gilligan Date: Tue, 17 Aug 2021 00:15:13 -0500 Subject: [PATCH 04/16] Update documentation for html_document. --- man/html_document.Rd | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/man/html_document.Rd b/man/html_document.Rd index 32d9ec88a6..2b686af53a 100644 --- a/man/html_document.Rd +++ b/man/html_document.Rd @@ -296,23 +296,26 @@ parameter as an alternative to providing a fully custom template. \section{Directory structure}{ -By default \code{html_document} and related HTML document types put dependency -files into the main output directory or a subdirectory specified by the -\code{lib_dir} parameter: -If \code{lib_dir} is not a direct descendant of the -main output directory, \code{render()} will throw and error with the -message "The path does not appear to be a descendant of -". +By default \code{html_document} and related HTML document types put +dependency files into the main output directory or a subdirectory specified +by the \code{lib_dir} parameter: +If \code{lib_dir} is not a direct descendant of the main output directory, +\code{render()} will throw and error with the message +"The path does not appear to be a descendant of ". Sometimes it is useful to have a directory tree where the different -HTML documents are in their own subdirectories and the -dependencies are in a common directory at the root of the site. +HTML documents are in their own subdirectories and the dependencies are in +a common directory at the root of the site. \itemize{ -\item{\code{main_dir} +\item{ +\code{main_dir/} +\itemize{ +\item{ +\code{lib/} \itemize{ -\item{\code{lib/} -\itemize{\item{dependencies go here}} +\item{dependencies go here} +} } } \item{\code{index.Rmd}} From 065cba34aee07ed9ac289ecbe39ac94247c9fc23 Mon Sep 17 00:00:00 2001 From: Jonathan Gilligan Date: Tue, 17 Aug 2021 00:25:25 -0500 Subject: [PATCH 05/16] Fixed conflicts with rstudio main version. --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 3a6a90aca9..ae2cfcaccf 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ rmarkdown 2.11 ". This makes it possible to have a directory structure for HTML output where there is a shared master library with css, javascript, etc. and separate child directories with RMarkdown files. #146 and #1859. + - It is possible to specify the version of jQuery via a global option now, e.g., `options(rmarkdown.jquery.version = 2)` (note that the default major version is `3`). This is mainly for advanced users and developers to test different versions of jQuery. From 5952bb601086c28b4d51c34ee5defed0e702afb2 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Wed, 18 Aug 2021 11:19:41 +0200 Subject: [PATCH 06/16] Mark result of citeproc conversion as UTF-8 (#2202) Pandoc will output UTF-8 content but on non default UTF-8 (like Windows), system() will return the result string in native encoding. We need to mark it before further processing. fixes #2195 Another option would be to convert to a file and read it back into R. --- DESCRIPTION | 2 +- NEWS.md | 2 ++ R/pandoc.R | 2 ++ tests/testthat/_snaps/pandoc.md | 49 +++++++++++++++++++++++++++++++ tests/testthat/resources/UTF8.bib | 7 +++++ tests/testthat/test-pandoc.R | 11 +++++++ 6 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 tests/testthat/_snaps/pandoc.md create mode 100644 tests/testthat/resources/UTF8.bib create mode 100644 tests/testthat/test-pandoc.R diff --git a/DESCRIPTION b/DESCRIPTION index 44f149f237..6914851a8b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rmarkdown Type: Package Title: Dynamic Documents for R -Version: 2.10.2 +Version: 2.10.3 Authors@R: c( person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"), person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), diff --git a/NEWS.md b/NEWS.md index 348daf2c0f..cff656c262 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,8 @@ rmarkdown 2.11 - It is possible to specify the version of jQuery via a global option now, e.g., `options(rmarkdown.jquery.version = 2)` (note that the default major version is `3`). This is mainly for advanced users and developers to test different versions of jQuery. +- `pandoc_citeproc_convert()` now handles correctly bib file containing specific UTF-8 characters on non default UTF-8 systems like Windows (thanks, @mitchelloharawild, #2195). + rmarkdown 2.10 ================================================================================ diff --git a/R/pandoc.R b/R/pandoc.R index bacb4a18a0..bb715b91ff 100644 --- a/R/pandoc.R +++ b/R/pandoc.R @@ -157,6 +157,8 @@ pandoc_citeproc_convert <- function(file, type = c("list", "json", "yaml")) { stop("Error ", status, " occurred building shared library.") } + Encoding(result) <- "UTF-8" + # convert the output if requested if (type == "list") { jsonlite::fromJSON(result, simplifyVector = FALSE) diff --git a/tests/testthat/_snaps/pandoc.md b/tests/testthat/_snaps/pandoc.md new file mode 100644 index 0000000000..ea7127184e --- /dev/null +++ b/tests/testthat/_snaps/pandoc.md @@ -0,0 +1,49 @@ +# Converting bib file is working + + list(list(author = list(list(family = "Conceição", given = "Sérgio")), + "container-title" = "Portuguese History", id = "conc2021", + issue = "1", issued = list("date-parts" = list(list(2021L))), + title = "História da habitação", type = "article-journal")) + +--- + + [1] "[" + [2] " {" + [3] " \"author\": [" + [4] " {" + [5] " \"family\": \"Conceição\"," + [6] " \"given\": \"Sérgio\"" + [7] " }" + [8] " ]," + [9] " \"container-title\": \"Portuguese History\"," + [10] " \"id\": \"conc2021\"," + [11] " \"issue\": \"1\"," + [12] " \"issued\": {" + [13] " \"date-parts\": [" + [14] " [" + [15] " 2021" + [16] " ]" + [17] " ]" + [18] " }," + [19] " \"title\": \"História da habitação\"," + [20] " \"type\": \"article-journal\"" + [21] " }" + [22] "]" + +--- + + [1] "---" + [2] "nocite: \"[@*]\"" + [3] "references:" + [4] "- author:" + [5] " - family: Conceição" + [6] " given: Sérgio" + [7] " container-title: Portuguese History" + [8] " id: conc2021" + [9] " issue: 1" + [10] " issued: 2021" + [11] " title: História da habitação" + [12] " type: article-journal" + [13] "---" + [14] "" + diff --git a/tests/testthat/resources/UTF8.bib b/tests/testthat/resources/UTF8.bib new file mode 100644 index 0000000000..a21773b077 --- /dev/null +++ b/tests/testthat/resources/UTF8.bib @@ -0,0 +1,7 @@ +@article{conc2021, + title={História da Habitação}, + author={Conceição, Sérgio}, + journal={Portuguese History}, + number={1}, + year={2021} +} diff --git a/tests/testthat/test-pandoc.R b/tests/testthat/test-pandoc.R new file mode 100644 index 0000000000..7b60ca80ae --- /dev/null +++ b/tests/testthat/test-pandoc.R @@ -0,0 +1,11 @@ +# TODO: to remove when switching the package to edition 3 +local_edition(3) + +test_that("Converting bib file is working", { + skip_on_cran() + skip_if_not_pandoc("2.11") # only test with newer Pandoc citeproc + bib_file <- test_path("resources/UTF8.bib") + expect_snapshot_value(pandoc_citeproc_convert(bib_file, "list"), style = "deparse") + expect_snapshot_output(pandoc_citeproc_convert(bib_file, "json")) + expect_snapshot_output(pandoc_citeproc_convert(bib_file, "yaml")) +}) From b218cd79c2e102e8149fb029718d37129dae865c Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Thu, 19 Aug 2021 10:08:44 -0400 Subject: [PATCH 07/16] Prerender shiny rmd in separate environment (#2203) This is primarly for learnr tutorial so that the exercise chunk does not get leaked object from the first rendering step. --- NEWS.md | 2 ++ R/shiny_prerendered.R | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index cff656c262..f7cd2eea3d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,8 @@ rmarkdown 2.11 - `pandoc_citeproc_convert()` now handles correctly bib file containing specific UTF-8 characters on non default UTF-8 systems like Windows (thanks, @mitchelloharawild, #2195). +- Shiny prerendered documents are now pre-rendered in a child environment to avoid allowing the results of static code chunks to exist in the Shiny app environment (@gadenbuie, #2203). + rmarkdown 2.10 ================================================================================ diff --git a/R/shiny_prerendered.R b/R/shiny_prerendered.R index b5e5b35534..612067b238 100644 --- a/R/shiny_prerendered.R +++ b/R/shiny_prerendered.R @@ -117,9 +117,12 @@ shiny_prerendered_html <- function(input_rmd, render_args) { # prerender if necessary if (prerender) { + args <- merge_lists(list(input = input_rmd), render_args) + # force prerender to execute in separate environment to ensure that + # running w/ prerender step is equivalent to running the prerendered app + args$envir <- new.env(parent = args$envir %||% globalenv()) # execute the render - args <- merge_lists(list(input = input_rmd), render_args) rendered_html <- do.call(render, args) } From 75e8f711b44defa6942b99dc8cc9001a0def64ce Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 19 Aug 2021 16:09:20 +0200 Subject: [PATCH 08/16] Bump version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6914851a8b..3d8df10ba6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rmarkdown Type: Package Title: Dynamic Documents for R -Version: 2.10.3 +Version: 2.10.4 Authors@R: c( person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"), person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), From 3cf7e9fcffd355c5acb338bb0f03b172a10c9e30 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Wed, 25 Aug 2021 17:38:31 -0500 Subject: [PATCH 09/16] fix yihui/xaringan#331: respect relative paths in parent directories in the `css` argument of `html_document()` Co-authored-by: Christophe Dervieux --- NEWS.md | 2 ++ R/html_document_base.R | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index f7cd2eea3d..c8adeb1331 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ rmarkdown 2.11 ================================================================================ +- Relative paths in parent directories in the `css` argument of `html_document()` were incorrectly normalized to absolute paths by #2095 in v2.8. Now relative paths in parent directories will no longer be converted to absolute paths (thanks, @daijiang, yihui/xaringan#331). + - It is possible to specify the version of jQuery via a global option now, e.g., `options(rmarkdown.jquery.version = 2)` (note that the default major version is `3`). This is mainly for advanced users and developers to test different versions of jQuery. - `pandoc_citeproc_convert()` now handles correctly bib file containing specific UTF-8 characters on non default UTF-8 systems like Windows (thanks, @mitchelloharawild, #2195). diff --git a/R/html_document_base.R b/R/html_document_base.R index 5504ff0b1e..791d35e369 100644 --- a/R/html_document_base.R +++ b/R/html_document_base.R @@ -105,9 +105,8 @@ html_document_base <- function(theme = NULL, ), options = sass::sass_options(output_style = "compressed") ) + f <- normalized_relative_to(output_dir, f) } - # do not normalize web path - if (!xfun::is_web_path(f)) f <- normalized_relative_to(output_dir, f) args <- c(args, "--css", pandoc_path_arg(f, backslash = FALSE)) } From a96b8c2af66816c756b61287ac05de329683462b Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Wed, 25 Aug 2021 17:44:07 -0500 Subject: [PATCH 10/16] use sass::output_template() instead of storing a copy in rmarkdown --- DESCRIPTION | 2 +- R/html_document_base.R | 27 ++------------------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3d8df10ba6..003da0116a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rmarkdown Type: Package Title: Dynamic Documents for R -Version: 2.10.4 +Version: 2.10.5 Authors@R: c( person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"), person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), diff --git a/R/html_document_base.R b/R/html_document_base.R index 791d35e369..315bd7c3bd 100644 --- a/R/html_document_base.R +++ b/R/html_document_base.R @@ -99,9 +99,9 @@ html_document_base <- function(theme = NULL, f <- sass::sass( sass::sass_file(f), # write output file to `lib_dir/sass-{sass:::sass_hash()}{[basename(f)}` - output = sass_output_template( + output = sass::output_template( basename = xfun::sans_ext(basename(f)), - tmpdir = lib_dir + path = lib_dir ), options = sass::sass_options(output_style = "compressed") ) @@ -244,26 +244,3 @@ extract_preserve_chunks <- function(input_file, extract = extractPreserveChunks) if (!identical(preserve$value, input_str)) write_utf8(preserve$value, input_file) preserve$chunks } - - -# inspired by sass::output_template but writes to a custom temp dir instead of only tempdir() -# TODO: use the one from sass package when sass 0.3.2 in on CRAN (rstudio/sass#77) -sass_output_template <- function(basename = "rmarkdown", dirname = "sass", - fileext = NULL, tmpdir = tempdir()) { - function(options = list(), suffix = NULL) { - fileext <- fileext %||% if (isTRUE(options$output_style %in% - c(2, 3))) - ".min.css" - else ".css" - out_dir <- if (is.null(suffix)) { - tempfile(tmpdir = tmpdir, pattern = dirname) - } - else { - file.path(tmpdir, paste0(dirname, suffix)) - } - if (!dir.exists(out_dir)) { - dir.create(out_dir, recursive = TRUE) - } - file.path(out_dir, paste0(basename, fileext)) - } -} From 7d0bd94ac56bacc5612b990005dd9449de611f7a Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 27 Aug 2021 10:53:20 -0500 Subject: [PATCH 11/16] export convert_ipynb() per suggestion of @acircleda --- NAMESPACE | 1 + NEWS.md | 2 ++ R/jupyter.R | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index ed9fbcf071..708f8fb333 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,6 +11,7 @@ export(all_output_formats) export(beamer_presentation) export(clean_site) export(context_document) +export(convert_ipynb) export(default_output_format) export(default_site_generator) export(draft) diff --git a/NEWS.md b/NEWS.md index c8adeb1331..5af0321944 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,6 +9,8 @@ rmarkdown 2.11 - Shiny prerendered documents are now pre-rendered in a child environment to avoid allowing the results of static code chunks to exist in the Shiny app environment (@gadenbuie, #2203). +- The previously unexported function `convert_ipynb()` is exported now (thanks, @acircleda). + rmarkdown 2.10 ================================================================================ diff --git a/R/jupyter.R b/R/jupyter.R index 2ab81313f1..387da92e8f 100644 --- a/R/jupyter.R +++ b/R/jupyter.R @@ -19,7 +19,7 @@ #' @param input Path to the input \file{.ipynb} file. #' @param output The output file path. #' @return The output file path (invisibly). -#' @keywords internal +#' @export #' @examples #' # this is not a real ipynb file, but illustrates what convert_ipynb() does #' nb_data <- list( From c8c502b76b50c84b84e86c0713828fe0f8e81646 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 27 Aug 2021 10:53:41 -0500 Subject: [PATCH 12/16] roxygenize and bump version --- DESCRIPTION | 2 +- man/convert_ipynb.Rd | 1 - man/md_document.Rd | 10 +++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 003da0116a..f72f0aa2b2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rmarkdown Type: Package Title: Dynamic Documents for R -Version: 2.10.5 +Version: 2.10.6 Authors@R: c( person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"), person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), diff --git a/man/convert_ipynb.Rd b/man/convert_ipynb.Rd index becc5d6a2b..e186d24a3f 100644 --- a/man/convert_ipynb.Rd +++ b/man/convert_ipynb.Rd @@ -52,4 +52,3 @@ xfun::file_string(nb_file) # show file content nb_rmd = rmarkdown:::convert_ipynb(nb_file) xfun::file_string(nb_rmd) } -\keyword{internal} diff --git a/man/md_document.Rd b/man/md_document.Rd index 1f8e70aa65..eedafaf314 100644 --- a/man/md_document.Rd +++ b/man/md_document.Rd @@ -23,11 +23,11 @@ md_document( } \arguments{ \item{variant}{Markdown variant to produce (defaults to "markdown_strict"). -Other valid values are "commonmark", "markdown_github", "markdown_mmd", -markdown_phpextra", or even "markdown" (which produces pandoc markdown). -You can also compose custom markdown variants, see the -\href{https://pandoc.org/MANUAL.html}{pandoc online documentation} -for details.} +Other valid values are "commonmark", "gfm", "commonmark_x", "markdown_mmd", +markdown_phpextra", "markdown_github", or even "markdown" (which produces +pandoc markdown). You can also compose custom markdown variants, see the +\href{https://pandoc.org/MANUAL.html}{pandoc online documentation} for +details.} \item{preserve_yaml}{Preserve YAML front matter in final document.} From eaf6efc3fe6d39373ae0cee7ce3a034119bb47f5 Mon Sep 17 00:00:00 2001 From: christophe dervieux Date: Wed, 1 Sep 2021 18:23:50 +0200 Subject: [PATCH 13/16] Add a specific dirname for sass caching Complement change in a96b8c2af66816c756b61287ac05de329683462b --- R/html_document_base.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/html_document_base.R b/R/html_document_base.R index 315bd7c3bd..a9fe0e5393 100644 --- a/R/html_document_base.R +++ b/R/html_document_base.R @@ -101,6 +101,7 @@ html_document_base <- function(theme = NULL, # write output file to `lib_dir/sass-{sass:::sass_hash()}{[basename(f)}` output = sass::output_template( basename = xfun::sans_ext(basename(f)), + dirname = "sass", path = lib_dir ), options = sass::sass_options(output_style = "compressed") From 348a7e15487d538a47b828d381357f05feca0a0d Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Mon, 13 Sep 2021 17:05:43 -0500 Subject: [PATCH 14/16] https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html -> https://pandoc.org/MANUAL.html#citations --- DESCRIPTION | 2 +- R/beamer_presentation.R | 2 +- R/context_document.R | 2 +- R/html_document.R | 2 +- R/odt_document.R | 2 +- R/pdf_document.R | 2 +- R/rtf_document.R | 2 +- R/word_document.R | 2 +- man/beamer_presentation.Rd | 2 +- man/context_document.Rd | 2 +- man/html_document.Rd | 2 +- man/odt_document.Rd | 2 +- man/pdf_document.Rd | 2 +- man/rtf_document.Rd | 2 +- man/word_document.Rd | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f72f0aa2b2..1d37813535 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -108,6 +108,6 @@ SystemRequirements: pandoc (>= 1.14) - http://pandoc.org URL: https://github.com/rstudio/rmarkdown, https://pkgs.rstudio.com/rmarkdown/ BugReports: https://github.com/rstudio/rmarkdown/issues License: GPL-3 -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 Encoding: UTF-8 VignetteBuilder: knitr diff --git a/R/beamer_presentation.R b/R/beamer_presentation.R index 102ef5962f..4005731c71 100644 --- a/R/beamer_presentation.R +++ b/R/beamer_presentation.R @@ -14,7 +14,7 @@ #' #' R Markdown documents also support citations. You can find more information on #' the markdown syntax for citations in the -#' \href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +#' \href{https://pandoc.org/MANUAL.html#citations}{Bibliographies #' and Citations} article in the online documentation. #' @inheritParams pdf_document #' @inheritParams html_document diff --git a/R/context_document.R b/R/context_document.R index e659132c42..d5c7f2ec15 100644 --- a/R/context_document.R +++ b/R/context_document.R @@ -14,7 +14,7 @@ #' #' R Markdown documents also support citations. You can find more information on #' the markdown syntax for citations in the -#' \href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +#' \href{https://pandoc.org/MANUAL.html#citations}{Bibliographies #' and Citations} article in the online documentation. #' @inheritParams pdf_document #' @param context_path Path of the ConTeXt executable. If not provided, ConTeXt has diff --git a/R/html_document.R b/R/html_document.R index 5e5a4a78de..0e26219df8 100644 --- a/R/html_document.R +++ b/R/html_document.R @@ -12,7 +12,7 @@ #' #' R Markdown documents also support citations. You can find more information on #' the markdown syntax for citations in the -#' \href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +#' \href{https://pandoc.org/MANUAL.html#citations}{Bibliographies #' and Citations} article in the online documentation. #' #'@inheritParams output_format diff --git a/R/odt_document.R b/R/odt_document.R index 20d8659893..acf5f3a63f 100644 --- a/R/odt_document.R +++ b/R/odt_document.R @@ -11,7 +11,7 @@ #' #' R Markdown documents also support citations. You can find more information on #' the markdown syntax for citations in the -#' \href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +#' \href{https://pandoc.org/MANUAL.html#citations}{Bibliographies #' and Citations} article in the online documentation. #' @inheritParams pdf_document #' @inheritParams html_document diff --git a/R/pdf_document.R b/R/pdf_document.R index 6d17b0b9cd..77c2b8d99c 100644 --- a/R/pdf_document.R +++ b/R/pdf_document.R @@ -14,7 +14,7 @@ #' #' R Markdown documents also support citations. You can find more information on #' the markdown syntax for citations in the -#' \href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +#' \href{https://pandoc.org/MANUAL.html#citations}{Bibliographies #' and Citations} article in the online documentation. #' #' Many aspects of the LaTeX template used to create PDF documents can be diff --git a/R/rtf_document.R b/R/rtf_document.R index e12b057832..45def06c19 100644 --- a/R/rtf_document.R +++ b/R/rtf_document.R @@ -11,7 +11,7 @@ #' #' R Markdown documents also support citations. You can find more information on #' the markdown syntax for citations in the -#' \href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +#' \href{https://pandoc.org/MANUAL.html#citations}{Bibliographies #' and Citations} article in the online documentation. #' @inheritParams pdf_document #' @inheritParams html_document diff --git a/R/word_document.R b/R/word_document.R index 3de833b47c..81efcbc66f 100644 --- a/R/word_document.R +++ b/R/word_document.R @@ -11,7 +11,7 @@ #' #' R Markdown documents also support citations. You can find more information on #' the markdown syntax for citations in the -#' \href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +#' \href{https://pandoc.org/MANUAL.html#citations}{Bibliographies #' and Citations} article in the online documentation. #' @inheritParams pdf_document #' @inheritParams html_document diff --git a/man/beamer_presentation.Rd b/man/beamer_presentation.Rd index 01ba026529..0f72681e7e 100644 --- a/man/beamer_presentation.Rd +++ b/man/beamer_presentation.Rd @@ -135,7 +135,7 @@ see the documentation on R Markdown \link[=rmd_metadata]{metadata}. R Markdown documents also support citations. You can find more information on the markdown syntax for citations in the -\href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +\href{https://pandoc.org/MANUAL.html#citations}{Bibliographies and Citations} article in the online documentation. } \examples{ diff --git a/man/context_document.Rd b/man/context_document.Rd index 6a019dc644..c3ddc6ce3a 100644 --- a/man/context_document.Rd +++ b/man/context_document.Rd @@ -116,7 +116,7 @@ see the documentation on R Markdown \link[=rmd_metadata]{metadata}. R Markdown documents also support citations. You can find more information on the markdown syntax for citations in the -\href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +\href{https://pandoc.org/MANUAL.html#citations}{Bibliographies and Citations} article in the online documentation. } \examples{ diff --git a/man/html_document.Rd b/man/html_document.Rd index 2494dd6b37..e54b6782c8 100644 --- a/man/html_document.Rd +++ b/man/html_document.Rd @@ -166,7 +166,7 @@ see the documentation on R Markdown \link[=rmd_metadata]{metadata}. R Markdown documents also support citations. You can find more information on the markdown syntax for citations in the -\href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +\href{https://pandoc.org/MANUAL.html#citations}{Bibliographies and Citations} article in the online documentation. } \section{Anchor Sections Customization}{ diff --git a/man/odt_document.Rd b/man/odt_document.Rd index 5a32284922..9b83a2b73b 100644 --- a/man/odt_document.Rd +++ b/man/odt_document.Rd @@ -65,7 +65,7 @@ see the documentation on R Markdown \link[=rmd_metadata]{metadata}. R Markdown documents also support citations. You can find more information on the markdown syntax for citations in the -\href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +\href{https://pandoc.org/MANUAL.html#citations}{Bibliographies and Citations} article in the online documentation. } \examples{ diff --git a/man/pdf_document.Rd b/man/pdf_document.Rd index e22423af9e..2644d9e4ae 100644 --- a/man/pdf_document.Rd +++ b/man/pdf_document.Rd @@ -131,7 +131,7 @@ see the documentation on R Markdown \link[=rmd_metadata]{metadata}. R Markdown documents also support citations. You can find more information on the markdown syntax for citations in the -\href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +\href{https://pandoc.org/MANUAL.html#citations}{Bibliographies and Citations} article in the online documentation. Many aspects of the LaTeX template used to create PDF documents can be diff --git a/man/rtf_document.Rd b/man/rtf_document.Rd index c4955f5e36..2ea7ddd28b 100644 --- a/man/rtf_document.Rd +++ b/man/rtf_document.Rd @@ -50,7 +50,7 @@ see the documentation on R Markdown \link[=rmd_metadata]{metadata}. R Markdown documents also support citations. You can find more information on the markdown syntax for citations in the -\href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +\href{https://pandoc.org/MANUAL.html#citations}{Bibliographies and Citations} article in the online documentation. } \examples{ diff --git a/man/word_document.Rd b/man/word_document.Rd index 164ff09075..0df2da80a1 100644 --- a/man/word_document.Rd +++ b/man/word_document.Rd @@ -79,7 +79,7 @@ see the documentation on R Markdown \link[=rmd_metadata]{metadata}. R Markdown documents also support citations. You can find more information on the markdown syntax for citations in the -\href{https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html}{Bibliographies +\href{https://pandoc.org/MANUAL.html#citations}{Bibliographies and Citations} article in the online documentation. } \examples{ From 04c9e2c530e10616c17691e74262c34a9c00b58a Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Tue, 14 Sep 2021 09:37:43 -0500 Subject: [PATCH 15/16] CRAN release v2.11 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1d37813535..1dbfb482cc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rmarkdown Type: Package Title: Dynamic Documents for R -Version: 2.10.6 +Version: 2.11 Authors@R: c( person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"), person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), From 61a4cc7a5a3ed821f7fe208874adcb980da8de94 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Tue, 14 Sep 2021 09:41:24 -0500 Subject: [PATCH 16/16] import bslib (#2154) --- DESCRIPTION | 4 ++-- NEWS.md | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1dbfb482cc..6833c02fc7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rmarkdown Type: Package Title: Dynamic Documents for R -Version: 2.11 +Version: 2.11.1 Authors@R: c( person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"), person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), @@ -89,6 +89,7 @@ Imports: tinytex (>= 0.31), xfun (>= 0.21), jquerylib, + bslib (>= 0.2.5.1), methods, stringr (>= 1.2.0) Suggests: @@ -102,7 +103,6 @@ Suggests: fs, rsconnect, withr (>= 2.4.2), - bslib (>= 0.2.5.1), sass (>= 0.4.0) SystemRequirements: pandoc (>= 1.14) - http://pandoc.org URL: https://github.com/rstudio/rmarkdown, https://pkgs.rstudio.com/rmarkdown/ diff --git a/NEWS.md b/NEWS.md index 5af0321944..b2e362f81f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +rmarkdown 2.12 +================================================================================ + + rmarkdown 2.11 ================================================================================