From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110221 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Re: Display reference number as Roman number Date: Wed, 6 Jan 2021 18:46:02 -0500 Message-ID: References: <89ed5c3f-ec6c-1748-15b5-149c12cc5128@rik.users.panix.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5725995171403937921==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15689"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.6.0 To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 07 00:46:23 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxIVS-0003xm-9E for gctc-ntg-context-518@m.gmane-mx.org; Thu, 07 Jan 2021 00:46:22 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CDF3B1C1899; Thu, 7 Jan 2021 00:46:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QgfYyWsSY3Ts; Thu, 7 Jan 2021 00:46:08 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E203B1C1913; Thu, 7 Jan 2021 00:46:08 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 68B3B1C1899 for ; Thu, 7 Jan 2021 00:46:07 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vjpfA-JFxmIU for ; Thu, 7 Jan 2021 00:46:06 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=166.84.1.89; helo=mailbackend.panix.com; envelope-from=rik@panix.com; receiver= Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 8F9DE1C177A for ; Thu, 7 Jan 2021 00:46:06 +0100 (CET) Original-Received: from [192.168.0.13] (cpe-24-194-28-156.nycap.res.rr.com [24.194.28.156]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4DB5bc1G2xz1d9X for ; Wed, 6 Jan 2021 18:46:04 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=panix.com; s=panix; t=1609976764; bh=2XLqT0T1Q1eiF7vkbRJklUoVrcIDgWNPccK6JfkdoIw=; h=Subject:To:References:From:Date:In-Reply-To; b=T1qmbq7qSZzP2CM7hSLN5zH3K1WrUWMIdAy/Mnemvpon/bhd+tzOWhJo7gufRxWEB axJdTJDNGpNi94IBu46w2s/BdD8+Ca+nI2uuLFYgQOtQEDxdPrhs7p1w3cs4XNClCK E9Lh5j8TQosrG8WvJiNQAbCz1Efc2NN4rxpxOlfI= In-Reply-To: <89ed5c3f-ec6c-1748-15b5-149c12cc5128@rik.users.panix.com> Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:110221 Archived-At: This is a multi-part message in MIME format. --===============5725995171403937921== Content-Type: multipart/alternative; boundary="------------17D38352DF3A34C8A80EF3EF" Content-Language: en-US This is a multi-part message in MIME format. --------------17D38352DF3A34C8A80EF3EF Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------17D38352DF3A34C8A80EF3EF Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit 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

--------------17D38352DF3A34C8A80EF3EF-- --===============5725995171403937921== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============5725995171403937921==--