Closed LukasCBossert closed 5 years ago
When you have subfigures like this (and using pandoc-crossref)
pandoc-crossref
<div id="fig:figureRef"> ![subfigure 1 caption](example-image-a){#fig:figureRefA short-caption="short subfigure caption A" width=45%} ![subfigure 2 caption](example-image-b){#fig:figureRefB short-caption="short subfigure caption B" width=45%} Caption of figure </div>
the filter won’t work, since it adds another figure environment.
figure
\begin{figure} \centering \begin{figure} \centering \subfloat[subfigure 1 caption]{\includegraphics[width=0.45\textwidth,height=\textheight]{example-image-a}\label{fig:figureRefA}} \caption[{short subfigure caption A}]{subfigure 1 caption} \label{fig:figureRefA} \end{figure} \begin{figure} \centering \subfloat[subfigure 2 caption]{\includegraphics[width=0.45\textwidth,height=\textheight]{example-image-b}\label{fig:figureRefB}} \caption[{short subfigure caption B}]{subfigure 2 caption} \label{fig:figureRefB} \end{figure} \caption{Caption of figure} \label{fig:figureRef} \end{figure}
I believe subfigures are out of scope for this filter; we will support subfigures when pandoc does. However, if you want to contribute a fix for this, we would consider it.
When you have subfigures like this (and using
pandoc-crossref
)the filter won’t work, since it adds another
figure
environment.