[NTG-context] Placing a section ending depending on odd/even sectionnumber
Willi Egger
context at boede.nl
Tue Aug 4 18:56:48 CEST 2020
Hi,
now I have another hurdle to be taken :-) — Depending on the odd or even number of the section I have to place an ornament at the end of the section.
I have sofar the following setup:
\define\stopmysection
{\setups{endsection}}
\startsetups endsection
\doifelse
{\currentheadnumber} %{\headnumber[section][current]}{odd}
{even}
{\vfil
{\bf End of even numbered section}
\stopsection%
}
{\vfil
{\bf End of odd numbered section}
\stopsection%
}
\stopsetups
\starttext
\startsection[title=Ward]
\setuppagenumbering[conversion=romannumerals]
\input ward
\stopmysection
\startsection[title=Knuth]
\setuppagenumbering[conversion=numbers]
\input knuth
\stopmysection
\stoptext
However the the evaluation of the sectionnumber results always in “false”, having therefore always odd as a sectionending.
What to change in order to get the desired result?
Kind regards
Willi
More information about the ntg-context
mailing list