Replies: 3 comments 19 replies
-
I don't think it's going to happen in a near future because CRAN would need to add Quarto binary to their setup. |
Beta Was this translation helpful? Give feedback.
-
Actually, this isn't nearly as hard as I imagined. Thanks to the example provided by @bdcaf's https://github.com/bdcaf/vignetteEngineMake, I see it's fairly straightforward to add Quarto vignettes to my package:
.onLoad <- function(libname, pkgname) {
tools::vignetteEngine(name = "quarto",
package = pkgname,
pattern = "[.]qmd$",
weave = function(file, ..., encoding = "UTF-8") {
message("Hello from custom Quarto vignette engine!")
## TODO: What is Quarto's expectation about encoding?
## NB: output_format = "all" below might make a better default
quarto::quarto_render(file, ..., output_format = "pdf")
},
tangle = tools::vignetteEngine("knitr::rmarkdown")$tangle,
aspell = tools::vignetteEngine("knitr::rmarkdown")$aspell
)
}
This makes a perfectly workable solution for me. But I believe a cleaner way to do this would be to define several vignetteEngines in the |
Beta Was this translation helpful? Give feedback.
-
For anyone who's interested and has not tested yet, the dev version of quarto R package now has some vignette engines registered. Please open new issues in https://github.com/quarto-dev/quarto-r for ideas, or any other feedback thanks! |
Beta Was this translation helpful? Give feedback.
-
I see that even the quarto package has an Rmd vignette, so I assume the answer is "not yet".
Are there plans to support Quarto vignettes? Might a
quarto
VignetteEngine be provided to replaceknitr::rmarkdown
? Or are are there deeper issues, e.g. aspects of Quarto's design that are incompatible with R package vignettes?Beta Was this translation helpful? Give feedback.
All reactions