Den 18. feb. 2017 15:55, skrev Marshall Feldman:

I have a long document that I’ve broken up into child documents. Each child resides in a subfolder of the parent, master document. For writing purposes, I find it best to compose each child document individually. And for proof-reading, to compile the child document I’m working on. This poses a question about proper use of LyX’s Start_Appendix_Here feature. For the master document, the logical place to insert Document > Start_Appendix_Here would be just before the appendices begin. However, this would not facilitate composing the child documents as appendices. OTOH, for each appendix child document, the logical place is at the start of the document. So here are my questions:

  * Will including Start_Appendix_Here in two or more child documents
    cause them to interfere with each other when they are
    simultaneously included in the parent docuement?

Yes. When you use Start_Appendix_Here, the appendix numbering is reset to "A". So every appendix become appendix "A" this way. This is wrong when printing the whole document. Also, it is the wrong appendix number when compiling any non-first appendix file.

  * Will including it in both the parent and children cause problems?

Only that each time, the appendix number is reset to "A". So no problem if you have "Start_Appendix_Here" in the main document and in the *first* appendix file.

  * Is there a better way to get proper references and draft copy for
    the appendix child documents while also getting proper compilation
    of the parent document?

​
I'll use Start_Appendix_Here in the main document only. If I compile an appendix alone, then it will say "Chapter 1" intead of "Appendix X", but otherwise the layout is the same. That works for me.

If you want/need to proofread with the correct chapter numbers & appendix letters (and page numbers!), then compiling the entire document is best. Even if you get one big PDF, you can still print only a single appendix by selecting the correct range of pages for printing.


It is possible to get "Appendix B" (and C,D,E,...) correct both when printing the entire document and when printing the file standalone. Some TeX code is necessary. In the Appendix B docoment, start with Start_Appendix_Here. Then have a line of paragraph type standard, with a TeX box with the command \setcounter{chapter}{1} The next line should be of type chapter, containing whatever chapter heading you want for appendix B.

When using setcounter like this, 0->A, 1->B, 2->C, 3->D and so on for appendix letters.

Note that an "appendix B" still will start on page one, and I don't think you can have cross references to other chapters/appendices when printing it standalone. For cross-chapter references, compile the entire document.

The obvious disadvantage of overriding the automatic appendix numbering like this, is that you have to change it all if you ever reorder your appenices or add/remove an appendix.

Page numbers can be overridden too, in order to print an "Appendix B" that start at page 51 or so. But I don't recommend doing that. Whatever you change in any earlier file may affect page numbering for later chapters, it is easy to get wrong page numbers (repeated ranges or gaps) if every child document overrides the page number! So if you want correct page numbers, definitely compile the whole document and then select the correct pages for printing out the proofreader's copy. You will have to do that anyway, if you have cross references into other files.

Helge Hafting

Helge Hafting


Reply via email to