Re: [NTG-context] LineSpacing Issue in Arabic Fonts

2017-02-20 Thread Ibn Saeed
​Thank you Hans,

I replaced min, line with {both}. Its working fine.

​

On Mon, Feb 20, 2017 at 2:41 PM, Hans Hagen  wrote:

> d={min,line},
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] LineSpacing Issue in Arabic Fonts

2017-02-20 Thread Ibn Saeed
my luatex version is:

This is LuaTeX, Version 1.0.4 (TeX Live 2016/W32TeX)


2017-02-20 11:42 GMT+04:00 Otared Kavian <ota...@gmail.com>:

> Hello Ibn Saeed,
>
> I tried your example file and obtained the same result as you with
> LuaTeX Version 1.0.3 and the latest beta version 2017.02.19 17:14.
>
> However the result is as expected with the version from TeXLIve, that is
> LuaTeX Version 0.95.0 (TeX Live 2016) and ConTeXt  ver: 2016.05.17
> 19:20.
>
> So there seems that, as Hans warned us a few days ago, there are still
> some problems with LuaTeX and the latest version of ConTeXt.
>
> Best regards: OK
>
>
> > On 20 Feb 2017, at 06:46, Ibn Saeed <ibnsa...@gmail.com> wrote:
> >
> > Hello
> >
> > I installed ConteXt standalone version.
> >
> > Here is the version details:
> >
> > ===
> > mtx-context | ConTeXt Process Management 1.00
> > mtx-context |
> > mtx-context | main context file: C:/context/tex/texmf-context/t
> ex/context/base/mkiv/context.mkiv
> > mtx-context | current version: 2017.02.19 17:14
> > ===
> >
> > I am trying to use the following context document which used to work
> fine before.
> >
> > I have upgraded my complete computer so had to install everything again.
> >
> > When i ran the same file, it gave all kinds of linespacing issue, that
> is what i think the issue might be.
> >
> > here is the code :
> >
> > ===
> > \showgrid
> > \mainlanguage[arabic]
> > \setupalign[r2l]
> > \righttoleft
> > \definefontfeature
> > [arabic]
> > [mode=node,language=dflt,script=arab,
> > init=yes,
> > medi=yes,
> > fina=yes,
> > isol=yes,
> > liga=yes,
> > dlig=yes,
> > rlig=yes,
> > tlig=yes,
> > calt=yes,
> > trep=yes,
> > clig=yes,
> > mark=yes,
> > mkmk=yes,
> > kern=yes,
> > curs=yes,
> > mset=yes
> > ]
> >
> > \starttypescript [serif] [arabic]
> > \setups[font:fallback:serif]
> > \definefontsynonym [Arabic-Regular] [file:arabtype.ttf] [features=arabic]
> > \definefontsynonym [Arabic-Bold] [file:Scheherazade-Bold.ttf]
> [features=arabic]
> > \stoptypescript
> >
> > \starttypescript [serif] [arabic] [name]
> > \definefontsynonym [Serif][Arabic-Regular] [features=arabic]
> > \definefontsynonym [SerifBold][Arabic-Bold][features=arabic]
> > \stoptypescript
> >
> > \starttypescript [Arabic]
> > \definetypeface [Arabic] [rm] [serif] [arabic] [default]
> > \stoptypescript
> >
> > \setuppapersize[A4]
> > \setuplayout[
> > grid=min,
> > backspace=46.666mm, width=140.00mm,
> > topspace=33.000mm, height=198.000mm,
> > header=12.9mm, footer=9mm,
> > location=middle,
> > ]
> >
> >
> > \setupbodyfont[Arabic,20pt]
> > \setupinterlinespace[line=32pt]
> > \setupwhitespace[line]
> >
> >
> >
> > \def\TextBig{\switchtobodyfont[Arabic-Regular, rm, 62pt]}
> > \def\TextNormal{\switchtobodyfont[Arabic-Regular, rm, 24pt]}
> > \def\TextSmall{\switchtobodyfont[Arabic-Regular, rm, 18pt]}
> > \def\TextSmaller{\switchtobodyfont[Arabic-Regular, rm, 14pt]}
> > \def\TextSmallSans{\switchtobodyfont[Arabic-Regular, ss, 12pt]}
> >
> >
> > \setuphead[chapter][
> > header=empty,
> > alternative=middle,
> > page=right,
> > grid=max,
> > number=no,
> > numbercommand=\groupedcommand{}{\blank[2*big]},
> > after={\blank[2*medium]},
> > ]
> >
> >
> >
> >
> > \starttext
> > \startfrontmatter
> >
> > \startstandardmakeup[
> > align=r2l,
> > doublesided=no,
> > headerstate=none]
> >
> > \startalignment[middle]
> > \blank[11*small]
> > {\switchtobodyfont[62pt] فتح القوي المتين}\par
> > \blank[7*small]
> > {\switchtobodyfont[24pt] في شرح الأربعين وتتمَّة الخمسين}\par
> > {\switchtobodyfont[18pt] النووي وابن رجب}
> > \vfill
> >
> > {\TextSmall تأليف}\par
> > {\TextSmall عبد المحسن بن حمد العباد البدر}
> > \stopalignment
> >
> > \stopstandardmakeup
> >
> >
> >
> >
> > \completecontent
> >
> >
> > \stopfrontmatter
> >
> >
> > \startbodymatter
> >
> >
> > \startchapter[
> > title={مقدمة}]
> > \stopchapter
> >
> >
> >  الحمد لله مجزل العَطاء ومسبغ النِّعم، وأشهد أن لا إله إلاَّ الله وحده
> لا شريك له ذو الفضل والإحسان والجود والكرم، وأشهد أنَّ محمداً عبده ورسوله
> سيِّد العرب والعجم، المخصوص من ربِّه بجوامع الكلم،

