Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table caption not displayed for data.frame or tibble #6458

Closed
sda030 opened this issue Aug 7, 2023 · 1 comment
Closed

Table caption not displayed for data.frame or tibble #6458

sda030 opened this issue Aug 7, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@sda030
Copy link

sda030 commented Aug 7, 2023

Bug description

I was not able to find a registered issue for this (obvious) bug, nor in the long CrossRef Overhaul list.
Basically, table caption only shows for kable, paged, etc, and not for data.frame (default) or tibble. Same for df-print: as for simplest example (seen below).

Steps to reproduce

---
format: html
---


```{r}
#| label: tbl-tab1
#| tbl-cap: Why am I not showing if just a data frame?

mtcars[1:4, 1:4]
```

Expected behavior

Table caption should display even as data frame or tibble.

Actual behavior

?(caption)

Your environment

  • IDE: RStudio 2023.06.1 Build 524
  • Windows 11

Quarto check output

[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.6: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.4: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.4.300
      Path: C:\Program Files\Quarto\bin
      CodePage: 1252

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

[>] Checking Python 3 installation....OK
      Version: 3.11.4
      Path: C:/Users/py128/AppData/Local/Programs/Python/Python311/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.1
      Path: C:/PROGRA~1/R/R-43~1.1
      LibPaths:
        - C:/Users/py128/AppData/Local/R/win-library
        - C:/Program Files/R/R-4.3.1/library
      knitr: 1.43
      rmarkdown: 2.23

[>] Checking Knitr engine render......OK
@sda030 sda030 added the bug Something isn't working label Aug 7, 2023
@mcanouil
Copy link
Collaborator

mcanouil commented Aug 7, 2023

A data.frame and tibble are not table, they are plain text, thus Quarto won't add a table caption for something that is not a table.
This is not a bug.
For now, for caption to work you need to output table as markdown/latex/html.

This will change with the work ongoing on the cross-reference system.

I am closing this as there is nothing to do right now, beside you outputting table rather than plain text.

@mcanouil mcanouil closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2023
@mcanouil mcanouil removed the bug Something isn't working label Aug 7, 2023
@mcanouil mcanouil added the wontfix This will not be worked on label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants