From 9eb10742bdae5e42366d7912f66e090f6efc2803 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 8 Nov 2024 08:02:41 -0600 Subject: [PATCH] tweak vignettes --- DESCRIPTION | 2 +- NEWS.md | 2 ++ vignettes/knitr-intro.Rmd | 3 +-- vignettes/knitr-markdown.Rmd | 12 ++++++------ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5d8f74a4aa..2b4e39eb3a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: knitr Type: Package Title: A General-Purpose Package for Dynamic Report Generation in R -Version: 1.49 +Version: 1.49.1 Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person("Abhraneel", "Sarma", role = "ctb"), diff --git a/NEWS.md b/NEWS.md index 9b2ff4f1c8..20641fe94a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,5 @@ +# CHANGES IN knitr VERSION 1.50 + # CHANGES IN knitr VERSION 1.49 ## NEW FEATURES diff --git a/vignettes/knitr-intro.Rmd b/vignettes/knitr-intro.Rmd index 73ba96edcc..a8d5033410 100644 --- a/vignettes/knitr-intro.Rmd +++ b/vignettes/knitr-intro.Rmd @@ -20,8 +20,7 @@ manual](https://yihui.org/knitr/demo/graphics/) ), and remember to read the help pages of functions in this package. There is a book "Dynamic Docuemnts with R and knitr" for this package, too. -Anyway, here is a code chunk that shows you can compile vignettes with **knitr** -as well using R 3.0.x, which supports non-Sweave vignettes: +Below are code chunk examples: ```{r show-off} options(digits = 4) diff --git a/vignettes/knitr-markdown.Rmd b/vignettes/knitr-markdown.Rmd index cbda8bcfe8..fd43caf321 100644 --- a/vignettes/knitr-markdown.Rmd +++ b/vignettes/knitr-markdown.Rmd @@ -1,5 +1,5 @@ --- -title: R Markdown (v1) Vignettes with knitr +title: R Markdown Vignettes with litedown author: Yihui Xie date: "`{r} Sys.Date()`" output: @@ -10,24 +10,24 @@ output: Before R 3.0.0, only Sweave/PDF vignettes were supported in R. Markdown is gaining popularity over the years due to its simplicity, and R 3.0.0 starts to support package vignettes written in R Markdown. -> Please note this example is for [R Markdown v1](https://cran.r-project.org/package=markdown) only. If you use [R Markdown v2](https://rmarkdown.rstudio.com), you should use the vignette engine `knitr::rmarkdown` instead of `knitr::knitr`. +> Please note this example is for [litedown](https://cran.r-project.org/package=litedown). If you use [R Markdown v2](https://rmarkdown.rstudio.com), you should use the vignette engine `knitr::rmarkdown` instead of `litedown::vignette`. ## Package vignettes To enable Markdown vignettes in an R package, you need to - add `*.Rmd` files under the `vignettes` directory -- add `VignetteBuilder: knitr` to the `DESCRIPTION` file -- specify the vignette engine `\VignetteEngine{knitr::knitr}` in the `Rmd` files (inside HTML comments) +- add `VignetteBuilder: litedown` to the `DESCRIPTION` file +- specify the vignette engine `\VignetteEngine{litedown::vignette}` in the `Rmd` files (inside HTML comments) ## View vignettes -And R will load the **knitr** package to build these vignettes to HTML files, and you can see them when you open the HTML help: +And R will load the **litedown** package to build these vignettes to HTML files, and you can see them when you open the HTML help: ```{r eval=FALSE} help(package = 'YourPackage', help_type = 'html')