Thomas A. Schmitz wrote:
Hi all, Hans,

here is a bug that remains with the new structure code after Hans fixed many things two weeks ago. I want a counter that is reset at every odd chapter. This works as expected in mkii (and used to work in mkiv), but complains about a "Missing number, treated as zero" and fails to compile in current beta:

ok, fixed in the beta

the problem is that the old code was somewhat crippled as it uses this two step method (determine and usage) due to expansion issues

in the current beta mkiv code we can do:

\setuphead
   [section]
   [after=\setups{section:after},
    expansion=yes]

\startsetups section:after
    \ifodd\namedheadnumber{section}\relax
       \resetSlideNumber\incrementSlideNumber
    \else
       \incrementSlideNumber
    \fi
    \blank
\stopsetups

btw, you misuse 'command' which in turn has side effects; use after instead

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to