[NTG-context] Preventing double title pages for nested content

Kate F kate at elide.org
Wed May 20 00:34:41 CEST 2015


I'm collating some UNIX-like manpages into a PDF.
I'm structuring the content like so:


  \definehead[Volume] [part] % red colour: man(1) section
  \definehead[Library][part] % blue colour: library within section 3



    \startVolume[title=Section 1: Programs]
        \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage}

    \startVolume[title=Section 2: Syscalls]
        \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem

    \startVolume[title=Section 3: Libraries]
            \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input
lorem \stopManpage}
            \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input
lorem \stopManpage}
            \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input
lorem \stopManpage}

    \startVolume[title=Section 4: Drivers]
        \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage}

    \startVolume[title=Section 7mk: Makefiles]
        \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage}

There I have grouped Volume 3 manpages into libraries. This grouping only
applies to Volume 3.

I'd like a single "title" page for each Volume (which I show in red),
except for section 3, where I'd like a title page for each Library
(which I show in blue). So the pagination should look like:

  toc S1 ... S2 ... libjpeg ...  libpng ... libbmp ... S4 ...

Where S* there is a red title page, S3 is absent, and lib* are blue title pages.
I'm trying to work out how best to do this.

Would you recommend I hide Volume 3's title page?
I think that must be the simplest way, but I don't know how to do it
using a setup.

My data is coming from XML, and I'd like to avoid having a special
\startVolume for Volume 3, if I can. Although perhaps that could help.

Are there any other ways which might be more sensible?

I wondered about using \setuphead[something][continue=yes] to fold the
first blue title pages onto the red title pages, but even if I can do that,
I think it would make things more difficult for getting the text right on
those pages.

Sorry for the long question!

Thank you,


More information about the ntg-context mailing list