These are variables that you can set to control how Quarto renders documents. For example, you can set them explicitly before running quarto render:
Terminal
exportQUARTO_R=/opt/R/4.2.3/binquarto render
TipWorking on a Quarto Project?
See Project Environment Variables for ways to set environment variables in Quarto Projects, including profile-specific environments and managing secrets.
Variable
Description
QUARTO_R
Explicit path to the version of Rscript to be used by the knitr engine and quarto run *.R command.
QUARTO_PYTHON
Explicit path to the version of python to be used by the jupyter engine and quarto run *.py command.
QUARTO_JULIA
Explicit path to the version of julia to be used by the julia engine.
QUARTO_VERSION_REQUIREMENT
A semver string describing the Quarto version requested by the environment. If this check fails, Quarto will not run.
QUARTO_KNITR_RSCRIPT_ARGS
Comma separated list of command line argument to pass to Rscript started by Quarto when rendering with knitr engine, e.g.
Explicit path to the TeX Live binaries to be passed to tlmgr option sys_bin used when setting tlmgr and related to PATH using tlmgr add path . By default, Quarto looks in known places.
QUARTO_CHROMIUM
Explicit path to binary to use for chrome headless. When not set, Quarto searches for browsers in this order: (1) Quarto-installed Chrome Headless Shell, (2) system Chrome or Edge, (3) legacy Puppeteer Chromium. The binary must be compatible with Chrome Devtools Protocol (e.g. Chrome, Chromium, Chrome Headless Shell, Edge, …).
QUARTO_CHROMIUM_HEADLESS_MODE
Used for adaption of the --headless mode used with QUARTO_CHROMIUM binary. Set to "none" for --headless , or to "old" or "new" to pass as argument, e.g. --headless=<QUARTO_CHROMIUM_HEADLESS_MODE> . Quarto 1.6 sets "old" as default, which works from Chrome 112 to 131. Starting Quarto 1.7.13, "none" is the default as Chrome 132 removed old headless mode.
QUARTO_LOG
QUARTO_LOG_LEVEL
QUARTO_LOG_FORMAT
Those variables controls the logging behavior:
QUARTO_LOG is the same as using --log at command line. It is used to set the path to the log file
QUARTO_LOG_LEVEL is the same as using --log-level at command line. It is used to set the max level that will be log. Possible values are DEBUG, INFO(default), WARNING, and ERROR.
QUARTO_LOG_FORMAT is the same as using --log-format at command line. It is used to set the format for the log. Possible values are plain (default) and json-stream.
Variables Quarto sets
These variables are set by Quarto you can query them. For example, you can query them in an executable code cell:
Root of the project, or the directory of the file if not in project mode
QUARTO_DOCUMENT_PATH
Directory of the document being rendered
QUARTO_DOCUMENT_FILE
Name of the file being rendered
QUARTO_PROFILE
Profile used, e.g QUARTO_PROFILE=advanced,production for quarto render --profile advanced,production
QUARTO_FIG_WIDTH and QUARTO_FIG_HEIGHT
Values for fig-width and fig-height as set in the document metadata
QUARTO_RUN_NO_NETWORK
When true, Quarto project scripts written in TypeScript won’t be allowed to use the network to download sources. In this setting, those scripts will not have access to the standard library.
QUARTO_EXECUTE_INFO
QUARTO_EXECUTE_INFO holds the path of a file containing a JSON object with execution information for Quarto engines. This is accessible by code in executable code cells.
QUARTO_PROJECT_SCRIPT_PROGRESS
Set to "1" when progress output can be shown during pre/post render scripts (e.g. rendering multiple files), "0" otherwise. |