aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorschrieveslaach <schrieveslaach@online.de>2017-03-27 21:20:27 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-27 21:20:27 +0200
commit49d72444d7223afe8730e1d7fe2ad881cc132b9c (patch)
tree23a4688a01be0c844c9322f7190f0158a4234ed2 /test
parente3472f0df545e37344deff87d7ba1197e651ae8d (diff)
downloadpandoc-49d72444d7223afe8730e1d7fe2ad881cc132b9c.tar.gz
LaTeX reader: add support for LaTeX subfiles package.
Closes #3530.
Diffstat (limited to 'test')
-rw-r--r--test/command/3530.md22
-rw-r--r--test/command/sub-file-chapter-1.tex8
-rw-r--r--test/command/sub-file-chapter-2.tex8
3 files changed, 38 insertions, 0 deletions
diff --git a/test/command/3530.md b/test/command/3530.md
new file mode 100644
index 000000000..66393c856
--- /dev/null
+++ b/test/command/3530.md
@@ -0,0 +1,22 @@
+```
+% pandoc -f latex -t native
+\subfile{command/sub-file-chapter-1}
+\subfile{command/sub-file-chapter-2}
+^D
+[Header 1 ("chapter-1",[],[]) [Str "Chapter",Space,Str "1"]
+,Para [Str "This",Space,Str "is",Space,Str "Chapter",Space,Str "1,",Space,Str "provided",Space,Str "in",Space,Str "a",Space,Str "sub",Space,Str "file."]
+,Header 1 ("chapter-2",[],[]) [Str "Chapter",Space,Str "2"]
+,Para [Str "This",Space,Str "is",Space,Str "Chapter",Space,Str "2,",Space,Str "provided",Space,Str "in",Space,Str "a",Space,Str "second",Space,Str "sub",Space,Str "file."]]
+```
+
+```
+% pandoc -flatex+raw_tex -t native
+\subfile{command/sub-file-chapter-1}
+\subfile{command/sub-file-chapter-2}
+^D
+[Header 1 ("chapter-1",[],[]) [Str "Chapter",Space,Str "1"]
+,Para [Str "This",Space,Str "is",Space,Str "Chapter",Space,Str "1,",Space,Str "provided",Space,Str "in",Space,Str "a",Space,Str "sub",Space,Str "file."]
+,Header 1 ("chapter-2",[],[]) [Str "Chapter",Space,Str "2"]
+,Para [Str "This",Space,Str "is",Space,Str "Chapter",Space,Str "2,",Space,Str "provided",Space,Str "in",Space,Str "a",Space,Str "second",Space,Str "sub",Space,Str "file."]]
+
+```
diff --git a/test/command/sub-file-chapter-1.tex b/test/command/sub-file-chapter-1.tex
new file mode 100644
index 000000000..9b3f38f58
--- /dev/null
+++ b/test/command/sub-file-chapter-1.tex
@@ -0,0 +1,8 @@
+\documentclass[main.tex]{subfiles}
+\begin{document}
+
+\section{Chapter 1}
+
+This is Chapter 1, provided in a sub file.
+
+\end{document}
diff --git a/test/command/sub-file-chapter-2.tex b/test/command/sub-file-chapter-2.tex
new file mode 100644
index 000000000..88e8a0ecc
--- /dev/null
+++ b/test/command/sub-file-chapter-2.tex
@@ -0,0 +1,8 @@
+\documentclass[main.tex]{subfiles}
+\begin{document}
+
+\section{Chapter 2}
+
+This is Chapter 2, provided in a second sub file.
+
+\end{document}