[NTG-context] Let chapter start on odd page and make the even page before show an image
Henning Hraban Ramm
texml at fiee.net
Fri May 29 22:13:16 CEST 2020
In a similar setup I wanted to start every chapter with image and short vita the author and came up with the following (of course not without help from our wizards):
\definefont[ChapterFont][Sans*default at 30pt]
\startsetups normalheader
% default numbers of my bodyfont are oldstyle
\setupheadertexts[chapter][{\addff{normnum}\pagenumber}][{\addff{normnum}\pagenumber}][]
\stopsetups
\startsetups noheader
\setupheadertexts[][][][]
\stopsetups
\startsetups bigchapter
\setupalign[flushleft,hz,hanging,verytolerant,nothyphenated]
\doifelse{\structureuservariable{image}}{}{% if image empty
}{%
\directsetup{noheader}
\vbox{%
{\ChapterFont\structurevariable{title}\par}%
\blank[big]
\externalfigure[img/\structureuservariable{image}][width=0.8\textwidth]\par
}
\doifnot{\structureuservariable{vita}}{}{% if vita
\vfill
\vbox{%
{\tf\ss\structureuservariable{vita}}
}%
}%
\page[right]
\vbox{%
\doifnot{\structureuservariable{subtitle}}{}{% if subtitle
{\definedfont[SerifItalic*eka at 30pt]\structureuservariable{subtitle}}
}%
}%
}%
\blank[3*big]
\directsetup{normalheader}
\setupalign[width,hz,hanging,hyphenated]% reset alignment
\stopsetups
\setuphead[chapter][
page=left,
number=no,
command=\gobbletwoarguments,
before=,
after={\directsetup{bigchapter}},
style={\ChapterFont},
]
This is the result:
https://www.dreiviertelhaus.de/editionka/lauf-los-buch/
(see preview images linked at the bottom)
Best, Hraban
More information about the ntg-context
mailing list