### Bug description

There is inconsistent behavior when including citation keys inside tables, but it's a really tricky issue and I'm not sure if it's a Quarto issue or an issue with other table-making packages. 

When making a table with regular Markdown or with `knitr::kable()`, citation keys that are included in table rows are rendered correctly by pandoc.

However, when making a table with `kableExtra::kbl()` or `gt::gt()`, pandoc doesn't see the citation keys.

Here's a reproducible example:

````
---
title: "Citations in tables"
format: html

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
---

## Raw Markdown

This works.

| Thing | Citation      |
|-------|---------------|
| 1234  | @Lovelace1842 |


## `knitr::kable()`

This works.

```{r}
library(knitr)
tibble::tribble(
  ~Thing, ~Citation,
  1234, "@Lovelace1842"
) |>
  kable()
```


## `kableExtra::kbl()`

This doesn't work.

```{r}
library(kableExtra)
tibble::tribble(
  ~Thing, ~Citation,
  1234, "@Lovelace1842"
) |>
  kbl() |>
  kable_styling()
```


## `gt::gt()`

This doesn't work.

```{r}
library(gt)
tibble::tribble(
  ~Thing, ~Citation,
  1234, "@Lovelace1842"
) |>
  gt()
```
````

Raw Markdown and `knitr::kable()` work correctly:

<img width="883" alt="image" src="https://user-images.githubusercontent.com/73663/202052027-f7683db1-cd2b-47ca-86c4-6b1910aed957.png">

`kableExtra::kbl()` and `gt::gt()` do not render the citation:

<img width="753" alt="image" src="https://user-images.githubusercontent.com/73663/202052106-610933bc-b59e-4bc7-af44-dc8bb7bed568.png">

---

This is a known issue in both **kableExtra** (https://github.com/haozhu233/kableExtra/issues/214#issuecomment-421706528) and **gt** (https://github.com/rstudio/gt/issues/112#issuecomment-632936052), and the existing solution for both packages is to use **bookdown**'s text reference feature to render the citation outside of the table and then automatically include the rendered citation inside the table when knitting, like this:

````
(ref:lovelace) @Lovelace1842

```{r}
library(kableExtra)
tibble::tribble(
  ~Thing, ~Citation,
  1234, "(ref:lovelace)"
) |>
  kbl() |>
  kable_styling()
```
````

This doesn't work in Quarto, though. #1959 and #1785 are about adding bookdown-esque text references to Quarto, which would potentially solve this issue.

---

This is with RStudio 2022.07.2+576 on macOS Monterey 12.6, but it happens across platforms

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
cscheid
2022-11-16T00:19:10Z
andrewheiss
bug crossref tables
v1.4
open
Citations in tables do not render correctly outside of raw markdown and kable
https://github.com/quarto-dev/quarto-cli/issues/3340