Re: [NTG-context] LineSpacing Issue in Arabic Fonts

2017-02-20 Thread Ibn Saeed
​Which part of code are you referring to, Hans ?​



On Mon, Feb 20, 2017 at 1:43 PM, Hans Hagen  wrote:

> for now, use {min,line}
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] LineSpacing Issue in Arabic Fonts

2017-02-19 Thread Ibn Saeed
Hello

I installed ConteXt standalone version.

Here is the version details:

===
mtx-context | ConTeXt Process Management 1.00
mtx-context |
mtx-context | main context file: C:/context/tex/texmf-context/
tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2017.02.19 17:14
===

I am trying to use the following context document which used to work fine
before.

I have upgraded my complete computer so had to install everything again.

When i ran the same file, it gave all kinds of linespacing issue, that is
what i think the issue might be.

here is the code :

===
\showgrid

\mainlanguage[arabic]

\setupalign[r2l]

\righttoleft

\definefontfeature

[arabic]

[mode=node,language=dflt,script=arab,

init=yes,

medi=yes,

fina=yes,

isol=yes,

liga=yes,

dlig=yes,

rlig=yes,

tlig=yes,

calt=yes,

trep=yes,

clig=yes,

mark=yes,

mkmk=yes,

kern=yes,

curs=yes,

mset=yes

]


\starttypescript [serif] [arabic]

\setups[font:fallback:serif]

\definefontsynonym [Arabic-Regular] [file:arabtype.ttf] [features=arabic]

\definefontsynonym [Arabic-Bold] [file:Scheherazade-Bold.ttf]
[features=arabic]

\stoptypescript


\starttypescript [serif] [arabic] [name]

\definefontsynonym [Serif][Arabic-Regular] [features=arabic]

\definefontsynonym [SerifBold][Arabic-Bold][features=arabic]

\stoptypescript


\starttypescript [Arabic]

\definetypeface [Arabic] [rm] [serif] [arabic] [default]

\stoptypescript


\setuppapersize[A4]

\setuplayout[

grid=min,

backspace=46.666mm, width=140.00mm,

topspace=33.000mm, height=198.000mm,

header=12.9mm, footer=9mm,

location=middle,

]



\setupbodyfont[Arabic,20pt]

\setupinterlinespace[line=32pt]

\setupwhitespace[line]




\def\TextBig{\switchtobodyfont[Arabic-Regular, rm, 62pt]}

\def\TextNormal{\switchtobodyfont[Arabic-Regular, rm, 24pt]}

\def\TextSmall{\switchtobodyfont[Arabic-Regular, rm, 18pt]}

\def\TextSmaller{\switchtobodyfont[Arabic-Regular, rm, 14pt]}

