pandoc-2.0: test/command/sub-file-chapter-2.tex
\documentclass[main.tex]{subfiles}
\begin{document}
\section{Chapter 2}
This is Chapter 2, provided in a second sub file.
\end{document}
\documentclass[main.tex]{subfiles}
\begin{document}
\section{Chapter 2}
This is Chapter 2, provided in a second sub file.
\end{document}