From 4a93405c33751f664428d9554d9c6bf20969c1af Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 17 Jan 2025 16:04:00 +0100 Subject: [PATCH 1/3] Add two env var used for chrome headless in our advanced doc (cherry picked from commit 489a865e4399fef64b01c12b4b3b84d0ddab2528) --- docs/advanced/environment-vars.qmd | 71 ++++++++++++++++-------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/docs/advanced/environment-vars.qmd b/docs/advanced/environment-vars.qmd index c10262dc49..4c4f7e42cf 100644 --- a/docs/advanced/environment-vars.qmd +++ b/docs/advanced/environment-vars.qmd @@ -15,25 +15,31 @@ quarto render You can read about other ways to set environment variables in Quarto Projects in [Environment Variables](/docs/projects/environment.qmd). -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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`](https://semver.org/) 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. | -| | | -| | ``` | -| | QUARTO_KNITR_RSCRIPT_ARGS="--no-init-file,--max-connections=258" | -| | ``` | -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| `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. | -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 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`](https://semver.org/) 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. | +| | | +| | ``` | +| | QUARTO_KNITR_RSCRIPT_ARGS="--no-init-file,--max-connections=258" | +| | ``` | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `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](https://chromedevtools.github.io/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 1.6 sets \`"old"\` as default, which works from Chrome 112 to 131. | ++---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ## Variables Quarto sets @@ -60,17 +66,16 @@ 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. | -+--------------------------------------------+----------------------------------------------------------------------------------------------------------+ ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 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. | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ \ No newline at end of file From 2a9608281e090990be638d30a467e37fd5df9c8d Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 17 Jan 2025 16:15:19 +0100 Subject: [PATCH 2/3] Correct formatting for code inline (cherry picked from commit 36ad9db097c672f6d8c91befec31a0bc2be14de4) --- docs/advanced/environment-vars.qmd | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/advanced/environment-vars.qmd b/docs/advanced/environment-vars.qmd index 4c4f7e42cf..c5d22a1bdb 100644 --- a/docs/advanced/environment-vars.qmd +++ b/docs/advanced/environment-vars.qmd @@ -36,9 +36,7 @@ You can read about other ways to set environment variables in Quarto Projects in +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | `QUARTO_CHROMIUM` | Explicit path to binary to use for chrome headless. Quarto uses [Chrome Devtools Protocol](https://chromedevtools.github.io/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 1.6 sets \`"old"\` as default, which works from Chrome 112 to 131. | +| `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 1.6 sets `"old"` as default, which works from Chrome 112 to 131. | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ## Variables Quarto sets From 346edaef5b5db5e501b1b7f3070d049d45afcc8a Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Fri, 17 Jan 2025 16:54:36 +0100 Subject: [PATCH 3/3] Add a note about change of default in Quarto 1.7.13 --- docs/advanced/environment-vars.qmd | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/advanced/environment-vars.qmd b/docs/advanced/environment-vars.qmd index c5d22a1bdb..b1b8c2d0d8 100644 --- a/docs/advanced/environment-vars.qmd +++ b/docs/advanced/environment-vars.qmd @@ -15,29 +15,29 @@ quarto render You can read about other ways to set environment variables in Quarto Projects in [Environment Variables](/docs/projects/environment.qmd). -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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`](https://semver.org/) 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. | -| | | -| | ``` | -| | QUARTO_KNITR_RSCRIPT_ARGS="--no-init-file,--max-connections=258" | -| | ``` | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| `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](https://chromedevtools.github.io/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 1.6 sets `"old"` as default, which works from Chrome 112 to 131. | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 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`](https://semver.org/) 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. | +| | | +| | ``` | +| | QUARTO_KNITR_RSCRIPT_ARGS="--no-init-file,--max-connections=258" | +| | ``` | ++---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `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](https://chromedevtools.github.io/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 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](https://developer.chrome.com/blog/removing-headless-old-from-chrome). | ++---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ## Variables Quarto sets