-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Description
Discussed in #3710
Originally posted by agerlach December 19, 2022
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?
---
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
```The resulting *.tex contains
\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}
