You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---title: "Citations in tables"format: htmlkeep-md: truereferences:
- type: article-journalid: Lovelace1842author:
- family: Lovelacegiven: Augusta Adaissued:
date-parts:
- - 1842title: >- Sketch of the analytical engine invented by Charles Babbage, by LF Menabrea, officer of the military engineers, with notes upon the memoir by the translatortitle-short: Molecular structure of nucleic acidscontainer-title: Taylor’s Scientific Memoirsvolume: 3page: 666-731language: 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
It produces this HTML table
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
The text was updated successfully, but these errors were encountered: