I'm trying to incorporate a {gt} object as a table in a Quarto .qmd document that outputs to PDF.

When I try to add a table caption within a code chunk (using #| tbl-cap: xyz), I get the following error:


> **Package array Error:  Illegal pream-token (\caption): `c' used.**
> 
> **See the array package documentation for explanation.**
> **Type  H <return>  for immediate help.**
>  **...**                                              
>                                                   
> **l.252 \caption**
>               **{\label{tbl-test}Results }** 
> 
> **see Untitled.log for more information.**


This error occurs whether I try to output the {gt} object using only `gt()` AND if I use `as_latex()` afterwards.

Here's a test document:

---
title: "Untitled"
format: pdf
---

## Libraries

```{r}
library(tidyverse)
library(gt)
```

## Fake Data

```{r}
test_data <- tribble( ~a, ~b,
                      1, 2,
                      3, 4,
                      5, 6
)
```

## Table Output

```{r}
#| label: tbl-test
#| tbl-cap: "Results"


test_data |> gt()
```

## Cross-reference

@tbl-test
cderv
2022-05-18T16:37:20Z
SEthanMilne
bug
closed
Issues using {gt} objects as cross-referenced tables
https://github.com/quarto-dev/quarto-cli/issues/924