From 3d09d4a3df4f0e323b0b94974e8e9e9625de50f3 Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Mon, 10 Jun 2024 11:36:10 -0700 Subject: [PATCH 1/3] Add listing page --- docs/advanced/environment-vars.qmd | 59 ++++++++++++++++++++++ docs/advanced/index.qmd | 12 +++++ docs/advanced/jupyter/kernel-execution.qmd | 1 + 3 files changed, 72 insertions(+) create mode 100644 docs/advanced/environment-vars.qmd create mode 100644 docs/advanced/index.qmd diff --git a/docs/advanced/environment-vars.qmd b/docs/advanced/environment-vars.qmd new file mode 100644 index 0000000000..bdab0c1ee6 --- /dev/null +++ b/docs/advanced/environment-vars.qmd @@ -0,0 +1,59 @@ +--- +title: "Environment Variables" +summary: Environment variables Quarto inspects and sets +format: html +draft: true +--- + +## 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`: + +```{.bash filename="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](/docs/projects/environment.qmd). + +| Variable | Description | +|-----------------|-------------| +| `QUARTO_R` | | +| `QUARTO_PYTHON` | | +| | | + +## Variables Quarto sets + +These variables are set by Quarto you can query them. For example, you can query them in an executable code cell: + +::: {.panel-tabset} + +## R + +```r +Sys.getenv("QUARTO_DOCUMENT_PATH") +``` + +## Python + +```python +import os +print(os.environ["QUARTO_DOCUMENT_PATH"]) +``` + +## Julia + +```julia +ENV["QUARTO_DOCUMENT_PATH"] +``` + +::: + + +| Variable | Description | +|---------------------------|-------------| +| `QUARTO_PROJECT_ROOT` | | +| `QUARTO_DOCUMENT_PATH` | | +| | | + + diff --git a/docs/advanced/index.qmd b/docs/advanced/index.qmd new file mode 100644 index 0000000000..42e4d7d604 --- /dev/null +++ b/docs/advanced/index.qmd @@ -0,0 +1,12 @@ +--- +title: "Advanced User Documentation" +format: html +search: false +listing: + type: table + fields: [title, summary] + field-display-names: + summary: Summary +--- + +Topics on this page may be of interest to advanced users of Quarto. \ No newline at end of file diff --git a/docs/advanced/jupyter/kernel-execution.qmd b/docs/advanced/jupyter/kernel-execution.qmd index 92177cfb4c..9f261f318d 100644 --- a/docs/advanced/jupyter/kernel-execution.qmd +++ b/docs/advanced/jupyter/kernel-execution.qmd @@ -1,6 +1,7 @@ --- title: Jupyter Kernel Execution format: html +summary: How to support Quarto from a Jupyter kernel --- Quarto executes Jupyter notebooks using [`nbclient`](https://github.com/jupyter/nbclient) together with a few additional options From 4ed82ddc68b9ca82564f1b4b2b360fcf1ef0b9d2 Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Mon, 10 Jun 2024 11:46:37 -0700 Subject: [PATCH 2/3] Add descriptions from dev docs --- docs/advanced/environment-vars.qmd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/advanced/environment-vars.qmd b/docs/advanced/environment-vars.qmd index bdab0c1ee6..15cb005800 100644 --- a/docs/advanced/environment-vars.qmd +++ b/docs/advanced/environment-vars.qmd @@ -50,10 +50,10 @@ ENV["QUARTO_DOCUMENT_PATH"] ::: -| Variable | Description | -|---------------------------|-------------| -| `QUARTO_PROJECT_ROOT` | | -| `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` | From ceed07799847c0062a06600aeb8d92e2ef32b8c9 Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Mon, 10 Jun 2024 14:46:05 -0700 Subject: [PATCH 3/3] Add figure sizing vars --- docs/advanced/environment-vars.qmd | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/docs/advanced/environment-vars.qmd b/docs/advanced/environment-vars.qmd index 15cb005800..dc2cfd9e4d 100644 --- a/docs/advanced/environment-vars.qmd +++ b/docs/advanced/environment-vars.qmd @@ -9,7 +9,7 @@ draft: true These are variables that you can set to control how Quarto renders documents. For example, you can set them explicitly before running `quarto render`: -```{.bash filename="Terminal"} +``` {.bash filename="Terminal"} export QUARTO_R=/opt/R/4.2.3/bin quarto render ``` @@ -26,34 +26,30 @@ You can read about other ways to set environment variables in Quarto Projects in These variables are set by Quarto you can query them. For example, you can query them in an executable code cell: -::: {.panel-tabset} - +::: panel-tabset ## R -```r +``` r Sys.getenv("QUARTO_DOCUMENT_PATH") ``` ## Python -```python +``` python import os print(os.environ["QUARTO_DOCUMENT_PATH"]) ``` -## Julia +## Julia -```julia +``` julia 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` | - - +| 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 | \ No newline at end of file