### Bug description

I'm running into the following error `LaTeX Error: Not in outer par mode` when trying to render a `.qmd` as a `pdf`. The problem only occurs when using `fig-align:` together with `#| fig-cap:`. Removing one or the other option solves the issue. Below is a reproducible example.

``````
---
format: pdf
execute: 
  echo: false
  warning: false
fig-format: pdf
fig-align: center
---

```{r}
#| fig-cap: foo
plot(1)
```
``````

Probably related to the following issue https://github.com/quarto-dev/quarto-cli/issues/462#issue-1180525040.

I'm using Quarto v. 0.9.549 in RStudio v. 4.2.0, running on macOS Monterey.

### 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, self-contained, and reproducible example?
- [X] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your issue?
- [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.
- [ ] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
jjallaire
2022-06-10T16:57:34Z
arnaudgallou
bug
1.0
closed
Combined use of fig-align and fig-caption results in LaTeX Error: Not in outer par mode
https://github.com/quarto-dev/quarto-cli/issues/1124