[NTG-context] help with facing page image
Henning Hraban Ramm
texml at fiee.net
Mon Mar 7 21:23:06 CET 2022
Am 07.03.22 um 21:08 schrieb Bruce Horrocks via ntg-context:
>
>
>> On 7 Mar 2022, at 03:49, jbf via ntg-context <ntg-context at ntg.nl> wrote:
>>
>> I wonder if someone can help me untangle the current little mess I seem to be creating!
>>
>> Author wants an image on facing page to each of 10 chapters in the bodypart of the document. Assume that everything else is working properly for this document (double-sided etc.), but other than before chapter 1, I can't seem to get my facing page image to appear where it should!
I didn’t see your original message.
Here’s my approach, as used in
https://www.dreiviertelhaus.de/reihen/eka/lauf-los-buch/ :
\startsetups eka:normalheader
\setupheadertexts[chapter][{\feature[=normnum]\pagenumber}][{\feature[=normnum]\pagenumber}][]
\stopsetups
\startsetups eka:noheader
\setupheadertexts[][][][]
\stopsetups
\startsetups eka:imagechapter
\setupalign[flushleft]
\doifelse{\structureuservariable{image}}{}{% if image empty, do nothing
}{%
\directsetup{eka:noheader}
\vbox{%
\blank[big]
\externalfigure[\structureuservariable{image}][width=0.8\textwidth]\par
}
\doifnot{\structureuservariable{motto}}{}{
\vfill
\vbox{%
{\MottoFont\structureuservariable{motto}}
}%
}%
\page[right]
\vbox{%
\doifnot{\structureuservariable{subtitle}}{}{
{\SubtitleFont\structureuservariable{subtitle}}
}%
}%
}%
\blank[3*big]
\directsetup{eka:normalheader}
\setupalign[width]
\stopsetups
\define[2]\Nothing{} % do nothing
\setuphead[chapter][
number=no,
page=left,
command=\Nothing,
before=,
after={\directsetup{eka:imagechapter}},
]
% example:
\startchapter
[title={Chapter Title – here only used in list}]
[author={},image=cow,
subtitle={Subtitle – here a quote by the author},
motto={Motto – here a short biography of the author}]
...
\stopchapter
Hraban
More information about the ntg-context
mailing list