# How to \input the part between \begin{document} and \end{document} from another LaTeX file?

Sometimes I want to \input some LaTeX code, which belongs to a standalone LaTeX file.

I would like to input the part between \begin{document} and \end{document}, while skipping the other part.

-
With “standalone” LaTeX file, do you mean that you are using the standalone document class? –  Caramdir Jun 27 '11 at 9:29