From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95358 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: \mainlanguage[pe] Date: Wed, 06 Jul 2016 20:30:08 +0200 Message-ID: <577D4E30.6060608@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1399239034797100137==" X-Trace: ger.gmane.org 1467829867 21271 80.91.229.3 (6 Jul 2016 18:31:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2016 18:31:07 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 06 20:30:55 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 1bKrb5-0004bs-9p for gctc-ntg-context-518@m.gmane.org; Wed, 06 Jul 2016 20:30:55 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 843C61120E; Wed, 6 Jul 2016 20:30:27 +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 2FM-wJiI0bI6; Wed, 6 Jul 2016 20:30:25 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 1891E1120F; Wed, 6 Jul 2016 20:30:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1C0161120D for ; Wed, 6 Jul 2016 20:30:24 +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 0H5xKn57dhUV for ; Wed, 6 Jul 2016 20:30:22 +0200 (CEST) Original-Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) (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 7F9FA11021 for ; Wed, 6 Jul 2016 20:30:12 +0200 (CEST) Original-Received: by mail-wm0-f44.google.com with SMTP id z126so121747990wme.0 for ; Wed, 06 Jul 2016 11:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=VYMMfQcIVilfJkyyIv4xENOTFzP9c9RRETPRykvwYnU=; b=VKlL7EmZdh7vwdB5SBwqPw3JQbQfdk4pyPkCtLo4TDjd9DsCtGqi8NMPUWKgnK6FaU xXFo2lCj93Y8Zk5rGZXDUw1xtg9uutxbJEFqIgi1IpNvxwotZZdi23MI3/ACNWtzUHWA t1U4humD5c9FKAi/1OlP+4mel3XVdRqKdlJkHXj0EqBQApU5XcSSmxIAV8DbdbcGUKER E0FCo8mavilV7PBiQ0mKiA+XrqWDvaTpvjpsuQmenZfb9tBqKkCL6KC28Xi7vJOX7Hxv Epop0cDfOCWHPsAfAJGGbR1ee5qj769OnvcleJb2vAR8YtzEJODwo6SBiYX5BbvkyBhd Ll/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=VYMMfQcIVilfJkyyIv4xENOTFzP9c9RRETPRykvwYnU=; b=b9VBz2petU6anDsWossz+1/enClYv3u1lxjgk7P1ajDu5O0MHFu6zaPBPDsyucqLR8 o0o9NUezm/d76OPfwLIlW088V9ioppOeyGtR2CKzMBDTLsUsadxZo4B4T6+3dJDT+tZC eem2XDKU5ERgMuKwS0dLeOiLmI5+CvyVUkGiQzFkoTtQQ7yLncbUzdiEiBPg4JVGeXi6 lnYA9Mm496zWzNfroS8baLTjW4Axc63/aIADOGZbXHqNRKKHWHcaIWqb9ed9y3UBdO+4 HMw+mnSwvf0cSmDUuodA1kK7AHQBBJOjGnjcXYken/OLLondVX0wbBGUtGD18lKTUcQX LjOw== X-Gm-Message-State: ALyK8tK9MQyA+hAy+CIGKg5wM/ZCa62C/S5VFPNx3C9d0mgcSaNCpB+dBkncj3VlInfz1g== X-Received: by 10.194.141.75 with SMTP id rm11mr22817219wjb.160.1467829811816; Wed, 06 Jul 2016 11:30:11 -0700 (PDT) Original-Received: from keima.localdomain (x2f28485.dyn.telefonica.de. [2.242.132.133]) by smtp.gmail.com with ESMTPSA id 12sm6293363wmj.19.2016.07.06.11.30.10 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jul 2016 11:30:11 -0700 (PDT) User-Agent: Postbox 4.0.8 (Macintosh/20151105) 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:95358 Archived-At: This is a multi-part message in MIME format. --===============1399239034797100137== Content-Type: multipart/alternative; boundary="------------040006070309000507040004" This is a multi-part message in MIME format. --------------040006070309000507040004 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > Mohammad Hossein Bateni > 6. Juli 2016 um 20:02 > Hello, > > This was lost in the other thread, so I'm starting a fresh one=20 > dedicated to the question. > > 1) \showinstalledlanguages does not show pe/persian/fa or anything=20 > like that but it has several arabic variants. was this dropped in=20 > MkIV or was there never a persian language environment even in MkII? =20 > I thought there were translated labels for Farsi somewhere. > 2) In the following MWE, ad-hoc hyphenation using \- works and leads=20 > to hyphenation. However, specifying the pattern at the beginning does=20 > 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=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 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=20 > suggests=20 > that this is possible. Does that mean I need to send the request to=20 > Hans/Wolfgang to create the new entry or can one do so dynamically? =20 > Beside the issue of sorting in indices, etc.=E2=80=94which I will get t= o in=20 > due time=E2=80=94having an entry for language pe/persian seems to be ne= cessary=20 > to /properly/ use \setuplabeltext, etc. Is that 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} \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=20 add entries for persian and send the modified file to Hans. Wolfgang --------------040006070309000507040004 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 fo= r=20 Farsi somewhere.
2) In the following MWE, ad-hoc=C2=A0hyphenation=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[= 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

%%=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 lang= uages manual=C2=A0suggests that this is possible.=C2=A0 Does that mean I n= eed 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 s= eems 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
--------------040006070309000507040004-- --===============1399239034797100137== 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= --===============1399239034797100137==--