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`

The content file then look like:

  % content01.tex
  Some text

Book main file:

  % ....

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.

  • 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

I created a project template for the Texlipse IDE which separates the different sections for an article using the exact same principle Martin suggests. I mentioned it in another post. You find it here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.