-
Notifications
You must be signed in to change notification settings - Fork 218
Closed
Description
Prework
- Read and agree to the code of conduct and contributing guidelines.
- If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
Description
When a footnote is placed next to text that has been processed with gt::md(), the footnote marker is placed in a separate row when rendered with Quarto. I spotted this behaviour in both column labels and footnotes (I haven't checked all location types, e.g. table cells, grouped row headers, summary rows, etc FYI). Note this does not occur when running the code interactively in the RStudio IDE. I think this is new behavior in gt 0.11.0.
Reproducible example
In the example below, I am using gt::md() in the column label and in the actual footnote text. In both cases, the use of gt::md() drives the footnote marker so its own row.
---
title: "Untitled"
format:
html:
embed-resources: true
---
## Quarto
gt footnotes without `gt::md()`: no issues.
```{r}
mtcars[1:2, 1:2] |>
gt::gt() |>
gt::cols_label(mpg = "**MPG**") |>
gt::tab_footnote(
"_Adding footnote_",
locations = gt::cells_column_labels(columns = gt::everything())
)
```
gt footnotes **WITH** `gt::md()`: footnote markers appear on their own line.
```{r}
mtcars[1:2, 1:2] |>
gt::gt() |>
gt::cols_label(mpg = gt::md("**MPG**")) |>
gt::tab_footnote(
gt::md("_Adding footnote_"),
locations = gt::cells_column_labels(columns = gt::everything())
)
```
Thank you again!!! 🕺🏼
PS This issue could be related to #1541. But that doesn't mention Quarto?
bzkrouse