* Display reference number as Roman number
@ 2020-11-25 3:09 Rik Kabel
2021-01-06 23:46 ` Rik Kabel
0 siblings, 1 reply; 2+ messages in thread
From: Rik Kabel @ 2020-11-25 3:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 501 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 750 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Display reference number as Roman number
2020-11-25 3:09 Display reference number as Roman number Rik Kabel
@ 2021-01-06 23:46 ` Rik Kabel
0 siblings, 0 replies; 2+ messages in thread
From: Rik Kabel @ 2021-01-06 23:46 UTC (permalink / raw)
To: ntg-context
[-- 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-06 23:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 3:09 Display reference number as Roman number Rik Kabel
2021-01-06 23:46 ` Rik Kabel
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).