zum Fachbereich
zur Fakultät
zur Universität


  utf-8 for Sanskrit (utfskt) - Typesetting Sanskrit Texts with OmegaTeX


Processing Sanskrit texts in utf-8 notation with Omega TeX


The idea behind this "package" was to hide what follows from the end user.

skt-rm.sty and skt-dn.sty

In both styles the transliteration part is the same. The transliterations require the diatop-macro for the placement of double accents (vedic accented long vowels etc.), which is defined first:

    \setbox1=\hbox to1\dimen0{\hss#1\hss}%
    \hbox to1\dimen0{\hss#2\hss}}}

Then follows the input translation for utf-8:

% setup for utf-8 input %
  \DefaultInputMode onebyte
  \InputMode currentfile onebyte
  \DefaultInputTranslation onebyte \UtfEightInput
  \InputTranslation currentfile \UtfEightInput}

Then Stefan Baums' sanskrit.otp is invoked.

% setup default: utf-8 Sanskrit Roman into tranliterated output
\addbeforeocplist 1 \Sanskrit
skt-rm ends here.

In addition to that the file skt-dn.sty continues with the devnag specific code:

% devnag setup

\externalocp\DevnagConv=odevnag {}

\addbeforeocplist 1 \UrToDevnag
\addbeforeocplist 10 \DevnagConv

\newcommand{\Nag}[1]{\begingroup\pushocplist\InputLatinOutputNagari\dn #1 \endgroup}
\newcommand{\Nagbf}[1]{\begingroup\pushocplist\InputLatinOutputNagari\dnb #1 \endgroup}
\newcommand{\Nagsl}[1]{\begingroup\pushocplist\InputLatinOutputNagari\dnsl #1 \endgroup}


First the external ocp odevnag -basically Toru Tomabechi's omdevnag with a few adaptions and fixes- is named, then ur2dev, which converts utf-8 into devnag codes. In the following ocp-list these two processes of conversion are combined, first utf-8 roman is converted into devnag (aa, .n etc.); then the result is processed by odevnag, which is a perl replacement for devnag.c, a preprocessor that was used for Velthuis's devnag package.

By the way, dev.sty has been renamed to omdev.sty, since I have added some macros for the boldface and slanted Nāgarī. The remaining changes concern the new font faces, which are really very simple modifications of metafont parameters.

A Hint for Win-Users and Emacs 21 Despite all announcements that Windows XP is Unicode-enabled, only very few of the Unicode fonts supplied with this operationg system display all the diacritics necessary for Sanskrit. Those who do take the diacritics from a different font with the result that the screen looks even worse than with our self-constructed DOS fonts in the beginning of the computing era. And I must say that many of the ttf-fonts specifically created for the Sanskritist are not aesthetically satisfying. There is one exception, however, namely the "Frutiger Monotype" font supplied with the Microsoft Reader. Just install the Microsoft Reader (provided somewhere on and the font will appear in the selection menu.

J Hanneder ( )

  Copyright       Disclaimer       Impressum       Kontakt
© 2002 Martin-Luther-Universität Halle-Wittenberg
Philosophische Fakultät I
Seminar für Indologie