[NTG-context] running head for TOC

Henning Hraban Ramm texml at fiee.net
Tue Jan 19 10:23:37 CET 2021



> Am 19.01.2021 um 05:55 schrieb jbf <roma83537 at gmail.com>:
> 
> I have a very long Table of Contents (runs across five pages) and the author would like the running head on recto pages for this to be 'Table of Contents'.
> 
> I am using the following to create the TOC head:
> 
> \definehead
>   [tochead]
>   [title]
> 
> \starttochead[title={Table of Contents}]
> \setupheader[state=start]
>   \placecombinedlist[content]
> \stoptochead
> 
> And I use the following to set up the headertexts for the book as a whole:
> 
> \setupheadertexts
>   [{\hfill\getmarking[chapter]\hfill}][] %recto pages
>   [{\hfill\documentvariable{metadata:title}\hfill}][] %verso pages
> 
> The problem is that I am unable to get 'Table of Contents' as a running head for the two recto pages where I need it. I realise I need to get 'tochead' recognised somehow for this.  If I set up a separate \setupheadertexts [{\hfill\getmarking[tochead]\hfill}][] then I end up with 'Table of Contents as the running head on all recto pages, which I don't want.
> 
> Can anyone suggest how can I get 'Table of Contents' as the running head just for the two recto pages of a five page TOC?

How about you inherit "tochead" from "chapter" and setup the combined list "content" so that it doesn’t include "tochead"?


Hraban


More information about the ntg-context mailing list