---
title: "Citations in tables"
format: html
keep-md: true
references:
- type: article-journal
id: Lovelace1842
author:
- family: Lovelace
given: Augusta Ada
issued:
date-parts:
- - 1842
title: >-
Sketch of the analytical engine invented by Charles Babbage, by LF Menabrea,
officer of the military engineers, with notes upon the memoir by the translator
title-short: Molecular structure of nucleic acids
container-title: Taylor’s Scientific Memoirs
volume: 3
page: 666-731
language: en-GB
---
## `gt::gt()`
```{r}
tibble::tribble(
~Thing, ~Citation,
1234, "@Lovelace1842"
) |>
knitr::kable(format = "html")
In addition, Quarto supports the specification of embedded Markdown content in tables. This is done by providing a data attribute qmd or qmd-base64 in an embedded span or div node. These nodes can appear anywhere that such content is allowed: table headers, footers, cells, captions, etc.
Take this example
This part
<td style="text-align:left;"> @Lovelace1842 </td>
will not be parsed as Markdown and so it will not be processed as citation.However, Quarto offers a mechanism for this described in https://quarto.org/docs/authoring/tables.html#html-tables
To this would work
gt does it with this syntax
We should probably have a way to escape for Quarto some column or values.
This could also be in kableExtra directly, but I think
kable()
should support it directly.More context in