From: Rik Kabel <rik@panix.com>
To: ntg-context@ntg.nl
Subject: Re: Display reference number as Roman number
Date: Wed, 6 Jan 2021 18:46:02 -0500 [thread overview]
Message-ID: <cd62698f-daeb-cbbf-465c-cd38e101b993@panix.com> (raw)
In-Reply-To: <89ed5c3f-ec6c-1748-15b5-149c12cc5128@rik.users.panix.com>
[-- Attachment #1.1: Type: text/plain, Size: 1132 bytes --]
On 11/24/2020 22:09, Rik Kabel wrote:
>
> Hello all,
>
> What I thought should be a simple conversion escapes me.
>
> I have a reference (created originally via a label defined by
> \definelabel) that, when referenced as \in[label] or
> \ref[number][label] displays a number, and that is how I normally use
> it. However, I want to display it in one instance as a Roman numeral.
> \Romannumerals{\in[label]} complains that it is not being fed a number.
>
> How can I display the label number in Roman number format in this one
> instance?
>
> --
> Rik
>
Okay, I have something that works. Perhaps not optimally, but it is
functional.
\definelabel[Qa]
\definecounter[SAVE][numberconversion=R]
\starttext
This is labeled.\Qa\par
This is labeled.\Qa[REF]\par
\setcounter[SAVE][{\rawcountervalue[Qa]}]
See \in[REF].\par
See \ref[number][REF].\par
See \in[REF].\par
This is labeled.\Qa\par
See \convertedcounter[SAVE].\par
\stoptext
If you can improve it, please do. A solution that lets me use the label
name (Qa here) and convert the associated number would be nice.
--
Rik
[-- Attachment #1.2: Type: text/html, Size: 1949 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
___________________________________________________________________________________
prev parent reply other threads:[~2021-01-06 23:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 3:09 Rik Kabel
2021-01-06 23:46 ` Rik Kabel [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=cd62698f-daeb-cbbf-465c-cd38e101b993@panix.com \
--to=rik@panix.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).