Skip to content

Using tab_source_note and tab_footnote together in quarto distorts table #1296

Description

@werkstattcodes

Prework

Description

When using tab_source_note and tab_footnote together in a quarto document, the rendered document shows a broken/distorted table. However, running the code chunks interactively (i.e. not rendering in quarto) returns the correct, intended table.

Reproducible example

I copy here the entire code of the quarto document. Running a reprex in an .r file doesn't reveal the error.


title: "Untitled"
format: html

library(tidyverse)
library(gt)
packageVersion("gt")

only source note

mtcars %>%
gt() %>%
tab_source_note(
  source_note="this is the source"
)

only footnote

mtcars %>%
gt() %>%
tab_footnote(
  footnote="this is the footnote",
  locations=cells_column_labels(columns=carb)
) 

both: error

mtcars %>%
gt() %>%
tab_source_note(
  source_note="this is the source"
) %>%
tab_footnote(
  footnote="this is the footnote",
  locations=cells_column_labels(columns=carb)
) 

image

Expected result

Table should contain footnote and sourcenote and be rendered correctly in quarto.

Session info

sessionInfo()
R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

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

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

loaded via a namespace (and not attached):
[1] compiler_4.2.3 tools_4.2.3 rstudioapi_0.14

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions