From beceac36bb53d65d2c611a723651ee627c051633 Mon Sep 17 00:00:00 2001 From: "J.J. Allaire" Date: Mon, 28 Jul 2025 13:41:31 -0400 Subject: [PATCH 1/2] jupyter: add environment variable for quarto base format Note that we already communicate this to the knitr engine via format$pandoc$to. Here we communicate the base-format which enables explicit detection of extended formats like dashboard and email. --- src/resources/jupyter/notebook.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/resources/jupyter/notebook.py b/src/resources/jupyter/notebook.py index 2d4ca301525..41e4ea5684a 100644 --- a/src/resources/jupyter/notebook.py +++ b/src/resources/jupyter/notebook.py @@ -121,6 +121,9 @@ def build_kernel_options(options): def set_env_vars(options): + os.environ["QUARTO_OUTPUT_BASE_FORMAT"] = str( + options["format"]["identifier"]["base-format"] + ) os.environ["QUARTO_FIG_WIDTH"] = str(options["fig_width"]) os.environ["QUARTO_FIG_HEIGHT"] = str(options["fig_height"]) if options["fig_format"] == "retina": From 639fc7d19d8a6a03a4f0aaf0bf1edd19524dc3cb Mon Sep 17 00:00:00 2001 From: "J.J. Allaire" Date: Mon, 28 Jul 2025 13:43:49 -0400 Subject: [PATCH 2/2] changelog entry --- news/changelog-1.8.md | 1 + 1 file changed, 1 insertion(+) diff --git a/news/changelog-1.8.md b/news/changelog-1.8.md index 890a50e7b2f..af4d92b7ec5 100644 --- a/news/changelog-1.8.md +++ b/news/changelog-1.8.md @@ -101,6 +101,7 @@ All changes included in 1.8: - ([#12753](https://github.com/quarto-dev/quarto-cli/issues/12753)): Support change in IPython 9+ and import `set_matplotlib_formats` from `matplotlib_inline.backend_inline` in the internal `setup.py` script used to initialize rendering with Jupyter engine. - ([#12839](https://github.com/quarto-dev/quarto-cli/issues/12839)): Support for `plotly.py` 6+ which now loads plotly.js using a cdn in script as a module. - ([#13026](https://github.com/quarto-dev/quarto-cli/pulls/13026)): Use `jsdelivr` CDN for jupyter widgets dependencies. +- ([#13150](https://github.com/quarto-dev/quarto-cli/pull/13150))): Add environment variable for quarto base format ### `knitr`