ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
Subject: using headnumber
Date: Thu, 20 Apr 2006 16:22:07 +0200	[thread overview]
Message-ID: <A798C06D-682F-4B62-BABD-1A6E619EC2FB@uni-bonn.de> (raw)

Hi,

I have a counter which I want to be incremented after every \section  
command and reset after every odd \section (don't ask why...). So I  
tried this approach:

\setuphead[section]
    [command={{{\determineheadnumber[section]}
      \ifodd{\currentheadnumber[section]}\resetSlideNumber 
\incrementSlideNumber
      \else\incrementSlideNumber
      \fi}]

But I'm getting errors:

! Missing number, treated as zero.
<to be read again>
                    {
\@@kosectioncommand ...adnumber [section]}\ifodd {
                                                   \currentheadnumber  
[sectio...

\doplaceheadnumbertext ...ue {\??ko #1\c!command }
                                                    
{\dostartattributes {\??ko...

\dodododoconstructhead ...{\finalsectionnumber }}}
                                                   \writesection {#1} 
{#3}{#4}...

Any pointers?

Thomas

             reply	other threads:[~2006-04-20 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-20 14:22 Thomas A. Schmitz [this message]
2006-04-20 15:14 ` Peter Rolf
2006-04-20 16:15   ` Thomas A. Schmitz
2006-04-20 17:06     ` Sanjoy Mahajan
2006-04-20 20:44     ` Hans Hagen
2006-04-20 21:46       ` Thomas A. Schmitz
2006-04-20 16:54   ` Sanjoy Mahajan

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=A798C06D-682F-4B62-BABD-1A6E619EC2FB@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --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).