Skip to content

Commit

Permalink
do not default to TRUE for knitr tidy option (closes #90)
Browse files Browse the repository at this point in the history
This prevent a requirement on formatR and is more align with default behavior in other format.
  • Loading branch information
cderv committed Nov 25, 2020
1 parent 0ae9c5b commit 3551518
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
1 change: 0 additions & 1 deletion R/handout.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion inst/rmarkdown/templates/tufte_ctex/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

Expand Down
2 changes: 1 addition & 1 deletion inst/rmarkdown/templates/tufte_html/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

Expand Down

0 comments on commit 3551518

Please sign in to comment.