quarto-dev / quarto-dev/quarto-cli
quarto treats tables from `kableExtra` (`tabu`) as subtables
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Long tables generated by kableExtra are created using the tabu environment (rather than tabular) and the captions are incorrect (the LaTeX code generated includes a subcaption and the caption from the YAML tbl-cap instruction is missing.
---
title: "MWE"
format: pdf
keep-tex: true
---
```{r}
#| label: tbl-test1
#| echo: false
#| tbl-cap: "Table caption"
data("mtcars")
knitr::kable(mtcars[1:5,],
row.names = FALSE)
```
```{r}
#| label: tbl-test2
#| echo: false
#| tbl-cap: "Table caption"
knitr::kable(mtcars[1:5,],
row.names = FALSE) |>
kableExtra::kable_styling(full_width = TRUE)
```
```{r}
#| label: tbl-test3
#| echo: false
#| tbl-cap: "Table caption"
data("mtcars")
kableExtra::kbl(mtcars[1:5,],
row.names = FALSE)
```
quarto check Output
[✓] Checking Quarto installation......OK
Version: 1.0.35
Path: /opt/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.5
Path: /usr/bin/python3
Jupyter: 4.11.1
Kernels: python3, julia-1.6, sagemath
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.2.1
Path: /usr/lib64/R
LibPaths:
- /home/lbelzile/R/x86_64-pc-linux-gnu-library/4.2
- /usr/lib/R/library
rmarkdown: 2.14
[✓] Checking Knitr engine render......OK
quarto tools check Output
Tool Status Installed Latest
chromium Not installed --- 869685
tinytex Not installed --- v2022.07
I have tinytex version 0.40 installed. chromium is also installed on my computer.
tinytex::tlmgr_version()
tlmgr revision 63068 (2022-04-18 07:58:07 +0200)
TeX Live (https://tug.org/texlive) version 2022
Running Arch Linux
RStudio 2022.07.0+548 "Spotted Wakerobin" Release (34ea3031089fa4e38738a9256d6fa6d70629c822, 2022-07-06) for Ubuntu Bionic
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36
Checklist
- formatted your issue so it is easier for us to read?
- included a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- documented the quarto version you're running, by pasting the output from running
quarto checkin the "Quarto Check Output" text area? - documented the version of the quarto tools you're running, by providing the output from running
quarto tools checkin the "Quarto Tools Check Output" text area? - documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
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.
Research direction
Start by rendering the supplied minimal .qmd example and compare the plain kable, kable_styling, and kbl cases. Done means long kableExtra tables are treated as tables rather than subtables, with the YAML tbl-cap caption present and no incorrect subcaption.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100