Skip to content

Commit

Permalink
Add figure sizing vars
Browse files Browse the repository at this point in the history
  • Loading branch information
cwickham committed Jun 10, 2024
1 parent 4ed82dd commit ceed077
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions docs/advanced/environment-vars.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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 |

0 comments on commit ceed077

Please sign in to comment.