quarto-dev / quarto-dev/quarto-cli
HTML tables not correctly included in embed HTML from a embed qmd
Open
@cderv is already working on this.
Since Feb 29, 2024.
bug
embed
manuscript
tables
triaged-to
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
This is related to #7210 and I've tested it on Quarto version 1.5.22 and 1.4.358. The captions now work for outputting knitr::kable tables but not with other table types (gt)
Steps to reproduce
- in the terminal i made a new project,
quarto create project manuscript - here's the
index.qmd
---
title: "Test of embedding tables"
format:
html:
toc: true
---
Hello world
```{r}
#| label: tbl-one
#| tbl-cap: This is normal gt table
gt::gt(head(mtcars))
```
embed with gt
{{< embed notebooks/table.qmd#tbl-two >}}
embed with kable
{{< embed notebooks/table.qmd#tbl-three >}}
- here's the notebook i want to embed in this path
notebooks/table.qmd
---
title: "Notebook"
---
```{r}
#| label: tbl-two
gt::gt(head(mtcars))
```
```{r}
#| label: tbl-three
knitr::kable(head(mtcars))
```
here's the result
Expected behavior
The gt table should render in the document. In total I should have two gt tables and one kable
Actual behavior
The gt table from the child document notebook/table.qmd does not render while the kable table does. Only the tbl-cap renders
Your environment
- IDE: Rstudio, Windows 11
$version
[1] ‘2023.12.1.402’
$long_version
[1] "2023.12.1+402"
$release_name
[1] "Ocean Storm"
Quarto check output
$ quarto render
[1/2] notebooks\table.qmd
[2/2] index.qmd
Creating MECA Bundle
2 article files
22 source files
2 notebooks
2 other files
Output created: _manuscript\index.html
FAA3303@DOHLTTUM2107608 MINGW64 ~/Projects/personal-repos/test
$ quarto check
Quarto 1.5.22
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.5.22
Path: C:\Program Files\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: v2024.02
Chromium: (not installed)
[>] Checking LaTeX....................OK
Using: TinyTex
Path: C:\Users\FAA3303\AppData\Roaming\TinyTeX\bin\windows\
Version: 2023
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.10.13 (Conda)
Path: C:/Users/FAA3303/AppData/Local/miniforge3/python.exe
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with conda install jupyter
[>] Checking R installation...........OK
Version: 4.2.2
Path: C:/PROGRA~1/R/R-42~1.2
LibPaths:
- C:/Program Files/R/R-4.2.2/library
knitr: 1.45
rmarkdown: 2.10
[>] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.