[NTG-context] Arabic transliteration—ayn and alif (MKII)

2011-12-11 Thread Alan Bowen
What is the best way to produce ayn and alif in transliterated Arabic using
MKII (Latin Modern)?

ACB
___
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 transliteration—ayn and alif (MKII)

2011-12-11 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Alan,

On Sun, 11 Dec 2011 06:21:31 -0700, Alan Bowen bowenala...@gmail.com
wrote:

What is the best way to produce ayn and alif in transliterated Arabic  
using

MKII (Latin Modern)?


Why MkII? MkIV is much better for this.

Anyway, the old approaches are obsolete, since LM now has the glyphs for
02BE (hamzah) and 02BF (alif). OTOH, they may be needed for other fonts.
Let's start with something REALLY obsolete:

% ac-trans.tex
%%%=low-level
\def\SHIFT#1{\dimen0=.001ex
   \multiply\dimen0 by\fontdimen1\font
   \multiply\dimen0 by #1
   \kern.0040\dimen0} % compensate for slant/italic in lower
accents

%\def\USHIFT#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font
% \kern.0040\dimen0} % compensate for slant/italic in upper
accents

%\def\USHIFTN#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font
% \kern-.0040\dimen0} % compensate for slant/italic in upper
accents

\def\buildtextbottombreve{\bottomaccent{.25ex}{0}{19}{\textbreve}}

%%%=ayn-hamzah
\def\CUPD#1#2{\leavevmode%
\SHIFT{#1}\rotate[rotation=180,location=high]{\txx c}%
\SHIFT{#2}}

%\definecharacter AYN   {\leavevmode\raise.9ex\hbox{\txx \SHIFT{4}
c\SHIFT{-4}}{}}
%\definecharacter
HAMZAH{\leavevmode\kern.07em\raise.9ex\hbox{\CUPD{7}{-5}}{}}

\define[4]\AYN   {\definecharacter Ayn
  {\leavevmode\kern#1em\raise#2ex\hbox{\txx
  \SHIFT{#3} c\SHIFT{#4}}{}}}
\define[4]\HAMZAH{\definecharacter Hamzah
  {\leavevmode\kern#1em\raise#2ex\hbox{\CUPD{#3}{#4}}{}}}

\AYN{0}{0.9}{4}{-4} %
\HAMZAH{0.07}{0.9}{7}{-5}

\def\'{\Hamzah}
\def\`{\Ayn}
\endinput

% mkii-trans.tex
\starttext
\def\ISHA{\`i\v sha\'}
For Muslims, \ISHA{} is the last prayer of the day.

For Muslims, {\em \ISHA{}} is the last prayer of the day.

For Muslims, {\it \ISHA{}}  is the last prayer of the day.
\stoptext
===

Brr... Or you have to have to define an encoding that includes the 02BE
02BF chars. I wrote an article on that, and I NEVER want to go back to
that again, ever :-)

Now we can do better, at least in LM. In MkIV, we simply:


\starttext
For Muslims, ʿišaʾ is the last prayer of the day.

For Muslims, {\em ʿišaʾ} is the last prayer of the day.

For Muslims, {\it ʿišaʾ}  is the last prayer of the day.
\stoptext

The italics/slants look better, no need to fight with italic correction
etc. I use a transliteration keyboard on Windows that I can send you if  
you like.


Anyway: It's time to switch to MkIV, my man :D

Best wishes
Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shīʿī Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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
___