ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Placing a section ending depending on odd/even sectionnumber
@ 2020-08-04 16:56 Willi Egger
  2020-08-04 17:46 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Willi Egger @ 2020-08-04 16:56 UTC (permalink / raw)
  To: NTG-Context ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-05 11:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04 16:56 Placing a section ending depending on odd/even sectionnumber Willi Egger
2020-08-04 17:46 ` Wolfgang Schuster
2020-08-05 11:39   ` Willi Egger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).