Skip to content

[Sync to prerelease] docs: document conditional execution via QUARTO_EXECUTE_INFO#2057

Merged
cderv merged 1 commit into
prereleasefrom
sync-2043-to-prerelease
Jun 10, 2026
Merged

[Sync to prerelease] docs: document conditional execution via QUARTO_EXECUTE_INFO#2057
cderv merged 1 commit into
prereleasefrom
sync-2043-to-prerelease

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Description

Sync of #2043 to prerelease.

Original PR

docs: document conditional execution via QUARTO_EXECUTE_INFO

Cross-link the existing QUARTO_EXECUTE_INFO reference page (docs/advanced/quarto-execute-info.qmd) from the six pages users actually browse when looking for conditional-execution behavior. The reference page itself is not modified.

Per the issue thread on quarto-dev/quarto-cli#13514, users want both:

  • a single canonical place documenting the env var (docs/advanced/quarto-execute-info.qmd, already exists)
  • concise, language-specific examples on the pages users land on (R, Python, Julia)

This branch addresses the second part — the first already exists.

Changes

  • docs/computations/execution-options.qmd — new ## Conditional Execution section explaining the distinction from format-based conditional content.
  • docs/computations/r.qmd, python.qmd, julia.qmd## Conditional Execution section per language, with a short verbatim snippet showing how to read QUARTO_EXECUTE_INFO. The R section also points at knitr::is_html_output(), knitr::is_latex_output(), and knitr::pandoc_to() for users who only need the common cases.
  • docs/authoring/conditional.qmd — explicit clarifier that .content-visible / .content-hidden hide output but do not skip execution (per cwickham's ask in the thread).
  • docs/authoring/cross-references-divs.qmd — same execution clarifier, plus a note pointing at project profiles as another axis for content variation beyond when-format.
  • docs/authoring/_visibility-vs-execution.md — shared partial used by both authoring pages so the execution-vs-visibility note has a single source of truth.

The added language snippets contain no executable code (wrapped in verbatim markdown fences with {{lang}} escaped cell markers), so no _freeze/ updates are introduced.

Test Plan

  • Render each modified page; confirm new sections appear in the page TOC and link targets resolve.
  • Confirm cross-references-divs.qmd Conditional Content section now ends with the two notes (execution + project profiles) plus the existing example.
  • Confirm _visibility-vs-execution.md partial renders identically in both consumer pages.
  • No _freeze/ regeneration triggered.

Closes quarto-dev/quarto-cli#13514

Cross-link the existing QUARTO_EXECUTE_INFO reference page from the
pages users actually browse when looking for conditional-execution
behavior. Users reported finding the reference only if they already
knew to look for it (quarto-dev/quarto-cli#13514).

- New "Conditional Execution" section in execution-options.qmd
  explaining the distinction from format-based conditional content
- Per-language sections (R, Python, Julia) with short verbatim
  snippets showing how to read QUARTO_EXECUTE_INFO; R section also
  surfaces knitr::is_html_output(), knitr::is_latex_output(), and
  knitr::pandoc_to() for users who only need common format checks
- Clarifier in conditional.qmd and cross-references-divs.qmd that
  .content-visible / .content-hidden hides rendered output but does
  not skip code execution
- Shared partial _visibility-vs-execution.md so the execution-vs-
  visibility note has a single source in both authoring pages

Closes quarto-dev/quarto-cli#13514

(cherry picked from commit b90194c)
@cderv

cderv commented Jun 10, 2026

Copy link
Copy Markdown
Member

/deploy-preview

@cderv cderv merged commit 1460f34 into prerelease Jun 10, 2026
@cderv cderv deleted the sync-2043-to-prerelease branch June 10, 2026 12:43
@github-actions

Copy link
Copy Markdown
Contributor Author

📝 Preview Deployment

🔍 Full site preview: https://deploy-preview-2057.quarto.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant