From: "Mehdi Omidali" <mehdioa@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Sample farsi file
Date: Fri, 9 Jan 2009 12:07:39 +0330 [thread overview]
Message-ID: <6048c4180901090037u9912097l64919ebbb710a0c8@mail.gmail.com> (raw)
In-Reply-To: <49670391.6030502@wxs.nl>
[-- Attachment #1.1: Type: text/plain, Size: 6333 bytes --]
No, Xepersian is a macro package for xelatex. MKIV is also excellent for
typesseting persian.
You can use the following module for persian or arabic
%-------------------------persian-env.tex-----------------------------------
%This file is designed by Mehdi Omidali for easy typesetting persian in
Context
%File Versin:2008-7-20
\startenvironment persian-env
\usemodule[lang-pe]
\mainlanguage[pe]
% Font setup
\definefontfeature
[persian]
[mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]
\starttypescript [serif] [persian]
\definefontsynonym [Persian-Regular] [name:XB Zar.ttf] [features=persian]
\definefontsynonym [Persian-Bold] [name:XB Zar Bd.ttf] [features=persian]
\definefontsynonym [Persian-Italic] [name:XB Zar It.ttf] [features=persian]
\definefontsynonym [Persian-BoldItalic] [name:XB Zar BdIt.ttf]
[features=persian]
\stoptypescript
\starttypescript [sans] [persian]
\definefontsynonym [Persian-Regular-sans] [name:XM Traffic.ttf]
[features=persian]
\definefontsynonym [Persian-Bold-sans] [name:XM Traffic Bd.ttf]
[features=persian]
\definefontsynonym [Persian-Italic-sans] [name:XM Traffic It.ttf]
[features=persian]
\definefontsynonym [Persian-BoldItalic-sans] [name:XM Traffic BdIt.ttf]
[features=persian]
\stoptypescript
\starttypescript [mono] [persian]
\definefontsynonym [Persian-Regular-mono] [name:XB Roya.ttf]
[features=persian]
\definefontsynonym [Persian-Bold-mono] [name:XB Roya Bd.ttf]
[features=persian]
\definefontsynonym [Persian-Italic-mono] [name:XB Roya It.ttf]
[features=persian]
\definefontsynonym [Persian-BoldItalic-mono] [name:XB Roya BdIt.ttf]
[features=persian]
\stoptypescript
\starttypescript [serif][persian][name]
\usetypescript[serif][persian]
\definefontsynonym [Serif] [Persian-Regular] [features=persian]
\definefontsynonym [SerifBold] [Persian-Bold] [features=persian]
\definefontsynonym [SerifItalic] [Persian-Italic] [features=persian]
\definefontsynonym [SerifBoldItalic] [Persian-BoldItalic] [features=persian]
\stoptypescript
\starttypescript [sans][persian][name]
\usetypescript[sans][persian]
\definefontsynonym [Sans] [Persian-Regular-sans] [features=persian]
\definefontsynonym [SansBold] [Persian-Bold-sans] [features=persian]
\definefontsynonym [SansItalic] [Persian-Italic-sans] [features=persian]
\definefontsynonym [SansBoldItalic] [Persian-BoldItalic-sans]
[features=persian]
\stoptypescript
\starttypescript [mono][persian][name]
\usetypescript[mono][persian]
\definefontsynonym [Mono] [Persian-Regular-mono] [features=persian]
\definefontsynonym [MonoBold] [Persian-Bold-mono] [features=persian]
\definefontsynonym [MonoItalic] [Persian-Italic-mono] [features=persian]
\definefontsynonym [MonoBoldItalic] [Persian-BoldItalic-mono]
[features=persian]
\stoptypescript
\starttypescript [Persian]
\definetypeface[Persian][rm][serif][persian][default]
\definetypeface[Persian][rm][sans][persian][default]
\definetypeface[Persian][rm][mono][persian][default]
\stoptypescript
\def\PersianGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\def\PersianParDir {\textdir TRT\pardir TRT}
\def\PersianTextDir {\textdir TRT}
\def\LatinParDir {\textdir TLT\pardir TLT}
\def\LatinTextDir {\textdir TLT}
\def\LatinGlobalDir {\pagedir TLT\bodydir TLT\pardir TLT\textdir TLT}
\definestartstop[persiandocument][commands={\usetypescript[Persian]%
\setupbodyfont[Persian,12pt]%
\PersianGlobalDir}]
\definestartstop
[persianpar]
[commands=\Persian\PersianParDir]
\define[1]\RT
{{\Persian\PersianTextDir#1}}
\define\setlatin
{\LatinGlobalDir%
\usetypescript[lm]%
\setupbodyfont[lm,18pt]}
\definestartstop
[latinpar]
[commands=\Persian\LatinParDir]
\define[1]\LT
{{\LatinTextDir#1}}
% \setuphead
% [chapter]
% [ page=yes,
% before=\hairline\blank,
% after=\nowhitespace\hairline,
% header=nomarking,
% textstyle=bold,
% numberstyle=bold,
% ]
\setupheads[separator=\LT{--}]
\setupheadertexts[]%We put here because we want to define headertexts next.
\setupheadertexts[][pagenumber]
\setupsection [chapter][conversion=persiannumerals]
\setupsection [section][conversion=persiannumerals]
\setupsection [subsection][conversion=persiannumerals]
\setupsection [subsubsection][conversion=persiannumerals]
\setupfootnotes[conversion=persiannumerals]
\setupnumbering[conversion=persiannumerals]
\setupformulas[conversion=persiannumerals]
\setuppagenumbering[conversion=persiannumerals]
\setupcaptions[conversion=persiannumerals]
\setupdirections[bidi=global]
\stopenvironment
---------------------------------------------end--------------------
A sample is this
%%%%%%%%sample.tex%%%%%%%%%%%
\starttext
\startpersiandocument
من بی می ناب زیستن نتوانم
بی باده کشید بار تن نتوانم
\placeformula[Eq:eq1]$$x^2+2x$$
\stoppersiandocument
\stoptext
On 1/9/09, Hans Hagen <pragma@wxs.nl> wrote:
> Ilda Khaki wrote:
>
>> Is it possible to import functionalities of XePersian into ConTeXt.
>> Xepersian now is excellent in Persian typesetting and you can do all you
>> want in Persian typography. but I hate LaTeX. its main author unfortunately
>> is anti-ConTeXt.
>>
>
> i have no clue what xepersian is but if you can describe what you want (and
> coordinate with idris cum suis) i can look into it;
>
> Hans
>
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
> | www.pragma-pod.nl
> -----------------------------------------------------------------
>
> ___________________________________________________________________________________
> 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 : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___________________________________________________________________________________
>
>
[-- Attachment #1.2: Type: text/html, Size: 21075 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2009-01-09 8:37 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-06 9:53 Ilda Khaki
2009-01-07 7:28 ` Otared Kavian
2009-01-07 8:38 ` Hans Hagen
2009-01-07 9:08 ` Hans Hagen
2009-01-07 16:56 ` Otared Kavian
2009-01-08 0:29 ` Hans Hagen
2009-01-08 8:06 ` Otared Kavian
2009-01-08 8:13 ` Taco Hoekwater
2009-01-08 10:44 ` Otared Kavian
2009-01-08 11:26 ` Wolfgang Schuster
2009-01-08 11:42 ` Mojca Miklavec
2009-01-08 12:03 ` Taco Hoekwater
2009-01-09 2:04 ` Ilda Khaki
2009-01-09 7:58 ` Hans Hagen
2009-01-09 8:37 ` Mehdi Omidali [this message]
2009-01-09 8:40 ` Mehdi Omidali
2009-01-09 8:44 ` Mehdi Omidali
2009-01-09 9:49 ` Mehdi Omidali
2009-01-09 10:45 ` Ilda Khaki
2009-01-09 11:11 ` Hans Hagen
2009-01-09 11:27 ` Ilda Khaki
2009-01-09 11:53 ` Mehdi Omidali
2009-01-09 12:07 ` Hans Hagen
2009-01-09 12:20 ` Taco Hoekwater
2009-01-09 14:24 ` Mehdi Omidali
2009-01-09 14:28 ` Taco Hoekwater
2009-01-09 15:57 ` Mehdi Omidali
2009-01-09 21:31 ` Khaled Hosny
2009-01-09 12:03 ` Hans Hagen
2009-01-09 12:08 ` Ilda Khaki
2009-01-09 11:15 ` Hans Hagen
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=6048c4180901090037u9912097l64919ebbb710a0c8@mail.gmail.com \
--to=mehdioa@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).