### Bug description

Sorry if this has already been reported. I did a quick search to check, but didn't see anything...

It looks like Pandoc's div blocks for figures, under certain conditions,  generate the LaTeX error - _Not in outer par mode_.

Here's an example:
````md
---
title: "figure divs"
format: pdf

::: {#fig-quarto}
![](quarto.png){fig-align="center" width="2in"}

Caption here
:::
````

Here's what I think is the relevant Quarto output during render:
````md
updating tlmgr

updating existing packages

compilation failed- error
LaTeX Error: Not in outer par mode.
````

A few things to note:
1. This doesn't cause an error for the html format. Everything looks right.
2. If you move the figure options to the div block, as in `::: {#fig-quarto fig-align="center" width="2in"}`, the document renders but the figure options are ignored. Is this expected behavior?
3. Inspecting the .tex file, it appears that adding figure options inside the Pandoc div block, as in the example above, causes Quarto to wrap a LaTeX figure environment inside another figure environment (see below). I kinda wonder if this is what's causing the error, but I don't understand LaTeX sufficiently to say.

````md
\begin{figure}
  {\centering 
    \begin{figure}
      {\centering \includegraphics[width=2in,height=\textheight]{quarto.png}}
    \end{figure}
  }
  \caption{\label{fig-quarto}Caption here}
\end{figure}
````

Here's my system info:
````md
> sessioninfo::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.1 (2022-06-23 ucrt)
 os       Windows 10 x64 (build 22621)
 system   x86_64, mingw32
 ui       RStudio
 language (EN)
 collate  English_United States.utf8
 ctype    English_United States.utf8
 tz       America/Denver
 date     2023-01-29
 rstudio  2022.12.0+353 Elsbeth Geranium (desktop)
 pandoc   2.19.2 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)

> quarto::quarto_version()
[1] ‘1.2.329’
````

### 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.
2023-01-29T19:37:26Z
kbvernon
bug
Future
open
figure divs for pdf format cause LaTeX error
https://github.com/quarto-dev/quarto-cli/issues/4142