When using a gt table as part of a Xaringan html slide presentation, adding footnotes with tab_footnotes() stopped working in version 0.8.0, and doesn't work in 0.9.0 either. It last worked in version 0.7.0. It doesn't matter which Xaringan version is used.
The problem presents itself as 1">Name1 (the 1s are in superscript) when creating a footnote, 1, at the Name column. See pictures below.
Reproducible example
This is the R code. "---" represents the start of a new slide in Xaringan.
---
### My slide title
```{r echo=FALSE}
my_test_data <- data.frame(
Name = c("Alice", "Bob", "Charlie"),
Age = c(25, 30, 28),
Score = c(95, 85, 90)
)
my_test_data %>%
gt() %>%
tab_footnote(
footnote = "Test footnote.",
locations = cells_column_labels(columns = Name)
)
"```" # Note that the quote marks are added to prevent closing the code block. They're not in the actual R code.
---
This is the table as generated using gt version 0.7.0:
This is the table as generated using gt version 0.8.0:
This is the table as generated using gt version 0.9.0:
Expected result
The expected outcome is a table as generated using version 0.7.0:
Description
When using a gt table as part of a Xaringan html slide presentation, adding footnotes with
tab_footnotes()
stopped working in version 0.8.0, and doesn't work in 0.9.0 either. It last worked in version 0.7.0. It doesn't matter which Xaringan version is used.The problem presents itself as
1">Name1
(the 1s are in superscript) when creating a footnote, 1, at the Name column. See pictures below.Reproducible example
This is the R code. "---" represents the start of a new slide in Xaringan.
This is the table as generated using gt version 0.7.0:
This is the table as generated using gt version 0.8.0:
This is the table as generated using gt version 0.9.0:
Expected result
The expected outcome is a table as generated using version 0.7.0: