# Switching between multiple .tex files and single .tex file [duplicate]

I'm using LaTeX to draft a journal paper and I'm writing with TeXMaker. To make the navigation easier, I broke down the paper into several .tex files. The master .tex file looks like this:

``````\section{Introduction}
\input{introduction.tex}
\section{Method}
\input{method.tex}
...
``````

The journal to which I am submitting the draft (FYI I refer to Physical Review E) requires me to submit only one .tex file, meaning that I am not allowed to use `\input`. For the first submission I just manually copied and pasted all the contents of separate .tex files into the master .tex file. Since it's likely that there will be several revisions before the paper is accepted, I would like to keep the separate .tex files structure to make revision easier.

Therefore, my question is: Is there an automatic way (scripts, special program, etc.) to combine those separate .tex files into one single master .tex file? or better yet, a way to switch between having separate .tex files and having one single master .tex file?