\def\TextSmallSans{\switchtobodyfont[Arabic-Regular, ss, 12pt]}



\setuphead[chapter][

header=empty,

alternative=middle,

page=right,

grid=max,

number=no,

numbercommand=\groupedcommand{}{\blank[2*big]},

after={\blank[2*medium]},

]





\starttext

\startfrontmatter


\startstandardmakeup[

align=r2l,

doublesided=no,

headerstate=none]


\startalignment[middle]

\blank[11*small]

{\switchtobodyfont[62pt] فتح القوي المتين}\par

\blank[7*small]

{\switchtobodyfont[24pt] في شرح الأربعين وتتمَّة الخمسين}\par

{\switchtobodyfont[18pt] النووي وابن رجب}

\vfill


{\TextSmall تأليف}\par

{\TextSmall عبد المحسن بن حمد العباد البدر}

\stopalignment


\stopstandardmakeup





\completecontent



\stopfrontmatter



\startbodymatter



\startchapter[

title={مقدمة}]

\stopchapter



الحمد لله مجزل العَطاء ومسبغ النِّعم، وأشهد أن لا إله إلاَّ الله وحده لا
شريك له ذو الفضل والإحسان والجود والكرم، وأشهد أنَّ محمداً عبده ورسوله
سيِّد العرب والعجم، المخصوص من ربِّه بجوامع الكلم، اللَّهمَّ صلِّ وسلِّم
وبارك عليه وعلى آله أهل المكارم والشِّيَم، وعلى أصحابه مصابيح الدُّجَى
والظُّلَم، الذين أكرمهم الله فجعلهم خير أمَّة هي خير الأمم، وعلى كل مَن جاء
بعدهم مقتفياً آثارهم، وقد خلا قلبُه من الغلِّ للمؤمنين وسلِم.\par



أمَّا بعد، فإنَّ من الموضوعات التي ألَّف فيها العلماء في حديث رسول الله
أحاديث الأربعين، وهي جمع أربعين حديثاً من أحاديث رسول الله ؛ لحديث ورد في
فضل حفظ أربعين حديثاً من أحاديث رسول الله ، ذكر النووي في مقدمة الأربعين له
وروده عن تسعة من أصحاب رسول الله سمَّاهم، وقال: (( واتَّفق الحفاظ على أنَّه
حديث ضعيف وإن كثُرت طرقُه ))، وذكر أنَّ اعتمادَه في تأليف الأربعين ليس
عليه، بل على أحاديث أخرى، مثل قوله : (( ليبلِّغ الشاهد منكم الغائب ))،
وقوله: (( نضَّر الله امرءاً سمع مقالتي فوعاها )) الحديث، وذكر ثلاثة عشر من
العلماء ألَّفوا في الأربعين، أولهم عبد الله بن المبارك، وآخرهم أبو بكر
البيهقي، وقال بعد ذكرهم: (( وخلائق لا يُحصون من المتقدِّمين والمتأخرين ))،
وقال: (( ثم مِن العلماء مَن جمع الأربعين في أصول الدِّين، وبعضهم في الفروع،
وبعضهم في الجهاد، وبعضهم في الزهد، وبعضهم في الآداب، وبعضهم في الخطب،
وكلُّها مقاصد صالحة رضي الله تعالى عن قاصديها، وقد رأيتُ جمع أربعين أهم من
هذا كلِّه، وهي أربعون حديثاً مشتملة على جميع ذلك، وكلُّ حديث منها قاعدة
عظيمة من قواعد الدِّين، قد وصفه العلماء بأنَّ مدارَ الإسلام عليه، أو هو نصف
الإسلام أو ثلثه أو نحو ذلك، ثم التزمتُ في هذه الأربعين أن تكون صحيحة،
ومعظمها في صحيحي البخاري ومسلم، وأذكرها محذوفة الأسانيد ليسهل حفظها ويعم
الانتفاع بها إن شاء الله ... وينبغي لكلِّ راغب في الآخرة أن يعرف هذه
الأحاديث لِمَا اشتملت عليه من المهمَّات، واحتوت عليه من التنبيه على جميع
الطاعات، وذلك ظاهر لِمَن تدبَّره )).\par


