On Mon, 26 Aug 2024, Henning Hraban Ramm wrote:
> Hi,
> I’d like to check the chapter number like
>
> \ifodd\rawcountervalue[chapter]
> What an odd chapter!
> \fi
>
> but apparently the counter isn’t called "chapter", or I’m doing it wrong
> otherwise.
> Could you enlighten me?
You need: \somenamedheadnumber{chapter}{current}
\starttext
\startsection[title=First]
This is: \somenamedheadnumber{section}{current}
\ifodd\somenamedheadnumber{section}{current}\relax
This is odd
\else
This is even
\fi
\stopsection
\startsection[title=Second]
This is: \somenamedheadnumber{section}{current}
\ifodd\somenamedheadnumber{section}{current}\relax
This is odd
\else
This is even
\fi
\stopsection
\stoptext
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________