Writes a standalone Quarto report to path (forced to a .qmd
suffix): a YAML header (title, format) followed by the
deterministic tf_dossier(theory) body. Returns the written path. When
render = TRUE, invokes quarto render, which requires a Quarto
installation, and stops if that render fails.
Arguments
- theory
A theory object (named list), e.g. from
tf_read().- path
Destination path; any extension is replaced with
.qmd.- title
Optional report title; defaults to
"theoryforge report: <title-or-id>", also whenNULL,NAor empty. It is written as a YAML double-quoted scalar with backslashes, double quotes and control characters escaped, so a YAML parser reads back exactly the string passed. Quarto then reads the title as Markdown, so raw TeX such as\emph{}is dropped from HTML output and$\alpha$becomes mathematics.- render
When
TRUE, runquarto renderon the written file and stop if it exits non-zero.- to
Quarto output format (default
"html").
Examples
theory <- tf_theory("demo-1", "A demonstration theory") |>
tf_add_construct("c_arousal", "Arousal", "Bodily activation.")
path <- tempfile(fileext = ".qmd")
tf_render_report(theory, path)
#> [1] "/tmp/Rtmp3y7gV9/file1ac9288bb0e5.qmd"