* [NTG-context] month form \currentdate in Roman numerals
@ 2024-12-06 11:35 Pablo Rodriguez via ntg-context
2024-12-06 14:39 ` [NTG-context] " Wolfgang Schuster
0 siblings, 1 reply; 11+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-12-06 11:35 UTC (permalink / raw)
To: ConTeXt users; +Cc: Pablo Rodriguez
Dear list,
I would like to get the current month in Roman numerals (just now, it
would be XII for December).
The best I get is:
\currentdate[\cldcontext{converters['R']
(tonumber(os.date("\letterpercent m", os.date(os.time()))))}]
This strikes me as too complex (even for someone who cannot code).
Is there now simpler way to write that?
Just in case it may be relevant, this is part of the full day reference.
Many thanks for your help,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2024-12-06 11:35 [NTG-context] month form \currentdate in Roman numerals Pablo Rodriguez via ntg-context
@ 2024-12-06 14:39 ` Wolfgang Schuster
2024-12-07 12:06 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2024-12-06 14:39 UTC (permalink / raw)
To: mailing list for ConTeXt users, Pablo Rodriguez via ntg-context
Cc: Pablo Rodriguez
Pablo Rodriguez via ntg-context schrieb am 06.12.2024 um 12:35:
> Dear list,
>
> I would like to get the current month in Roman numerals (just now, it
> would be XII for December).
>
> The best I get is:
>
> \currentdate[\cldcontext{converters['R']
> (tonumber(os.date("\letterpercent m", os.date(os.time()))))}]
>
> This strikes me as too complex (even for someone who cannot code).
>
> Is there now simpler way to write that?
The \date (and \currentdate) command supports number conversion for the
day and year values but not the month.
\starttext
\currentdate[d:R,space,space,y:R]
\stoptext
The simplest method is to use \convertnumber in combination with
\normalmonth etc. which holds the value for the current month etc.
\starttext
\convertnumber{R}{\normalday }\textslash
\convertnumber{R}{\normalmonth}\textslash
\convertnumber{R}{\normalyear }
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2024-12-06 14:39 ` [NTG-context] " Wolfgang Schuster
@ 2024-12-07 12:06 ` Pablo Rodriguez via ntg-context
2025-02-20 18:53 ` Mohammad Hossein Bateni
0 siblings, 1 reply; 11+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-12-07 12:06 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 12/6/24 15:39, Wolfgang Schuster wrote:
> [...]
> The \date (and \currentdate) command supports number conversion for the
> day and year values but not the month.
>
> \starttext
> \currentdate[d:R,space,space,y:R]
> \stoptext
Many thanks for your fast reply, Wolfgang.
I didn’t even know that there were such short invocations for number
conversions in \currentdate.
> The simplest method is to use \convertnumber in combination with
> \normalmonth etc. which holds the value for the current month etc.
>
> \starttext
> \convertnumber{R}{\normalday }\textslash
> \convertnumber{R}{\normalmonth}\textslash
> \convertnumber{R}{\normalyear }
> \stoptext
First time I see these commands. Good to know them.
Many thanks for your help,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2024-12-07 12:06 ` Pablo Rodriguez via ntg-context
@ 2025-02-20 18:53 ` Mohammad Hossein Bateni
2025-02-21 17:11 ` Wolfgang Schuster
0 siblings, 1 reply; 11+ messages in thread
From: Mohammad Hossein Bateni @ 2025-02-20 18:53 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Pablo Rodriguez
[-- Attachment #1.1: Type: text/plain, Size: 1702 bytes --]
Any thoughts why the following doesn't work?
\currentdate[d:persiannumerals]
It just outputs the normal digits.
In contrast, these work:
\currentdate[d:abjadnumerals]
\convertnumber{persiannumerals}{\normalday}
On Sat, Dec 7, 2024, 7:11 AM Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> wrote:
> On 12/6/24 15:39, Wolfgang Schuster wrote:
> > [...]
> > The \date (and \currentdate) command supports number conversion for the
> > day and year values but not the month.
> >
> > \starttext
> > \currentdate[d:R,space,space,y:R]
> > \stoptext
>
> Many thanks for your fast reply, Wolfgang.
>
> I didn’t even know that there were such short invocations for number
> conversions in \currentdate.
>
> > The simplest method is to use \convertnumber in combination with
> > \normalmonth etc. which holds the value for the current month etc.
> >
> > \starttext
> > \convertnumber{R}{\normalday }\textslash
> > \convertnumber{R}{\normalmonth}\textslash
> > \convertnumber{R}{\normalyear }
> > \stoptext
>
> First time I see these commands. Good to know them.
>
> Many thanks for your help,
>
> Pablo
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 2888 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2025-02-20 18:53 ` Mohammad Hossein Bateni
@ 2025-02-21 17:11 ` Wolfgang Schuster
2025-02-27 11:30 ` Mohammad Hossein Bateni
0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2025-02-21 17:11 UTC (permalink / raw)
To: ntg-context
Am 20.02.2025 um 19:53 schrieb Mohammad Hossein Bateni:
> Any thoughts why the following doesn't work?
>
> \currentdate[d:persiannumerals]
>
> It just outputs the normal digits.
>
> In contrast, these work:
>
> \currentdate[d:abjadnumerals]
> \convertnumber{persiannumerals}{\normalday}
persiannumerals aren't considered a conversion method for the underlying
Lua mechanism while there exists a method for \convertnumber on the TeX
side.
Both system are separate (to a certain degree) but the TeX side borrows
the conversion vectors from the Lua mechanism.
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2025-02-21 17:11 ` Wolfgang Schuster
@ 2025-02-27 11:30 ` Mohammad Hossein Bateni
2025-02-28 22:28 ` Mohammad Hossein Bateni
0 siblings, 1 reply; 11+ messages in thread
From: Mohammad Hossein Bateni @ 2025-02-27 11:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2773 bytes --]
For Jalali dates and Persian numbering, I can get the following to work:
\persiandecimals{\rawdate[jalali:to,d]}/\persiandecimals{\rawdate[jalali:to,M]}/\persiandecimals{\rawdate[jalali:to,y]}
but the following does not work and throws an error:
\persiandecimals{\currentdate[jalali:to,d]}
If I want to get the output for different date, option 1 below works and
option 2 does not.
---------
% option 1
\persiandecimals{\begingroup\setdate[m=5]\rawdate[jalali:to,y]\endgroup}
% option 2
{\begingroup\setdate[m=5]\persiandecimals{\rawdate[jalali:to,y]}\endgroup}
----------
does \setdate expand to something non-empty?
note that with the above ideas, we cannot get "mm" with leading zeros to
work because
\persiandecimals drops the leading zero. the following ugly hack works if I
insist on using
\currentdate to format the output and I want Indic digits.
--------
\startluacode
function persmap(s)
local stream = tostring(s)
local mapping = languages.decimals.persian
local gsub = string.gsub
return mapping and gsub(stream, ".", mapping) or stream
end
\stopluacode
\def\persmap#1{\ctxlua{context(persmap("#1"))}}
\def\mycurrentdate[#1]{\persmap{\rawdate[#1]}}
\mycurrentdate[jalali:to,dd,/,mm,/,y]
--------
even with \mainlanguage[fa] and \language[fa] I don't get the month names
translated to persian labels. why?
------
\mainlanguage[fa]
\language[fa]
\starttext
\currentdate[month:jalali]
\stoptext
-----
On Fri, Feb 21, 2025 at 12:13 PM Wolfgang Schuster <
wolfgang.schuster.lists@gmail.com> wrote:
> Am 20.02.2025 um 19:53 schrieb Mohammad Hossein Bateni:
> > Any thoughts why the following doesn't work?
> >
> > \currentdate[d:persiannumerals]
> >
> > It just outputs the normal digits.
> >
> > In contrast, these work:
> >
> > \currentdate[d:abjadnumerals]
> > \convertnumber{persiannumerals}{\normalday}
>
> persiannumerals aren't considered a conversion method for the underlying
> Lua mechanism while there exists a method for \convertnumber on the TeX
> side.
>
> Both system are separate (to a certain degree) but the TeX side borrows
> the conversion vectors from the Lua mechanism.
>
> Wolfgang
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 4113 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2025-02-27 11:30 ` Mohammad Hossein Bateni
@ 2025-02-28 22:28 ` Mohammad Hossein Bateni
2025-02-28 22:30 ` Mohammad Hossein Bateni
2025-03-02 12:59 ` Hans Hagen via ntg-context
0 siblings, 2 replies; 11+ messages in thread
From: Mohammad Hossein Bateni @ 2025-02-28 22:28 UTC (permalink / raw)
To: mailing list for ConTeXt users, Wolfgang Schuster
[-- Attachment #1.1: Type: text/plain, Size: 3675 bytes --]
the following outputs "farsi" instead of "fa". is this the reason the
translation of jalali month does not kick in?
------
\mainlanguage[fa]
\currentlanguage
------
strangely either of the following two lines changes the month name.
------
\setuplabeltext[en][february:jalali=test]
\setuplabeltext[fa][february:jalali=test]
\currentlanguage[month:jalali]
------
I'm confused. why isn't the data in lang-txt.lua used?
strangely, the following outputs the correct translation of second jalali
month in farsi regardless of the above \setuplabeltext commands:
----
\ctxlua{context(languages.data.labels.texts['february:jalali'].labels.fa)}
----
On Thu, Feb 27, 2025 at 6:30 AM Mohammad Hossein Bateni <bateni@gmail.com>
wrote:
> For Jalali dates and Persian numbering, I can get the following to work:
>
>
> \persiandecimals{\rawdate[jalali:to,d]}/\persiandecimals{\rawdate[jalali:to,M]}/\persiandecimals{\rawdate[jalali:to,y]}
>
> but the following does not work and throws an error:
>
> \persiandecimals{\currentdate[jalali:to,d]}
>
> If I want to get the output for different date, option 2 below works and
> option 1 does not.
>
> ---------
> % option 1
> \persiandecimals{\begingroup\setdate[m=5]\rawdate[jalali:to,y]\endgroup}
> % option 2
> {\begingroup\setdate[m=5]\persiandecimals{\rawdate[jalali:to,y]}\endgroup}
> ----------
>
> does \setdate expand to something non-empty?
>
> note that with the above ideas, we cannot get "mm" with leading zeros to
> work because
> \persiandecimals drops the leading zero. the following ugly hack works if
> I insist on using
> \currentdate to format the output and I want Indic digits.
>
> --------
> \startluacode
> function persmap(s)
> local stream = tostring(s)
> local mapping = languages.decimals.persian
> local gsub = string.gsub
> return mapping and gsub(stream, ".", mapping) or stream
> end
> \stopluacode
>
> \def\persmap#1{\ctxlua{context(persmap("#1"))}}
> \def\mycurrentdate[#1]{\persmap{\rawdate[#1]}}
> \mycurrentdate[jalali:to,dd,/,mm,/,y]
> --------
>
> even with \mainlanguage[fa] and \language[fa] I don't get the month names
> translated to persian labels. why?
>
> ------
> \mainlanguage[fa]
> \language[fa]
> \starttext
> \currentdate[month:jalali]
> \stoptext
> -----
>
>
>
> On Fri, Feb 21, 2025 at 12:13 PM Wolfgang Schuster <
> wolfgang.schuster.lists@gmail.com> wrote:
>
>> Am 20.02.2025 um 19:53 schrieb Mohammad Hossein Bateni:
>> > Any thoughts why the following doesn't work?
>> >
>> > \currentdate[d:persiannumerals]
>> >
>> > It just outputs the normal digits.
>> >
>> > In contrast, these work:
>> >
>> > \currentdate[d:abjadnumerals]
>> > \convertnumber{persiannumerals}{\normalday}
>>
>> persiannumerals aren't considered a conversion method for the underlying
>> Lua mechanism while there exists a method for \convertnumber on the TeX
>> side.
>>
>> Both system are separate (to a certain degree) but the TeX side borrows
>> the conversion vectors from the Lua mechanism.
>>
>> Wolfgang
>>
>>
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage : https://www.pragma-ade.nl / https://context.aanhet.net
>> (mirror)
>> archive : https://github.com/contextgarden/context
>> wiki : https://wiki.contextgarden.net
>>
>> ___________________________________________________________________________________
>>
>
[-- Attachment #1.2: Type: text/html, Size: 5429 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2025-02-28 22:28 ` Mohammad Hossein Bateni
@ 2025-02-28 22:30 ` Mohammad Hossein Bateni
2025-03-02 12:47 ` Hans Hagen via ntg-context
2025-03-02 12:59 ` Hans Hagen via ntg-context
1 sibling, 1 reply; 11+ messages in thread
From: Mohammad Hossein Bateni @ 2025-02-28 22:30 UTC (permalink / raw)
To: mailing list for ConTeXt users, Wolfgang Schuster
[-- Attachment #1.1: Type: text/plain, Size: 4057 bytes --]
BTW why doesn't \setuplabeltext exist in the mtx-server-ctx-help? It does
exist in setup-en.pdf and shows that it is an instance of \setupLABELtext.
On Fri, Feb 28, 2025 at 5:28 PM Mohammad Hossein Bateni <bateni@gmail.com>
wrote:
> the following outputs "farsi" instead of "fa". is this the reason the
> translation of jalali month does not kick in?
>
> ------
> \mainlanguage[fa]
> \currentlanguage
> ------
>
> strangely either of the following two lines changes the month name.
>
> ------
> \setuplabeltext[en][february:jalali=test]
> \setuplabeltext[fa][february:jalali=test]
> \currentlanguage[month:jalali]
> ------
>
> I'm confused. why isn't the data in lang-txt.lua used?
> strangely, the following outputs the correct translation of second jalali
> month in farsi regardless of the above \setuplabeltext commands:
>
> ----
> \ctxlua{context(languages.data.labels.texts['february:jalali'].labels.fa)}
> ----
>
> On Thu, Feb 27, 2025 at 6:30 AM Mohammad Hossein Bateni <bateni@gmail.com>
> wrote:
>
>> For Jalali dates and Persian numbering, I can get the following to work:
>>
>>
>> \persiandecimals{\rawdate[jalali:to,d]}/\persiandecimals{\rawdate[jalali:to,M]}/\persiandecimals{\rawdate[jalali:to,y]}
>>
>> but the following does not work and throws an error:
>>
>> \persiandecimals{\currentdate[jalali:to,d]}
>>
>> If I want to get the output for different date, option 2 below works and
>> option 1 does not.
>>
>> ---------
>> % option 1
>> \persiandecimals{\begingroup\setdate[m=5]\rawdate[jalali:to,y]\endgroup}
>> % option 2
>> {\begingroup\setdate[m=5]\persiandecimals{\rawdate[jalali:to,y]}\endgroup}
>> ----------
>>
>> does \setdate expand to something non-empty?
>>
>> note that with the above ideas, we cannot get "mm" with leading zeros to
>> work because
>> \persiandecimals drops the leading zero. the following ugly hack works if
>> I insist on using
>> \currentdate to format the output and I want Indic digits.
>>
>> --------
>> \startluacode
>> function persmap(s)
>> local stream = tostring(s)
>> local mapping = languages.decimals.persian
>> local gsub = string.gsub
>> return mapping and gsub(stream, ".", mapping) or stream
>> end
>> \stopluacode
>>
>> \def\persmap#1{\ctxlua{context(persmap("#1"))}}
>> \def\mycurrentdate[#1]{\persmap{\rawdate[#1]}}
>> \mycurrentdate[jalali:to,dd,/,mm,/,y]
>> --------
>>
>> even with \mainlanguage[fa] and \language[fa] I don't get the month names
>> translated to persian labels. why?
>>
>> ------
>> \mainlanguage[fa]
>> \language[fa]
>> \starttext
>> \currentdate[month:jalali]
>> \stoptext
>> -----
>>
>>
>>
>> On Fri, Feb 21, 2025 at 12:13 PM Wolfgang Schuster <
>> wolfgang.schuster.lists@gmail.com> wrote:
>>
>>> Am 20.02.2025 um 19:53 schrieb Mohammad Hossein Bateni:
>>> > Any thoughts why the following doesn't work?
>>> >
>>> > \currentdate[d:persiannumerals]
>>> >
>>> > It just outputs the normal digits.
>>> >
>>> > In contrast, these work:
>>> >
>>> > \currentdate[d:abjadnumerals]
>>> > \convertnumber{persiannumerals}{\normalday}
>>>
>>> persiannumerals aren't considered a conversion method for the underlying
>>> Lua mechanism while there exists a method for \convertnumber on the TeX
>>> side.
>>>
>>> Both system are separate (to a certain degree) but the TeX side borrows
>>> the conversion vectors from the Lua mechanism.
>>>
>>> Wolfgang
>>>
>>>
>>> ___________________________________________________________________________________
>>> If your question is of interest to others as well, please add an entry
>>> to the Wiki!
>>>
>>> maillist : ntg-context@ntg.nl /
>>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>>> webpage : https://www.pragma-ade.nl / https://context.aanhet.net
>>> (mirror)
>>> archive : https://github.com/contextgarden/context
>>> wiki : https://wiki.contextgarden.net
>>>
>>> ___________________________________________________________________________________
>>>
>>
[-- Attachment #1.2: Type: text/html, Size: 5961 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2025-02-28 22:30 ` Mohammad Hossein Bateni
@ 2025-03-02 12:47 ` Hans Hagen via ntg-context
0 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen via ntg-context @ 2025-03-02 12:47 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
On 2/28/2025 11:30 PM, Mohammad Hossein Bateni wrote:
> BTW why doesn't \setuplabeltext exist in the mtx-server-ctx-help? It
> does exist in setup-en.pdf and shows that it is an instance of
> \setupLABELtext.
because it's a 'defined command' ... i could probably add it but it's
not like there has been much demand for it
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2025-02-28 22:28 ` Mohammad Hossein Bateni
2025-02-28 22:30 ` Mohammad Hossein Bateni
@ 2025-03-02 12:59 ` Hans Hagen via ntg-context
2025-03-03 2:11 ` Mohammad Hossein Bateni
1 sibling, 1 reply; 11+ messages in thread
From: Hans Hagen via ntg-context @ 2025-03-02 12:59 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
On 2/28/2025 11:28 PM, Mohammad Hossein Bateni wrote:
> the following outputs "farsi" instead of "fa". is this the reason the
> translation of jalali month does not kick in?
We have these short and long names, and originally only had short ones,
for efficiency reasons (like memory limitations in tex engines). At some
point some showt nakes also started clashing, like \it : italian and
italic.
One can best use the long ones, while te shirt ones are used e.g. in lua
data tables (easier). Teh fact that ther eis \fa is sort of 'good luck'
because if we'd add a language today we don't define the short ones as
command any longer (we keep the existing ones for compatibility).
If you want to add a language (parent of child) you need to check that
with Tomas Hala first because it has to into his label managagement
project (with international students).
When conversions are added, Wolfgang needs to agree with it. When okay
it then can also be added to the interface (setups) specification.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* [NTG-context] Re: month form \currentdate in Roman numerals
2025-03-02 12:59 ` Hans Hagen via ntg-context
@ 2025-03-03 2:11 ` Mohammad Hossein Bateni
0 siblings, 0 replies; 11+ messages in thread
From: Mohammad Hossein Bateni @ 2025-03-03 2:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2473 bytes --]
On Sun, Mar 2, 2025, 8:00 AM Hans Hagen via ntg-context <ntg-context@ntg.nl>
wrote:
> On 2/28/2025 11:28 PM, Mohammad Hossein Bateni wrote:
> > the following outputs "farsi" instead of "fa". is this the reason the
> > translation of jalali month does not kick in?
>
> We have these short and long names, and originally only had short ones,
> for efficiency reasons (like memory limitations in tex engines). At some
> point some showt nakes also started clashing, like \it : italian and
> italic.
>
> One can best use the long ones, while te shirt ones are used e.g. in lua
> data tables (easier). Teh fact that ther eis \fa is sort of 'good luck'
> because if we'd add a language today we don't define the short ones as
> command any longer (we keep the existing ones for compatibility).
>
This make sense.
My point is not why the language shows up as farsi.
The problem is that the labels in the lua table are for 'fa'.
So farsi or fa language doesn't pick them up.
See my example in previous emails (even for figure captions).
What's the solution?
To add a key to install language to say what short form should be used on
lua side?
Or to rewrite the lua table to use farsi as key not fa?
>
> If you want to add a language (parent of child) you need to check that
> with Tomas Hala first because it has to into his label managagement
> project (with international students).
>
> When conversions are added, Wolfgang needs to agree with it. When okay
> it then can also be added to the interface (setups) specification.
>
> Hans
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 4045 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-03-03 2:12 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-06 11:35 [NTG-context] month form \currentdate in Roman numerals Pablo Rodriguez via ntg-context
2024-12-06 14:39 ` [NTG-context] " Wolfgang Schuster
2024-12-07 12:06 ` Pablo Rodriguez via ntg-context
2025-02-20 18:53 ` Mohammad Hossein Bateni
2025-02-21 17:11 ` Wolfgang Schuster
2025-02-27 11:30 ` Mohammad Hossein Bateni
2025-02-28 22:28 ` Mohammad Hossein Bateni
2025-02-28 22:30 ` Mohammad Hossein Bateni
2025-03-02 12:47 ` Hans Hagen via ntg-context
2025-03-02 12:59 ` Hans Hagen via ntg-context
2025-03-03 2:11 ` Mohammad Hossein Bateni
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).