Use Quarto extensions for the {asar} report template #352
Bai-Li-NOAA
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While working on the NSAP Quarto slides template demo this week, I ended up exploring Quarto extensions in more depth. They feel quite similar in spirit to R packages, but specifically tailored for Quarto. The more I read, the more I wondered whether the {asar} report template might be a good candidate for a Quarto extension rather than remaining purely an R package, while {stockplotr} would still be an excellent R package for content generation. For example, Quarto already supports extensions for journal articles (examples here: https://quarto.org/docs/extensions/listing-journals.html, GitHub org: https://github.com/quarto-journals). Below is a quick comparison of approaches from Gemini:
One thing that caught my attention is the approach of generating template code as strings inside R functions. If developers think that writing R functions that output long strings of Markdown or LaTeX is becoming difficult to read and maintain, a Quarto extension template might be a better fit. See a conceptual example from Gemini below. Instead of having a LaTeX title page template, you'd have an R function that generates the required LaTeX code as a character string.
I haven’t developed any Quarto extensions myself, but I’ve recently noticed their growing presence and found that installing/adding a template to a project seems straightforward. Others (e.g., Jonathan Peake) who have experience with extension development, may have better insights on this topic.
Beta Was this translation helpful? Give feedback.
All reactions