As originally discussed in #2249, here is a separate issue to discuss exposing LUA variables.

Currently, users do not have access to all LUA variables (from Quarto and Pandoc) which could be useful.
With that in mind I wrote a LUA filter/shortcode (<https://github.com/mcanouil/quarto-lua-env>) to expose the following objects recursively, or at least the scalar variables.

```
lua-env:
  quarto: "quarto"
  pandoc:
    PANDOC_STATE: "PANDOC_STATE"
    FORMAT: "FORMAT"
    PANDOC_READER_OPTIONS: "PANDOC_READER_OPTIONS"
    PANDOC_WRITER_OPTIONS: "PANDOC_WRITER_OPTIONS"
    PANDOC_VERSION: "PANDOC_VERSION"
    PANDOC_API_VERSION: "PANDOC_API_VERSION"
    PANDOC_SCRIPT_FILE: "PANDOC_SCRIPT_FILE"
```

Variables can be accessed using:
- `{{< lua-env pandoc.PANDOC_VERSION >}}`
- `{{< meta lua-env.pandoc.PANDOC_VERSION >}}`
- `{{< lua-env quarto.doc.input_file >}}`
- `{{< meta lua-env.quarto.doc.input_file >}}`

This could be integrated into Quarto if deemed useful to have such behaviour as exposing "all" LUA variables to shortcode for use in Quarto document and possibly in code cells in the future.
cscheid
2023-03-11T17:04:03Z
mcanouil
enhancement
v1.4
open
Expose all LUA variables to Quarto meta shortcode
https://github.com/quarto-dev/quarto-cli/issues/4770