والأحاديث التي جمعها النووي ـ رحمه الله ـ اثنان وأربعون حديثاً، قد أطلق
عليها أربعين تغليباً مع حذف الكسر الزائد، وقد رُزق هذا الكتاب للنووي مع
كتابه (( رياض الصالحين )) القبول عند الناس، وحصل اشتهارهما والعناية بهما،
وأوَّلُ كتاب ينقدح في الأذهان يُرشَد المبتدئون في الحديث إليه هذه الأربعون
للإمام النووي رحمه الله، وقد زاد ابن رجب الحنبلي ـ رحمه الله ـ عليها ثمانية
أحاديث من جوامع الكلم، فأكمل بها العدَّة خمسين، وشرحها بكتاب سَمَّاه: ((
جامع العلوم والحكم في شرح 

Re: [NTG-context] Overfull boxes using m-cweb

2016-01-26 Thread Ibn Saeed
Hans Hagen  wxs.nl> writes:


> it may be a result of many unbreakable (key)words, so in that case try:
> 
> \setuptolerance[verytolerant,stretch]
> 
> Hans
> 


Thanks Hans, I was having some issue with overfull boxe in one paragraph, i
applied your command and it solved the issue.



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

Re: [NTG-context] which is the best/right element for elements in cover and title pages?

2016-01-26 Thread Ibn Saeed
Pablo Rodriguez  gmx.es> writes:

> 
> On 01/26/2016 05:13 AM, Ibn Saeed wrote:
> > Pablo Rodriguez writes:
> > 
> > Have you tried \startstandardmakeup for Title Pages ?
> 
> Many thanks for your reply, Ibn.
> 
> I use a makeup for the title pages (in fact \startitlepage could be
> written as \startmakeup[titlepage]).
> 
> I mean the individual information such as title, subtitle, author, and
> so on.
> 
> Pablo


Take a look at \setupinteraction

Syntax :
http://wiki.contextgarden.net/Command/setupinteraction

Examples here:
http://wiki.contextgarden.net/Export

http://wiki.contextgarden.net/PDFX









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

Re: [NTG-context] which is the best/right element for elements in cover and title pages?

2016-01-25 Thread Ibn Saeed
Pablo Rodriguez  gmx.es> writes:



Have you tried \startstandardmakeup for Title Pages ?


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

[NTG-context] Showcase of Title Pages done with ConTeXt ?

2016-01-24 Thread Ibn Saeed
Hello

I am trying to get a feel of what is possible with ConTeXt for designing
Title Pages or Cover Pages.

In LaTeX, i see the following title pages

http://ctan.asis.io/info/latex-samples/TitlePages/titlepages.pdf

and some are shown here

http://tex.stackexchange.com/questions/85904/showcase-of-beautiful-title-page-done-in-tex

What is the best way on setting up a title page in ConTeXt MarkIV and where
should i start?

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

Re: [NTG-context] (mashriqi) Arabic-Hindi Numerals

2016-01-19 Thread Ibn Saeed


Here is my code for the header:

\setupheadertexts
   [{\righttoleft\getmarking[chapter]}][{\romannumerals}]
   [{\pagenumber}][{\righttoleft\getmarking[chapter]}]


\setuppagenumbering[
   alternative=doublesided,
   location=, 
]


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

Re: [NTG-context] (mashriqi) Arabic-Hindi Numerals

2016-01-19 Thread Ibn Saeed

> \setupuserpagenumber[numberconversion=Characters]
> Wolfgang


Thank you very much Wolfgang.Its nice seperation of settings and content.

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

Re: [NTG-context] (mashriqi) Arabic-Hindi Numerals

2016-01-19 Thread Ibn Saeed
Wolfgang Schuster  gmail.com> writes:

> Use
>     \setupheadertexts[pagenumber]
> or
>     \setupheadertexts[\userpagenumber]
> Wolfgang
> 


Hello Wolfgang,

Thanks for helping out again.

i tried your code :


\setupheadertexts[pagenumber]
   [{\righttoleft\getmarking[chapter]}][{\romannumerals}]
   [{\pagenumber}][{\righttoleft\getmarking[chapter]}]




\setuppagenumbering[
   alternative=doublesided,
   location=,
]

It did not work, no page numbers appeared(blank)

I am using TexLive 2015.
___
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
___

Re: [NTG-context] (mashriqi) Arabic-Hindi Numerals

2016-01-19 Thread Ibn Saeed
Otared Kavian  gmail.com> writes:

> 
> Hi,
> There is the command 
> 
> 
>   \persiandecimals
> 
> is that what you are looking for?
> 
> Best regards: OK
> 

No, that is not it. I am looking for Arabic Decimals. 

I think, ill have to uninstall texlive and setup ConTeXt standalone.

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

Re: [NTG-context] (mashriqi) Arabic-Hindi Numerals

2016-01-19 Thread Ibn Saeed
Mohammad Hossein Bateni  gmail.com> writes:

> 
> 
> You do not need to uninstall TeXLive.  ConTeXt Standalone can work side by 
side and it's very simple to install.  You can pick to use the standalone for 
some of your compilations.
> \persiandecimals and \arabicdecimals are very similar.  The difference is 
(almost) only in digits for 0,4,5,6.  However, Ibn Saeed most probably needs 
\arabicdecimals to typeset "mashiriqi" numerals.
> 
> The important thing is that neither one exists in TeXLive Context.  It was 
there in MkII but not in MkIV for some reason.  It was added to MkIV sometime 
in the fall.
> 
> 

Thank you Mohammad. Ill install the standalone version
___
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
___

Re: [NTG-context] (mashriqi) Arabic-Hindi Numerals

2016-01-19 Thread Ibn Saeed
Mohammad Hossein Bateni  gmail.com> writes:

> 
> 
> You do not need to uninstall TeXLive.  ConTeXt Standalone can work side by 
side and it's very simple to install.  You can pick to use the standalone for 
some of your compilations.
> \persiandecimals and \arabicdecimals are very similar.  The difference is 
(almost) only in digits for 0,4,5,6.  However, Ibn Saeed most probably needs 
\arabicdecimals to typeset "mashiriqi" numerals.
> 
> The important thing is that neither one exists in TeXLive Context.  It was 
there in MkII but not in MkIV for some reason.  It was added to MkIV sometime 
in the fall.



I have installed ConTeXt standalone version 0.63. i dont know if its beta or 
stable release.

How do i use \arabicdecimals now ? where should i place the code 
___
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
___

Re: [NTG-context] (mashriqi) Arabic-Hindi Numerals

2016-01-19 Thread Ibn Saeed
Mohammad Hossein Bateni  gmail.com> writes:

> 
> 
> You do not need to uninstall TeXLive.  ConTeXt Standalone can work side by 
side and it's very simple to install.  You can pick to use the standalone for 
some of your compilations.
> \persiandecimals and \arabicdecimals are very similar.  The difference is 
(almost) only in digits for 0,4,5,6.  However, Ibn Saeed most probably needs 
\arabicdecimals to typeset "mashiriqi" numerals.
> 
> The important thing is that neither one exists in TeXLive Context.  It was 
there in MkII but not in MkIV for some reason.  It was added to MkIV sometime 
in the fall.


I updated ConTeXt as per your advice to the latest version.

I tried the following code on ConTeXt 0.63 running in AucTeX Spacemacs Editor.

\setupheadertexts
   [{\righttoleft\getmarking[chapter]}][{\arabicdecimals\pagenumber}]
   [{\arabicdecimals\pagenumber}]
[{\righttoleft\getmarking[chapter]}]


This time it worked perfectly.

Thank you very much Mohammad Hossein Bateni
___
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
___

Re: [NTG-context] Arabic Letters are disjointed and reversed in headers and margin

2016-01-18 Thread Ibn Saeed
Wolfgang Schuster  gmail.com> writes:

> 
> \setupheader[style=\righttoleft]
> Wolfgang
>

Thank you very much. 

This solves the issue of the arabic text in header as well.



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

[NTG-context] Page Numbers change after 9 to 01 - 11 -21 - 31 and so on.

2016-01-18 Thread Ibn Saeed
Hello

I am trying to typeset a book in arabic in ConTeXt. I have stumbled upon 
this issue

Page Numbers change after 9 
to 01 for page 10
21 for page 12
31 for page 13
41 for page 14
and so on

Here is the snapshot of the page number issue:
https://i.imgsafe.org/a5f34fb.jpg



Here is my ConTeXt Code:

\mainlanguage[arabic]

\setupdirections[bidi=global]

\definefontfeature
  [arabic]
  [mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,tlig=yes,
calt=yes,trep=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]


\starttypescript [serif] [arabic]
  \definefontsynonym [Arabic-Regular] [file:ScheherazadeRegOT.ttf] 
[features=arabic]
  \definefontsynonym [Arabic-Bold] [file:ScheherazadeRegOT.ttf] 
[features=arabic]
\stoptypescript

\starttypescript [serif] [arabic] [name]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif] [Arabic-Regular] [features=arabic]
 \definefontsynonym [SerifBold] [Arabic-Bold][features=arabic]
\stoptypescript

\starttypescript [Arabic]
  \definetypeface [Arabic] [rm] [serif] [arabic] [default] 
\stoptypescript 
  


\setupmargindata[margintext]
[align=r2l]

\setupalign[r2l]  


\setuppapersize[A4]


\setuplayout[
  grid=min,
  backspace=46.666mm, width=140mm,
  topspace=33.000mm, height=198mm,
  header=12.9mm,footer=9mm,
  ]
  
  
%% Double sided document
\setuppagenumbering[
  alternative=doublesided,
  state=none,
  location={header,marginedge},
%  conversion=romannumerals, left={--~}, right={~--},
]


\setupbodyfont[Arabic,18pt]
\setupinterlinespace[line=42pt]

 
\setupheads[number=no]
\setuphead[chapter]
[style=\bfd,before=,after=\blank,alternative=middle,grid=both]
\setuphead[section][style=\bfc,before=\blank,after=,grid=both]

\setupbackgrounds[text][text][frame=off, topframe=on]

\setupheader[style=\righttoleft, state=normal] 

\setupheadertexts
[{\getmarking[chapter]}][{\pagenumber}]
[{\pagenumber}][{\getmarking[chapter]}]



\starttext
\chapter{شرح الآجرومية}
الحمد لله رب العالمين، وصلى الله وسلم وبارك على عبده ورسوله نبينا محمد وعلى 
آله وصحبه أجمعين، أما بعد:\\
\stoptext
___
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
___

Re: [NTG-context] Page Numbers change after 9 to 01 - 11 -21 - 31 and so on.

2016-01-18 Thread Ibn Saeed
It seems to be the issue with 

\setupheader[style=\righttoleft, state=normal] 

The style is righttoleft to accomodate the proper direction for arabic text. 
But it messes up the page number direction.

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

Re: [NTG-context] Page Numbers change after 9 to 01 - 11 -21 - 31 and so on.

2016-01-18 Thread Ibn Saeed
Mohammad Hossein Bateni  gmail.com> writes:

> 
> 
> One hacky way to fix it is the following:
> 
> \setupheadertexts        [{\getmarking[chapter]}]    
[{\lefttoright\pagenumber}]        [{\lefttoright\pagenumber}]        
[{\getmarking[chapter]}]
> 
> 
> Ideally \setupdirections[bidi] or something like that should be used, as I 
mentioned in the other thread; that'll fix a bunch of other problems, as 
well

I did enable \setupdirections[bidi=global] and it did not help.

Here is how it was solved. I could not use your solution as it would move 
the position of the page number of the even page on top of the chapter name.

So here is the solution derived from your answer, which works for my 
scenario.

\setupheader[margin][
style=\righttoleft, 
state=normal
] 

\setupheadertexts
[{\righttoleft\getmarking[chapter]}][{\pagenumber}]
[{\pagenumber}][{\righttoleft\getmarking[chapter]}]

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

[NTG-context] (mashriqi) Arabic-Hindi Numerals

2016-01-18 Thread Ibn Saeed
Hello

I am trying to get mashriqi arabic numerals. 

i tried

\setupuserpagenumber[numberconversion=arabicnumerals]

but it does not make any change.

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

Re: [NTG-context] Arabic Letters are disjointed and reversed in headers and margin

2016-01-17 Thread Ibn Saeed

> 
> \setupmargindata
>   [margintext]
>   [align=r2l]
> 
> use \setupalign[r2l] and \righttoleft and not the dir primitives
> 


I did not understand how to use 

"use \setupalign[r2l] and \righttoleft and not the dir primitives"

Do you mean that i should remove these lines ?

\pagedir TRT
\bodydir TRT
\pardir TRT
\textdir TRT


How should i use \setupalign[r21] and \righttoleft

i have added your code above the starttext area and it did not make any 
change



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

Re: [NTG-context] Arabic Letters are disjointed and reversed in headers and margin

2016-01-17 Thread Ibn Saeed
Ibn Saeed  gmail.com> writes:

> 
> 
> > 
> > \setupmargindata
> >   [margintext]
> >   [align=r2l]
> > 
> > use \setupalign[r2l] and \righttoleft and not the dir primitives
> > 
> 
> I did not understand how to use 
> 
> "use \setupalign[r2l] and \righttoleft and not the dir primitives"
> 
> Do you mean that i should remove these lines ?
> 
> \pagedir TRT
> \bodydir TRT
> \pardir TRT
> \textdir TRT
> 
> How should i use \setupalign[r21] and \righttoleft
> 
> i have added your code above the starttext area and it did not make any 
> change
> 
> 


By using right 

\setupmargindata
 [margintext]
 [align=r2l]

and 
\setupalign[r2l]

The margin arabic text appears correctly

But the arabic texts in the header is still the same.



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

[NTG-context] Arabic Letters are disjointed and reversed in headers and margin

2016-01-17 Thread Ibn Saeed
I have also made a post at tex.stackexchange.com

I am trying to get Arabic Chapter Name in the header and some arabic text in 
the margins using ConTeXt MarkIV

Here is the code:

\mainlanguage[arabic]

\setupdirections[bidi=global]

\definefontfeature
  [arabic]
  [mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,tlig=yes,
calt=yes,trep=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]


\starttypescript [serif] [arabic]
  \definefontsynonym [Arabic-Regular] [file:ScheherazadeRegOT.ttf] 
[features=arabic]
  \definefontsynonym [Arabic-Bold] [file:ScheherazadeRegOT.ttf] 
[features=arabic]
\stoptypescript

\starttypescript [serif] [arabic] [name]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif] [Arabic-Regular] [features=arabic]
 \definefontsynonym [SerifBold] [Arabic-Bold][features=arabic]
