I'm using SageMathCloud's LaTeX.
So I've got five .tex documents (all pretty long) with similar formatting. I want to add all five files into one large file that will respect the preambles of all five files.
I thought \include would be my best option. However, it is not working. By that I mean that I enter it and nothing happens, not even an Error. I've tried using \input, but this option does not respect preambles of the documents. Additionally, for some reason, the \input command won't work unless I use the standalone package.
I've been entering this:
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{caption}
\usepackage{float}
\usepackage{pdfpages}
\pagestyle{fancy}
\begin{document}
\begin{titlepage}
\includepdf{cover.pdf}
\end{titlepage}
\tableofcontents
\include{doc1.tex}
\include{doc2.tex}
\include{doc3.tex}
\include{doc4.tex}
\include{doc5.tex}
\end{document}
\inputor\includethe format of the files being included is the same and must not have a preamble of its own but be tex code that would be allowed at that point in the main document. – David Carlisle May 29 '16 at 21:47master.texfor each document allowing you to treat them as independent documents, or as a combined document.) – mforbes May 30 '16 at 20:17