Environment Variables
Variables Quarto inspects
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
export QUARTO_R=/opt/R/4.2.3/bin
quarto render
You can read about other ways to set environment variables in Quarto Projects in Environment Variables.
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
|
QUARTO_TEXLIVE_BINPATH |
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. Quarto uses Chrome Devtools Protocol to do screenshot of HTML diagrams for PDF insertion. The binary must be compatible with this 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. |
Variables Quarto sets
These variables are set by Quarto you can query them. For example, you can query them in an executable code cell:
Sys.getenv("QUARTO_DOCUMENT_PATH")
import os
print(os.environ["QUARTO_DOCUMENT_PATH"])
ENV["QUARTO_DOCUMENT_PATH"]
Variable | Description |
---|---|
QUARTO_PROJECT_ROOT |
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_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. |