Detect whether the current knit is running under Quarto or plain R Markdown
Source:R/render_mode.R
detect_render_mode.Rdknitr::opts_knit$get("quarto.version") is set whenever Quarto drives the
render (the same signal flextable's own knit_print.flextable() uses);
QUARTO_PROJECT_ROOT / QUARTO_DOCUMENT_PATH are set by the Quarto CLI
itself, including for a single-file (non-project) render, and are checked
as a fallback. Verified against a real Quarto 1.9.37 Typst render (all
three set) and a plain rmarkdown::render() (all three absent).