\stoptypescript

\starttypescript [Arabic]
  \definetypeface [Arabic] [rm] [serif] [arabic] [default] 
\stoptypescript 
  

\def\ArabicGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\def\ArabicParDir{\textdir TRT\pardir TRT}
\def\ArabicTextDir   {\textdir TRT}


\define\setarabic
  {\ArabicGlobalDir%
   \usetypescript[Arabic]%
   \setupbodyfont[Arabic,20pt]}

\definestartstop
  [arabicpar]
  [commands=\Arabic\ArabicParDir]

\define[1]\RT
  {{\Arabic\ArabicTextDir#1}}


\pagedir TRT
\bodydir TRT
\pardir TRT
\textdir TRT




\setuppapersize[A4]

\setuplayout[
  grid=min,
  backspace=55.999mm, width=130mm,
  topspace=39.666mm, height=210mm,
  header=12mm, footer=9mm,
  ]



\setupbodyfont[Arabic,24pt]
\setupinterlinespace[line=42pt]


\setupheads[number=no]
\setuphead[chapter]
[style=\bfd,before=,after=\blank,alternative=middle,grid=both]
\setuphead[section][style=\bfc,before=\blank,after=,grid=both]

\setupbackgrounds[header][text][frame=off, bottomframe=on]

\setupheadertexts
[{\getmarking[chapter]}][{صفحة }]
[{صفحة }][{\getmarking[chapter]}]

\setupinmargin[stack=yes]


\starttext

\chapter{الآجرومية}

\margintext{الآجرومية}

الحمد لله رب العالمين، وصلى الله وسلم وبارك على عبده ورسوله نبينا محمد وعلى 
آله وصحبه أجمعين، أما بعد:
فلا يخفى على من له أدنى عناية بالعلم الشرعي لا سيما ما يتعلق بالكتاب 
العزيز والسنة النبوية لا يخفى عليه أهمية معرفة اللغة العربية بفنونها 
العشرة أو الإثني عشر: 



\stoptext



here is the screenshot:

http://postimg.org/image/too54uv7r/




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