### Bug description

When a figure generated by a code block appears inside a callout, and the code block has a label starting with `fig-`, and `echo: false`, the latex compiler returns the error:

`LaTeX Error: Not in outer par mode.`

A minimal `qmd` document demonstrating this behavior is below. I am working on Ubuntu Linux with the development version of quarto installed from github.

````md
---
format: pdf
---

::: {.callout-info}

## Callout figure compiles with `echo: false` and non `fig-` label

```{r}
#| label: test
#| echo: false
plot(rnorm(100), rnorm(100))
```

:::

::: {.callout-info}

## Figure also compiles with `fig-` label but without `echo: false`

```{r}
#| label: fig-test
plot(rnorm(100), rnorm(100))
```

:::

::: {.callout-info}

## But when the two are combined, it doesn't compile

```{r}
#| label: fig-combined
#| echo: false
plot(rnorm(100), rnorm(100))
```

:::
````


### 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?
- [ ] 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?
dragonstyle
2022-06-27T16:20:13Z
dalejbarr
bug
v1.4
open
latex fails to compile figure from code block when `echo: false` and `label: fig-...`
https://github.com/quarto-dev/quarto-cli/issues/1230