From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/114186 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: musa furber via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Changed behavior from \convertnumber{arabicdecimals}{..} as a textcommand for note Date: Mon, 17 Jan 2022 13:33:38 +0800 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8771328489832160390==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36915"; mail-complaints-to="usenet@ciao.gmane.io" Cc: musa furber To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 17 06:34:40 2022 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 1n9Kf4-00096v-6x for gctc-ntg-context-518@m.gmane-mx.org; Mon, 17 Jan 2022 06:34:34 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D88872813EC; Mon, 17 Jan 2022 06:33:56 +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 HM1tbJ56Lf04; Mon, 17 Jan 2022 06:33:55 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 82C11282D91; Mon, 17 Jan 2022 06:33:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 75468282D91 for ; Mon, 17 Jan 2022 06:33:53 +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 TjHneQkPtWhD for ; Mon, 17 Jan 2022 06:33:52 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.160.169; helo=mail-qt1-f169.google.com; envelope-from=musafurber@gmail.com; receiver= Original-Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 20B4A2813EC for ; Mon, 17 Jan 2022 06:33:52 +0100 (CET) Original-Received: by mail-qt1-f169.google.com with SMTP id v7so18195152qtw.13 for ; Sun, 16 Jan 2022 21:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=15HXIpITjAYITXrBFt//71GttmLtiv5UgkvbjYnbiSM=; b=jYAUqp1i1R1Pzj4euM89QqGk7H6NJr+iGbdsQaJtWJNIWi7HfqqoLBYaFBNj7E3BT1 q+FElVrhm4RIprtPiSkYtJdKqkO5HAGkviUmSZqCtHAPIw7CGaz6+5DdmH5g5/G0ssxm y8ptveckXfksHaZPoy1nkGBlMLzuj799e3T7Osxsfhkq31pPBH/cNRpPHpevPfImFgxO zYHx6NCrDxdJvMippGSTmaaE4y4d+g/DyjpHUgWpFr/idoDZVFgZ4lOEMsTV/CH+M2U9 XwJPb/R8Fol+whKC53FH/PklwGyWuxIJr5WPvPbu4qlK6EdI9FmVauba6nNRZZQvgUes Aprw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=15HXIpITjAYITXrBFt//71GttmLtiv5UgkvbjYnbiSM=; b=XJ4qug6wwzr5FmUmqXEQQ9nuz5Nzm3WuTM3pIOpv52cw9+qhfDrBd6FGXOiKgQiH+U XS5HOzGG/FtKtfD8O5HO1IbAZKHnPzgjNAxVP8Fb+dfgGzGA7wKxvvW9N3G4ftO+fWt6 xiP6PP/67nwz30uQ2m4N0zv8IVSncNAfu2ALcUQCU52qrBi5WVkwGr0g3eigSq4yOhKO yb6u828RewKRW9LVVFOJAFJnIVe8rOVL61OQ/pXyCB/42DfKtrxuvG9g5RIK+wqYbw68 +uh+VF58QPyhor75sItr9gd0q/ARSUr+SziLZvw4tMz5GQ1svW9syuF2RQSLTRDK8H+y WGYw== X-Gm-Message-State: AOAM531Lgopok/EeoMtB0apEtepkEnff69i0Vny8NIIlCqWYpMsi8K5J dwNp0gs9Ixyy345gciKxpSrAY6J6UXNY9MUxH2FJ+6+o3uYOyQ== X-Google-Smtp-Source: ABdhPJwynzVKTnetYK8J289dxWtqXKkGJXKOeG+tGtheU641AwcBoIg+4GyYGoGTVddvd8E7q2+VSvMtiD2IY9FrK74= X-Received: by 2002:ac8:5dcf:: with SMTP id e15mr2560826qtx.229.1642397630077; Sun, 16 Jan 2022 21:33:50 -0800 (PST) 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:114186 Archived-At: --===============8771328489832160390== Content-Type: multipart/alternative; boundary="0000000000005220e505d5c07fe0" --0000000000005220e505d5c07fe0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Hans, Thank you for your reply. Here is the missing MWE. (I will also try to attach it.) % mwe % document is an English translation of Arabic text; all annotations are in English. % % concerning footnotes to Arabic text: % numbers in body should use Mashriki numbers (e.g. =D9=A0=D9=A1=D9=A2=D9= =A3=D9=A4=D9=A5=D9=A6=D9=A7=D9=A8=D9=A9), and appear between parenthesis % numbers in footer should use Arabic numbers (e.g. 0123456789), and without parenthesis % % MWE uses dejavu for English and Amiri for and Arabic. Amiri is availble at https://www.amirifont.org/ \mainlanguage[en-gb] \setupdirections[bidi=3Dglobal,method=3Done] \starttypescriptcollection [amiri] \starttypescript [serif] [amiri] \definefontsynonym [Serif] [file:Amiri-Regular.ttf] [features=3Darabic] \stoptypescript \starttypescript [amiri] \definetypeface [amiri] [rm] [serif] [amiri] [default] [fallbacks=3Dlatin-fallback] \stoptypescript \stoptypescriptcollection \define\setarabic{ \setupalign[r2l] \righttoleft \switchtobodyfont[amiri] } \define\setlatin{ \setupalign[l2r] \lefttoright \switchtobodyfont[dejavu] } \setupnotes[footnote][] \setupnotes[arfootnote][] \definenote[arfootnote][footnote] \setupnotation [arfootnote] [before=3D\setlatin, alternative=3Dtext, ] \setupnote [arfootnote] [headstyle=3D{\switchtobodyfont[amiri]}, textcommand=3D\footnotenotenumbercommand, alternative=3Dtext, ] \protected\def\footnotenotenumbercommand#1{{\high{({\convertnumber{arabicde= cimals}{#1}})}}} % unexpected results % \protected\def\footnotenotenumbercommand#1{{\high{({\convertnumber{abjadnum= erals}{#1}})}}} % \protected\def\footnotenotenumbercommand#1{{\high{({\convertnumber{default}= {#1}})}}} % % `\detokenize' variations, for comparison... % % \protected\def\footnotenotenumbercommand#1{{\high{(\detokenize{\convertnumb= er{arabicdecimals}{#1}})}}} % \protected\def\footnotenotenumbercommand#1{{\high{(\detokenize{\convertnumb= er{abjadnumerals}{#1}})}}} % \protected\def\footnotenotenumbercommand#1{{\high{(\detokenize{\convertnumb= er{default}{#1}})}}} \setupbodyfont[dejavu,11pt] \starttext \setarabic =D9=85=D8=B1=D8=AD=D8=A8=D9=8B=D8=A7\arfootnote{Annotation text.} % expecte= d footnote `(=D9=A1)`, got `1arabic` =D9=85=D8=B1=D8=AD=D8=A8=D9=8B=D8=A7\arfootnote{Annotation text.} % expecte= d footnote `(=D9=A2)`, got `2arabic` \stoptext %%% end of mwe Thanks, Musa --0000000000005220e505d5c07fe0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear Hans,

