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
___

Re: [NTG-context] Arabic transliteration

2008-05-14 Thread Idris Samawi Hamid
On Wed, 14 May 2008 08:41:08 -0600, Alan Bowen [EMAIL PROTECTED]  
wrote:

 For now, however, I will have to
 cobble a macro using hints that Mojca provided.

 By the way I am using Latin Modern (ec encoding).

Have you checked the very latest Latin Modern? You should not need macros,  
since all Arabic transliteration chars are there now.

If you really do need macros, I can send you my old Arabic transliteration  
macros and you can use/modify those for the effect you need.

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Arabic transliteration

2008-05-14 Thread Mojca Miklavec
On Wed, May 14, 2008 at 4:41 PM, Alan Bowen wrote:
 Many thanks, Idris and Mojca.

  If all goes well, I will move to luatex this summer---that really does
  seem to be the way to go---and then investigate XeTeX, which I gather
  is now functioning well with luatex. For now, however, I will have to
  cobble a macro using hints that Mojca provided.

My hint(s) only work in XeTeX and LuaTeX.

  By the way I am using Latin Modern (ec encoding).

With ec encoding you really need to do ugly things. You need to
compose a character by more or less manually lowering the breve accent
and take care for italic correction yourself. Not even accent
primitive can be used for it. And you cannot use the combining accent
after the character or the proper Unicode glyph (though the latter
might be possible by patching some definition in ConTeXt core), you
always need to use a macro.

With XeTeX and LuaTeX all that comes (almost) for free.

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


Re: [NTG-context] Arabic transliteration

2008-05-14 Thread Alan Bowen
Ugly things indeed, Mojca. And even more so given my limited skills.  
Here is what I have for  “H” with a breve accent below.
\def\Hbrevebelow{H\smash{\lower1.9ex\hbox{\kern-3pt\llap{\char'010}}} 
\kern3pt}
This only “works” in an italic environment by the way.

With apologies to the wizards on this list,

Alan

On May 14, 2008, at 13;17,49 , Mojca Miklavec wrote:

 On Wed, May 14, 2008 at 4:41 PM, Alan Bowen wrote:
 Many thanks, Idris and Mojca.

 If all goes well, I will move to luatex this summer---that really  
 does
 seem to be the way to go---and then investigate XeTeX, which I gather
 is now functioning well with luatex. For now, however, I will have to
 cobble a macro using hints that Mojca provided.

 My hint(s) only work in XeTeX and LuaTeX.

 By the way I am using Latin Modern (ec encoding).

 With ec encoding you really need to do ugly things. You need to
 compose a character by more or less manually lowering the breve accent
 and take care for italic correction yourself. Not even accent
 primitive can be used for it. And you cannot use the combining accent
 after the character or the proper Unicode glyph (though the latter
 might be possible by patching some definition in ConTeXt core), you
 always need to use a macro.

 With XeTeX and LuaTeX all that comes (almost) for free.

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

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


Re: [NTG-context] Arabic transliteration

2008-05-13 Thread Idris Samawi Hamid
Hi,

On Tue, 13 May 2008 15:53:17 -0600, Alan Bowen [EMAIL PROTECTED]  
wrote:

 Greetings!

 I am trying to typeset some transliterated Arabic and one of the
 diacritical marks is giving me a problem. How does one put what looks
 like a breve accent (a cup or concave arc) under an letter in ConTeXT?

I used to use macros for that purpose, with the latest Latin Modern fonts  
you should have every Arabic transliteration character you need, including  
the arc under the h, ie, ḫ. In luatex you just type ḫ. Try it!

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
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
___


Re: [NTG-context] Arabic transliteration

2008-05-13 Thread Mojca Miklavec
On Tue, May 13, 2008 at 11:53 PM, Alan Bowen wrote:
 Greetings!

  I am trying to typeset some transliterated Arabic and one of the
  diacritical marks is giving me a problem. How does one put what looks
  like a breve accent (a cup or concave arc) under an letter in ConTeXT?

Hello,

First of all, it's nice if the font provides that character. Which
fonts are you using for your document?

I wanted to send you an example of how it can be done in different
ways, but there seems to be in interesting problem with XeTeX at the
moment, so I wasn't able to play with it.

But in general:

a) simply use character U+032E (combining breve below)
It kind-of-works with LM, but not perfect (there has been some
discussion about how to improve the behaviour of combining accents in
LM)

b) use character brevebelow from LM and use TeX to place the accent,
see enco-ini.tex for examples

Of course you can assign your own macro to either of the two options
to access the accent more easily.

Mojca


brevebelow.tex
Description: TeX document


brevebelow.pdf
Description: Adobe PDF document
___
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
___


Re: [NTG-context] Arabic transliteration

2008-05-13 Thread Idris Samawi Hamid
On Tue, 13 May 2008 16:24:02 -0600, Mojca Miklavec  
[EMAIL PROTECTED] wrote:

 I wanted to send you an example of how it can be done in different
 ways, but there seems to be in interesting problem with XeTeX at the
 moment, so I wasn't able to play with it.

 But in general:

 a) simply use character U+032E (combining breve below)
 It kind-of-works with LM, but not perfect (there has been some
 discussion about how to improve the behaviour of combining accents in
 LM)

The big problem with macros for this sort of thing is getting the italics  
right -- Arabic transliteration typically uses italics in running text.  
The macro will have to be adjusted (or an italic parameter changed) for  
every font. See [EMAIL PROTECTED] on page 356 of the TeXBook.

Anyway, the Unicode 1E00--FF block has most of these problematic chars,  
and LM has incorporated the relevant ones.

For other fonts, perhaps Hans could implement a combining command that  
gives an italics parameter option, though that will differ for regular,  
bold, etc...

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
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
___


Re: [NTG-context] Arabic transliteration macros

2005-10-15 Thread Henning Hraban Ramm

Am 2005-10-15 um 22:11 schrieb Idris Samawi Hamid:

If there are any other suggestions or comments to improve or  
streamline this,

please let me know.


Please publish this in the wiki at Arabian or Arabian and  
Hebrew (as supposed) liked at http://wiki.contextgarden.net/Fonts
(I don't know nothing about Arabian, but I'd like to see the list of  
non-latin scripts enhanced.)


Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context