Am 26.08.24 um 17:57 schrieb Wolfgang Schuster:
Henning Hraban Ramm schrieb am 26.08.2024 um 17:41:
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?
\namedheadnumber{chapter}
Thank you, but it doesn’t work in my setup where I’m trying to change a
background image depending on the chapter number:
\defineoverlay[BG][\start
\ifodd\namedheadnumber{chapter}\relax
\externalfigure[bgimage][height=\overlayheight]
\else
\mirror{\externalfigure[bgimage][height=\overlayheight]}
\fi
\stop]
This is then used with
\setlayerframed[papier][background=BG]
I guess it’s expanded only once.
But it was a bad idea anyway, I wanted more than two variants and now
just set them as a uservariable.
Sorry for the effort.
Hraban
___________________________________________________________________________________
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
___________________________________________________________________________________