ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* why is \getnumber an undefined control sequence?
@ 2012-04-02 14:46 Thomas A. Schmitz
  2012-04-02 14:56 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas A. Schmitz @ 2012-04-02 14:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

what's wrong with this code?

\definenumber [testnumber] [way=bytext,prefix=no]

\starttext

\incrementnumber[testnumber]

A \getnumber[testnumber]

\stoptext

Works with older betas, craps out with latest.

Thomas
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why is \getnumber an undefined control sequence?
  2012-04-02 14:46 why is \getnumber an undefined control sequence? Thomas A. Schmitz
@ 2012-04-02 14:56 ` Hans Hagen
  2012-04-02 15:03   ` Thomas A. Schmitz
  2012-04-02 15:15   ` Wolfgang Schuster
  0 siblings, 2 replies; 7+ messages in thread
From: Hans Hagen @ 2012-04-02 14:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz

On 2-4-2012 16:46, Thomas A. Schmitz wrote:
> Hi all,
>
> what's wrong with this code?
>
> \definenumber [testnumber] [way=bytext,prefix=no]
>
> \starttext
>
> \incrementnumber[testnumber]
>
> A \getnumber[testnumber]
>
> \stoptext
>
> Works with older betas, craps out with latest.

they were already for a while synonyms ... recently all 
'structurecounter' names became 'counter' (the structure was a 
transition addition in order to have old and new code alongside)

in the process we got rid of the 'number' synonyms

so, just replace number by counter

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why is \getnumber an undefined control sequence?
  2012-04-02 14:56 ` Hans Hagen
@ 2012-04-02 15:03   ` Thomas A. Schmitz
  2012-04-02 15:15   ` Wolfgang Schuster
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas A. Schmitz @ 2012-04-02 15:03 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On 04/02/2012 04:56 PM, Hans Hagen wrote:
> they were already for a while synonyms ... recently all
> 'structurecounter' names became 'counter' (the structure was a
> transition addition in order to have old and new code alongside)
>
> in the process we got rid of the 'number' synonyms
>
> so, just replace number by counter

you mean, as in

\definecounter [testnumber] [way=bytext,prefix=no]

\starttext

\incrementcounter[testnumber]

A \getcounter[testnumber]

\stoptext

That gives

! Undefined control sequence.

...

l.9 A \getcounter
                  [testnumber]

Did you maybe miss a file when you uploaded?

Thomas
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why is \getnumber an undefined control sequence?
  2012-04-02 14:56 ` Hans Hagen
  2012-04-02 15:03   ` Thomas A. Schmitz
@ 2012-04-02 15:15   ` Wolfgang Schuster
  2012-04-02 15:20     ` Thomas A. Schmitz
  1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2012-04-02 15:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen, Thomas A. Schmitz


Am 02.04.2012 um 16:56 schrieb Hans Hagen:

> On 2-4-2012 16:46, Thomas A. Schmitz wrote:
>> Hi all,
>> 
>> what's wrong with this code?
>> 
>> \definenumber [testnumber] [way=bytext,prefix=no]
>> 
>> \starttext
>> 
>> \incrementnumber[testnumber]
>> 
>> A \getnumber[testnumber]
>> 
>> \stoptext
>> 
>> Works with older betas, craps out with latest.
> 
> they were already for a while synonyms ... recently all 'structurecounter' names became 'counter' (the structure was a transition addition in order to have old and new code alongside)
> 
> in the process we got rid of the 'number' synonyms
> 
> so, just replace number by counter

The problem are these two synonyms:

\let \getnumber             \getcounter       % [name]
\let \convertednumber       \getcounter       % [name]

There is a \convertedcounter but no \getcounter.

@Thomas: You can \rawcounter to print only the numeric value of the counter or \convertedcounter for a formatted form of the counter (you can apply a conversion, e.g. romannumerals or add a prefix, e.g. the current chapter or section number).

Wolfgang
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why is \getnumber an undefined control sequence?
  2012-04-02 15:15   ` Wolfgang Schuster
@ 2012-04-02 15:20     ` Thomas A. Schmitz
  2012-04-02 15:33       ` Hans Hagen
  2012-04-02 16:37       ` Wolfgang Schuster
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas A. Schmitz @ 2012-04-02 15:20 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users, Hans Hagen

