From d17f0dab841fdda322853c175563792bde50fca2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 24 Apr 2017 23:39:14 +0200 Subject: LaTeX reader: better support for subfigure package. A figure with two subfigures turns into two pandoc figures; the subcaptions are used and the main caption ignored, unless there are no subcaptions. Closes #3577. --- test/command/3577.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/command/3577.md (limited to 'test') diff --git a/test/command/3577.md b/test/command/3577.md new file mode 100644 index 000000000..bfeb86eaa --- /dev/null +++ b/test/command/3577.md @@ -0,0 +1,35 @@ +``` +% pandoc -f latex -t html5 +\begin{figure}[ht] + \begin{subfigure}{0.45\textwidth} + \centering + \includegraphics{img1.jpg} + \caption{Caption 1} + \end{subfigure} + + \begin{subfigure}{0.45\textwidth} + \centering + \includegraphics{img2.jpg} + \caption{Caption 2} + \end{subfigure} + \caption{Subfigure with Subfloat} +\end{figure} +^D +
+Caption 1
Caption 1
+
+
+Caption 2
Caption 2
+
+``` +``` +% pandoc -f latex -t html5 +\begin{figure}[ht] + \includegraphics{img1.jpg} + \caption{Caption 3} +\end{figure} +^D +
+Caption 3
Caption 3
+
+``` -- cgit v1.2.3