ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \mainlanguage[pe]
Date: Wed, 06 Jul 2016 20:30:08 +0200	[thread overview]
Message-ID: <577D4E30.6060608@gmail.com> (raw)
In-Reply-To: <CAMHZ1dZ2grqJBh0QwEM9tSHvsbnJ+cP1f1WR2uxmp3pn5UmSZA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2666 bytes --]

> Mohammad Hossein Bateni <mailto:bateni@gmail.com>
> 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=arabic,range=arabic]
> \setupalign[r2l]
> \showframe
> \hyphenation{سازمان‌-دهی}
>
> \starttext
>
> %% The above pattern is not used here and the long word moves into the 
> margin.
> \dorecurse{14}{سلام }
> سازمان‌دهی
> مناسب.
>
> %% It does work here, though.
> \dorecurse{14}{سلام }
> سازمان\-دهی
> مناسب.
>
> \stoptext
>
>
> How can one create a new language?  The languages manual 
> <http://www.pragma-ade.nl/general/manuals/languages-mkiv.pdf> 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?  
> Beside the issue of sorting in indices, etc.—which I will get to in 
> due time—having an entry for language pe/persian seems to be necessary 
> 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=\v!broad,
    \c!leftsentence=\emdash,
    \c!rightsentence=\emdash,
    \c!leftsubsentence=\emdash,
    \c!rightsubsentence=\emdash,
    \c!leftquote=\upperleftsinglesixquote,
    \c!rightquote=\upperrightsingleninequote,
    \c!leftquotation=\upperleftdoublesixquote,
    \c!rightquotation=\upperrightdoubleninequote,
    \c!date={\v!day,\space,\v!month,\space,\v!year}]

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

\installlanguage[\s!fa-ir][\c!default=\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

[-- Attachment #1.2: Type: text/html, Size: 4268 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2016-07-06 18:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 18:02 \mainlanguage[pe] Mohammad Hossein Bateni
2016-07-06 18:30 ` Wolfgang Schuster [this message]
2016-07-07  8:53   ` \mainlanguage[pe] Mohammad Hossein Bateni
2016-07-07 12:40     ` \mainlanguage[pe] Mohammad Hossein Bateni
2016-07-07 21:28       ` \mainlanguage[pe] Hans Hagen
2016-07-08  9:40         ` \mainlanguage[pe] Meer, Hans van der
2016-07-07 14:02     ` \mainlanguage[pe] Wolfgang Schuster
2016-07-07 14:31       ` \mainlanguage[pe] Mohammad Hossein Bateni
2016-07-07 17:32         ` \mainlanguage[pe] Wolfgang Schuster
2016-08-01 16:31           ` \mainlanguage[pe] Mohammad Hossein Bateni
2016-07-07  5:20 ` \mainlanguage[pe] Mojca Miklavec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577D4E30.6060608@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).