![](https://secure.gravatar.com/avatar/e6a8cdca99f0d9d386925fda7012a8a8.jpg?s=120&d=mm&r=g)
Thank you Kauśika, these details are v. helpful.
Best, Richard
--
T +6433121699 M +64210640216
rmahoney@indica-et-buddhica.org
https://indica-et-buddhica.org/
Indica et Buddhica
Littledene Bay Road Oxford NZ
-----Original Message-----
From: kauśika via ntg-context
- initial indic transliteration support .. recent indic (font) experiences and transliteration tricks will be eplained by kauśika
Recently when we were troubled by incorrect rendering of certain conjuncts in malayalam, Hans added a new font-feature. More below*, but first some background: from my testing, the main reason for the problems with fonts seems to come from the varied interpretations and/or implementations of OTF specification. To add to this complexity there are two script tags (v1, v2 in OTF and -one, -two in ConTeXt) for each writing system (script). While there are fonts which work very well right away many others have issues and the feature was added to somewhat alleviate these issues. *The feature is 'indic'. It has two aspects: 'movematra' and 'conjuncts'. conjuncts takes values: mixed | continue | quit | auto movematra takes values: default | leftbeforebase | auto By default indic=auto for indic scripts. So this "should work" in most cases. In case there are issues, I have seen that the following approach usually yields best result in debugging: • try to switch between the -one and -two version of the features (i.e. use the v1 or v2 OTF script tag): some fonts may have some rules defined only under one of the script tags. (I am not an expert in fonts but with my testing of free fonts I have seen this). • if that does not fix (the particular issue), revert to a working feature and then set the indic feature as indic={movematra=default,conjuncts=quit} to see • Please see: https://www.mail-archive.com/ntg-context@ntg.nl/msg99691.html issues usually have a pattern (across languages/scripts so some hacks might work) For conjuncts, 'mixed' and 'auto' are synonymous. Setting conjuncts=mixed ensures that for some fonts conjuncts with the reph forms are rendered correctly. (This was tested with a relatively new font in malayalam using the mlm2 script tag). For problematic fonts, if one can identify which conjuncts work under which script tag and/or with what settings for indic, then, using ConTeXt feature sets one can easily fix rendering in documents by doing, for instance {\feature[=][devanagari-two] …}, and/or {\feature[=][devanagari-one] …} accordingly See the comprehensive wiki page: https://wiki.contextgarden.net/Featuresets for more details on how such feautresets might be built and applied. Now, a brief note on the transliterations macros. First, one specifies that indic transliteration is desired with: \usetransliteration[indic] Now, one can transliterate sanskrit to and from various forms by using \transliterate[scheme]{ … } where scheme is one of: • iast to deva • deva to iast • deva to mlym which are respectively the following schemes : • IAST → Devanagari • Devanagari → IAST • Devanagari → Malayalam More schemes will be added in the near future for various other indic scripts as well. Currently there is only support for sanskrit language, which we can extend to other languages (wherever the script allows). Additionally, there is also \definetransliteration[…][…] which can be used to define a specific transliteration block. So, one just sets vector accordingly to get the desired transliteration block. Please see below a minimal example for both: % SOF \usetransliteration[indic] \definetransliteration [MyIASTtoDeva] [color=blue, style=bold, language=sa, vector={iast to deva}] \starttransliteration[MyIASTtoDeva]%[color=green] can set a new color here idaṁ śarīraṁ kaunteya kṣetramityabhidīyate. etadyo vetti taṁ prāhuḥ kṣetrajña iti tadvidaḥ. \stoptransliteration \transliteration[MyIASTtoDeva]{idaṁ śarīraṁ kaunteya kṣetramityabhidīyate} % or directly \transliterate[iast to deva]{idaṁ śarīraṁ kaunteya kṣetramityabhidīyate} % EOF kauśika ______________________________________________________________________ _____________ 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 ______________________________________________________________________ _____________