Not possible to embed cell with subplots in R

Open
#13,597 2 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Oct 22, 2025.

Assessment

This issue has not been assessed yet.

Description

bug embed engines-knitr
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

Hello,

I am using a manuscript project. I'm trying to embed from a .qmd file the contents of a chunk that has subplots. According to the guide, it should be possible using the jupyter environment. However I am not able to make it work with the knirt environment.

Thank you in advance for your help!

Steps to reproduce

index.qmd

---
title: embed-issue
authors:
  - name: Juan
---

## Section

{{< embed notebook.qmd#fig-test >}}

notebook.qmd

---
title: "notebook"
---

```{r}
#| label: fig-test
#| fig-cap: this is figure caption
#| fig-subcap: 
#|   - "This is subfig 1"
#|   - "This is subfig 2"
#|   - "This is subfig 3"
#| layout-ncol: 3

hist(x = runif(100))
hist(x = rnorm(100))
plot(x = runif(100), y = rnorm(100))
```
Actual behavior

I obtain the following error code

[1/2] notebook.qmd
[2/2] index.qmd
ERROR: The cell fig-test does not exist in notebook
Expected behavior

All subfigures should be embeded in the index.qmd document, as shown in the guide

Your environment
R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=German_Germany.utf8  LC_CTYPE=German_Germany.utf8    LC_MONETARY=German_Germany.utf8 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.utf8    

time zone: Europe/Berlin
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] digest_0.6.37     R6_2.5.1          later_1.4.1       fastmap_1.2.0     xfun_0.51         knitr_1.50        htmltools_0.5.8.1
 [8] rmarkdown_2.29    ps_1.9.0          cli_3.6.3         processx_3.8.6    compiler_4.3.0    rstudioapi_0.17.1 tools_4.3.0      
[15] quarto_1.4.4      evaluate_1.0.3    yaml_2.3.10       Rcpp_1.0.13-1     rlang_1.1.4       jsonlite_2.0.0   
Quarto check output
Quarto 1.8.25
[>] Checking environment information...
      Quarto cache location: C:\Users\user\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.87.0: OK
      Deno version 2.3.1: OK
      Typst version 0.13.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.8.25
      Path: C:\Users\user\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: v2025.10
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\user\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2025

[>] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
      Source: Windows Registry

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

[>] Checking Python 3 installation....OK
      Version: 3.9.0
      Path: C:/Program Files/Python39/python.exe
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with py -m pip install jupyter

[>] Checking R installation...........OK
      Version: 4.3.0
      Path: C:/PROGRA~1/R/R-43~1.0
      LibPaths:
        - C:/Users/user/AppData/Local/R/win-library/4.3
        - C:/Program Files/R/R-4.3.0/library
      knitr: 1.50
      rmarkdown: 2.29

[>] Checking Knitr engine render......OK
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

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.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.