Page range by chapters on headers

Hi everyone,

I have a master document with papers as subdocuments, id est, like chapters in a book. I need to express the page range of each chapter in their headers. For instance, in the first chapter we should read “pages 7-34”, chapter 2 “pages 35-59” and so on. Any idea?

If you don’t mind editing a bit your subdocuments and master document, this can be achieved.

  • In sub documents

    Define bookmarks at start and end of subdocument as xxxStart and xxxEnd where xxx is a unique prefix (in the end, i.e. seen from the master document, there must be no duplicate).

See variant below.

  • In master document

    Define one page style (or page style family) per subdocument. This is necessary because you need a different header per subdocument. Activate heading. Transition from one part to the next is achieved with a real paragraph (not included from a subdocument) with a “page break before” switching to the page style (or first page style of the family) for this part.

    Note that this empty transition paragraph can be made nearly invisible with font size equal to 2pt and no spacing above and below.

    Type fixed text for the header in the header area like "pages ". Then Insert>Cross-Reference, Type Bookmarks, Selection xxxStart, Insert. Type dash and do the same for xxxEnd.

    This must be done for every included subdocument.

I assumed you know how to set headers, create page styles and include subdocuments. If you need help about bookmarks, come back here for more explanation (use edit your question or comment, not answer).

EDIT 2018-6-1 with variant on bookmarks

Considering your remark about collaborative work, it is effectively much better to use a single document template with several independent authors.

In this situation, do not insert the bookmarks in the template. As a consequence, the included documents will not contain bookmarks.

Insert the bookmarks in the master document as dummy text (to be defined at your convenience as “small” text, hidden paragraph or any “invisible” formatting) around the locations where documents are included.

The paragraph with the xxxStart bookmark is flagged with a page break to a dedicated page style so that you can define the required header. From a quick experiment, formatting this paragraph as Hidden does not deactivate the page break effect. This means that if you have no specific “non-author” text to insert (such as an introduction), this formatting can be used to hide the inter-document technical data.

If this answer helped you, please accept it by clicking the check mark :heavy_check_mark: to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

Actually, I have achieved the main goal by this method in the past, but using sections to divide chapters. My problem with this now is that the papers come from different authors working from the same subdocument template. As I can’t give the authors different templates with unique prefixed bookmarks in each one, I would need to rename te bookmarks on the subdocuments every time I import the papers in the master document, correct? I really would prefer a more automatic solution, hope it exits.