ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Typesetting Classical Arabic Poetry
@ 2013-08-23 21:12 J. R. Schmid
  2013-08-24 14:13 ` Idris Samawi Hamid ادريس   سماوي حامد
  0 siblings, 1 reply; 5+ messages in thread
From: J. R. Schmid @ 2013-08-23 21:12 UTC (permalink / raw)
  To: ntg-context

Dear list,

for better or worse, I'm trying to typeset Arabic poetry in ConTeXt 
after having become fed up with LaTeX for a variety of reasons. Arabic 
script itself is not a problem and I already love how easy it is to use 
whatever font you like and how clean ConTeXt seems to be in its design.

What is giving me trouble, though, is the face that traditionally, 
poetry needs to be typeset in two columns. Using an English poem for an 
example, it'd look a little bit like this:

                 Said Rich Accetta-Evans:

   1 My  poem  delights  me    2 My   poem   is   mine
   3 It is like fresh bread    4 When I bake it myself
   5 It   is  like  my  son    6 The  day  he was born
   [...]

This is to be read in the order of the numbers, so "columns" or 
"simplecolumns" won't work (I think).

The second problem is the way in which Arabic needs to be justified, 
namely not by adjusting the space between words, but instead by 
adjusting the connecting line between letters:

                قال أبو الطيب أحمد بن الحسين المتنبّي

   أنـا الـذي نـظر الأعمى إلـى أدبي  وأسمعـت كـلماتــي مـن به صمم
   كم تـطلبون لـنا عيبًـا فــيعجزكم  ويكره المجد ما تأتـون والكرم
   ما أبعـد العيب والنقصان عن شرفي  أنا الثّريا وذان الشيب والهرم
   [...]

I couldn't find any info on either of these two questions through the 
documentation or through Google (although I might have been looking for 
the wrong keywords). Any comments are appreciated! :-)

With best regards,
           J. R. Schmid
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Typesetting Classical Arabic Poetry
  2013-08-23 21:12 Typesetting Classical Arabic Poetry J. R. Schmid
@ 2013-08-24 14:13 ` Idris Samawi Hamid ادريس   سماوي حامد
  0 siblings, 0 replies; 5+ messages in thread
From: Idris Samawi Hamid ادريس   سماوي حامد @ 2013-08-24 14:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2612 bytes --]

Hi JR,

On Fri, 23 Aug 2013 15:12:54 -0600, J. R. Schmid <jrs@weitnahbei.de> wrote:

> for better or worse, I'm trying to typeset Arabic poetry in ConTeXt

For better :-)

> after having become fed up with LaTeX for a variety of reasons. Arabic  
> script itself is not a problem and I already love how easy it is to use  
> whatever font you like and how clean ConTeXt seems to be in its design.
>
> What is giving me trouble, though, is the face that traditionally,  
> poetry needs to be typeset in two columns. Using an English poem for an  
> example, it'd look a little bit like this:
>
>                  Said Rich Accetta-Evans:
>
>    1 My  poem  delights  me    2 My   poem   is   mine
>    3 It is like fresh bread    4 When I bake it myself
>    5 It   is  like  my  son    6 The  day  he was born
>    [...]
>
> This is to be read in the order of the numbers, so "columns" or  
> "simplecolumns" won't work (I think).

I have an experimental/rudimentary module that does this. It needs some
work to get, e.g., better widths for automatic typesetting in the
high-level code (tracking the dynamic \hsize in ConTeXt) but you are
welcome to try it. See the attached module and test file.

>
> The second problem is the way in which Arabic needs to be justified,  
> namely not by adjusting the space between words, but instead by  
> adjusting the connecting line between letters:
>
>                 قال أبو الطيب أحمد بن الحسين المتنبّي
>
>    أنـا الـذي نـظر الأعمى إلـى أدبي  وأسمعـت كـلماتــي مـن به صمم
>    كم تـطلبون لـنا عيبًـا فــيعجزكم  ويكره المجد ما تأتـون والكرم
>    ما أبعـد العيب والنقصان عن شرفي  أنا الثّريا وذان الشيب والهرم
>    [...]
>
> I couldn't find any info on either of these two questions through the  
> documentation or through Google (although I might have been looking for  
> the wrong keywords). Any comments are appreciated! :-)

I'm hoping that this will be implemented in the coming months. Hans and I
have done work on the general case -- involving very advanced
font-features -- but not so much on the simple case -- involving
insertions of tatweel. That may seem counter-intuitive, usually the simple
comes before the complex ;-)

