Indological Unicode support for Emacs and Omega
Before you read on, please note that the software described on this page has since been integrated into the more comprehensive “skt‐utf” package by Jürgen Hanneder of the Martin‐Luther‐Universität Halle‐Wittenberg. Additional documentation for skt-utf has been written by Christian Coseru of the College of Charleston. Your best bet is reading all three pages.
Description
Here is a Unicode input method for Sanskrit transliteration and Western European characters for Emacs (sanskrit.el) and a corresponding Omega Translation Process to translate this range of characters from Unicode to LATEX macros (sanskrit.otp).
Using this Omega Translation Process by putting
\ocp\InUTF=inutf8
\DefaultInputTranslation onebyte \InUTF
\InputTranslation currentfile \InUTF
before your
\documentclass[]{}
and
\ocp\Sanskrit=sanskrit
\ocplist\MyOCPList=
\addbeforeocplist 1 \Sanskrit
\nullocplist
\pushocplist\MyOCPList
right after it, and invoking lambda instead of latex, your LATEX setup (including Babel, your favourite fonts, etc.) will continue working just like before, but now you can type “saṃskṛtam” in your source file instead of “sa\d{m}sk\d{r}tam”.
If you want to typeset accented Sanskrit text, the OTP for now has a dependency on macros from exaccent.sty, which comes with the TIPA package (get it from http://www.tooyoo.l.u-tokyo.ac.jp/~fkr/tipa.html), and on the following macro, that you should define in your preamble:
\def\diatop[#1|#2]{\leavevmode{\setbox1=\hbox{{#1{}}}\setbox2=\hbox{{#2{}}}%
\dimen0=\ifdim\wd1>\wd2\wd1\else\wd2\fi%
\dimen1=\ht2\advance\dimen1by-1ex%
\setbox1=\hbox to1\dimen0{\hss#1\hss}%
\rlap{\raise1\dimen1\box1}%
\hbox to1\dimen0{\hss#2\hss}}}%
Screenshots
Sample files
Here are the files that you see in the screenshots above: sample.tex, sample.dvi.
Plans
At present, the input method and OTP reflect the mode of transliterating Sanskrit that I personally use (the traditional German one). I plan to gradually add support for other conventions (American, French) and other Indologically relevant languages. Let me know what you would like to see added.
The diatop macro and those parts of exaccent.sty that the OTP uses should probably be put in their own sanskrit.sty, to be distributed and used together with sanskrit.otp.
Wishlist
Adding Sanskrit hyphenation patterns to Babel is highly desirable. Apparently, somebody has done this, and they are supposed to be included in a future version of Babel. More information on this, or even the actual patterns file, would be welcome.
Contact
You can email your comments to baums@u.washington.edu. If you seek help with problems, please describe the problem as precisely as possible and in any case let me know the name and version of your operating system, windowing system, TEX distribution, and Emacs.