Skip to content

Include Quarto templates in R Package #1111

Closed

Description

@Pecners

Bug description

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:
image

I'm not seeing the same capability with "New Quarto Document" after updating my package with template material:
image

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

Checklist

  • formatted your issue so it is easier for us to read?
  • included a minimal, self-contained, and reproducible example?
  • documented the quarto version you're running, by providing the output produced by quarto check in a terminal in your issue?
  • documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • documented which operating system you're running? If on Linux, please provide the specific distribution as well.
  • upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?

Activity

  1. added
    bug
    on Jun 8, 2022
  2. jjallaire commented on Jun 8, 2022

    @jjallaire
    Collaborator

    No that isn't currently supported however we are working on a templates mechanism for quarto which should be available soon!

  3. added this to the Future milestone on Jun 8, 2022
  4. Pecners commented on Jun 8, 2022

    @Pecners
    Author

    Wow that was a response within 1 minute, thanks!

  5. cderv commented on Jun 9, 2022

    @cderv
    Member

    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!

  6. reopened this on Jun 9, 2022
  7. added
    enhancement
    and removed
    bug
    on Jun 9, 2022
  8. modified the milestones: Future, 1.0 on Jun 9, 2022
  9. modified the milestones: 1.0, Formats on Jun 21, 2022
  10. dragonstyle commented on Jul 20, 2022

    @dragonstyle
    Collaborator

    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

  11. isaactpetersen commented on May 11, 2024

    @isaactpetersen

    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.

  12. cscheid commented on May 11, 2024

    @cscheid
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions