[NTG-context] Let chapter start on odd page and make the even page before show an image

Jan U. Hasecke juh+ntg-context at mailbox.org
Fri May 29 17:42:57 CEST 2020


Hi Wolfgang,

thank you very much. Amazing!

Am 29.05.20 um 15:35 schrieb Wolfgang Schuster:

> \definedataset [chapter]
>
> \startsetups [chapter:before]
> 
>   \page[yes]
> 
>   \doglobal\increment\ChapterCounter
> 
>   \doifoddpageelse
>     {}
>     {\doifsomething
>        {\datasetvariable{chapter}{\ChapterCounter}{image}}
>        {\startlayout[page]
>         \centerbox{\externalfigure
> [\datasetvariable{chapter}{\ChapterCounter}{image}][factor=min]}
>         \stoplayout}}
> 
> \stopsetups
> 
> \setuphead
>   [chapter]
>   [page=,
>    beforesection=\directsetup{chapter:before},
> insidesection={\setdataset[chapter][\ChapterCounter][image=\structureuservariable{image}]}]
> 

One and a half question.
Why did you set \ChapterCounter explizitly and why is \ChapterCounter
part of the datasetvariable?

juh


More information about the ntg-context mailing list