You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to include Quarto templates in an R Package, as is possible for R Markdown? I've tried following the same methodology as for R Markdown, i.e. I added template resources to inst/quarto/templates, but that doesn't seem to work.
I'm working in RStudio, and I'm expecting to select the template as from the "New R Markdown", shown here:
I'm not seeing the same capability with "New Quarto Document" after updating my package with template material:
RStudio Version:
RStudio 2022.02.3+492 "Prairie Trillium" Release (1db809b8323ba0a87c148d16eb84efe39a8e7785, 2022-05-20) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36
Hey @Pecners, I'll reopen so that once the template mechanism is finally done for Quarto, we don't forget to document a comparaison with R Markdown template mechanism to make them available, and we see if making them available through R package is possible. (The quarto template mechanism should make possible to share template in various way and R package may not be the best way).
Thanks for opening the question / suggestion by the way!
Reacted by Spencer Schien, Anders Alexandersson, Brad Cannell, Brancen Gregory and Michael Stadler
Note that templates really can be a simple as a repo with contents - there is no requirement to create a format extension as well, though that is often useful.
We'll leave rstudio/rstudio#11316 as an issue to track improving support within RStudio
Would it be possible to add support for Quarto templates via RStudio dialogs (as is supported with R Markdown templates)? This will allow Quarto to be more accessible, including to students.
Activity
jjallaire commentedon Jun 8, 2022
No that isn't currently supported however we are working on a templates mechanism for quarto which should be available soon!
Pecners commentedon Jun 8, 2022
Wow that was a response within 1 minute, thanks!
cderv commentedon Jun 9, 2022
Hey @Pecners, I'll reopen so that once the template mechanism is finally done for Quarto, we don't forget to document a comparaison with R Markdown template mechanism to make them available, and we see if making them available through R package is possible. (The quarto template mechanism should make possible to share template in various way and R package may not be the best way).
Thanks for opening the question / suggestion by the way!
dragonstyle commentedon Jul 20, 2022
We don't current support templates via the RStudio dialogs, but the templating mechanism for the CLI is now supported and documented.
https://quarto.org/docs/extensions/formats.html#format-templates
The best exemplars of this are currently the journal article templates which bundle extensions plus a template:
https://quarto.org/docs/journals/
Note that templates really can be a simple as a repo with contents - there is no requirement to create a format extension as well, though that is often useful.
We'll leave rstudio/rstudio#11316 as an issue to track improving support within RStudio
isaactpetersen commentedon May 11, 2024
Would it be possible to add support for Quarto templates via RStudio dialogs (as is supported with R Markdown templates)? This will allow Quarto to be more accessible, including to students.
cscheid commentedon May 11, 2024
That would be a feature request for https://github.com/rstudio/rstudio