Changelog
Source:NEWS.md
quartose (development version)
-
quarto_div()now accepts objects likeknitr::kable(format = "html"),flextable, andgttables ascontent– previously most of these were either mis-rendered (e.g.flextable, coerced throughformat()) or rejected outright, depending on the object.check_args_div()detects these via the same"knit_asis"-output check used byquarto_tabset()(see below), andformat.quarto_div()extracts and emits their raw markup unescaped, consistent with howquarto_tabset()now handles the same kinds of objects. Objects that neither print like ordinary R objects nor return"knit_asis"output (a bare list, a model object, a number, etc.) are still rejected at construction time with the existing informative error. - Fixed a bug where
format.quarto_tabset()mishandled content whoseknit_print()method returns output marked viaknitr::asis_output()(class"knit_asis") rather than printing it as a side effect — this includesknitr::kable(format = "html"),flextableobjects, and most htmlwidget-like objects. Previously such content was displayed as the literal, quoted R representation of the return value (including itsattr(,"class")dump) inside a<pre>block, rather than as rendered markup.format.quarto_tabset()now detects"knit_asis"output and emits it as raw, unescaped markup so it renders as intended.?quarto_format’s escaping-policy documentation is updated accordingly.
quartose 0.2.0
CRAN release: 2026-07-26
- Fixed a bug where
format.quarto_tabset()did not escape</>in captured output from arbitrary R objects (e.g. a tibble’s<fct>column-type tag), which could be parsed as an unknown HTML tag by quarto/pandoc (#1).?quarto_formatnow documents the resulting escaping policy: onlyquarto_tabset()’s captured object output is escaped this way;quarto_span()/quarto_div()content is validated rather than captured, andquarto_markdown()passes raw markup through untouched by design. - Fixed a bug where the internal
quarto_plotwrapper used to capture ggplot2 objects insidequarto_tabset()had its class silently stripped byc()-based list flattening informat.quarto_tabset(). Plot capture now preserves thequarto_plotclass and is dispatched via a dedicatedknit_print.quarto_plot()method instead of relying onggplot’s ownknit_printmethod by coincidence. -
quarto_div()now validates itscontentargument: every element must be a character vector or aquarto_object, mirroring the checks already applied byquarto_group()/quarto_markdown(). Previously an unsupported object (e.g. a bare list, a model object, or a number) would pass silently intoquarto_div()and only fail later insideformat(). An empty div (content = NULL,content = list(), orcontent = character(0)) is still permitted. -
quarto_tabset()now raises a specific error (“content has no names, andnameswas not supplied…”) whencontentis unnamed andnamesisn’t supplied, instead of the generic (and misleading) “names must be a character vector”. -
quarto_tabset()now auto-detects and renders a wider range of graphics objects as images, rather than only ggplot2 (#2): base R recorded plots (grDevices::recordPlot()), grid grobs, lattice/trellis objects, and patchwork objects (which subclass ggplot2 and already worked once thequarto_plotflattening bug was fixed). Addedas_quarto_graphic(), an escape hatch that tags an arbitrary object so it is treated as a graphic even when quartose doesn’t otherwise recognize its class. This addsgrDevicesandgridtoImports; both are base R packages bundled with every R installation, so this does not add any new installation burden. -
quarto_div()now supports graphics objects incontent(#3), using the same detection and rendering machinery asquarto_tabset().format()returns a single string as before whencontenthas no graphics objects, and a list (mixing strings and plot objects, asquarto_tabset()already does) when it does.
quartose 0.1.0
CRAN release: 2025-07-09
- Initial CRAN submission. This release establishes the core design that later versions build on: constructors validate and store their arguments unprocessed (
R/class.R),format.<class>()methods turn a stored object into Quarto syntax on demand (R/format.R), and a sharedprint.quarto_object()/knit_print.quarto_object()pair (R/print.R) gives a human-readable console summary viaprint()and emits the actual Quarto markup viacat()whenknitr::knit_print()is called inside aresults: asischunk. - Provides six constructors, all returning an object with parent S3 class
quarto_objectplus a class-specific subclass:quarto_section()for headers;quarto_tabset()for tabsets, with optional section title and manual tab naming vianames;quarto_div()andquarto_span()for divs and spans with CSS classes;quarto_markdown()for passing raw markdown/character content through untouched; andquarto_group()for bundling several quarto objects so they print together. -
quarto_tabset()content can include ggplot2 objects: these are captured and rendered only whenknit_print()is called, via an internalquarto_plotwrapper.quarto_div()does not yet support plot content. - Basic argument validation (
R/validate.R) checks types and lengths for each constructor (e.g.levelmust be a whole number between 1 and 6;quarto_group()/quarto_markdown()require theircontentelements to all be quarto objects or character vectors, respectively), raising informative errors viarlang::abort(). - Imports: cli, knitr, purrr, rlang, utils. Suggests: ggplot2, quarto, rmarkdown, spelling, testthat (>= 3.0.0).