Replies: 3 comments 1 reply
-
There are no special hacks required, you can use markdown citations anywhere. So the following both work: ```{r}
library(knitr)
kable(head(pressure), caption="Pressure [@spacean2000]")
```
```{r}
#| tbl-cap: Pressure [@spacean2000]
library(knitr)
kable(head(pressure))
``` Docs on citations here: https://quarto.org/docs/authoring/footnotes-and-citations.html Docs on table captions w/ computations here (note that |
Beta Was this translation helpful? Give feedback.
-
That's likely because kableExtra is emitting raw HTML which of course the markdown doesn't resolve in (thus the |
Beta Was this translation helpful? Give feedback.
-
Unless I'm missing something, I would like to add that the Quarto option can appropriately format citations ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes, it's necessary to cite the source where a table's data come from. And usually, i use kable for creating tables. In bookdown, i can do it be declaring a text reference using
(ref:[---])@[---]
and refer to that text using paste0 as instructed it in bookdown's instructions. This doesn't work with quarto. It isn't even documented in quarto's instructions. How can i cite something inside a caption whose table is generated using kable?Beta Was this translation helpful? Give feedback.
All reactions