From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95363 Path: news.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: \mainlanguage[pe] Date: Thu, 7 Jul 2016 08:40:14 -0400 Message-ID: References: <577D4E30.6060608@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1808353144744176008==" X-Trace: ger.gmane.org 1467895279 10405 80.91.229.3 (7 Jul 2016 12:41:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2016 12:41:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 07 14:41:08 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bL8c8-0002IY-Fh for gctc-ntg-context-518@m.gmane.org; Thu, 07 Jul 2016 14:41:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7B3DD11129; Thu, 7 Jul 2016 14:40:31 +0200 (CEST) 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 jaR56jGZTP2I; Thu, 7 Jul 2016 14:40:29 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id B7D9B11172; Thu, 7 Jul 2016 14:40:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F00FF110E4 for ; Thu, 7 Jul 2016 14:40:28 +0200 (CEST) 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 v8KLMS9rzdA8 for ; Thu, 7 Jul 2016 14:40:27 +0200 (CEST) Original-Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 77727110CF for ; Thu, 7 Jul 2016 14:40:17 +0200 (CEST) Original-Received: by mail-oi0-f47.google.com with SMTP id u201so21006072oie.0 for ; Thu, 07 Jul 2016 05:40:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=iLCKTc+kRzHie8IznV1jnlK7N9fsM/fuxAAxGL3lMR8=; b=SlTNf1uQHgi8nZP972YOSmB+RONzxr0V1Ha4c/rGRwumREHngG03oziMoNEy5rXYNW nu953qQifjtWAEOo117rt0JUbZHy13LbLCDKAZzyCviolLCgYbc81wCFFHUNCtmz9vGb YD+I8I+pQFESv2rYT9nbvWHbhaLcm1RQn2ynOeHXlbXwzObC6CiPdJOgIqTetXAVx3rU 7hw630qHSAJRONaH9tvRQ77DkdsDJScBJ/CntcwDJOBOdDrXg7moaQSOgMlvrRj8FOiy ecv37ZZvscMVO5Ct+b4qcwomk6k1YWtlElQ9TdM/J7aMzdCwiisQqZKVkuLwjAR5KXZZ +KHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=iLCKTc+kRzHie8IznV1jnlK7N9fsM/fuxAAxGL3lMR8=; b=LCi2RN6yO72+HoY3Fhm/IXQilVWybXGRxg9rt/xmGQRYshrpPyEqaRckgafJ68+Pxd osrnwPHKucbY0rN4FoPt9J9EHxWmmOAV9XXsyjyhaCIoj2XkR6DcQHEXJEMqDN8K54pm YlNO0jaq6gh02ULS1r13/MzbI6DTdhRdzdaopPNLIr9d9/CTWfeG/f3JL4ZcJGZIPQCx 6lsYJPlhq9czQVPGd71TzHeCgSTWiaXTL9lFYZPwlibxWvX3ck/N3wKEQtwqy1znSwcc aQWCEUnAaZN3SojwvJ9h8D+3EdwuLnPo2zWhZMZyYqx+8lzFjzxv7d3L7lsCTJ3+j8yL FU+Q== X-Gm-Message-State: ALyK8tLwYXh/ZvmiAz1nl6WI8Kl/s1cD14GSyVj7FxIOVhGLkTV+SbklckEH5ltnA54v9AD3nwPfCaDSHQHAdw== X-Received: by 10.157.16.43 with SMTP id h40mr1059ote.36.1467895214994; Thu, 07 Jul 2016 05:40:14 -0700 (PDT) Original-Received: by 10.157.46.104 with HTTP; Thu, 7 Jul 2016 05:40:14 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:95363 Archived-At: --===============1808353144744176008== Content-Type: multipart/alternative; boundary=001a1135bf38db7aef05370afc69 --001a1135bf38db7aef05370afc69 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable While you're at it, could you also add something like jday, jmonth, jmm, jyear, etc. to use the Jalali calendar instead of the Gregorian? I see that the=E2=80=94commented=E2=80=94conversion code exists in core-con.lua. = I am willing to provide test cases for the conversion. Thanks! =E2=80=94MHB On Thu, Jul 7, 2016 at 4:53 AM, Mohammad Hossein Bateni wrote: > Wolfgang & Hans, > > In customizing the date, is there a way to use a number converter on day > and year? In particular, I'd like to apply persiandecimals conversion on > them. (I have a similar question regarding \currentime.) > > Thanks! > =E2=80=94Hossein > > On Wed, Jul 6, 2016 at 2:30 PM, Wolfgang Schuster < > schuster.wolfgang@gmail.com> wrote: > >> Mohammad Hossein Bateni >> 6. Juli 2016 um 20:02 >> Hello, >> >> This was lost in the other thread, so I'm starting a fresh one dedicated >> to the question. >> >> 1) \showinstalledlanguages does not show pe/persian/fa or anything like >> that but it has several arabic variants. was this dropped in MkIV or wa= s >> there never a persian language environment even in MkII? I thought ther= e >> were translated labels for Farsi somewhere. >> 2) In the following MWE, ad-hoc hyphenation using \- works and leads to >> hyphenation. However, specifying the pattern at the beginning does not >> have any effect. Am I missing something? >> >> >> \usemodule[simplefonts] >> \setmainfont[dejavusans][features=3Darabic,range=3Darabic] >> \setupalign[r2l] >> \showframe >> \hyphenation{=D8=B3=D8=A7=D8=B2=D9=85=D8=A7=D9=86=E2=80=8C-=D8=AF=D9=87= =DB=8C} >> >> \starttext >> >> %% The above pattern is not used here and the long word moves into the >> margin. >> \dorecurse{14}{=D8=B3=D9=84=D8=A7=D9=85 } >> =D8=B3=D8=A7=D8=B2=D9=85=D8=A7=D9=86=E2=80=8C=D8=AF=D9=87=DB=8C >> =D9=85=D9=86=D8=A7=D8=B3=D8=A8. >> >> %% It does work here, though. >> \dorecurse{14}{=D8=B3=D9=84=D8=A7=D9=85 } >> =D8=B3=D8=A7=D8=B2=D9=85=D8=A7=D9=86\-=D8=AF=D9=87=DB=8C >> =D9=85=D9=86=D8=A7=D8=B3=D8=A8. >> >> \stoptext >> >> >> How can one create a new language? The languages manual >> suggests >> that this is possible. Does that mean I need to send the request to >> Hans/Wolfgang to create the new entry or can one do so dynamically? Bes= ide >> the issue of sorting in indices, etc.=E2=80=94which I will get to in due >> time=E2=80=94having an entry for language pe/persian seems to be necessa= ry to >> *properly* use \setuplabeltext, etc. Is that correct? >> >> You can create a new language (and synonyms for it) with the >> \installlanguage command, below is a slightly modified version of the >> arabic entry. You can change the values for leftquotation etc. and send = the >> result to Hans. >> >> % this goes into mult-sys.mkiv >> >> \definesystemconstant {persian} \definesystemconstant {fa} >> >> % this goes into lang-def.mkiv >> >> \installlanguage >> [\s!fa] >> [\c!spacing=3D\v!broad, >> \c!leftsentence=3D\emdash, >> \c!rightsentence=3D\emdash, >> \c!leftsubsentence=3D\emdash, >> \c!rightsubsentence=3D\emdash, >> \c!leftquote=3D\upperleftsinglesixquote, >> \c!rightquote=3D\upperrightsingleninequote, >> \c!leftquotation=3D\upperleftdoublesixquote, >> \c!rightquotation=3D\upperrightdoubleninequote, >> \c!date=3D{\v!day,\space,\v!month,\space,\v!year}] >> >> \installlanguage [\s!persian] [\s!fa] >> >> \installlanguage[\s!fa-ir][\c!default=3D\s!fa] >> >> >> The default labels for the languages are stored in lang-txt.lua, you can >> add entries for persian and send the modified file to Hans. >> >> Wolfgang >> >> >> ________________________________________________________________________= ___________ >> If your question is of interest to others as well, please add an entry t= o >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net >> archive : http://foundry.supelec.fr/projects/contextrev/ >> wiki : http://contextgarden.net >> >> ________________________________________________________________________= ___________ >> > > --001a1135bf38db7aef05370afc69 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
While you're at it, could you also add something like = jday, jmonth, jmm, jyear, etc. to use the Jalali calendar instead of the Gr= egorian?=C2=A0 I see that the=E2=80=94commented=E2=80=94conversion code exi= sts in=C2=A0core-con.lua.=C2=A0 I am willing to provide test cases for the = conversion.

