aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-04-24 23:39:14 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-04-24 23:39:14 +0200
commitd17f0dab841fdda322853c175563792bde50fca2 (patch)
treeeff817c8b8b98b472dba1e5b2a15658347d2531c /test
parent624e5b2f9283a5b18ceeb178f9ad4e7fa2520e7e (diff)
downloadpandoc-d17f0dab841fdda322853c175563792bde50fca2.tar.gz
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.
Diffstat (limited to 'test')
-rw-r--r--test/command/3577.md35
1 files changed, 35 insertions, 0 deletions
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
+<figure>
+<img src="img1.jpg" alt="Caption 1" /><figcaption>Caption 1</figcaption>
+</figure>
+<figure>
+<img src="img2.jpg" alt="Caption 2" /><figcaption>Caption 2</figcaption>
+</figure>
+```
+```
+% pandoc -f latex -t html5
+\begin{figure}[ht]
+ \includegraphics{img1.jpg}
+ \caption{Caption 3}
+\end{figure}
+^D
+<figure>
+<img src="img1.jpg" alt="Caption 3" /><figcaption>Caption 3</figcaption>
+</figure>
+```