### Bug description

RStudio: 2022.07.1 Build 554
OS: M1 Mac Air

A call to make a `gt::gt()` in R, breaks all subsequent table numbering for `kbl()` tables called after the `gt()` call even if the {gt} library isn't loaded. This only happens when building to PDF.  If `eval=FALSE` is added to the `gt()` chunk, then then table numbers re-appear.

Sample qmd file

<pre>
---
title: "test"
format: pdf
---

```{r}
#| label: tbl-kbl
#| tbl-cap: "first kable call: this should have a number"
library(knitr)
kableExtra::kbl(head(mtcars[1:2,]), booktabs=TRUE)
```

```{r}
#| label: tbl-gt
#| tbl-cap: "table numbering is broken with gt"
gt::gt(mtcars[1:2,])
```

```{r}
#| label: tbl-kbl2
#| tbl-cap: "second kable call: this should have a number"
kableExtra::kbl(head(mtcars[1:2,]), booktabs=TRUE)
```
</pre>

<img width="396" alt="image" src="https://user-images.githubusercontent.com/2545978/184181127-45deb863-608c-4c90-a292-70e1054b6470.png">


### `quarto check` Output

```
[✓] Checking Quarto installation......OK
      Version: 1.0.38
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.12
      Path: /opt/homebrew/opt/python@3.9/bin/python3.9
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.1.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/eli.holmes/Library/R/x86_64/4.1/library
        - /Library/Frameworks/R.framework/Versions/4.1/Resources/library
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK
```

### `quarto tools check` Output

```
[✓] Inspecting tools

Tool         Status                    Installed     Latest  
chromium     Not installed             ---           869685  
tinytex      External Installation     ---           v2022.08
```

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included 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] documented the quarto version you're running, by pasting the output from running `quarto check` in the "Quarto Check Output" text area?
- [X] documented the version of the quarto tools you're running, by providing the output from running `quarto tools check` in the "Quarto Tools Check Output" text area?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
cscheid
2022-08-11T16:18:52Z
eeholmes
bug
v1.1
closed
Calling gt functions breaks table numbering for kable in PDF
https://github.com/quarto-dev/quarto-cli/issues/1826