diff --git a/NEWS.md b/NEWS.md index 268e805..eddd686 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ - Add the missing `CSLReferences` environment in the template required by Pandoc 2.11+ and its new citeproc (#89) +- `tufte_handout()` now uses default `tidy` knitr option, which is `FALSE`. It can be changed with `knitr::opts_chunk$set(tidy = TRUE)` and requires in that case the **formatR** package. + # CHANGES IN tufte VERSION 0.8 - References are now moved in the margin correctly with Pandoc 2.11 (#86). diff --git a/R/handout.R b/R/handout.R index fb66dcf..f38d3e3 100644 --- a/R/handout.R +++ b/R/handout.R @@ -64,7 +64,6 @@ tufte_pdf = function( if (is.null(knitr_options$knit_hooks)) knitr_options$knit_hooks = list() # set options - knitr_options$opts_chunk$tidy = TRUE knitr_options$opts_knit$width = 45 # set hooks for special plot output diff --git a/inst/rmarkdown/templates/tufte_ctex/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/tufte_ctex/skeleton/skeleton.Rmd index b6b3630..23b607a 100644 --- a/inst/rmarkdown/templates/tufte_ctex/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/tufte_ctex/skeleton/skeleton.Rmd @@ -20,7 +20,7 @@ link-citations: yes ```{r setup, include=FALSE} library(tufte) # tufte版本变化之后更新knitr缓存 -knitr::opts_chunk$set(tidy = FALSE, cache.extra = packageVersion('tufte')) +knitr::opts_chunk$set(cache.extra = packageVersion('tufte')) options(htmltools.dir.version = FALSE) ``` diff --git a/inst/rmarkdown/templates/tufte_html/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/tufte_html/skeleton/skeleton.Rmd index 9deae53..8875800 100644 --- a/inst/rmarkdown/templates/tufte_html/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/tufte_html/skeleton/skeleton.Rmd @@ -19,7 +19,7 @@ link-citations: yes ```{r setup, include=FALSE} library(tufte) # invalidate cache when the tufte version changes -knitr::opts_chunk$set(tidy = FALSE, cache.extra = packageVersion('tufte')) +knitr::opts_chunk$set(cache.extra = packageVersion('tufte')) options(htmltools.dir.version = FALSE) ```