quarto-dev / quarto-dev/quarto-cli

`embed` shortcode requires `knitr` engine cells to have `echo: true` (at cell level)

Open
#13,735 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug embed engines-knitr
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

I have:
  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide
Bug description

It appears one cannot set echo: false at code cell level and embed the corresponding cell.

Steps to reproduce
---
title: "Reproducible Quarto Document"
format: html
---

{{< embed cell.qmd#plot >}}
---
engine: knitr
---

```{r}
#| label: plot
#| echo: false
plot(1)
```
Actual behavior
Rendering qmd embeds
[1/1] cell.qmd
ℹ R version 4.5.2 (2025-10-31)
! Config '~/.Rprofile' was loaded!


processing file: cell.qmd
1/3       
2/3 [plot]
3/3       
output file: cell.knit.md

ERROR: The cell plot does not exist in notebook

Stack trace:
    at file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/core/jupyter/jupyter-embed.ts:446:15
    at Array.map (<anonymous>)
    at notebookMarkdown (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/core/jupyter/jupyter-embed.ts:443:36)
    at eventLoopTick (ext:core/01_core.js:179:7)
    at async replaceNotebookPlaceholders (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/core/jupyter/jupyter-embed.ts:326:26)
    at async renderPandoc (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/render/render.ts:118:26)
    at async Object.onRender (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/render/render-files.ts:731:30)
    at async renderFileInternal (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/render/render-files.ts:693:9)
    at async renderFiles (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/render/render-files.ts:331:9)
    at async render (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/render/render-shared.ts:106:18)
    at async renderForPreview (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/preview/preview.ts:422:24)
    at async render (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/preview/preview.ts:169:22)
    at async preview (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/preview/preview.ts:186:18)
    at async Command.actionHandler (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/command/preview/cmd.ts:424:7)
    at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7)
    at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1780:14)
    at async quarto (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/quarto.ts:193:5)
    at async file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/quarto.ts:225:5
    at async file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/core/main.ts:45:14
    at async mainRunner (file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/core/main.ts:47:5)
    at async file:///Users/mcanouil/Projects/quarto-dev/quarto-cli/src/quarto.ts:215:3
Expected behavior

The embedding should work similarly to setting echo: false at document level.

---
engine: knitr
execute:
  echo: false
---

```{r}
#| label: plot
plot(1)
```
Your environment
  • VSCode
  • Latest macOS
Quarto check output
Quarto 99.9.9
[✓] Checking environment information...
      Quarto cache location: /Users/mcanouil/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.87.0: OK
      NOTE: Deno version 2.4.5 does not strictly match 2.3.1 and strict checking is enabled. Please use 2.3.1.
      Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 99.9.9
      commit: 20d67b97dceb83c1d69034bf24bf47616100cc8d
      Path: /Users/mcanouil/Projects/quarto-dev/quarto-cli/package/dist/bin

[✓] Checking tools....................OK
      TinyTeX: v2025.11
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/mcanouil/Library/TinyTeX/bin/universal-darwin
      Version: 2025

[✓] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
      Source: QUARTO_CHROMIUM

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.14.0
      Path: /Users/mcanouil/Projects/quarto-dev/quarto-playground/.venv/bin/python
      Jupyter: 5.9.1
      Kernels: uv, julia-1.12, python3

[✓] Checking Jupyter engine render....OK

(/) Checking R installation...........ℹ R version 4.5.2 (2025-10-31)
! Config '~/.Rprofile' was loaded!
[✓] Checking R installation...........OK
      Version: 4.5.2
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/mcanouil/Projects/quarto-dev/quarto-playground/renv/library/macos/R-4.5/aarch64-apple-darwin20
        - /Users/mcanouil/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.5/aarch64-apple-darwin20/4cd76b74
      knitr: 1.50
      rmarkdown: 2.30

[✓] Checking Knitr engine render......OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/core/jupyter/jupyter-embed.ts around the notebookMarkdown and replaceNotebookPlaceholders locations shown in the stack trace. Reproduce the issue with the two QMD examples using a knitr cell labeled plot and cell-level echo: false. Done means the embed shortcode finds and embeds the cell without requiring echo: true at cell level.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, r
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.