@@ -24,7 +24,7 @@ it is always possible to extend existing classes.
24
24
## Vignettes {#vignettes}
25
25
26
26
A vignette demonstrates how to accomplish non-trivial tasks embodying the core
27
- functionality of your package. There are two common types of vignettes.
27
+ functionality of your package. There are three types of vignettes.
28
28
29
29
* (Recommended) An * R markdown* vignette is similar to a * Sweave* vignette, but
30
30
uses [ markdown] ( http://daringfireball.net/projects/markdown/ ) instead of
@@ -34,11 +34,20 @@ functionality of your package. There are two common types of vignettes.
34
34
vignettes] [ CRAN vigs ] for technical details. See the
35
35
` r BiocStyle::Biocpkg("BiocStyle") ` package for a convenient way to use common
36
36
macros and a standard _ Bioconductor_ style vignette.
37
-
38
- * A * Sweave* vignette is an ` .Rnw ` file that contains $\LaTeX$ and chunks of <i
39
- class="fab fa-r-project"></i > code. The code chunk starts with a line
37
+
38
+ * Quarto is a new format for vignettes that uses the
39
+ [ Quarto] ( https://quarto.org/ ) system. It is similar to R Markdown but offers
40
+ more advanced features and flexibility. Similar to R Markdown, Quarto
41
+ vignettes can be rendered to various formats, including HTML and PDF, and are
42
+ suitable for multi-language documentation needs. Note that an installation
43
+ of the ` quarto ` command line tool is required to build Quarto vignettes.
44
+
45
+ * A * Sweave* vignette is an ` .Rnw ` file that contains $\LaTeX$ and chunks of
46
+ <i class =" fab fa-r-project " ></i > code. The code chunk starts with a line
40
47
` <<>>= ` , and ends with ` @ ` . Each chunk is evaluated during ` R CMD build ` ,
41
- prior to $\LaTeX$ compilation to a PDF document.
48
+ prior to $\LaTeX$ compilation to a PDF document. Note that this format
49
+ requires $\LaTeX$ dependencies for rendering that are not be available in
50
+ standard _ Bioconductor_ containers.
42
51
43
52
A vignette provides reproducibility: the vignette produces the same results as
44
53
copying the corresponding commands into an <i class =" fab fa-r-project " ></i >
@@ -49,21 +58,20 @@ markdown) undermine the benefit of vignettes and are generally **not allowed**;
49
58
exceptions can be made with proper justification and are at the discretion of
50
59
[ _ Bioconductor_ reviewers] [ reviewer-list ] .
51
60
52
- All packages are required to have at least one Rmd or Rnw vignette. Vignettes go
53
- in the ` vignettes/ ` directory of the package. Vignettes are often used as
54
- standalone documents, so best practices are to include an informative title, the
55
- primary author of the vignette, the last modification date of the vignette, and
56
- a link to the package landing page. We encourage the use of `r
57
- BiocStyle::Biocpkg("BiocStyle")` for formatting with ` html_document` as
58
- rendering target. Something like the following in the vignette will accomplish
59
- the above suggestion :
61
+ All packages are required to have at least one Rmd, qmd, or Rnw vignette.
62
+ Vignettes go in the ` vignettes/ ` directory of the package. Vignettes are often
63
+ used as standalone documents, so best practices are to include an informative
64
+ title, the primary author of the vignette, the last modification date of the
65
+ vignette, and a link to the package landing page. We encourage the use of
66
+ ` r BiocStyle::Biocpkg("BiocStyle")` with ` html_document ` as the rendering
67
+ function. For example, in an R Markdown vignette one can use the following
68
+ specification in the yaml front matter :
60
69
61
- ```
70
+ ``` yaml
62
71
output :
63
72
BiocStyle::html_document :
64
73
toc : true
65
74
toc_depth : 2
66
-
67
75
` ` `
68
76
69
77
If you want to write more than one vignette, you may want to control
@@ -76,10 +84,10 @@ e.g. using numbers `1-9`, if you have a single digit number of
76
84
vignettes, or `01-99` if you have ten or more vignettes. For example,
77
85
the first vignette could specify in the header :
78
86
79
- ```
87
+ ` ` ` yaml
80
88
vignette: >
81
89
%\V ignetteEngine{knitr::rmarkdown}
82
- %\VignetteIndexEntry{1. Quick start to MyPackage }
90
+ %\V ignetteIndexEntry{1. Quick Start: An Introduction }
83
91
%\V ignetteEncoding{UTF-8}
84
92
` ` `
85
93
@@ -126,12 +134,11 @@ Include a section with the `SessionInfo()` at the end of the vignette.
126
134
127
135
# ## `vignettes/` directory and intermediate files
128
136
129
- Only the source vignette file (` .Rnw ` or ` .Rmd ` ) and any necessary static images
130
- should be in the vignette directory. No intermediate files should be
131
- present. This include complete processed vignette products as well; the vignette
132
- should be created through the ` R CMD build ` of a package. To include other types
133
- of documentation please use the ` inst/doc ` or other appropriately named ` inst `
134
- directory.
137
+ Only the source vignette file (`.Rnw`, `.qmd`, or `.Rmd`) and any necessary
138
+ static images should be in the `vignettes/` directory. No intermediate files
139
+ should be present, including vignette products. Vignettes are created through
140
+ by running `R CMD build` on a package. To include other types of documentation
141
+ please use the `inst/doc` or other appropriately named `inst` directory.
135
142
136
143
# ## References
137
144
0 commit comments