Let me know how things work, and you can write me off-list.

Best wishes
Idris
-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

[-- Attachment #2: arabic-poem.tex --]
[-- Type: application/x-tex, Size: 2634 bytes --]

[-- Attachment #3: hemistiches.tex --]
[-- Type: application/x-tex, Size: 698 bytes --]

[-- Attachment #4: arabic-poem.pdf --]
[-- Type: application/pdf, Size: 32378 bytes --]

[-- Attachment #5: 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Typesetting Classical Arabic Poetry
  2013-08-26 18:06 ` Marco Patzer
@ 2013-08-26 20:39   ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2013-08-26 20:39 UTC (permalink / raw)
  To: ntg-context

On 8/26/2013 8:06 PM, Marco Patzer wrote:

> In contrast to Latin script, justifying Arabic text is not solely
> achieved by varying the inter-word space, but also by means of
> elongating particular glyps². After having read Idris' article³ it
> seems like this is a font feature. However, I have no idea which
> particular feature is responsible for the elongation and how many
> fonts actually have it. I could not find the mentioned Husayni font
> anywhere, which seems to be able to do this. So for the time being
> the justification is only done by varying the inter-word space.

there is a special mechanism for that in context already for some years 
but it works best with arabic fonts that have an extensive featureset 
like the upcoming husayni ... once that font is ready idris will wrap up 
the systematic approach related to this font (as it depends on featuresets)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Typesetting Classical Arabic Poetry
  2013-08-26 14:15 J. R. Schmid
@ 2013-08-26 18:06 ` Marco Patzer
  2013-08-26 20:39   ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Patzer @ 2013-08-26 18:06 UTC (permalink / raw)
  To: ntg-context


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

On 2013–08–26 J. R. Schmid wrote:

> I've played around with your module and ran into some problems
> which may have been due to my inexperiencedness with ConTeXt
> (rupturing of ligatures, at least with Scheherazade and
> inconsistent line height). Marco has been helping me though, and
> it looks like he solved those problems while improving on your
> module while doing so. He doesn't seem to be done with it yet and
> perhaps he'll want to reply himself when he is, so I'll leave it
> at that for now :-)

I don't do any Arabic typesetting myself, but I wrapped Idris' idea
into a nicer interface¹. Since I don't use it myself, I'll leave it
like that until I receive feedback or improvement suggestions.
There's no documentation yet, as I don't know how useful this is in
the first place.

In contrast to Latin script, justifying Arabic text is not solely
achieved by varying the inter-word space, but also by means of
elongating particular glyps². After having read Idris' article³ it
seems like this is a font feature. However, I have no idea which
particular feature is responsible for the elongation and how many
fonts actually have it. I could not find the mentioned Husayni font
anywhere, which seems to be able to do this. So for the time being
the justification is only done by varying the inter-word space.

Arabic is beautiful!

Marco

¹ https://github.com/mpfusion/context-arabic-verse
² http://en.wikipedia.org/wiki/Kashida
³ https://www.tug.org/TUGboat/tb31-2/tb98hamid.pdf

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Typesetting Classical Arabic Poetry
@ 2013-08-26 14:15 J. R. Schmid
  2013-08-26 18:06 ` Marco Patzer
  0 siblings, 1 reply; 5+ messages in thread
From: J. R. Schmid @ 2013-08-26 14:15 UTC (permalink / raw)
  To: ntg-context


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

Hi Idris,

thank you much for your answer and also the attached files!

I've played around with your module and ran into some problems which may
have been due to my inexperiencedness with ConTeXt (rupturing of ligatures,
at least with Scheherazade and inconsistent line height). Marco has been
helping me though, and it looks like he solved those problems while
improving on your module while doing so. He doesn't seem to be done with it
yet and perhaps he'll want to reply himself when he is, so I'll leave it at
that for now :-)

Best regards from Germany,
   Jonathan

[-- Attachment #1.2: Type: text/html, Size: 638 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-26 20:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23 21:12 Typesetting Classical Arabic Poetry J. R. Schmid
2013-08-24 14:13 ` Idris Samawi Hamid ادريس   سماوي حامد
2013-08-26 14:15 J. R. Schmid
2013-08-26 18:06 ` Marco Patzer
2013-08-26 20:39   ` Hans Hagen

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).