parent
e3472f0df5
commit
49d72444d7
4 changed files with 39 additions and 0 deletions
|
@ -1008,6 +1008,7 @@ include = do
|
||||||
char '\\'
|
char '\\'
|
||||||
name <- try (string "include")
|
name <- try (string "include")
|
||||||
<|> try (string "input")
|
<|> try (string "input")
|
||||||
|
<|> try (string "subfile")
|
||||||
<|> string "usepackage"
|
<|> string "usepackage"
|
||||||
-- skip options
|
-- skip options
|
||||||
skipMany $ try $ char '[' *> manyTill anyChar (char ']')
|
skipMany $ try $ char '[' *> manyTill anyChar (char ']')
|
||||||
|
|
22
test/command/3530.md
Normal file
22
test/command/3530.md
Normal file
|
@ -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."]]
|
||||||
|
|
||||||
|
```
|
8
test/command/sub-file-chapter-1.tex
Normal file
8
test/command/sub-file-chapter-1.tex
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
\documentclass[main.tex]{subfiles}
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\section{Chapter 1}
|
||||||
|
|
||||||
|
This is Chapter 1, provided in a sub file.
|
||||||
|
|
||||||
|
\end{document}
|
8
test/command/sub-file-chapter-2.tex
Normal file
8
test/command/sub-file-chapter-2.tex
Normal file
|
@ -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}
|
Loading…
Reference in a new issue