Hi Hans, can you finally add synonyms for the following four commands. - \definestructureresetset - \definestructureseparatorset - \definestructureconversionset - \definestructureprefixset Wolfgang
On 15-3-2012 22:34, Wolfgang Schuster wrote:
Hi Hans,
can you finally add synonyms for the following four commands.
- \definestructureresetset - \definestructureseparatorset - \definestructureconversionset - \definestructureprefixset
you mean \definecounterresetset etc? ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 28.03.2012 um 23:07 schrieb Hans Hagen:
On 15-3-2012 22:34, Wolfgang Schuster wrote:
Hi Hans,
can you finally add synonyms for the following four commands.
- \definestructureresetset - \definestructureseparatorset - \definestructureconversionset - \definestructureprefixset
you mean
\definecounterresetset
etc?
One solution is to provide a commands for each key to enable the set, e.g. - \definesectionconverionset for sectionconversion, - \defineprefixconversionset for prefixconversion and - \definenumberconverionset for numberconversion but that’s overkill for the same thing and leads to redundant setting because section and prefix are the same thing. Your \definecounter… synonyms is a good thing in the middle. 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). Wolfgang
On 28-3-2012 23:48, Wolfgang Schuster wrote:
Am 28.03.2012 um 23:07 schrieb Hans Hagen:
On 15-3-2012 22:34, Wolfgang Schuster wrote:
Hi Hans,
can you finally add synonyms for the following four commands.
- \definestructureresetset - \definestructureseparatorset - \definestructureconversionset - \definestructureprefixset
you mean
\definecounterresetset
etc?
One solution is to provide a commands for each key to enable the set, e.g.
- \definesectionconverionset for sectionconversion, - \defineprefixconversionset for prefixconversion and - \definenumberconverionset for numberconversion
but that’s overkill for the same thing and leads to redundant setting because section and prefix are the same thing.
Your \definecounter… synonyms is a good thing in the middle.
or maybe just \defineconversionset
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 Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
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: \makecounter{...} \countervalue{...} \pluscounter{...} \minuscounter{...} \resetcounter{...} \setcounter{…}{…} \savecounter{...} \restorecounter{…} 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? Wolfgang
On 29-3-2012 10:46, Wolfgang Schuster wrote:
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:
So will we drop the number ones then? (Making a beta now with the rename of the sets. We have to do this stepwise in order to be sure. I also have to adapt the test suite.) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 29.03.2012 um 11:30 schrieb Hans Hagen:
On 29-3-2012 10:46, Wolfgang Schuster wrote:
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:
So will we drop the number ones then?
This would only work when you also drop \makecounter because it won’t be usable anymore when \definenumber will be changed to \definecounter. Wolfgang
On 29-3-2012 18:38, Wolfgang Schuster wrote:
Am 29.03.2012 um 11:30 schrieb Hans Hagen:
On 29-3-2012 10:46, Wolfgang Schuster wrote:
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:
So will we drop the number ones then?
This would only work when you also drop \makecounter because it won’t be usable anymore when \definenumber will be changed to \definecounter.
Well, a direct consequence of removing all 'structure' from 'structurecounter' is indeed that we get \definecounter and therefore need to drop the ones in syst-aux (no big deal as they are only used a few times and nowadays we have more than enough \count's; we can always turn them into \definevaluecounter or so if needed). Anyhow, I already did a lot of editing so there's no going back now ... I'm making a beta that you can check in a while. In the process \currentstructurecounter has become \currentsectioncountervalue and some macros got value appended as well. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 29.03.2012 um 19:23 schrieb Hans Hagen:
On 29-3-2012 18:38, Wolfgang Schuster wrote:
Am 29.03.2012 um 11:30 schrieb Hans Hagen:
On 29-3-2012 10:46, Wolfgang Schuster wrote:
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:
So will we drop the number ones then?
This would only work when you also drop \makecounter because it won’t be usable anymore when \definenumber will be changed to \definecounter.
Well, a direct consequence of removing all 'structure' from 'structurecounter' is indeed that we get \definecounter and therefore need to drop the ones in syst-aux (no big deal as they are only used a few times and nowadays we have more than enough \count's; we can always turn them into \definevaluecounter or so if needed).
Anyhow, I already did a lot of editing so there's no going back now ... I'm making a beta that you can check in a while. In the process \currentstructurecounter has become \currentsectioncountervalue and some macros got value appended as well.
It looks good and I will update my modules to use the new names but what’s with the following helper functions, will you provide synonyms for them or should I use these names (the commands are too useful to not use them myself): - \strc_counters_register_component - \strc_counter_setup_using_parameter - \strc_counter_preset_using_parameter Wolfgang
On 29-3-2012 21:33, Wolfgang Schuster wrote:
It looks good and I will update my modules to use the new names but what’s with the following helper functions, will you provide synonyms for them or should I use these names (the commands are too useful to not use them myself):
- \strc_counters_register_component - \strc_counter_setup_using_parameter - \strc_counter_preset_using_parameter
these are quite low level and not meant for regular users Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Wolfgang Schuster