[Sync to prerelease] docs: document conditional execution via QUARTO_EXECUTE_INFO#2057
Merged
Conversation
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)
Member
|
/deploy-preview |
4 tasks
Contributor
Author
📝 Preview Deployment🔍 Full site preview: https://deploy-preview-2057.quarto.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Sync of #2043 to
prerelease.Original PR
docs: document conditional execution via QUARTO_EXECUTE_INFO
Cross-link the existing
QUARTO_EXECUTE_INFOreference 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:
docs/advanced/quarto-execute-info.qmd, already exists)This branch addresses the second part — the first already exists.
Changes
docs/computations/execution-options.qmd— new## Conditional Executionsection explaining the distinction from format-based conditional content.docs/computations/r.qmd,python.qmd,julia.qmd—## Conditional Executionsection per language, with a short verbatim snippet showing how to readQUARTO_EXECUTE_INFO. The R section also points atknitr::is_html_output(),knitr::is_latex_output(), andknitr::pandoc_to()for users who only need the common cases.docs/authoring/conditional.qmd— explicit clarifier that.content-visible/.content-hiddenhide 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 beyondwhen-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
cross-references-divs.qmdConditional Content section now ends with the two notes (execution + project profiles) plus the existing example._visibility-vs-execution.mdpartial renders identically in both consumer pages._freeze/regeneration triggered.Closes quarto-dev/quarto-cli#13514