Thanks!
=E2=80=94MHB

On Thu, Jul 7, 2016= at 4:53 AM, Mohammad Hossein Bateni <bateni@gmail.com> wrote= :
Wolfgang & Ha= ns,

In customizing the date, is there a way to use a nu= mber converter on day and year?=C2=A0 In particular, I'd like to apply = persiandecimals conversion on them. =C2=A0(I have a similar question regard= ing \currentime.)

Thanks!
=E2=80=94Hossein

On= Wed, Jul 6, 2016 at 2:30 PM, Wolfgang Schuster <schuster.wolfga= ng@gmail.com> wrote:
= 6.=20 Juli 2016 um 20:02
Hello,

This was lost in the other thread, so I'm starting a fresh one dedicated to= =20 the question.

1) \showinstalledlanguages does not show=20 pe/persian/fa or anything like that but it has several arabic variants.=20 =C2=A0was this dropped in MkIV or was there never a persian language=20 environment even in MkII?=C2=A0 I thought there were translated labels for= =20 Farsi somewhere.
2) In the following MWE, ad-hoc=C2=A0hyphe= nation=C2=A0using \- works and leads to=C2=A0hyphenation.=C2=A0 However, specifying the pattern at the beginning does not have any=20 effect.=C2=A0 Am I missing something?