On 04/02/2012 05:15 PM, Wolfgang Schuster wrote:
> The problem are these two synonyms:
>
> \let \getnumber             \getcounter       % [name]
> \let \convertednumber       \getcounter       % [name]
>
> There is a \convertedcounter but no \getcounter.
>
> @Thomas: You can \rawcounter to print only the numeric value of the counter or \convertedcounter for a formatted form of the counter (you can apply a conversion, e.g. romannumerals or add a prefix, e.g. the current chapter or section number).
>
> Wolfgang

Ah, thank you Wolfgang! \rawcounter is sufficient for me in my real-life 
case, but I assume you will want to add \getcounter? (And are the number 
synonyms here to stay, or will they be deleted?)

All best

Thomas
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why is \getnumber an undefined control sequence?
  2012-04-02 15:20     ` Thomas A. Schmitz
@ 2012-04-02 15:33       ` Hans Hagen
  2012-04-02 16:37       ` Wolfgang Schuster
  1 sibling, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2012-04-02 15:33 UTC (permalink / raw)
  To: Thomas A. Schmitz; +Cc: mailing list for ConTeXt users

On 2-4-2012 17:20, Thomas A. Schmitz wrote:
> On 04/02/2012 05:15 PM, Wolfgang Schuster wrote:
>> The problem are these two synonyms:
>>
>> \let \getnumber \getcounter % [name]
>> \let \convertednumber \getcounter % [name]
>>
>> There is a \convertedcounter but no \getcounter.
>>
>> @Thomas: You can \rawcounter to print only the numeric value of the
>> counter or \convertedcounter for a formatted form of the counter (you
>> can apply a conversion, e.g. romannumerals or add a prefix, e.g. the
>> current chapter or section number).
>>
>> Wolfgang
>
> Ah, thank you Wolfgang! \rawcounter is sufficient for me in my real-life
> case, but I assume you will want to add \getcounter? (And are the number
> synonyms here to stay, or will they be deleted?)

they might stay as they are in manuals but best start using the counter 
names (reason: a,b,c is counting but not numbering)

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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why is \getnumber an undefined control sequence?
  2012-04-02 15:20     ` Thomas A. Schmitz
  2012-04-02 15:33       ` Hans Hagen
@ 2012-04-02 16:37       ` Wolfgang Schuster
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2012-04-02 16:37 UTC (permalink / raw)
  To: Thomas A. Schmitz; +Cc: mailing list for ConTeXt users, Hans Hagen


Am 02.04.2012 um 17:20 schrieb Thomas A. Schmitz:

> On 04/02/2012 05:15 PM, Wolfgang Schuster wrote:
>> The problem are these two synonyms:
>> 
>> \let \getnumber             \getcounter       % [name]
>> \let \convertednumber       \getcounter       % [name]
>> 
>> There is a \convertedcounter but no \getcounter.
>> 
>> @Thomas: You can \rawcounter to print only the numeric value of the counter or \convertedcounter for a formatted form of the counter (you can apply a conversion, e.g. romannumerals or add a prefix, e.g. the current chapter or section number).
>> 
>> Wolfgang
> 
> Ah, thank you Wolfgang! \rawcounter is sufficient for me in my real-life case, but I assume you will want to add \getcounter? (And are the number synonyms here to stay, or will they be deleted?)

There is no need for a \getcounter command, you can fix it by making both synonyms for the \convertedcounter command.

\let\getnumber     \convertedcounter
\let\convertednumber\convertedcounter

Wolfgang
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-02 16:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-02 14:46 why is \getnumber an undefined control sequence? Thomas A. Schmitz
2012-04-02 14:56 ` Hans Hagen
2012-04-02 15:03   ` Thomas A. Schmitz
2012-04-02 15:15   ` Wolfgang Schuster
2012-04-02 15:20     ` Thomas A. Schmitz
2012-04-02 15:33       ` Hans Hagen
2012-04-02 16:37       ` Wolfgang Schuster

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).