ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger <context@boede.nl>
To: NTG-Context ConTeXt users <ntg-context@ntg.nl>
Subject: Placing a section ending depending on odd/even sectionnumber
Date: Tue, 4 Aug 2020 18:56:48 +0200	[thread overview]
Message-ID: <13BAC8B4-9DBB-4678-B966-70FE35117076@boede.nl> (raw)

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
___________________________________________________________________________________

             reply	other threads:[~2020-08-04 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 16:56 Willi Egger [this message]
2020-08-04 17:46 ` Wolfgang Schuster
2020-08-05 11:39   ` Willi Egger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13BAC8B4-9DBB-4678-B966-70FE35117076@boede.nl \
    --to=context@boede.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).