ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Kevin Kenan <kevin@kevinkenan.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Use a counter in a reference?
Date: Sun, 19 Apr 2020 05:39:00 -0700	[thread overview]
Message-ID: <5C29D2B7-65CE-4CE1-85A3-A74D407764A0@kevinkenan.com> (raw)
In-Reply-To: <272b0156-cd72-896f-1a11-a6db8b2f4c5b@uni-bonn.de>


[-- Attachment #1.1: Type: text/plain, Size: 1771 bytes --]

The label mechanism worked great.

Thanks!

-kk

> On Apr 13, 2020, at 1:20 PM, Thomas A. Schmitz <thomas.schmitz@uni-bonn.de> 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 <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 <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/>
> wiki     : http://contextgarden.net <http://contextgarden.net/>
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 16280 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

      reply	other threads:[~2020-04-19 12:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13 20:13 Kevin Kenan
2020-04-13 20:20 ` Thomas A. Schmitz
2020-04-19 12:39   ` Kevin Kenan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5C29D2B7-65CE-4CE1-85A3-A74D407764A0@kevinkenan.com \
    --to=kevin@kevinkenan.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).