Here is a description of my problem:

I have two documents, a main text and a supplementary text (both written in tex), which I would like to combine and submit to arXiv. arXiv requires that I submit a single .tex file. I attempted to submit a single file that combined two pdfs using pdfpages. My submission was eventually put on hold and they contacted me to say that using pdfpages was against the rules (this wasn't clear to me when I submitted it. In fact, I saw another SE post suggesting someone use this exact method to submit to arXiv).

How can I combine these two tex files into one? Is there some command that can reset all parameters within a tex file? My hope is that there is some command like the following (with `\BEGINNEWDOC` acting like I suggested):

```
% document 1 (main text)
\documentclass{article}
\title{title 1}
\begin{document}

\maketitle

\section{Introduction}

text...

\end{document}

\BEGINNEWDOC

% document 2 (supplementary text)
\documentclass{article}
\title{title 2}
\begin{document}

\maketitle

\section{Introduction}

text...

\end{document}

```

Then this single file would be like creating the two documents separately then manually combining the pdfs.

I am using Overleaf to edit the documents if that is relevant.