1

I am currently writing a project which will be composed of a main file, and several chapters.

The main file is based on memoir, but the chapters are all amsart.

Currently I am manually changing the page numbers in the chapter files, and using pdfpages to stitch in the .pdf files. This has the effect that the links are removed.

Is there a better solution that will allow me to preserve the links? If not, is there a way to combine the TOCs from all the files, and preferably with the internal hyperlinks?

  • 5
    The document class is a property of the (whole) document, not of single chapters. What do you mean by the chapters all being "amsart"? In a document (including all the files that are \input or \included) there can only be a single \documentclass line near the beginning, which will determine the document class of the whole document. – gernot Apr 6 '17 at 7:12
  • 2
    I usually just use docmute and then \input or \include the files. docmute changes \input and friends such that it ignores any preamble in the included file. This of course meants that any needed packages or macros from the included docs have to be added to the main doc. So far I has worked fine. – daleif Apr 6 '17 at 8:36
  • @daleif -- if the op tries this and it works, this is the answer. i am quite interested in learning the outcome in this case. – barbara beeton Apr 6 '17 at 13:54
  • 1
    @barbarabeeton we have a book in the works at Springer that was made this way. We cleaned the initial 15 chapters (from 15 different sets of authors), common macros was gathered in a style file (uncommon macros was resolved in each chapter in order for them not to interfere). In addition a special style file was prepared that contains the label data from each chapter. Each chapter was given just article class and these two packages and then could be compiled on their own (and thus updatable by the authors) and we could collect everything into the book by just including the authors files as it – daleif Apr 6 '17 at 14:17
  • 1
    As the amsart document class doesn't provide a \chapter command, what does it mean that "the chapters are all amsart"? – Mico Apr 6 '17 at 18:48
1

You could try using the combine package but I have no idea if it will work in your case.

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.