Preventing double title pages for nested content
Hello! I'm collating some UNIX-like manpages into a PDF. I'm structuring the content like so: \setupcolors[state=start] \definehead[Volume] [part] % red colour: man(1) section \definehead[Library][part] % blue colour: library within section 3 \definehead[Manpage][chapter] \setuphead[Volume,Library,Manpage][page=yes,number=no,placehead=yes] \setuphead[Volume][color=red] \setuphead[Library][color=blue] \starttext \placecontent[list={Volume,Library,Manpage}] \startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume \startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext 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, -- Kate
Am 20.05.2015 um 00:34 schrieb Kate F
: Hello!
I'm collating some UNIX-like manpages into a PDF. I'm structuring the content like so:
\setupcolors[state=start]
\definehead[Volume] [part] % red colour: man(1) section \definehead[Library][part] % blue colour: library within section 3 \definehead[Manpage][chapter]
\setuphead[Volume,Library,Manpage][page=yes,number=no,placehead=yes] \setuphead[Volume][color=red] \setuphead[Library][color=blue]
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
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.
Change your manpage headings to \chapter and test at the begin of each new volume for the number of chapters (you can use the list mechanism for this) in each volume. %\setuphead[part][placehead=yes,after=\directsetup{chapterentries}] \setuphead[part][placehead=empty,after=\directsetup{chapterentries}] \startsetups[chapterentries] \determinelistcharacteristics[chapter] \ifcase\structurelistsize No chapter in this part. \or One chapter in this part. \else Two or more chapters in this part. \fi \stopsetups \starttext \dorecurse{4} {\startpart[title=Part #1] \dorecurse{\ifcase#1\or 0\or 3\else 1\fi} {\startchapter[title=Chapter ##1] \stopchapter} \stoppart} \stoptext Wolfgang
On 19 May 2015 at 23:51, Wolfgang Schuster
Am 20.05.2015 um 00:34 schrieb Kate F
: Hello!
I'm collating some UNIX-like manpages into a PDF. I'm structuring the content like so:
\setupcolors[state=start]
\definehead[Volume] [part] % red colour: man(1) section \definehead[Library][part] % blue colour: library within section 3 \definehead[Manpage][chapter]
\setuphead[Volume,Library,Manpage][page=yes,number=no,placehead=yes] \setuphead[Volume][color=red] \setuphead[Library][color=blue]
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
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.
Change your manpage headings to \chapter and test at the begin of each new volume for the number of chapters (you can use the list mechanism for this) in each volume.
%\setuphead[part][placehead=yes,after=\directsetup{chapterentries}] \setuphead[part][placehead=empty,after=\directsetup{chapterentries}]
\startsetups[chapterentries] \determinelistcharacteristics[chapter] \ifcase\structurelistsize No chapter in this part. \or One chapter in this part. \else Two or more chapters in this part. \fi \stopsetups
\starttext
\dorecurse{4} {\startpart[title=Part #1] \dorecurse{\ifcase#1\or 0\or 3\else 1\fi} {\startchapter[title=Chapter ##1] \stopchapter} \stoppart}
\stoptext
Wolfgang
Very interesting! I don't want to use \chapter because I'm dealing with several types of document, and so I'm trying to keep different things separate, so that I don't confuse myself with all the setups. But I just converted your example to use \definehead[Manpage] instead, and that seems to have the same effect for \determinelistcharacteristics[Manpage]. Maybe I'm being unimaginative, but I don't see how you're suggesting I use this technique to achieve the effect I'm after. Did you mean to count Libraries rather than Manpages? Even then I'm not sure how to apply the idea. (Especially as your example doesn't have the same structure as mine.) Sorry if my original description was unclear. Thanks, -- Kate
Am 20.05.2015 um 01:26 schrieb Kate F
: On 19 May 2015 at 23:51, Wolfgang Schuster
wrote: Am 20.05.2015 um 00:34 schrieb Kate F
: Hello!
I'm collating some UNIX-like manpages into a PDF. I'm structuring the content like so:
\setupcolors[state=start]
\definehead[Volume] [part] % red colour: man(1) section \definehead[Library][part] % blue colour: library within section 3 \definehead[Manpage][chapter]
\setuphead[Volume,Library,Manpage][page=yes,number=no,placehead=yes] \setuphead[Volume][color=red] \setuphead[Library][color=blue]
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
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.
Change your manpage headings to \chapter and test at the begin of each new volume for the number of chapters (you can use the list mechanism for this) in each volume.
%\setuphead[part][placehead=yes,after=\directsetup{chapterentries}] \setuphead[part][placehead=empty,after=\directsetup{chapterentries}]
\startsetups[chapterentries] \determinelistcharacteristics[chapter] \ifcase\structurelistsize No chapter in this part. \or One chapter in this part. \else Two or more chapters in this part. \fi \stopsetups
\starttext
\dorecurse{4} {\startpart[title=Part #1] \dorecurse{\ifcase#1\or 0\or 3\else 1\fi} {\startchapter[title=Chapter ##1] \stopchapter} \stoppart}
\stoptext
Wolfgang
Very interesting!
I don't want to use \chapter because I'm dealing with several types of document, and so I'm trying to keep different things separate, so that I don't confuse myself with all the setups. But I just converted your example to use \definehead[Manpage] instead, and that seems to have the same effect for \determinelistcharacteristics[Manpage].
Maybe I'm being unimaginative, but I don't see how you're suggesting I use this technique to achieve the effect I'm after. Did you mean to count Libraries rather than Manpages? Even then I'm not sure how to apply the idea. (Especially as your example doesn't have the same structure as mine.)
Sorry if my original description was unclear.
It doesn’t matter which name you use for the sections. \definehead [Library] [part] \definehead [Manpage] [chapter] \setuphead [Library] [placehead=empty, before={\startmakeup[standard][align=middle,style=\ssd]}, after={\directsetup{chapterentries}\stopmakeup}] \startsetups[chapterentries] \determinelistcharacteristics[Manpage] \ifcase\structurelistsize No manpages for this libary. \or One manpage for this Library \else Two or more manpages for this library. \fi \stopsetups \starttext \startLibrary[title=First Library] \startManpage[title=Manpage 1] \stopManpage \stopLibrary \startLibrary[title=First Library] \stopLibrary \startLibrary[title=First Library] \startManpage[title=Manpage 1] \stopManpage \startManpage[title=Manpage 2] \stopManpage \startManpage[title=Manpage 3] \stopManpage \stopLibrary \stoptext Wolfgang
On 20 May 2015 at 22:19, Wolfgang Schuster
Am 20.05.2015 um 01:26 schrieb Kate F
: On 19 May 2015 at 23:51, Wolfgang Schuster
wrote: Am 20.05.2015 um 00:34 schrieb Kate F
: Hello!
I'm collating some UNIX-like manpages into a PDF. I'm structuring the content like so:
\setupcolors[state=start]
\definehead[Volume] [part] % red colour: man(1) section \definehead[Library][part] % blue colour: library within section 3 \definehead[Manpage][chapter]
\setuphead[Volume,Library,Manpage][page=yes,number=no,placehead=yes] \setuphead[Volume][color=red] \setuphead[Library][color=blue]
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
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.
Change your manpage headings to \chapter and test at the begin of each new volume for the number of chapters (you can use the list mechanism for this) in each volume.
%\setuphead[part][placehead=yes,after=\directsetup{chapterentries}] \setuphead[part][placehead=empty,after=\directsetup{chapterentries}]
\startsetups[chapterentries] \determinelistcharacteristics[chapter] \ifcase\structurelistsize No chapter in this part. \or One chapter in this part. \else Two or more chapters in this part. \fi \stopsetups
\starttext
\dorecurse{4} {\startpart[title=Part #1] \dorecurse{\ifcase#1\or 0\or 3\else 1\fi} {\startchapter[title=Chapter ##1] \stopchapter} \stoppart}
\stoptext
Wolfgang
Very interesting!
I don't want to use \chapter because I'm dealing with several types of document, and so I'm trying to keep different things separate, so that I don't confuse myself with all the setups. But I just converted your example to use \definehead[Manpage] instead, and that seems to have the same effect for \determinelistcharacteristics[Manpage].
Maybe I'm being unimaginative, but I don't see how you're suggesting I use this technique to achieve the effect I'm after. Did you mean to count Libraries rather than Manpages? Even then I'm not sure how to apply the idea. (Especially as your example doesn't have the same structure as mine.)
Sorry if my original description was unclear.
It doesn’t matter which name you use for the sections.
\definehead [Library] [part] \definehead [Manpage] [chapter]
\setuphead [Library] [placehead=empty, before={\startmakeup[standard][align=middle,style=\ssd]}, after={\directsetup{chapterentries}\stopmakeup}]
\startsetups[chapterentries] \determinelistcharacteristics[Manpage] \ifcase\structurelistsize No manpages for this libary. \or One manpage for this Library \else Two or more manpages for this library. \fi \stopsetups
\starttext
\startLibrary[title=First Library] \startManpage[title=Manpage 1] \stopManpage \stopLibrary
\startLibrary[title=First Library] \stopLibrary
\startLibrary[title=First Library] \startManpage[title=Manpage 1] \stopManpage \startManpage[title=Manpage 2] \stopManpage \startManpage[title=Manpage 3] \stopManpage \stopLibrary
\stoptext
Wolfgang
Hi, There's been a misunderstanding here. You're showing a structure which is a two-deep hierarchy (Libraries containing Manpages). That's not what the structure in my example is, and you're showing something which I think is different to what I'm asking for. (Or I just can't see how to apply the technique you're illustrating) The structure for my example is Volumes which contain either Libraries *or* Manpages, and a Library contains Manpages. I'll draw out the tree from my example again: (this is the same as in my first email for this thread, but I'm repeating it here for clarity) \starttext \placecontent[list={Volume,Library,Manpage}] \startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume \startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext Please look at Volume 3; you can see it contains some Libraries (libjpeg, libpng, libbmp). The other Volumes do not contain Libraries; they just contain Manpages directly. So the ToC is: Volume 1: "Programs" <-- I want a title page for this ... manpages for (1) Volume 2: "Syscalls" <-- I want a title page for this ... manpages for (2) Volume 3: "Libraries" <-- no title page for this!! Because this Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this ... manpages for (3) libbmp Volume 4: "Drivers" <-- I want a title page for this ... manpages for (4) Volume 7: "Makefiles" <-- I want a title page for this ... manpages for (7) As I said in my original email, this grouping into libraries only applies to Volume 3. The effect I'm trying to achieve is to have a single title page before each set of manpages. So I want a title page for "Programs", "Syscalls", "libjpeg", "libpng", "libbmp", "Drivers", and "Makefiles". But I do not want a title page for Volume 3 itself, "Libraries" because that would be immediately followed by the title page for libjpeg, and my aim is to avoid having two consecutive title pages. I have indicated these with arrows above. I hope that's clear. Sorry for repeating myself... Thank you! -- Kate
Am 21.05.2015 um 00:36 schrieb Kate F
: Hi,
There's been a misunderstanding here.
You're showing a structure which is a two-deep hierarchy (Libraries containing Manpages). That's not what the structure in my example is, and you're showing something which I think is different to what I'm asking for. (Or I just can't see how to apply the technique you're illustrating)
You have to add just another level to my example, nothing more.
The structure for my example is Volumes which contain either Libraries *or* Manpages, and a Library contains Manpages. I'll draw out the tree from my example again: (this is the same as in my first email for this thread, but I'm repeating it here for clarity)
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
Please look at Volume 3; you can see it contains some Libraries (libjpeg, libpng, libbmp). The other Volumes do not contain Libraries; they just contain Manpages directly. So the ToC is:
Volume 1: "Programs" <-- I want a title page for this ... manpages for (1) Volume 2: "Syscalls" <-- I want a title page for this ... manpages for (2) Volume 3: "Libraries" <-- no title page for this!! Because this Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this ... manpages for (3) libbmp Volume 4: "Drivers" <-- I want a title page for this ... manpages for (4) Volume 7: "Makefiles" <-- I want a title page for this ... manpages for (7)
As I said in my original email, this grouping into libraries only applies to Volume 3.
The effect I'm trying to achieve is to have a single title page before each set of manpages. So I want a title page for "Programs", "Syscalls", "libjpeg", "libpng", "libbmp", "Drivers", and "Makefiles". But I do not want a title page for Volume 3 itself, "Libraries" because that would be immediately followed by the title page for libjpeg, and my aim is to avoid having two consecutive title pages. I have indicated these with arrows above.
I hope that's clear. Sorry for repeating myself…
Sorry for resending nearly the same example for another time but it still does what you asked for. \definehead [Volume] [part] \definehead [Library] [chapter] \definehead [Manpage] [section] \setuphead [Volume] [placehead=empty, after=\directsetup{libraryentries}] \startsetups[libraryentries] \determinelistcharacteristics[Library] \ifnum\structurelistsize=0 \startframed[frame=off,width=\textwidth,height=\dimexpr\textheight-\strutdp\relax,align={middle,lohi}] \placeheadtext[Volume] \stopframed \else % Hide the Volume title \fi \stopsetups \starttext \placelist[Volume,Library,Manpage] \startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 2: Syscalls] \dorecurse{3} {\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3} {\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3} {\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3} {\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume \startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext Wolfgang
On 21 May 2015 at 09:06, Wolfgang Schuster
Am 21.05.2015 um 00:36 schrieb Kate F
: Hi,
There's been a misunderstanding here.
You're showing a structure which is a two-deep hierarchy (Libraries containing Manpages). That's not what the structure in my example is, and you're showing something which I think is different to what I'm asking for. (Or I just can't see how to apply the technique you're illustrating)
You have to add just another level to my example, nothing more.
The structure for my example is Volumes which contain either Libraries *or* Manpages, and a Library contains Manpages. I'll draw out the tree from my example again: (this is the same as in my first email for this thread, but I'm repeating it here for clarity)
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
Please look at Volume 3; you can see it contains some Libraries (libjpeg, libpng, libbmp). The other Volumes do not contain Libraries; they just contain Manpages directly. So the ToC is:
Volume 1: "Programs" <-- I want a title page for this ... manpages for (1) Volume 2: "Syscalls" <-- I want a title page for this ... manpages for (2) Volume 3: "Libraries" <-- no title page for this!! Because this Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this ... manpages for (3) libbmp Volume 4: "Drivers" <-- I want a title page for this ... manpages for (4) Volume 7: "Makefiles" <-- I want a title page for this ... manpages for (7)
As I said in my original email, this grouping into libraries only applies to Volume 3.
The effect I'm trying to achieve is to have a single title page before each set of manpages. So I want a title page for "Programs", "Syscalls", "libjpeg", "libpng", "libbmp", "Drivers", and "Makefiles". But I do not want a title page for Volume 3 itself, "Libraries" because that would be immediately followed by the title page for libjpeg, and my aim is to avoid having two consecutive title pages. I have indicated these with arrows above.
I hope that's clear. Sorry for repeating myself…
Sorry for resending nearly the same example for another time but it still does what you asked for.
But it doesn't... You have a page for Volume 3 (which is made blank due to your \ifnum\structurelistsize=0):
Volume 3: "Libraries" <-- no title page for this!!
Instead, I'm trying to find how to not have this produce a page (or some other way to achieve the same effect). And you have no title pages for these:
Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this
Of course these pages would be easy, using just the normal way, if the page for Volume 3 can be not output somehow. But I don't know if that's there's another way which I'm not aware of. I'm trying to separate describing the effect I'm trying to achieve (where I drew "<--" for each page I'd like to produce) vs. my idea for implementing that effect (to somehow not produce a page for Volume 3, and then to produce title pages for each Library), because there are often surprising ways to do things which aren't what I'd thought of. Thank you for taking the time with this, -- Kate
Am 21.05.2015 um 14:33 schrieb Kate F
: On 21 May 2015 at 09:06, Wolfgang Schuster
mailto:schuster.wolfgang@gmail.com> wrote: Am 21.05.2015 um 00:36 schrieb Kate F
: Hi,
There's been a misunderstanding here.
You're showing a structure which is a two-deep hierarchy (Libraries containing Manpages). That's not what the structure in my example is, and you're showing something which I think is different to what I'm asking for. (Or I just can't see how to apply the technique you're illustrating)
You have to add just another level to my example, nothing more.
The structure for my example is Volumes which contain either Libraries *or* Manpages, and a Library contains Manpages. I'll draw out the tree from my example again: (this is the same as in my first email for this thread, but I'm repeating it here for clarity)
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
Please look at Volume 3; you can see it contains some Libraries (libjpeg, libpng, libbmp). The other Volumes do not contain Libraries; they just contain Manpages directly. So the ToC is:
Volume 1: "Programs" <-- I want a title page for this ... manpages for (1) Volume 2: "Syscalls" <-- I want a title page for this ... manpages for (2) Volume 3: "Libraries" <-- no title page for this!! Because this Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this ... manpages for (3) libbmp Volume 4: "Drivers" <-- I want a title page for this ... manpages for (4) Volume 7: "Makefiles" <-- I want a title page for this ... manpages for (7)
As I said in my original email, this grouping into libraries only applies to Volume 3.
The effect I'm trying to achieve is to have a single title page before each set of manpages. So I want a title page for "Programs", "Syscalls", "libjpeg", "libpng", "libbmp", "Drivers", and "Makefiles". But I do not want a title page for Volume 3 itself, "Libraries" because that would be immediately followed by the title page for libjpeg, and my aim is to avoid having two consecutive title pages. I have indicated these with arrows above.
I hope that's clear. Sorry for repeating myself…
Sorry for resending nearly the same example for another time but it still does what you asked for.
But it doesn't...
You have a page for Volume 3 (which is made blank due to your \ifnum\structurelistsize=0):
You’re wrong, the test for \structurelistsize has nothing to do with the empty page.
Volume 3: "Libraries" <-- no title page for this!!
Instead, I'm trying to find how to not have this produce a page (or some other way to achieve the same effect).
And you have no title pages for these:
Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this
These weren’t needed for the example and I have no idea what kind of title page you want for your Volumes and Libraries. Wolfgang
On 21 May 2015 at 22:09, Wolfgang Schuster
Am 21.05.2015 um 14:33 schrieb Kate F
: On 21 May 2015 at 09:06, Wolfgang Schuster
wrote: Am 21.05.2015 um 00:36 schrieb Kate F
: Hi,
There's been a misunderstanding here.
You're showing a structure which is a two-deep hierarchy (Libraries containing Manpages). That's not what the structure in my example is, and you're showing something which I think is different to what I'm asking for. (Or I just can't see how to apply the technique you're illustrating)
You have to add just another level to my example, nothing more.
The structure for my example is Volumes which contain either Libraries *or* Manpages, and a Library contains Manpages. I'll draw out the tree from my example again: (this is the same as in my first email for this thread, but I'm repeating it here for clarity)
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
Please look at Volume 3; you can see it contains some Libraries (libjpeg, libpng, libbmp). The other Volumes do not contain Libraries; they just contain Manpages directly. So the ToC is:
Volume 1: "Programs" <-- I want a title page for this ... manpages for (1) Volume 2: "Syscalls" <-- I want a title page for this ... manpages for (2) Volume 3: "Libraries" <-- no title page for this!! Because this Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this ... manpages for (3) libbmp Volume 4: "Drivers" <-- I want a title page for this ... manpages for (4) Volume 7: "Makefiles" <-- I want a title page for this ... manpages for (7)
As I said in my original email, this grouping into libraries only applies to Volume 3.
The effect I'm trying to achieve is to have a single title page before each set of manpages. So I want a title page for "Programs", "Syscalls", "libjpeg", "libpng", "libbmp", "Drivers", and "Makefiles". But I do not want a title page for Volume 3 itself, "Libraries" because that would be immediately followed by the title page for libjpeg, and my aim is to avoid having two consecutive title pages. I have indicated these with arrows above.
I hope that's clear. Sorry for repeating myself…
Sorry for resending nearly the same example for another time but it still does what you asked for.
But it doesn't...
You have a page for Volume 3 (which is made blank due to your \ifnum\structurelistsize=0):
You’re wrong, the test for \structurelistsize has nothing to do with the empty page.
Volume 3: "Libraries" <-- no title page for this!!
Instead, I'm trying to find how to not have this produce a page (or some other way to achieve the same effect).
And you have no title pages for these:
Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this
These weren’t needed for the example
They were the whole point of what I was asking for help with. -- Kate
Am 21.05.2015 um 23:44 schrieb Kate F
: On 21 May 2015 at 22:09, Wolfgang Schuster
wrote: Am 21.05.2015 um 14:33 schrieb Kate F
: On 21 May 2015 at 09:06, Wolfgang Schuster
wrote: Am 21.05.2015 um 00:36 schrieb Kate F
: Hi,
There's been a misunderstanding here.
You're showing a structure which is a two-deep hierarchy (Libraries containing Manpages). That's not what the structure in my example is, and you're showing something which I think is different to what I'm asking for. (Or I just can't see how to apply the technique you're illustrating)
You have to add just another level to my example, nothing more.
The structure for my example is Volumes which contain either Libraries *or* Manpages, and a Library contains Manpages. I'll draw out the tree from my example again: (this is the same as in my first email for this thread, but I'm repeating it here for clarity)
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
Please look at Volume 3; you can see it contains some Libraries (libjpeg, libpng, libbmp). The other Volumes do not contain Libraries; they just contain Manpages directly. So the ToC is:
Volume 1: "Programs" <-- I want a title page for this ... manpages for (1) Volume 2: "Syscalls" <-- I want a title page for this ... manpages for (2) Volume 3: "Libraries" <-- no title page for this!! Because this Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this ... manpages for (3) libbmp Volume 4: "Drivers" <-- I want a title page for this ... manpages for (4) Volume 7: "Makefiles" <-- I want a title page for this ... manpages for (7)
As I said in my original email, this grouping into libraries only applies to Volume 3.
The effect I'm trying to achieve is to have a single title page before each set of manpages. So I want a title page for "Programs", "Syscalls", "libjpeg", "libpng", "libbmp", "Drivers", and "Makefiles". But I do not want a title page for Volume 3 itself, "Libraries" because that would be immediately followed by the title page for libjpeg, and my aim is to avoid having two consecutive title pages. I have indicated these with arrows above.
I hope that's clear. Sorry for repeating myself…
Sorry for resending nearly the same example for another time but it still does what you asked for.
But it doesn't...
You have a page for Volume 3 (which is made blank due to your \ifnum\structurelistsize=0):
You’re wrong, the test for \structurelistsize has nothing to do with the empty page.
Volume 3: "Libraries" <-- no title page for this!!
Instead, I'm trying to find how to not have this produce a page (or some other way to achieve the same effect).
And you have no title pages for these:
Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this
These weren’t needed for the example
They were the whole point of what I was asking for help with.
\definehead [Volume] [part] \definehead [Library] [chapter] \definehead [Manpage] [section] \setuphead [Volume] [placehead=empty, after=\directsetup{libraryentries}] \setuphead [Library] [ page=, placehead=empty, before=\directsetup{Library:before}, after=\directsetup{Library:after}] \startsetups[Library:before] \ifconditional\libraryentries \page \else \settrue\libraryentries \fi \stopsetups \startsetups[Library:after] \startframed[frame=off,width=\textwidth,height=\dimexpr\textheight-\strutdp\relax,align={middle,lohi}] \placeheadtext[Library] \stopframed \page \stopsetups \newconditional\libraryentries \settrue\libraryentries \startsetups[libraryentries] \determinelistcharacteristics[Library] \ifnum\structurelistsize=0 \startframed[frame=off,width=\textwidth,height=\dimexpr\textheight-\strutdp\relax,align={middle,lohi}] \placeheadtext[Volume] \stopframed \else \setfalse\libraryentries \fi \stopsetups %\showframe[text][text] \starttext \placelist[Volume,Library,Manpage] \startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 2: Syscalls] \dorecurse{3} {\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3} {\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3} {\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3} {\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume \startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume \startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext Wolfgang
On 21 May 2015 at 23:06, Wolfgang Schuster
Am 21.05.2015 um 23:44 schrieb Kate F
: On 21 May 2015 at 22:09, Wolfgang Schuster
wrote: Am 21.05.2015 um 14:33 schrieb Kate F
: On 21 May 2015 at 09:06, Wolfgang Schuster
wrote: Am 21.05.2015 um 00:36 schrieb Kate F
: Hi,
There's been a misunderstanding here.
You're showing a structure which is a two-deep hierarchy (Libraries containing Manpages). That's not what the structure in my example is, and you're showing something which I think is different to what I'm asking for. (Or I just can't see how to apply the technique you're illustrating)
You have to add just another level to my example, nothing more.
The structure for my example is Volumes which contain either Libraries *or* Manpages, and a Library contains Manpages. I'll draw out the tree from my example again: (this is the same as in my first email for this thread, but I'm repeating it here for clarity)
\starttext \placecontent[list={Volume,Library,Manpage}]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3}{\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3}{\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3}{\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3}{\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume \stoptext
Please look at Volume 3; you can see it contains some Libraries (libjpeg, libpng, libbmp). The other Volumes do not contain Libraries; they just contain Manpages directly. So the ToC is:
Volume 1: "Programs" <-- I want a title page for this ... manpages for (1) Volume 2: "Syscalls" <-- I want a title page for this ... manpages for (2) Volume 3: "Libraries" <-- no title page for this!! Because this Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this ... manpages for (3) libbmp Volume 4: "Drivers" <-- I want a title page for this ... manpages for (4) Volume 7: "Makefiles" <-- I want a title page for this ... manpages for (7)
As I said in my original email, this grouping into libraries only applies to Volume 3.
The effect I'm trying to achieve is to have a single title page before each set of manpages. So I want a title page for "Programs", "Syscalls", "libjpeg", "libpng", "libbmp", "Drivers", and "Makefiles". But I do not want a title page for Volume 3 itself, "Libraries" because that would be immediately followed by the title page for libjpeg, and my aim is to avoid having two consecutive title pages. I have indicated these with arrows above.
I hope that's clear. Sorry for repeating myself…
Sorry for resending nearly the same example for another time but it still does what you asked for.
But it doesn't...
You have a page for Volume 3 (which is made blank due to your \ifnum\structurelistsize=0):
You’re wrong, the test for \structurelistsize has nothing to do with the empty page.
Volume 3: "Libraries" <-- no title page for this!!
Instead, I'm trying to find how to not have this produce a page (or some other way to achieve the same effect).
And you have no title pages for these:
Volume contains Libraries Library "libjpeg" <-- I want a title page for this ... manpages for (3) libjpeg Library "libpng" <-- I want a title page for this ... manpages for (3) libpng Library "libbmp" <-- I want a title page for this
These weren’t needed for the example
They were the whole point of what I was asking for help with.
\definehead [Volume] [part] \definehead [Library] [chapter] \definehead [Manpage] [section]
\setuphead [Volume] [placehead=empty, after=\directsetup{libraryentries}]
\setuphead [Library] [ page=, placehead=empty, before=\directsetup{Library:before}, after=\directsetup{Library:after}]
\startsetups[Library:before] \ifconditional\libraryentries \page \else \settrue\libraryentries \fi \stopsetups
\startsetups[Library:after] \startframed[frame=off,width=\textwidth,height=\dimexpr\textheight-\strutdp\relax,align={middle,lohi}] \placeheadtext[Library] \stopframed \page \stopsetups
\newconditional\libraryentries \settrue\libraryentries
\startsetups[libraryentries] \determinelistcharacteristics[Library] \ifnum\structurelistsize=0 \startframed[frame=off,width=\textwidth,height=\dimexpr\textheight-\strutdp\relax,align={middle,lohi}] \placeheadtext[Volume] \stopframed \else \setfalse\libraryentries \fi \stopsetups
%\showframe[text][text]
\starttext
\placelist[Volume,Library,Manpage]
\startVolume[title=Section 1: Programs] \dorecurse{3}{\startManpage[title=progxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 2: Syscalls] \dorecurse{3} {\startManpage[title=syscallxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 3: Libraries] \startLibrary[title=libjpeg] \dorecurse{3} {\startManpage[title=jpegapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libpng] \dorecurse{3} {\startManpage[title=pngapi_a(3)] \input lorem \stopManpage} \stopLibrary \startLibrary[title=libbmp] \dorecurse{3} {\startManpage[title=bmpapi_a(3)] \input lorem \stopManpage} \stopLibrary \stopVolume
\startVolume[title=Section 4: Drivers] \dorecurse{3}{\startManpage[title=drvxyz(1)] \input lorem \stopManpage} \stopVolume
\startVolume[title=Section 7mk: Makefiles] \dorecurse{3}{\startManpage[title=xyz.mk(1)] \input lorem \stopManpage} \stopVolume
\stoptext
Wolfgang
Yes! That's exactly what I was trying to achieve. Thank you. Your code there is full of things I didn't know about, or didn't think to use, but having just added some things to see what's going on, I think I understand how it works. It's a very different implementation than I had imagined! -- Kate
participants (2)
-
Kate F
-
Wolfgang Schuster