Writing in Hindi and other scripts (was: Re: [OS X TeX] Installing CJK)

Jonathan Kew jonathan_kew at sil.org
Thu Jul 15 10:57:08 EDT 2004


On 15 Jul 2004, at 3:24 pm, Thomas Schröder wrote:

> Hi Jonathan,
>
> Am 15.07.2004 um 15:00 schrieb Jonathan Kew:
>
>> I wonder if this procedure is really adequate; I don't see where in 
>> this solution there will be any mechanism to deal with the 
>> complex-rendering requirements of Devanagari -- reordering of the 
>> short-i vowel, formation of half forms and conjuncts, formation and 
>> positioning of reph, etc.
>
> Well, if Unicode can do it, so can this method because you type your 
> stuff with the Devanagari keyboard layout. Right?

No, it's not. The Devanagari keyboard layout generates a sequence of 
Unicode characters. But the mapping from Unicode characters to glyphs 
in a font is far from a simple one-to-one mapping. There are issues of 
reordering, contextual selection of various glyphs for a given 
character, and so on. This method doesn't have any implementation of 
that layer, as far as I can see.

>
>> (Similar comments would apply to using the Titus font for other 
>> scripts such as Arabic.)
>
> My concern was, wether the Titus font could do all the things you 
> could do with the Devanagari keyboard layout and furthermore wether 
> you were really able to do everything necessary with the layout.

I expect it probably supports all the *character codes* that the layout 
will generate, but without some "smart rendering" technology such as 
AAT or Uniscribe/OpenType, the rendered text will not be correct 
Devanagari.

Using the Devanagari-QWERTY keyboard layout, enter the key sequence
	h i n f d I
which should render as हिन्दी (provided your mail client displays it OK; 
type it in TextEdit to check!). Try typesetting this with pdflatex and 
Titus, and see how close it comes to the same result; I'm guessing the 
short 'i' will not appear in the right place, and the 'nd' cluster will 
not form correctly.

>
>> Another option might be to use XeTeX, which would allow you to 
>> directly use the Devanagari MT font that ships with OS X, with 
>> Unicode source text; this takes care of the character-to-glyph 
>> rendering process for you.
>
> I know, but I wanted to do this with normal pdflatex because if I 
> understand this correctly, then XeTeX is OS-X-only, at least at the 
> moment.

Correct. But to do it with normal pdflatex, you'll need (a) access to 
additional glyphs beyond the nominal forms that are associated with 
each Unicode codepoint; and (b) some pretty complex processing to 
handle the character-to-glyph mapping with all its contextual 
reordering and glyph shaping behavior.

To do it in a platform-independent way, you could use Omega; or you 
could try to implement all the behavior in TeX macros (you'd be a 
braver man than I am!); or create a portable pre-processor along the 
lines of ArabTeX.

Regards,

Jonathan
-----------------------------------------------------
Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the MacOSX-TeX mailing list