[NTG-context] Should command `\setnumber' print number in text?

Wolfgang Schuster schuster.wolfgang at googlemail.com
Tue May 1 16:03:32 CEST 2012


Am 29.04.2012 um 14:23 schrieb Vladimir Lomov:

> Just to clarify question (before update wiki): is `\setnumber' command
> obsolete and `\setupnumber' should be used instead?

Both commands have a different purpose, with \setupnumber you can
change the conversion of the counter (romannumerals, characters etc.),
add a prefix (chapter, section … number) and let the counter be reset
with each new sectionblock or heading.

With \setnumber you can set the counter to a certain value but to fit
the command in the normal syntax there was a change a while back.

In MkII you set the number in braces

  \setnumber[…]{<number>}

but for MkIV you use brackets to set the number

  \setnumber[…][<number>]

> I'm also reading "dev-context", some time ago there were discussion about
> `\definestructure...', in message `<4F737D98.5040600 at wxs.nl>' Hans shown
> several `\let' commands, from that I thought that `\setnumber' is ok to
> use with `[]{}'.

In MkIV the real names for the counter mechanism are

- \definecounter
- \setupcounter
- \incrementcounter
- \convertedcounter
- …

but for backward compatibility (the names are mentioned in manuals) the old
names from MkII are synonyms with the same syntax.

Wolfgang


More information about the ntg-context mailing list