# [texhax] General Advice on Combining Documents for a Thesis

Thomas Jacobs thomasjacobs at gmail.com
Sat May 29 04:16:09 CEST 2010

Reinhard,

First off, thanks so much for the detailed reply.  I need to submit
electronically but there is no requirement that hyperlinks be embedded
and to date I have written my papers with \url commands.  While I
would like to use hyperlinks at some point and have yet to master it,
I need not get it working for the dissertation.

I have not used acrobat to merge multiple documents with consecutive
page numbers so I am unsure how challenging that will be.

I am unable to use the appendix approach you suggest since the order
must be as I described, with the Thesis conclusion following the
as you described in your recommended approach with appendices for the
papers?

So if I follow you, I would make a top level .tex file that would be a
section and just as I currently use input for tables and charts I
would input the documents I currently have a stand alone papers and
each would then have its own bibliography line enabling distinct
reference sections and it would properly label page numbers and I hope
in your example.  Is this different from a section or the same thing?

Tom

On Fri, May 28, 2010 at 6:55 PM, Reinhard Kotucha
<reinhard.kotucha at web.de> wrote:
> On 28 May 2010 Thomas Jacobs wrote:
>
>  > I am a doctoral student in Finance where the practice is to write
>  > three papers (not necessarily related) and combine them into a thesis.
>  >  I have confirmed that combining them as follows is acceptable to the
>  >
>  > Paper 1 Title Page, Abstract, Body, References, Tables, Figures
>  > Paper 2 Title Page, Abstract, Body, References, Tables, Figures
>  > Paper 3 Title Page, Abstract, Body, References, Tables, Figures
>  > Thesis Conclusion
>  >
>  > I have been unable to decipher how to do this in LaTeX, particularly
>  > as most web available code skeletons or guides assume a single set of
>  > references, etc.
>  >
>  > When I try to combine them in one TeX file I get errors if I have more
>  > than one document begin and end line and am uncertain how I would code
>  > the three distinct sets of references.
>  >
>  > Can anyone advise if this is possible or if I need to create five
>  > separate LaTeX projects and their resulting output .pdf files
>  > then use Acrobat to combine the five resulting files?  Thanks very
>  > much.
>
> The question is whether it's sufficient to provide a paper copy or you
> need a PDF file with intact hyperlinks.
>
> Combining the PDF files is possible, either using Acrobat or the
> pdfpages package.  Then you have to set the page counter at the
> beginning of each file manually.  This is quite easy and I even could
> send you a Perl script which combines all PDF files in a particular
> directory into a single PDF file.  The drawback is that hyperlinks get
> lost because they are not stored at the same place as the page
> contents within a PDF file.  Don't know whether Acrobat handles this
> better.  It's not trivial.
>
> The LaTeX solution is to move everything between \begin{document} and
> \end{document} to separate files.  The papers (Paper 1..3) should use
> \documentclass{article} because the top-level sectioning command is
> \section.
>
> Then you could write your thesis like this:
>
> --------------------------
> \documentclass{report}
>
> \begin{document}
> \chapter{foo}
> text...
>
> \chapter{bar}
> text...
>
> \chapter{foobar}
> text...
>
> \chapter{Paper 1}\include{paper1}
> \chapter{Paper 2}\include{paper2}
> \chapter{Paper 3}\include{paper3}
>
> \chapter{Conclusion}
> text...
> \end{document}
> --------------------------
>
>
> In order to compile a particular paper separately, you have to provide
> files like:
>
> --------------------------
> \documentclass{article}
>
> \begin{document}
> \include{paper1}
> \end{document}
> --------------------------
>
>
> BTW, I would move the papers to the appendix:
>
> --------------------------
> \documentclass{report}
>
> \begin{document}
>
> \chapter{Conclusion}
> ...conclusion...
>
> \appendix
>
> \chapter{Paper 1}\include{paper1}
> \chapter{Paper 2}\include{paper2}
> \chapter{Paper 3}\include{paper3}
> \end{document}
> --------------------------
>
>
>  1 foo
>  2 bar
>  3 foobar
>  4 Conclusion
>  A Paper 1
>  B Paper 2
>  C Paper 3
>
> Regards,
>  Reinhard
>
> --
> ----------------------------------------------------------------------------
> Reinhard Kotucha                                      Phone: +49-511-3373112
> Marschnerstr. 25
> D-30167 Hannover                              mailto:reinhard.kotucha at web.de
> ----------------------------------------------------------------------------
> Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
> ----------------------------------------------------------------------------
>

--
Thomas Jacobs