Impossibility to fence a code chunk with the chunk option include: false?
#14214
Unanswered
elenlefoll
asked this question in
Q&A
Replies: 2 comments 3 replies
-
|
That's not a bug.
Use escaping for these cases: ```{{r}}
#| label: demo-chunk
#| include: false
demoplot <- plot(1:10)
``` |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks for your quick answer. This is indeed a solution for displaying the code chunk as is, but it doesn't execute it, which is a problem for me as these code chunks are used to create objects that are called in future chunks in the textbook. So currently, I have to duplicate these chunks and make one escaped for displaying and keep the other for execution. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have:
Bug description
For a textbook I would like to explain to students that they can use the code chunk option
include: falseto run a chunk, but not display it or its output in their rendered document. I would like to be able to display this demo chunk in the rendered version of my textbook and, for this, I used theecho: fencedoption. However, the problem is that the chunk is not displaying in the rendered doc (see reprex below).Steps to reproduce
Actual behavior
The code chunk is not displayed in the rendered doc.
reprex.html
Expected behavior
The code chunk should be rendered including with the opening and closing backticks.
Your environment
Quarto check output
Quarto 1.9.30 [✓] Checking environment information... Quarto cache location: /Users/lefoll/Library/Caches/quarto [✓] Checking versions of quarto binary dependencies... Pandoc version 3.8.3: OK Dart Sass version 1.87.0: OK Deno version 2.4.5: OK Typst version 0.14.2: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.9.30 Path: /Applications/quarto/bin [✓] Checking tools....................OK TinyTeX: v2025.11 Chromium: (not installed) Chrome Headless Shell: (not installed) VeraPDF: (not installed) [✓] Checking LaTeX....................OK Using: TinyTex Path: /Users/lefoll/Library/TinyTeX/bin/universal-darwin Version: 2025 [✓] Checking Chrome Headless....................OK Using: Chrome found on system Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome Source: MacOS known location [✓] Checking basic markdown render....OK [✓] Checking R installation...........OK Version: 4.5.2 Path: /Library/Frameworks/R.framework/Resources LibPaths: - /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library knitr: 1.51 rmarkdown: 2.30 [✓] Checking Knitr engine render......OK [✓] Checking Python 3 installation....OK Version: 3.12.8 (Conda) Path: /Users/lefoll/miniconda3/bin/python Jupyter: (None) Jupyter is not available in this Python installation. Install with conda install jupyter [✓] Checking Julia installation...Beta Was this translation helpful? Give feedback.
All reactions