\usemodule[si= mplefonts]
\setmainfont[dejavusans][features=3Darabic,range=3Darabic]\setupalign[r2l]
\showframe
\hyphenation{=D8=B3=D8=A7= =D8=B2=D9=85=D8=A7=D9=86=E2=80=8C-=D8=AF=D9=87=DB=8C}

\starttext
=
%%=20 The above pattern is not used here and the long word moves into the=20 margin.
\dorecurse{14}{=D8=B3=D9=84=D8=A7=D9=85 }
=D8=B3=D8=A7=D8=B2= =D9=85=D8=A7=D9=86=E2=80=8C=D8=AF=D9=87=DB=8C
=D9=85=D9=86=D8=A7=D8=B3= =D8=A8.

%% It=20 does work here, though.
\dorecurse{14}{=D8=B3=D9=84=D8=A7=D9=85 }
=D8= =B3=D8=A7=D8=B2=D9=85=D8=A7=D9=86\-=D8=AF=D9=87=DB=8C
=D9=85=D9=86=D8=A7= =D8=B3=D8=A8.
\stoptext


How can one create a= new=20 language?=C2=A0 The languages manual=C2=A0suggests that this is possible.=C2=A0 Does that mean I nee= d to=20 send the request to Hans/Wolfgang to create the new entry or can one do=20 so dynamically?=C2=A0 Beside the issue of sorting in indices, etc.=E2=80=94= which I=20 will get to in due time=E2=80=94having an entry for language pe/persian see= ms to be necessary to properly use \setuplabeltext, etc.=C2=A0 Is that=20 correct?
You can create a new language (and synonyms for it) with the=20 \installlanguage command, below is a slightly modified version of the=20 arabic entry. You can change the values for leftquotation etc. and send=20 the result to Hans.

% this goes into mult-sys.mkiv

\definesystemconstant {persian}=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 \definesystemconstant {fa}

% this goes into lang-def.mkiv

\installlanguage
=C2=A0 [\s!fa]
=C2=A0 [\c!spacing=3D\v!broad,
=C2=A0=C2=A0 \c!leftsentence=3D\emdash,
=C2=A0=C2=A0 \c!rightsentence=3D\emdash,
=C2=A0=C2=A0 \c!leftsubsentence=3D\emdash,
=C2=A0=C2=A0 \c!rightsubsentence=3D\emdash,
=C2=A0=C2=A0 \c!leftquote=3D\upperleftsinglesixquote,
=C2=A0=C2=A0 \c!rightquote=3D\upperrightsingleninequote,
=C2=A0=C2=A0 \c!leftquotation=3D\upperleftdoublesixquote,
=C2=A0=C2=A0 \c!rightquotation=3D\upperrightdoubleninequote,
=C2=A0=C2=A0 \c!date=3D{\v!day,\space,\v!month,\space,\v!year}]

\installlanguage [\s!persian] [\s!fa]

\installlanguage[\s!fa-ir][\c!default=3D\s!fa]


The default labels for the languages are stored in lang-txt.lua, you can add entries for persian and send the modified file to Hans.

Wolfgang

__________________________________________= _________________________________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________


--001a1135bf38db7aef05370afc69-- --===============1808353144744176008== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1808353144744176008==--