I'm trying to combine four separate .tex documents into one big "book" with each document as a chapter. I use the import package.
This is essentially what my main document looks like:
\documentclass{paper}
\usepackage{import}
\begin{document}
\section{Chapter 1}
\import{Chapters/}{Chapter1}
\section{Chapter 2}
\import{Chapters/}{Chapter2}
\section{Chapter 3}
\import{Chapters/}{Chapter3}
\section{Chapter 4}
\import{Chapters/}{Chapter4}
\end{document}
When I do it this way, I have to remove all options and preambles of the individual imported files, which means I can't typeset them on their own.
Chapter 1 just contains text, no preamble or options:
This is chapter one, with all its glorious information.
What I'd like:
\documentclass{paper}
\usepackage{xcolor, graphicx}
\graphicspath{{tex/img/}}
\setlenght\parindent{0pt}
\title{Chapter 1}
\begin{document}
\maketitle
This is chapter one, with all its glorious information.
\end{document}
I want to be able to look into every document, typeset them and use them individually, but also in combination within the main document. Is it possible to include/input/import .tex-documents without removing all of the preamble of said documents? Or is there another way to do all of this?
\includeonlyto make the individual chapters. – cslstr Jul 14 '14 at 11:21docmutepackage. It redefines\inputand thus\includesuch that anything outside thedocumentenv is ignored. I've made proceedings like this. You just have to make sure that the packages needed by the various contributions are also in the master. – daleif Jul 14 '14 at 11:22combinepackage may help: http://tug.ctan.org/tex-archive/macros/latex/contrib/combine/combine.pdf – Ethan Bolker Jul 14 '14 at 12:05