HomeSucheUebersicht
   


zum Fachbereich
zur Fakultät
zur Universität

Aktuelles
Studium
Forschung
Mitarbeiter
Fachbibliothek
Institutsgeschichte
Publikationen
Links
Entertainment

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

utf-skt

Processing Sanskrit texts in utf-8 notation with Omega TeX

Components

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:

\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}}}

Then follows the input translation for utf-8:

% setup for utf-8 input %
\ocp\UtfEightInput=inutf8
\AtBeginDocument{
  \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
\ocp\Sanskrit=sanskrit
\ocplist\MyOCPList=
\addbeforeocplist 1 \Sanskrit
\nullocplist
\pushocplist\MyOCPList
\endinput
skt-rm ends here.

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

% devnag setup

\externalocp\DevnagConv=odevnag {}
\ocp\UrToDevnag=ur2dev

\ocplist\InputLatinOutputNagari=
\addbeforeocplist 1 \UrToDevnag
\addbeforeocplist 10 \DevnagConv
\nullocplist

\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}

\usepackage{omdev}
\endinput

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 microsoft.com) and the font will appear in the selection menu.

J Hanneder (hanneder@indologie.uni-halle.de )

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