-
Notifications
You must be signed in to change notification settings - Fork 391
Closed
Description
Bug description
Consider the following minimal working example
---
title: "MWE"
format:
pdf:
documentclass: article
pdf-engine: xelatex
keep-tex: true
---
Figures
::: {#fig-elephants layout-ncol="2"}


Famous Elephants
:::
It produces
Note that the subfigures are label as normal figures. The LaTeX produced by Quarto is
\begin{figure}
\begin{minipage}[t]{0.50\linewidth}
{\centering
\raisebox{-\height}{
\includegraphics{elephant.png}
}
\caption{Surus}
}
\end{minipage}%
%
\begin{minipage}[t]{0.50\linewidth}
{\centering
\raisebox{-\height}{
\includegraphics{elephant.png}
}
\caption{Hanno}
}
\end{minipage}%
\caption{\label{fig-elephants}Famous Elephants}
\end{figure}
Now compare the minimal working example with a patched version of it that has cross reference information.
---
title: "MWE"
format:
pdf:
documentclass: article
pdf-engine: xelatex
keep-tex: true
---
Figures
::: {#fig-elephants layout-ncol="2"}
{#fig-surus}
{#fig-hanno}
Famous Elephants
:::
It produces
Note that the subfigures are label properly. The LaTeX produced by Quarto is
\begin{figure}
\begin{minipage}[t]{0.50\linewidth}
{\centering
\raisebox{-\height}{
\includegraphics{elephant.png}
}
}
\subcaption{\label{fig-surus}Surus}
\end{minipage}%
%
\begin{minipage}[t]{0.50\linewidth}
{\centering
\raisebox{-\height}{
\includegraphics{elephant.png}
}
}
\subcaption{\label{fig-hanno}Hanno}
\end{minipage}%
\caption{\label{fig-elephants}Famous Elephants}
\end{figure}
Would be great if Quarto can generate a cross reference information for the subfigures so that users avoid experience the issue reported in the minimal working example.
Checklist
- 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.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.

