From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95362 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 04:53:41 -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="===============5179767029290752566==" X-Trace: ger.gmane.org 1467881664 22841 80.91.229.3 (7 Jul 2016 08:54:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2016 08:54:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 07 10:54:12 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 1bL54W-0003Vx-4t for gctc-ntg-context-518@m.gmane.org; Thu, 07 Jul 2016 10:54:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DFE6D1110F; Thu, 7 Jul 2016 10:53:57 +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 WmL8BRTdDHOU; Thu, 7 Jul 2016 10:53:57 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id F34F51111E; Thu, 7 Jul 2016 10:53:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4A68B1110F for ; Thu, 7 Jul 2016 10:53:55 +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 SS-CAQxeRz26 for ; Thu, 7 Jul 2016 10:53:54 +0200 (CEST) Original-Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) (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 09CE01110E for ; Thu, 7 Jul 2016 10:53:44 +0200 (CEST) Original-Received: by mail-oi0-f49.google.com with SMTP id s66so14807898oif.1 for ; Thu, 07 Jul 2016 01:53:43 -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=wInUOk8/FLQo1EKv9zbDy6eEahjHWmRT2GzrmnIeqP0=; b=DBoSnA4azN0kxbQDmaKlo678rCk7lLScvUu6T2H4Nw6DomTcO6k36kUtpZ6L05qAWb J9qv+uDgjWwAIODdqAcAZ39pgTie3/qmFr4a6/ce/wleK8UbmNAK0wRoSK4gU83KoFMR ilWWPSTciZgjPN0ois1IbnknhGsGRfHWQCs9oQiZxlZNHbnNb+j0xTeY5fwwI6gyUwPK YahEgWEKTtkRd2yY2GFHj5KX7qr3uaEoyp060VNZq6AkPNH3gB9P5eTIyT+cmEzNvt2f 8GSgLVaKXNF6J9bLS3R2xHl1uEG9fe3eEQ15/Fkm2MvfyBaEx588asaLI1iKbS27oTo1 Cz8w== 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=wInUOk8/FLQo1EKv9zbDy6eEahjHWmRT2GzrmnIeqP0=; b=hOWODknhRd81HH5PT/TvGfkTFZO538JWx5SmKkyt+Pt1zZXF3va5FCwF4TgF+LVz5U T+XhBthQX/Sr1jsGxVsytX1OiKGDPwGd4aVFGvEL8sXKWfcT/hLVO39keRhM1Gj7VZG5 FUl3c6FINC0P8ycoB5F8bSSTWf8SAY11kl/9txHvwd8OlAdOKdIVcvXtj88nmjALsSWF lFkU9A6Xgo2D4e89fw0O79WPJL7AxctNLWYCTbe1yVxUI0aq6JG5cebD2VZkvf2dyvtO UYn97PiawZnUxqR1LC5lWpld4zLtNzp1/3BmuVeDbY72dg2Mv4e5rsLRBBB4FUQI4MJi kMIw== X-Gm-Message-State: ALyK8tLJ8TwT/QxIKVxx+fOyJEN4F+JB97CqfDEiCdHxU+Wdw83dU8wwvkrolOfIQ3r0CWWygYHqT/gNEYrNhw== X-Received: by 10.157.27.243 with SMTP id v48mr9891263otv.96.1467881622046; Thu, 07 Jul 2016 01:53:42 -0700 (PDT) Original-Received: by 10.157.46.104 with HTTP; Thu, 7 Jul 2016 01:53:41 -0700 (PDT) In-Reply-To: <577D4E30.6060608@gmail.com> 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:95362 Archived-At: --===============5179767029290752566== Content-Type: multipart/alternative; boundary=001a113e9212a78c4d053707d27a --001a113e9212a78c4d053707d27a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 was > there never a persian language environment even in MkII? I thought there > 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? Besi= de > 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 necessar= y 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 t= he > 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 to > 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 > > _________________________________________________________________________= __________ > --001a113e9212a78c4d053707d27a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Wolfgang & Hans,

In customizi= ng the date, is there a way to use a number 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 regarding \currentime.)

Thanks!
=E2=80=94Hossein

On Wed, Jul 6, 2016 at 2:30 PM, Wolfgan= g Schuster <schuster.wolfgang@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-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-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
___________________________________________________________________________= ________

--001a113e9212a78c4d053707d27a-- --===============5179767029290752566== 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= --===============5179767029290752566==--