Re: [NTG-context] Use a counter in a reference?

2020-04-19 Thread Kevin Kenan
The label mechanism worked great.

Thanks!

-kk

> On Apr 13, 2020, at 1:20 PM, Thomas A. Schmitz  
> wrote:
> 
> On 4/13/20 10:13 PM, Kevin Kenan wrote:
>> I have a need to tag elements in a text in a way that they are sequentially 
>> numbered and can have references to refer to them. Something like:
>> Here is some \tag[tagref]{\bf text} that is tagged.
>> .
>> .
>> .
>> Refer to tag \tagnumber[tagref] on page \at[tagref].
>> What is the best way to do this in ConTeXt? I’ve got a counter for tag 
>> number, but I’m not sure how to use \reference so that it uses my tag 
>> number. For instance:
>> \definecounter[myTagCounter]
>> .
>> .
>> .
>> \reference[tagref]{\rawcountervalue[myTagCounter]}
>> Doesn’t work. But perhaps I’m going about this incorrectly?
>> Thanks in advance!
> 
> Are you looking for this: https://wiki.contextgarden.net/Command/definelabel 
>  ?
> 
> HTH
> 
> 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://context.aanhet.net 
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> 
> wiki : http://contextgarden.net 
> ___

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Use a counter in a reference?

2020-04-13 Thread Thomas A. Schmitz

On 4/13/20 10:13 PM, Kevin Kenan wrote:

I have a need to tag elements in a text in a way that they are sequentially 
numbered and can have references to refer to them. Something like:


 Here is some \tag[tagref]{\bf text} that is tagged.
 .
 .
 .
 Refer to tag \tagnumber[tagref] on page \at[tagref].


What is the best way to do this in ConTeXt? I’ve got a counter for tag number, 
but I’m not sure how to use \reference so that it uses my tag number. For 
instance:


 \definecounter[myTagCounter]
 .
 .
 .
 \reference[tagref]{\rawcountervalue[myTagCounter]}


Doesn’t work. But perhaps I’m going about this incorrectly?

Thanks in advance!


Are you looking for this: 
https://wiki.contextgarden.net/Command/definelabel ?


HTH

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Use a counter in a reference?

2020-04-13 Thread Kevin Kenan
I have a need to tag elements in a text in a way that they are sequentially 
numbered and can have references to refer to them. Something like:


Here is some \tag[tagref]{\bf text} that is tagged.
.
.
.
Refer to tag \tagnumber[tagref] on page \at[tagref].


What is the best way to do this in ConTeXt? I’ve got a counter for tag number, 
but I’m not sure how to use \reference so that it uses my tag number. For 
instance:


\definecounter[myTagCounter]
.
.
.
\reference[tagref]{\rawcountervalue[myTagCounter]}


Doesn’t work. But perhaps I’m going about this incorrectly? 

Thanks in advance!
-kk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___