How do I add a separate LaTeX-document as an appendix?

I want to add LaTeX-documents to my main document as appendices.

I have a set of documents (of class scrartcl) that all have their own tables of content, titles etc. Each of these documents should be included as an appendix in the main document.

Optimally, it would work like:

• The main document lists every document in its TOC (e.g. ... 4. foo 5. bar A First Appendix ...)
• After the content of the main document has ended, the appendix documents are listed (each on a new page)

• Each appendix-document's content stays untouched (They have different headers etc.)

• (I don't think that's possible) The numbering for e.g. graphics is altered so that it is "Figure A 4.1" instead of "Figure 4.1 for Appendix A.

Can something like this be done?

If not, is it possible to stitch the pdfs of every document together? Then I would have to find a way to adjust the main TOC.

Any help is highly appreciated.

-
pdfpages package will help you combine pdfs. the \addcontentsline mechanism will help with the toc. your third and fourth bullets seem to conflict... – cmhughes Mar 12 '12 at 19:27
@cmshughes Thank you! I will have a look into pdfpages. Regarding Point 3/4 staying in conflict: I maybe should have phrased that a little better - what I meant in point 3 is that the content of the .tex files of the appendix documents should stay untouched. :) – Julian Mar 12 '12 at 20:10
Well, if they must stay untouched, then changing the numbering is going to be tricky :) – cmhughes Mar 12 '12 at 20:58
I kind of thought that this was impossible :D Thanks, mate :) – Julian Mar 12 '12 at 21:00

You can use the pdfpages to include other pdfs in your document- there are lots of options for this package, all of which are well documented. In the MWE below, I've used

\includepdf[pages=-]{myotherdocument}


so that it includes all of the pages of myotherdocument.pdf

If you want to add content to your toc, then you can use \addcontentsline which has the general form

\addcontentsline{<file>}{<level>}{<stuff>}


You can choose the <level> to be chapter, section, etc depending on how you want it to look.

As discussed in the comments, your third and fourth requests conflict :)

Here's a MWE, assuming that you have myotherdocument.pdf in your current working directory.

\documentclass{report}
\usepackage{pdfpages}

\begin{document}

\tableofcontents