# Bind reports/articles into a book, but keep the ability to compile them individually

I see a few questions and answers about writing a book/thesis in LaTeX (here's one). But I would like to be able to compile reports separately as I write them to have a bunch of standalone documents. Is this possible without a lot of editing each time?

The context: every week for class I have to write a few summaries of the papers we read (some assigned, some just for my own benefit later). So I like the ability to compile each individually each week, then at the end of the semester bind them all into one "book" with pagination and a TOC.

Should I just make standalone articles each week, then edit all manually at the end of the semester into a book? Thanks!

-

You could split every report into two files: a main file holding only the preamble and an \input as document body, and a second file holding all the actual content. Then you are able to \input or \include all the content files in another main file for the book.

  % Main file of one report, e.g. report01.tex
\documentclass{report}
\title{...}
\begin{document}
\maketitle
\input{content01}
\end{document}


The content file then look like:

  % content01.tex
\section{...}
Some text


Book main file:

  \documentclass{book}
% ....
\begin{document}
\maketitle
\input{content01}
\input{content02}
\input{content03}
\input{content04}
\end{document}


This should work fine as long you don't want to keep the report title pages.

There are also packages like docmute or standalone which allow you to \include or \input another file which has its own preamble. The preambles of this sub-files are then ignored. This is basically the same like above but you don't need to split each report into two files.

-
Thanks! I used your first solution and it works great! –  Richard Herron Feb 16 '11 at 15:46
Looking to do something similar, I also ran across the combine and includex packages. The combine packages looks particularly interesting. –  David L Mar 20 '12 at 21:47