diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-01-04 14:05:03 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-01-04 14:05:03 -0800 |
commit | ea479bf28a4031f408af12ea92d3e19f9a838820 (patch) | |
tree | 8e4e717dba081f8b6806230169161648b4e848d5 /test | |
parent | 1ce7db1fa67b6a9f1d354d377e3bfa548d854ee9 (diff) | |
download | pandoc-ea479bf28a4031f408af12ea92d3e19f9a838820.tar.gz |
LaTeX reader: handle filecontents environment.
Closes #7003.
Diffstat (limited to 'test')
-rw-r--r-- | test/command/7003.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/command/7003.md b/test/command/7003.md new file mode 100644 index 000000000..1f6275943 --- /dev/null +++ b/test/command/7003.md @@ -0,0 +1,37 @@ +``` +% pandoc -f latex -t native +\documentclass{article} +\usepackage{listings} + +\lstset{basicstyle=\ttfamily} + +\begin{filecontents*}[overwrite]{example.tex} +\documentclass{article} +\begin{document} +\section{Bar} +This a Bar section +\end{document} +\end{filecontents*} + +\begin{document} + +\section{With lstlisting environment} + +\begin{lstlisting} +\documentclass{article} +\begin{document} +\section{Foo} +This a Foo section +\end{document} +\end{lstlisting} + +\section{With lstinputlisting command} + +\lstinputlisting{example.tex} +\end{document} +^D +[Header 1 ("with-lstlisting-environment",[],[]) [Str "With",Space,Str "lstlisting",Space,Str "environment"] +,CodeBlock ("",[],[]) "\\documentclass{article}\n\\begin{document}\n\\section{Foo}\nThis a Foo section\n\\end{document}" +,Header 1 ("with-lstinputlisting-command",[],[]) [Str "With",Space,Str "lstinputlisting",Space,Str "command"] +,CodeBlock ("",["latex"],[]) "\\documentclass{article}\n\\begin{document}\n\\section{Bar}\nThis a Bar section\n\\end{document}"] +``` |