### Discussed in https://github.com/quarto-dev/quarto-cli/discussions/3710

<div type='discussions-op-text'>

<sup>Originally posted by **agerlach** December 19, 2022</sup>
When using `fig-cap` with `fig-subcap` I am getting a weird layout for the main caption with pdf output. `fig-cap` is placed fine when `fig-subcap` is not used. Is this a bug, or am I doing something incorrectly?

````markdown
---
title: Hello World
jupyter: julia-1.8
---

```{julia}
#| echo: false
#| fig-cap: "My Plots"
#| fig-subcap: 
#|   - "Plot A"
#|   - "Plot B"
#| layout-ncol: 2

using Plots

plot(rand(25)) |> display
plot(rand(25)) |> display
```

```{julia}
#| echo: false
#| fig-cap: "My Plots 2"

plot(rand(25)) |> display
```
````
![Screen Shot 2022-12-19 at 9 14 11 AM](https://user-images.githubusercontent.com/599421/208445399-d1875fc9-7f08-4c18-b254-496c8dc38023.png)

![image](https://user-images.githubusercontent.com/599421/208445594-4418339d-1529-42d6-a971-9e0fc0bf08b2.png)

The resulting *.tex contains

```latex
\begin{figure}

\begin{minipage}[t]{0.50\linewidth}

{\centering 

\raisebox{-\height}{

\includegraphics{subcap_files/figure-pdf/cell-2-output-1.pdf}

}

\caption{Plot A}

}

\end{minipage}%
%
\begin{minipage}[t]{0.50\linewidth}

{\centering 

\raisebox{-\height}{

\includegraphics{subcap_files/figure-pdf/cell-2-output-2.pdf}

}

\caption{Plot B}

}

\end{minipage}%
\newline
\begin{minipage}[t]{0.50\linewidth}

{\centering 

My Plots

}

\end{minipage}%

\end{figure}
```

</div>
cscheid
2022-12-19T15:13:05Z
cscheid
enhancement crossref julia
v1.4
open
Weird `fig-cap` placement with `fig-subcap` with pdf output
https://github.com/quarto-dev/quarto-cli/issues/3711