I have to publish a document in two versions:
- Original full version
- Chapters that have been published elsewhere must be excluded
My problem is related to version 2. Simply removing the appropriate chapters does not work since I have three restrictions:
- I must keep the original page numbering (even though there will be numbering gaps)
- The table of contents must be identical for both versions
- In case of removed chapters I have to include a page which indicates that the chapter content is not there because it has been published elsewhere
To give an example, the following would be the “original full version”:
- Contents
- Chapter 1…………1
- Chapter 2…………28
- Chapter 3…………86
- Chapter 1 (pp. 1-27)
- Chapter 2 (pp. 28-85)
- Chapter 3 (pp. 86-110)
Let’s assume “Chapter 2” has been published elsewhere. Hence, I have to remove pages 28-85. In addition I have to show a note on page 28 that the contents are not available because they have been published elsewhere. Hence, within the *.pdf-file page 86 follows immediately after page 28 (numbering gap). Examples for page 28 for both versions:
Page 28: Original full version:
Page 28: Reduced version (chapter 2 has been excluded):
Using \includeonly and \nofiles allows me to remove chapters while keeping page numbering and the table of contents. However, I can't figure out how to replace the original "Chapter"-page with a reduced one as shown above.
A perfect solution would allow me to use some kind of switch to compile different versions.


\sectionetc? – Dec 31 '16 at 02:10