Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

short-caption does not work with subfigures #62

Closed
LukasCBossert opened this issue Jun 14, 2019 · 1 comment
Closed

short-caption does not work with subfigures #62

LukasCBossert opened this issue Jun 14, 2019 · 1 comment

Comments

@LukasCBossert
Copy link

LukasCBossert commented Jun 14, 2019

When you have subfigures like this (and using 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.

\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}
@tarleb
Copy link
Member

tarleb commented Jun 19, 2019

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.

@tarleb tarleb closed this as completed Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants