[dev-context] Counters (was: \definestructure…)

Wolfgang Schuster schuster.wolfgang at googlemail.com
Thu Mar 29 10:46:14 CEST 2012

Am 29.03.2012 um 09:34 schrieb Hans Hagen:

> On 28-3-2012 23:48, Wolfgang Schuster wrote:
>> As we’re now talking about \definestructure… I have a new request, can’t you change (or provide alternatives names) all the new counter commands from …structurecounter… (\definestructurecounter, \rawstructurecounter, \convertedstructurecounter etc.) to …counter… (e.g. \definecounter \rawcounter, \convertedcounter).
> we already have
> \let \definenumber          \definestructurecounter    % [name]
> \let \setupnumber           \setupstructurecounter     % [name][setups]
> \let \setnumber             \setstructurecounter       % [name]{value}
> \let \resetnumber           \resetstructurecounter     % [name]
> \let \savenumber            \savestructurecounter      % [name]
> \let \restorenumber         \restorestructurecounter   % [name]
> \let \incrementnumber       \incrementstructurecounter % [name]
> \let \decrementnumber       \decrementstructurecounter % [name]
> \let \rawnumber             \rawstructurecounter       % [name]
> \let \getnumber             \getstructurecounter       % [name]
> \let \convertednumber       \getstructurecounter       % [name]
> \let \doifdefinednumber     \doifstructurecounter      % {number}{true}
> \let \doifundefinednumber   \doifnotstructurecounter   % {number}{true}
> \let \doifdefinednumberelse \doifstructurecounterelse  % {number}{true}{false}
> \let \setupnumbering        \setupstructurecountering
> and three synonyms is a bit too much ... best is to decide on the main one and then provide a synonym for a while for backward compatibility

To many names aren’t a good solution but when I have to make a decision I would choose \definecounter because it’s the name which makes more sense. The only thing (besides backward compatibility) is the \makecounter mechanism which use the following commands:


If the \definenumber commands are changed this mechanism can’t exist anymore but do we really need 4 different counter mechanism (\newcount, \newcounter, \makecounter and \definenumber/\definestructurecounter) in ConTeXt?


More information about the dev-context mailing list