From: Kevin Kenan <kevin@kevinkenan.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Use a counter in a reference?
Date: Mon, 13 Apr 2020 13:13:39 -0700 [thread overview]
Message-ID: <6EB3A951-CA7A-4BED-8ECC-119E640EF440@kevinkenan.com> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2020-04-13 20:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 20:13 Kevin Kenan [this message]
2020-04-13 20:20 ` Thomas A. Schmitz
2020-04-19 12:39 ` Kevin Kenan
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=6EB3A951-CA7A-4BED-8ECC-119E640EF440@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).