Thank you for you= r reply.

Here is the missing MWE. (I will also try= to attach it.)

% mwe
% document is an English t= ranslation of Arabic text; all annotations are in English.
%
% concer= ning footnotes to Arabic text:
% =C2=A0 numbers in body should use Mashr= iki numbers (e.g. =D9=A0=D9=A1=D9=A2=D9=A3=D9=A4=D9=A5=D9=A6=D9=A7=D9=A8=D9= =A9), and appear between parenthesis
% =C2=A0 numbers in footer should u= se Arabic numbers (e.g. 0123456789), and without parenthesis
%
% MWE = uses dejavu for English and Amiri for and Arabic. Amiri is availble at https://www.amirifont.= org/

\mainlanguage[en-gb]

\setupdirections[bidi=3Dglobal,= method=3Done]

\starttypescriptcollection [amiri]

=C2=A0 =C2= =A0 \starttypescript [serif] [amiri]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \define= fontsynonym [Serif] [file:Amiri-Regular.ttf] [features=3Darabic]
=C2=A0 = =C2=A0 \stoptypescript

=C2=A0 =C2=A0 \starttypescript [amiri]
=C2= =A0 =C2=A0 =C2=A0 =C2=A0\definetypeface [amiri] [rm] [serif] [amiri] [defau= lt] [fallbacks=3Dlatin-fallback]
=C2=A0 =C2=A0 \stoptypescript

\s= toptypescriptcollection

\define\setarabic{
=C2=A0 \setupalign[r2l= ] \righttoleft \switchtobodyfont[amiri]
}

\define\setlatin{
= =C2=A0 \setupalign[l2r] \lefttoright \switchtobodyfont[dejavu]
}

=
\setupnotes[footnote][]
\setupnotes[arfootnote][]

\definenote= [arfootnote][footnote]
\setupnotation
=C2=A0 =C2=A0 [arfootnote]
= =C2=A0 =C2=A0 [before=3D\setlatin,
=C2=A0 =C2=A0 =C2=A0alternative=3Dtex= t,
=C2=A0 =C2=A0 ]

\setupnote
=C2=A0 =C2=A0 [arfootnote]
= =C2=A0 =C2=A0 [headstyle=3D{\switchtobodyfont[amiri]},
=C2=A0 =C2=A0 =C2= =A0textcommand=3D\footnotenotenumbercommand,
=C2=A0 =C2=A0 =C2=A0alterna= tive=3Dtext,
=C2=A0 =C2=A0 =C2=A0]

\protected\def\footnotenotenum= bercommand#1{{\high{({\convertnumber{arabicdecimals}{#1}})}}} % unexpected = results
% \protected\def\footnotenotenumbercommand#1{{\high{({\convertnu= mber{abjadnumerals}{#1}})}}}
% \protected\def\footnotenotenumbercommand#= 1{{\high{({\convertnumber{default}{#1}})}}}
%
% `\detokenize' var= iations, for comparison...
%
% \protected\def\footnotenotenumbercomm= and#1{{\high{(\detokenize{\convertnumber{arabicdecimals}{#1}})}}}
% \pro= tected\def\footnotenotenumbercommand#1{{\high{(\detokenize{\convertnumber{a= bjadnumerals}{#1}})}}}
% \protected\def\footnotenotenumbercommand#1{{\hi= gh{(\detokenize{\convertnumber{default}{#1}})}}}

\setupbodyfont[deja= vu,11pt]

\starttext
\setarabic

=D9=85=D8=B1=D8=AD=D8=A8=D9= =8B=D8=A7\arfootnote{Annotation text.} % expected footnote `(=D9=A1)`, got = `1arabic`

=D9=85=D8=B1=D8=AD=D8=A8=D9=8B=D8=A7\arfootnote{Annotation= text.} % expected footnote `(=D9=A2)`, got `2arabic`


\stoptext<= br>
%%% end of mwe

Thanks,
Musa
--0000000000005220e505d5c07fe0-- --===============8771328489832160390== 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== --===============8771328489832160390==--