%
%    manual.tex v2.0
%
%    LaTeX source file of the Manual for the "Devanagari for TeX" package.
%    Copyright (C) 1991-1999 University of Groningen, The Netherlands
%
%    Author  : Anshuman Pandey <apandey@u.washington.edu>
%    Revised : 23 January 2000
%
%    This program is free software; you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation.
%
%    This program is distributed in the hope that it will be useful,
%    but without any warranty; without even the implied warranty of
%    merchantability or fitness for a particular purpose. See the
%    GNU General Public License for more details.
%

\documentclass[11pt,titlepage]{article}
\usepackage{dev}
\usepackage{multicol,mflogo}
%\renewcommand{\rmdefault}{ptm}

\def\portraitpage{%
    \setlength{\topmargin}{-0.50in} % real margin == this + 1in
    \setlength{\oddsidemargin}{-0.0in} % real margin == this + 1in
    \setlength{\evensidemargin}{-0.0in} % real margin == this + 1in
    \setlength{\columnsep}{20pt}
    \setlength{\columnseprule}{0.4pt}

    % Use Portrait Size Page
    \setlength{\textwidth}{6.5in}
    \setlength{\textheight}{9.0in}%
}
\portraitpage

\newcommand{\moddate}{23 January 2000}
\newcommand{\version}{2.0}

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\columnseprule}{0pt}

\begin{document}

\title{{\LARGE \bfseries Devan\=agar{\=\i} for \TeX{}} \\
       Version \version{} \\
       User's Manual}
\author{\Large Anshuman Pandey}
\date{\large \moddate{}}
\maketitle

\tableofcontents
\listoftables
\vfill
\newpage

\section{Introduction}
The \textit{Devan\=agar{\=\i} for \TeX{}} (\textsf{devnag}) package enables 
the typesetting of the Devan\=agar{\=\i} script in \TeX{} and \LaTeX{}. 
The Devan\=agar{\=\i} script is used for writing and printing Sanskrit. 
It is also the script used to write a number of languages in Northern 
and Central India such as Hindi and Marathi.

The \textsf{devnag} package was originally developed and released
in May 1991 by Frans Velthuis, and has since been used by a number
of scholars and enthusiasts alike. Since its release, the package has 
been upgraded for compliance with the \LaTeX{} standard.

This document accompanies version \version{} of the \textsf{devnag} package.
This latest release includes the newest version of the preprocessor, 
style files, and fonts. Version \version{} of \textsf{devnag} is the first major 
revision of the preprocessor since its original release. It is based on 
version  1.6 (there are no releases 1.7, 1.8 or 1.9), and, in addition to 
Marc Csernel's \LaTeX{} extensions, incorporates numerous modifications 
made by John Smith. The style files have been revised by Dominik Wujastyk 
and Fran\c{c}ois Patte, and revisions of the font made by Anshuman Pandey.

This package may be found at various Comprehensive \TeX{} 
Archive Networks (CTAN) such as \texttt{ftp://ftp.tex.ac.uk/} in the directory
\texttt{tex-archive/language/devanagari/distrib/}.

Velthuis developed the \textsf{devnag} package with an objective of
keeping the format of the input source text as close as possible to 
the accepted scholarly standards for transliteration. In doing so he
instituted a widely used transliteration scheme known as the 
`Velthuis scheme'. The `Velthuis scheme' has been adapted by
various other Indic language \TeX{} packages and serves as the
basis of other Indic transliteration schemes.

The following individuals currently maintain the \textsf{devnag}
package. Please send questions regarding the preprocessor
directly to John Smith.

\begin{quote}
\begin{tabular}{ll}
John Smith         & \verb+jds10@cam.ac.uk+ \\
Fran\c{c}ois Patte & \verb+patte@math-info.univ-paris5.fr+ \\
Dominik Wujastyk   & \verb+d.wujastyk@ucl.ac.uk+ \\ 
Anshuman Pandey    & \verb+apandey@u.washington.edu+ \\
\end{tabular}
\end{quote}

Frans Velthuis may be contacted at \verb+velthuis@rc.rug.nl+.
\bigskip

{\parindent=0pt
Anshuman Pandey \\
University of Washington \\
Seattle, WA, USA \\
\verb+apandey@u.washington.edu+
\medskip

\moddate{}

\vfill

Copyright \textcopyright{} University of Groningen, The Netherlands, 1991-1998.
}
\newpage

\section{The Distribution}

The following files are distributed with version \version{} of the 
\textsf{devnag} package.
\bigskip

{
\renewcommand{\arraystretch}{1.50}
\begin{tabular}{ll}
\texttt{devnag.c} & C source code for the \textsf{devnag} preprocessor; ver. \version{} \\
\texttt{devnag.exe} & DOS/Win32 executable binary for the preprocessor. \\
& \\
\texttt{dnmacs.tex} & Plain \TeX{} macros; ver. 2.0. \\
\texttt{dev209.sty} & \LaTeX{} 2.09 style file. \\
\texttt{dev.sty} & \LaTeXe{} style file; ver. 2.0. \\
\texttt{udn.fd} & \LaTeXe{} font definition file for the New Font Selection Scheme (NFSS). \\
& \\
\texttt{dnchars.mf} & \MF{} character source for the Devan\=agar{\=\i} (\textsf{dvng}) font. \\
\texttt{defs.mf} & \MF{} definition file for \textsf{dvng}. \\
\texttt{dvng8.mf} & \MF{} source file for \textsf{dvng} at 8pt. \\
\texttt{dvng8.tfm} & \TeX{} Font Metric file for \textsf{dvng} at 8pt. \\
\texttt{dvng9.mf} & \MF{} source file for \textsf{dvng} at 9pt. \\
\texttt{dvng9.tfm} & \TeX{} Font Metric file for \textsf{dvng} at 9pt. \\
\texttt{dvng10.mf} & \MF{} source file for \textsf{dvng} at 10pt. \\
\texttt{dvng10.tfm} & \TeX{} Font Metric file for \textsf{dvng} at 10pt. \\ 
& \\
\texttt{manual.tex} & Documentation; \LaTeXe{} source file. \\
\texttt{examples.dn} & Example file illustrating the use of embedded \TeX{} commands. \\
\texttt{misspaal.dn} & Excerpt from the Hindi short story \textit{Miss P\=al} by Mohan Rakesh. \\
\texttt{copying} & GNU General Public License. \\
\end{tabular}
}
\newpage

\section{The \textsf{devnag} Package}

The \textsf{devnag} package consists of a preprocessor, font files,
macro files for Plain \TeX{}, and style and font definition files 
for \LaTeX{}. The use of specific styles and macros, and other
typesetting features depend on whether Plain \TeX{} or \LaTeX{} 
is being used. Both flavors of \TeX{} use the `Devnag' \MF{} 
developed by Frans Velthuis.

\subsection{Using \textsf{devnag} with Plain \TeX{}}
To prepare a Devan\=agar{\=\i} document with Plain \TeX{}, the
\texttt{dnmacs.tex} macro file must be used. The statement 
\verb+\input dnmacs+ must be placed at the beginning of 
the document. The file \texttt{dnmacs.tex} contains various macros which 
allow you to switch to different font sizes.

In Plain \TeX{} the size of a font must be declared manually. The
macro file defines a few macros which load the Devan\=agar{\=\i}
font at standard sizes. The 10 point size is declared as \verb+\dnnormal+. 
The macros \verb+\dnsmall+ and \verb+\dnnine+ give smaller sizes at 
8 and 9 points. The macros for larger sizes are \verb+\dnhalf+, 
\verb+\dnbig+, \verb+\dnlarge+, and \verb+\dnhuge+. These macros are
not restricted to \textsf{devnag} delimited text and may be used throughout 
the document. Refer to the file \texttt{dnmacs.tex} for all defined font
sizing macros.

\subsection{Using \textsf{devnag} with \LaTeX{}}
The \textsf{dev} style file enables the Devan\=agar{\=\i} package to be used 
with \LaTeXe{}. The \textsf{dev} style must be declared in the preamble
of the document with the command \verb+\usepackage{dev}+. The style file
\textsf{dev209} is for use with \LaTeX{} 2.09.

\textit{It is strongly suggested that you use \LaTeXe{}. Version 2.09 
is obsolete and is no longer supported. Version 2e is the only supported 
and most current version of \LaTeX{}.}

The file \texttt{udn.fd} enables the New Font Selection Scheme (NFSS)
to be used with \textsf{devnag} documents. Older versions
of \textsf{devnag} used the `OT1' font encoding. The \textsf{dvng} fonts
do not follow this scheme, and so to comply with \LaTeX{} 
standards, the font encoding definition was renamed to the `U',
or user-defined, encoding. Using NFSS with \LaTeX{} provides automatic 
font size changing for titles, footnotes, etc. The standard 
\LaTeX{} size changing commands (ie. \verb+\small+, \verb+\large+, 
\verb+\huge+, etc.) may also be used with \textsf{devnag}.

\section{The Preprocessor}
The \textsf{devnag} package produces Devan\=agar{\=\i} output by use of an
intermediary program called a preprocessor. The preprocessor \texttt{devnag}
reads data from a file in the form of transliterated input and 
converts the input into codes with which \TeX{} is familiar.
The transliterated input is discussed in Section \ref{trans}.

The preprocessor also handles the details of character placement
such as the alignment of vowel diacritics and consonant ligatures. 
The rest of the layout, however, must be handled by the user.
The preprocessor now permits \LaTeX{} macros with arguments to be
embedded with \textsf{devnag} delimiters. The following command types
may be used within the delimiters. Please refer to the file
\texttt{examples.dn} for examples on the use of embedded \LaTeX{}
environments and commands in \textsf{devnag} delimited text.

\begin{itemize}
\item All environment commands: \verb+\begin{+\textit{x}\verb+}+ ...
\verb+\end{+\textit{x}\verb+}+. The three table environments
\verb+tabular+, \verb+supertabular+, and \verb+longtable+ are
permitted. Note: To use table environments within delimited
text, the \verb+@tabs+ directive must be specified in order
to enable the use of the ampersand as a tab marker instead of  
a marker for \textit{vir\=ama}. Refer to Section \ref{dirs} for more
details on preprocessor directives. 

\item Spacing commands: \verb+\hspace+, \verb+\hspace*+, \verb+\vspace+,
\verb+\vspace*+, \verb+\addvspace+, \verb+\enlargethispage+,
\verb+\enlargethispage*+, \verb+\setlength+, \verb+\addtolength+,
and \verb+\\[+\textit{n}\verb+]+. Plain \TeX{} commands may also be used 
when placed between brackets: \verb+{\hskip }+, \verb+{\vskip }+, 
\verb+{\vadjust }+, and \verb+{\kern }+.

\item Counter commands: \verb+\setcounter+, \verb+\stepcounter+,
\verb+\addtocounter+, and \verb+\refstepcounter+. Page numbering
in Devan\=agar{\=\i} is also available through the \verb+dev+
counter.

\item Boxes and rule commands: \verb+\parbox+, \verb+\makebox+, 
\verb+\framebox+, \verb+raisebox+, and \verb+\rule+.

\item Reference commands: \verb+\label+, \verb+\ref+, \verb+\pageref+,
\verb+\index+, \verb+\cite+, and \verb+\bibitem+. If the argument
of the \verb+\index+ command is in Devan\=agar{\=\i}, it will
be written as such in the index file. 

\item File commands such as \verb+\input+ and \verb+\include+ are
now also permitted.

\item Roman text may also be embedded within Devan\=agar{\=\i}
delimited text as long as the Roman does not exceed the length
of one line. Use \verb+{\rm }+ to produce embedded Roman text.


\end{itemize}

\subsection{Calling the Preprocessor}
After an input file is completed, it has to be processed by the
preprocessor before it can be fed to \TeX{} or \LaTeX{}. To process
an input file, type:
\medskip

\centerline{\texttt{devnag} \textit{infile outfile}}
\medskip

The file extension for an input file is \verb+.dn+ and for an
output file \verb+.tex+. If no output filename is specified then the
name of the output file will be the same as that of the input file;
for instance, typing \texttt{devnag hindi} will cause \texttt{devnag} to read 
from the file \texttt{hindi.dn} and write to the file \texttt{hindi.tex}. 
Invoking \texttt{devnag} without any command-line parameters will be 
put \texttt{devnag} in interactive mode and you will be prompted for the 
names of the input and output files.

{\bf Note:} If the input file has a name such as \texttt{x.y.dn}, the 
output file will now be \texttt{x.y.tex}, not, as previously, \texttt{x.tex}. 
In addition, it is now mandatory for the files to have the suffixes 
\texttt{.dn} and \texttt{.tex}, though as before these are supplied by the 
program if omitted by the user. This change has been made for safety 
reasons: formerly, typing \texttt{devnag myfile.tex} would delete
the contents of \texttt{myfile.tex}.

There is also now an option to show the version of the program. If
devnag is invoked as \verb+devnag -v+ it will print a banner giving
the version number and other information, and then exit.

\section{Preprocessor Directives}
\label{dirs}
The preprocessor creates a \TeX{} file from the input file 
by acting on two different parts of the input: directives
and transliterated input. As it creates a \TeX{} file from the 
input file, the preprocessor can be told to modify the way in which 
it operates by means of special commands called directives. These 
directives are not themselves typesetting instructions; rather 
they are instructions to the preprocessor notifying it to process 
the input text in a given manner, such as permitting hyphenation, 
suppressing the use of certain ligatures, etc. In simple use of 
the \textsf{devnag} package it may never be necessary to make use of 
preprocessor directives.

Directives to change the behavior of the preprocessor must occupy a
line by themselves, and always begin with the character \verb+@+. As of 
version \version{}, a major change has been made to the way in which the 
preprocessor handles \verb+@+ commands. Previously it was only
possible to use these at the beginning of the \texttt{.dn} file; they may 
now be placed anywhere in the text, provided that they do not occur
within passages of Devan\=agar{\=\i} (where \verb+@+ has its own meaning:
the continuation symbol {\dn ^^?}). New ``negative'' commands have been 
added to reverse the effect of most existing commands: thus it is now 
possible to enable or disable specific features for specific passages of 
text, ie. \verb+@hindi+ may be disabled with \verb+@sanskrit+.

Use of directives at the very start of the input file is now strongly 
discouraged, as some directives rely on \TeX{}/\LaTeX{} macros which
must be defined in the standard start-up files before they can be
used. Directives specific to a particular passage of text should
appear immediately before that passage; directives applying to the
entire file should appear just before the first line of actual text
to be typeset.

Since \verb+@+ is a perfectly legal character in \TeX{}, lines 
beginning with \verb+@+ that do not match any valid \verb+@+ command 
are flagged with a warning, but processing of the file continues. 
(In the somewhat unlikely event that you actually need to have a line of 
\TeX{} text consisting exactly of, say, \verb+@hindi+, the preprocessor 
may be fooled by typing \verb+{}@hindi+, \verb+{@hindi}+, or anything 
similar.)

Currently, the following preprocessor commands are defined:

{\parindent=0pt
\begin{multicols}{5}
\verb+@hindi+ \\
\verb+@sanskrit+ \\
\verb+@dollars+ \\
\verb+@nodollars+ \\
\verb+@dolmode0+ \\
\verb+@dolmode1+ \\
\verb+@dolmode2+ \\
\verb+@dolmode3+ \\
\verb+@lig+ \\
\verb+@nolig+ \\
\verb+@hyphen+ \\
\verb+@nohyphen+ \\
\verb+@tabs+ \\
\verb+@notabs+ \\
\verb+@vconjuncts+
\end{multicols}
}

In previous releases of \textsf{devnag}, the preprocessor would split 
long lines in its output, and the \verb+@obeylines+ command was 
provided to disable this feature. The line-splitting code has been
removed from the program, so that it now outputs lines as they appear
in the input file. In \textsf{devnag} v2.0, attempted use of \verb+@obeylines+ 
produces a warning; this is likely to be withdrawn in a future release, 
after which attempts to use it will cause \verb+@obeylines+ to be typeset 
as a part of the text of the document.

\subsection{\texttt{@hindi}}
The preprocessor operates in two different modes: Sanskrit and
Hindi. The difference between the two is that in Sanskrit mode 
all the available conjuncts are used, whereas in Hindi mode certain 
simplified conjunct forms are used instead, ie. {\dn Qc} in place of 
{\dn \3CEw}. Additionally, in Sanskrit mode a \textit{vir\=ama} is 
automatically added at the end of a word if it ends in a consonant, 
while in Hindi mode the preprocessor assumes an implicit \texttt{a}.

The \verb+@hindi+ directive puts the preprocessor in Hindi mode. 
The default mode is Sanskrit. The mode directive governs the file 
as a whole. The directive \verb+@hindi+, if used, must precede the 
\verb+@lig+ and \verb+@nolig+ commands.

\subsection{\texttt{@sanskrit}}

The \verb+@sanskrit+ directive is the default mode for the preprocessor.
This command reinstates the behavior of the preprocessor which 
\verb+@hindi+ countermands. 

\subsection{\texttt{@dollars} and \texttt{@nodollars}}
\label{dol}
In addition to the \verb+{\dn+ ... \verb+}+ delimiters, 
Devan\=agar{\=\i} text can also be delimited by dollar signs, ie. 
\verb+$acchaa$+. To enable this delimiter, the directive 
\verb+@dollars+ must be specified.

\subsection{\texttt{@dolmode0}, \texttt{@dolmode1}, \texttt{@dolmode2}, and \texttt{dolmode3}}
\label{advtop}
As mentioned above, \verb+{\dn ... }+ and dollar signs may be 
used to delimit \textsf{devnag} text. If you use dollar signs, these signs 
cannot be used for other purposes, such as printing a dollar sign or 
switching to mathematical mode. However, dollar signs can be printed by 
means of \verb+\char36+ (in \TeX{}) or \verb+\symbol{36}+ (in \LaTeX{}). 
Switching to mathematical mode can be accomplished in an alternative way 
in \LaTeX{} by using \verb+\(+ and \verb+\)+ as delimiters of mathematical 
mode. The preprocessor does the following with text between \textsf{devnag} 
delimiters:

\begin{quote}
1. Translates the Devan\=agar{\=\i} input into \TeX{} code. \\
2. Switches to the Devan\=agar{\=\i} font. \\
3. Handles adjustment of various \TeX{} parameters.
\end{quote}

Situations might arise in which not all of these functions are 
required. The behavior of the preprocessor upon seeing a dollar 
delimiter can be changed with the preprocessor commands \verb+@dolmode0+, 
\verb+@dolmode1+, \verb+@dolmode2+, and \verb+@dolmode3+. 

\begin{center}
\begin{tabular}{llllll}
\textbullet & \verb+@dolmode0+ & : 
   & \verb+$acchaa$+ 
   & $\rightarrow$ 
   & \verb+$acchaa$+ \\
\textbullet & \verb+@dolmode1+ & : 
   & \verb+$acchaa$+ 
   & $\rightarrow$ 
   & \verb+\dn aQCA+ \\
\textbullet & \verb+@dolmode2+ & : 
   & \verb+$acchaa$+ 
   & $\rightarrow$ 
   & \verb+\pdn aQCA+ \\
\textbullet & \verb+@dolmode3+ & : 
   & \verb+$acchaa$+ 
   & $\rightarrow$ 
   & \verb+aQCA+ \\
\end{tabular}
\end{center}

Alternately, \verb+@dolmode3+ can be mimicked using the macro 
\verb+\dn#+, \verb+{\dn# acchaa}+ $\rightarrow$ \texttt{aQCA}.
Also, the macro \verb+\pdn+ changes the current font into Devan\=agar{\=\i} 
in the current size. This works \textit{only} in Plain \TeX{}. \LaTeXe{} 
automatically adjusts the font sizing for Devan\=agar{\=\i} 
to the document font size.

\subsection{\texttt{@lig} and \texttt{@nolig}}
\label{ligcom}
It is possible to enable or disable the use of certain ligatures.
This is accomplished through the directives \verb+@lig+ and 
\verb+@nolig+. The former enables ligatures while the latter disables 
them. Ligatures are specified by means of a code assigned to each ligature. 
Table \ref{ligs} shows the ligatures which are available and their codes.
For example, the command \verb+@nolig 2+ produces {\dn ?t}
instead of {\dn \3C4w}.

More then one ligature may be specified with a \verb+@lig+ or 
\verb+@nolig+ command, ie. \verb+@lig 20 43 90+. There is no limit to 
the number of \verb+@lig+ or \verb+@nolig+ directives issued within
a document. However, when a certain ligature is disabled, all
other ligature combinations involving the disabled ligature
are also disabled. For example, if ligature 3 {\dn\symbol{'307}} 
is disabled then ligature 10 {\dn\symbol{'346}} will also be disabled.

Some `standard' Devan\=agar{\=\i} ligatures like {\dn\symbol{34}}, 
{\dn +}, and {\dn /} cannot be disabled and are not in the table. 
Also, most two element ligatures involving \textit{ra} like 
{\dn\symbol{135}}, {\dn g\5}, and {\dn \3FEw} cannot be disabled.

\subsection{\texttt{@hyphen} and \texttt{@nohyphen}}
The directive \verb+@hyphen+ enables the hyphenation of Devan\=agar{\=\i} 
text; \verb+@nohyphen+ disables the feature.

In previous versions of \textsf{devnag} it was necessary to declare
the \textsf{hyphenate} option of the \textsf{dev} style to enable 
proper hyphenation in \LaTeXe{}. This option has been removed and
is no longer required. 
%\verb+@hyphen+ and \verb+@nohyphen+ now invoke 
%specific defined macros, therefore they \textit{cannot} be used at the 
%head of a document before \verb+\input dnmacs+ in Plain \TeX{} or 
%\verb+\usepackage+ in \LaTeX{}.

A specific benefit of this directive is the ability to enclose a
section of particularly dense text between \verb+@hyphen+ and
\verb+@nohyphen+ without affecting other parts of text in the
document. To type a hyphen in a Devan\=agar{\=\i} document simply 
type \texttt{-}. For example, typing \verb+{\dn dive-dive}+ will produce
{\dn Edv\?{\rs -\re}Edv\?}.
\bigskip

Hyphenation between \textit{words} is a habit from Romanized Sanskrit.  
In early printed books in Devan\=agar{\=\i}, hyphenation was simply
applied between any \textit{ak\d{s}ara-s}, when the end of the 
line was reached. In manuscripts, however, the use of hyphens is
non-existant. No regard was paid to actual word breaks or syntactic 
elements within compound words. Scribes usually just stopped writing
at the right margin with whatever \textit{ak\d{s}ara} they happened to
be upon, and continued on the following line. The \texttt{devnag}
preprocessor can produce this kind of hyphenation very successfully. It
is more important for Sanskrit than Hindi because of the long compounds
found in the former.

Usage of hyphenation in Devan\=agar{\=\i} has changed slightly during the 
20th century towards etymological and syntactic breaks, but the practice
is still varied, and the older style ``break anywhere'' system is still
in practice. So many Sanskrit books are reprints of 19th century books that, 
in any case, the contemporary reader's eye is still used to the older style!

The \texttt{devnag} package does more or less all that needs to be done from 
the point of view of hyphenating Sanskrit in Devan\=agar{\=\i}. If 
hyphenation is off, then there are no hyphens, and very stretchy
inter-word space. This is acceptable for ragged-right settings or for 
\textit{\'sloka-s}, but may produce poor results in right-justified prose
text, especially if the given passage contains long compound words. If 
hyphenation is on then discretionary hyphens are set between all syllables. 
This is acceptable for justified prose text.

Jun Takashima is working on a \textsf{babel} module with special 
hyphenation tables for Romanized Sanskrit that will do etymological 
hyphenation. This will be very useful indeed, of course, for those who 
work in Romanization, where ``break anywhere'' hyphenation is unacceptable.

\subsection{\texttt{@tabs} and \texttt{@notabs}}
The \verb+@tabs+ directive specifies that the \verb+&+ character
is to be used as a \TeX{} tabular character, not as a method of
encoding \textit{vir\=ama}. The use of \verb+&+ to encode \textit{vir\=ama} 
is reset by \verb+@notabs+. If \verb+&+ appears word medially, ie.
\verb+.sa.t&"siraa.h+, it will be processed as a \textit{vir\=ama}
even if \verb+@tabs+ is specified. This avoids possible incompatibility
issues with legacy documents. The \verb+_+ character now doubles as a 
way of producing \textit{vir\=ama}, particularly if \verb+@tabs+ is used,
ie. \verb+pari.sad_+

\subsection{\texttt{@vconjuncts}}
A change has been introduced in the output produced from input such as 
\verb+{\dn .sa.t"siraa.h}+, i.e. in cases where an {\it i-m\=atr\=a\/} 
vowel is associated with a consonant sequence containing a {\it vir\=ama}. 
The previous behavior was to treat the consonant sequence as if it were a 
normal conjunct by placing the vowel diacritic before the sequence as a 
whole, ie. {\dn qE\qq{V}frA,}. The majority opinion seems to be that this 
is undesirable, and that the vowel symbol should follow the consonant to 
which the {\it vir\=ama} is attached, ie. {\dn q\qq{V}EfrA,}.
A change has therefore been made to implement this. However, the
previous behavior can be reinstated by means of this new
\verb+@vconjuncts+ preprocessor command.

\section{The Transliterated Input}
\label{trans}
The \textsf{devnag} package produces Devan\=agar{\=\i} text by 
processing a Roman transliteration of the actual Devan\=agar{\=\i}
text. 

The preprocessor recognizes the text it is to act upon by use of 
delimiters, of which there are two types. The basic one will be used
through out this manual. The second is discussed in Section \ref{dol}. 
Any text outside of these two delimiters is not parsed by the preprocessor.

The basic delimiter is the command macro \verb+\dn+. This delimiter
is used by enclosing the input with \verb+{\dn ... }+, ie. 
\verb+{\dn acchaa}+, which produces {\dn aQCA}.

For large pieces of Devan\=agar{\=\i} text, the first method is 
recommended because it is easier to determine the beginning and 
end of the input text. The second method is useful when you have to 
switch often between Devan\=agar{\=\i} and Roman script. 

As mentioned, if you use \LaTeX{} then size changing commands may be used 
within \textsf{devnag} delimited text. However, the \verb+\dn+ delimiter
needs to be placed appropriately with regard to the size command
otherwise the text will not appear correctly. As a general rule, the size 
changing command should follow after the delimited text, otherwize it will 
override the definition of \verb+\dn+. For example, items 1, 2, and 3 below 
produce the correct forms, but 4 does not:

\begin{center}
\begin{tabular}{llcl}
1. & \verb+{\dn \large acchaa}+   & $\rightarrow$ & {\dn aQCA} \\
2. & \verb+{\dn {\large acchaa}}+ & $\rightarrow$ & {\dn aQCA} \\
3. & \verb+{\large {\dn acchaa}}+ & $\rightarrow$ & {\dn aQCA} \\
4. & \verb+{\large \dn acchaa}+   & $\rightarrow$ & {\dn acchaa} \\
\end{tabular}
\end{center}

Item 4 does not produce the desired Devan\=agar{\=\i} output because
the \verb+\+\verb+dn+ delimiter must be placed directly after the
brace. Otherwise the preprocessor will overlook it and simply switch
to the `Devnag' font without processing the transliterated input.

There are very few restrictions on what may be placed between the
delimiters. All input transliteration codes from Table \ref{chars},
all punctuation marks, and all \TeX{} macro commands are acceptable 
input. Please refer to the table for the inventory of characters
and their corresponding input transliterations. Any codes not given in 
the table will not be recognized by the preprocessor.

Conjunct consonants are automatically produced by \textsf{devnag}. The
list of ligatures supported by \textsf{devnag} is given in Table 
\ref{ligs}. Advanced options such as disabling ligatures is
discussed in Section \ref{ligcom}.

The file \texttt{misspaal.dn} contains an excerpt from the Hindi
short story \textit{Miss P\=al} by Mohan Rakesh. Please refer to the
contents of the file for examples of producing a Devan\=agar{\=\i}
document.

\subsection{Supplementary Notes}
Attention should be paid to the following points:

\begin{enumerate}
\item For several Devan\=agar{\=\i} characters there are two alternate 
ways to produce them. Long vowels may be typed twice or with a single 
capital letter, ie. \texttt{aa} or \texttt{A}. In cases where ambiguity might 
arise, the use of uppercase is preferred. For instance, the word ``few'' 
in Hindi is correctly written {\dn kI} \verb+kaI+, not {\dn k\4i}
\verb+kaii+.
                                         
\item For words which have two successive short vowels, a sequence of 
brackets \verb+{}+ may be used to separate the vowels, ie. {\dn \3FEw{}ug}
\verb+pra{}uga+, as opposed to {\dn \3FEwOg} \verb+prauga+ . This is 
required because the combinations \verb+ai+ and \verb+au+ are defined by 
the `Velthuis scheme' as dipthongs. This practice may also be used in 
cases similiar to the previous point.

This procedure may be used to split any multi-character input, ie. 
\verb+t{}h+ to produce {\dn \qq{t}{}h}, if desired instead of \verb+th+
{\dn T}.

\item The standard ligatures {\dn\symbol{34}} and {\dn +} are
produced \verb+k.sa+ and \verb+j~na+.

\item \verb+~a+ produces an `English a' Marathi style. Compare:
Hindi {\dn V\4?sF} and Marathi {\dn V\<?sF}.

\item Numerals are printed as Arabic numerals by default. The command
\verb+\dnnum+ switches to Devan\=agar{\=\i} numerals. Every numeral 
after this command is printed as a Devan\=agar{\=\i} numeral. 
The command \verb+\cmnum+ switches back to Arabic numerals.

\item In Hindi mode the character \verb+&+ can be put at the end of a 
word to produce a \textit{vir\={a}ma} sign under the final consonant. For 
example, \verb+pari.sad&+ produces {\dn pErq\qq{d}} . The underscore
character \verb+_+ also produces a \textit{vir\=ama}.

\item In many Hindi words an \verb+a+ needs to be written between
consonants to produce the correct spelling, otherwise \textsf{devnag}
will produce an undesired conjunct consonant. To produce the 
correct spelling of {\dn krnA}, you must type \verb+karanaa+ 
instead of \verb+karnaa+.

\item Tab characters in the input file, which previously were treated
as fatal errors, are now silently converted to spaces.
\end{enumerate}

%%% Character Inventory %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{table}[p]
\begin{center}
\renewcommand{\doublerulesep}{.5cm}
\renewcommand{\arraystretch}{1.40}

\begin{tabular}{|llc|llc|llc|llc|}
\hline
\multicolumn{12}{|c|}{\textit{Vowels}} \\
\hline
  \texttt{a}  & {\dn a}               &  ---
& \texttt{aa}, \texttt{A} & {\dn a\symbol{'101}} & {\dn\symbol{'101}}
& \texttt{i}  & {\dn i}              & {\dn\symbol{'105}}
& \texttt{ii}, \texttt{I} & {\dn I}     & {\dn\symbol{'106}} \\
  \texttt{u}  & {\dn u}              & {\dn\symbol{0}}
& \texttt{uu}, \texttt{U} & {\dn U}     & {\dn\symbol{'1}}
& \texttt{.r} & {\dn\symbol{'33}}    & {\dn\symbol{2}} 
& \texttt{.R} & {\dn\symbol{'21}}    & {\dn\symbol{'16}} \\
  \texttt{.l} & {\dn\symbol{'30}}    & {\dn\symbol{'37}} 
& \texttt{.L} & {\dn\symbol{'31}}    & {\dn\symbol{'174}}
& \texttt{e}  & {\dn e}              & {\dn\symbol{3}}
& \texttt{ai} & {\dn e\?}            & {\dn\symbol{'173}} \\ 
  \texttt{o}  & {\dn ao}             & {\dn o}
& \texttt{au} & {\dn aO}             & {\dn O}
& \texttt{aM} & {\dn a\2}            & {\dn \2}
& \texttt{aH} & {\dn a\symbol{'54}}  & {\dn\symbol{'54}} \\
\hline
\end{tabular}
\vspace*{.5cm}

\begin{tabular}{|ll|ll|ll|ll|ll|}
\hline
\multicolumn{10}{|c|}{\textit{Consonants}} \\
\hline
  \texttt{ka}   & {\dn k}  
& \texttt{kha}  & {\dn K}   
& \texttt{ga}   & {\dn g}  
& \texttt{gha}  & {\dn G}   
& \texttt{"na}  & {\dn R} \\

  \texttt{ca}   & {\dn c}  
& \texttt{cha}  & {\dn C}   
& \texttt{ja}   & {\dn j}  
& \texttt{jha}  & {\dn J}  
& \texttt{\char`~na} & {\dn\symbol{'32}} \\

  \texttt{.ta}  & {\dn\symbol{'126}} 
& \texttt{.tha} & {\dn\symbol{'127}} 
& \texttt{.da}  & {\dn\symbol{'130}} 
& \texttt{.dha} & {\dn\symbol{'131}} 
& \texttt{.na}  & {\dn\symbol{'132}}  \\

  \texttt{ta}   & {\dn t}  
& \texttt{tha}  & {\dn T}  
& \texttt{da}   & {\dn d}  
& \texttt{dha}  & {\dn D}  
& \texttt{na}   & {\dn n}  \\

  \texttt{pa}   & {\dn p}  
& \texttt{pha}  & {\dn P}  
& \texttt{ba}   & {\dn b}  
& \texttt{bha}  & {\dn B}  
& \texttt{ma}   & {\dn m}  \\
\hline
\end{tabular}
\vspace*{.5cm}

\begin{tabular}{|ll|ll|ll|ll|}
\hline
\multicolumn{8}{|c|}{\textit{Semi-Vowels}} \\
\hline                                                            
\texttt{ya} & {\dn y} & \texttt{ra} & {\dn r} & \texttt{la} & {\dn l} & \texttt{va} & {\dn v} \\
\hline
\end{tabular}
\hspace*{.4cm}
\begin{tabular}{|ll|ll|ll|}
\hline
\multicolumn{6}{|c|}{\textit{Sibilants}} \\
\hline                                                            
  \texttt{"sa} & {\dn\symbol{'146}} 
& \texttt{.sa} & {\dn\symbol{'161}}
& \texttt{sa}  & {\dn s} \\
\hline
\end{tabular}
\hspace*{.4cm}
\begin{tabular}{|ll|}
\hline
\multicolumn{2}{|c|}{\textit{Aspirate}} \\
\hline                                                            
\texttt{ha} & {\dn h}  \\
\hline
\end{tabular}
\vspace*{.5cm}

\begin{tabular}{|ll|ll|ll|ll|ll|ll|ll|ll|}
\hline
\multicolumn{16}{|c|}{\textit{Supplementary Consonants}} \\
\hline
  \texttt{qa}  & {\dn\symbol{'52}} 
& \texttt{.kh}, \texttt{.K} & {\dn\symbol{'14}}
& \texttt{.ga} & {\dn\symbol{'13}}
& \texttt{za}  & {\dn\symbol{'51}} 
& \texttt{Ra}  & {\dn\symbol{'167}} 
& \texttt{Rha} & {\dn\symbol{'170}} 
& \texttt{fa}  & {\dn\symbol{'47}}
& \texttt{La}  & {\dn\symbol{'17}} \\
\hline
\end{tabular}
\vspace*{.5cm}

\begin{tabular}{|ll|ll|ll|ll|ll|}
\hline
\multicolumn{10}{|c|}{\textit{Numerals}} \\
\hline                                                            
\texttt{0} & {\dn 0} & \texttt{1} & {\dn 1} & \texttt{2} & {\dn 2} & \texttt{3} & {\dn 3} & \texttt{4} & {\dn
4} \\
\texttt{5} & {\dn 5} & \texttt{6} & {\dn 6} & \texttt{7} & {\dn 7} & \texttt{8} & {\dn 8} & \texttt{9} & {\dn
9} \\
\hline
\end{tabular}

\vspace*{.5cm}
\begin{tabular}{|lll|lll|lll|lll|}
\hline
\multicolumn{12}{|c|}{\textit{Special Characters}} \\
\hline
  \texttt{.o} & {\dn\symbol{'72}} & \textit{AUM}
& \texttt{.m}, \texttt{M} & {\dn\symbol{'25}} & \textit{anusv\=ara}
& \texttt{/}  & {\dn\symbol{'40}} & \textit{candrabindu}
& \texttt{.h}, \texttt{H} & {\dn\symbol{'54}} & \textit{visarga}  \\

  \texttt{.a} & {\dn\symbol{'137}} & \textit{avagraha}
& \texttt{@}  & {\dn\symbol{'177}} & continuation 
& {\tt\symbol{'43}} & {\dn\symbol{'25}} & elliptical dot 
& {\tt\symbol{'176}r} & {\dn\symbol{'35}} & Marathi \textit{ra} \\

  \texttt{\char`~a} & {\dn\symbol{'4}} & English a
& \texttt{\char`~o} & {\dn aA\<} & English o 
& {\tt\symbol{'174}} & {\dn\symbol{'56}} & \textit{da\d{n}\d{d}\=a}
& \texttt{..} & {\dn\symbol{'24}} & period \\

\hline
\end{tabular}
\caption{The Velthuis Transliteration Scheme}
\label{chars}
\end{center}
\end{table}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Line Spacing}
Due to the super- and subscript characters of the Devan\=agar{\=\i}
script, the line spacing often needs to be altered to prevent
the crowding of characters between lines. The parameter 
\verb+\baselineskip+ controls the distance between lines. The 
style and macro files adjust the value of \verb+\baselineskip+.
However, \TeX{} determines and adjusts the value of \verb+\baselineskip+
after it has processed a given paragraph. If a paragraph contains a 
mixture of Devan\=agar{\=\i} and Roman text, and ends with Roman
text, then \TeX{} will set the value of \verb+\baselineskip+ according
to the Roman text. This may result in crowding of Devan\=agar{\=\i}
text.

There are, however, solutions to this. An explicit value can be 
assigned to \verb+\baselineskip+ before the paragraph ends. The macro 
file \texttt{dnmacs.tex} shows examples of the value of \verb+\baselineskip+ 
at different font sizes. Alternately, `dummy' \textsf{devnag} text 
containing \verb+\par+ can be placed at the end of the paragraph, ie. 
\verb+{\dn \par}+.

Even when a paragraph has only \textsf{devnag} text, the paragraph-end 
must be included in the \textsf{devnag} text, meaning that the final 
delimited \verb+}+ or \verb+$+ which ends the \textsf{devnag} text must 
follow the empty line or the \verb+\par+ command that forces the
paragraph to end.

\begin{table}[p]
\begin{center}
\begin{tabular} {||l|l|l|l||l|l|l|l||l|l|l|l||@{\protect\rule{0cm}{.4cm}}}
\hline
\# & consonants & lig. & hindi &
\# & consonants & lig. & hindi &
\# & consonants & lig. & hindi \\ \hline
1  & {\dn k k} & {\dn\symbol{'303}} & yes &
36 & {\dn\symbol{'32} c} & {\dn\symbol{'321}} & &
71 & {\dn d r y} & {\dn\symbol{'357}} & yes \\
2  & {\dn k t } & {\dn\symbol{'304}} & yes &
37 & {\dn\symbol{'32} j} & {\dn\symbol{'322}} & &
72 & {\dn d v y} & {\dn\symbol{'225}} & yes \\
3  & {\dn k n} & {\dn\symbol{'307}} & &
38 & {\dn V k} & {\dn\symbol{'326}} & yes &
73 & {\dn D n} & {\dn\symbol{'360}} & \\
4  & {\dn k m} & {\dn\symbol{'311}} & &
39 & {\dn V V} & {\dn\symbol{'323}} & yes &
74 & {\dn n n} & {\dn\symbol{'340}} & yes \\
5  & {\dn k y} & {\dn\symbol{'310}} & yes &
40 & {\dn V W} & {\dn\symbol{'341}} & yes &
75 & {\dn p t} & {\dn\symbol{'330}} & \\
6  & {\dn k l} & {\dn\symbol{'312}} & &
41 & {\dn V y} & {\dn\symbol{'324}} & yes &
76 & {\dn p n} & {\dn\symbol{'331}} & \\
7  & {\dn k v} & {\dn\symbol{'313}} & &
42 & {\dn W y} & {\dn\symbol{'325}} & yes &
77 & {\dn p l} & {\dn\symbol{'332}} & \\
8  & {\dn k t y} & {\dn\symbol{'305}} & yes &
43 & {\dn X g} & {\dn\symbol{'263}} & &
78 & {\dn b n} & {\dn\symbol{'247}} & \\
9  & {\dn k t v} & {\dn\symbol{'306}} & yes &
44 & {\dn X G} & {\dn\symbol{'264}} & &
79 & {\dn b b} & {\dn\symbol{'251}} & \\
10 & {\dn k n y} & {\dn\symbol{'346}} & &
45 & {\dn X X} & {\dn\symbol{'345}} & yes &
80 & {\dn b v} & {\dn\symbol{'333}} & \\
11 & {\dn k r y} & {\dn\symbol{'347}} & yes &
46 & {\dn X m} & {\dn\symbol{'273}} & &
81 & {\dn B n} & {\dn\symbol{'336}} & \\
12 & {\dn k v y} & {\dn\symbol{'314}} & &
47 & {\dn X y} & {\dn\symbol{'267}} & yes &
82 & {\dn m n} & {\dn\symbol{'337}} & \\
13 & {\dn k t r y} & {\dn\symbol{'374}} & yes &
48 & {\dn X g y} & {\dn\symbol{'270}} & &
83 & {\dn m l} & {\dn\symbol{'335}} & \\
14 & {\dn G n} & {\dn\symbol{'315}} & &
49 & {\dn X G r} & {\dn\symbol{'266}} & &
84 & {\dn l l} & {\dn\symbol{'245}} & \\
15 & {\dn R k} & {\dn\symbol{'254}} & yes &
50 & {\dn X r y} & {\dn\symbol{'373}} & yes &
85 & {\dn v n} & {\dn\symbol{'246}} & \\
16 & {\dn R K} & {\dn\symbol{'262}} & yes &
51 & {\dn Y y} & {\dn\symbol{'344}} & yes &
86 & {\dn v v} & {\dn\symbol{'250}} & \\
17 & {\dn R g} & {\dn\symbol{'275}} & yes &
52 & {\dn t t} & {\dn\symbol{'201}} & yes &
87 & {\dn f c} & {\dn\symbol{'226}} & \\
18 & {\dn R G} & {\dn\symbol{'277}} & yes &
53 & {\dn t n} & {\dn\symbol{'327}} & &
88 & {\dn f n} & {\dn\symbol{'227}} & \\
19 & {\dn R R} & {\dn\symbol{'274}} & yes &
54 & {\dn d g} & {\dn\symbol{'213}} & &
89 & {\dn f b} & {\dn\symbol{'233}} & \\
20 & {\dn R n} & {\dn\symbol{'265}} & yes &
55 & {\dn d G} & {\dn\symbol{'212}} & &
90 & {\dn f l} & {\dn\symbol{'232}} & \\
21 & {\dn R m} & {\dn\symbol{'301}} & yes &
56 & {\dn d d} & {\dn\symbol{'214}} & yes &
91 & {\dn f v} & {\dn\symbol{'230}} & \\
22 & {\dn R y} & {\dn\symbol{'302}} & yes &
57 & {\dn d D} & {\dn\symbol{'210}} & yes &
92 & {\dn q V} & {\dn\symbol{'243}} & \\
23 & {\dn R k t} & {\dn\symbol{'255}} & &
58 & {\dn d n} & {\dn\symbol{'221}} & &
93 & {\dn q W} & {\dn\symbol{'244}} & \\
24 & {\dn R k y} & {\dn\symbol{'257}} & yes &
59 & {\dn d b} & {\dn\symbol{'223}} & yes &
94 & {\dn q V y} & {\dn\symbol{'367}} & \\
25 & {\dn R k q} & {\dn\symbol{'260}} & &
60 & {\dn d B} & {\dn\symbol{'211}} & yes &
95 & {\dn q V v} & {\dn\symbol{'253}} & \\
26 & {\dn R K y} & {\dn\symbol{'272}} & yes &
61 & {\dn d m} & {\dn\symbol{'224}} & &
96 & {\dn q V r y} & {\dn\symbol{'252}} & \\
27 & {\dn R g y} & {\dn\symbol{'276}} & yes &
62 & {\dn d y} & {\dn\symbol{'215}} & yes &
97 & {\dn s n} & {\dn\symbol{'334}} & \\
28 & {\dn R G y} & {\dn\symbol{'271}} & yes &
63 & {\dn d v} & {\dn\symbol{'222}} & yes &
98 & {\dn s r} & {\dn\symbol{'372}} & yes \\
29 & {\dn R G r} & {\dn\symbol{'300}} & yes &
64 & {\dn d g r} & {\dn\symbol{'355}} & &
99 & {\dn h Z} & {\dn\symbol{'242}} & yes \\
30 & {\dn R k t y} & {\dn\symbol{'256}} & &
65 & {\dn d G r} & {\dn\symbol{'356}} & &
100 & {\dn h n} & {\dn\symbol{'241}} & yes \\
31 & {\dn R k q v} & {\dn\symbol{'261}} & &
66 & {\dn d d y} & {\dn\symbol{'220}} & yes &
101 & {\dn h m} & {\dn\symbol{'234}} & yes \\
32 & {\dn c c} & {\dn\symbol{'316}} & &
67 & {\dn d d v} & {\dn\symbol{'370}} & yes &
102 & {\dn h y} & {\dn\symbol{'235}} & yes \\
33 & {\dn c \symbol{'32}} & {\dn\symbol{'317}} & &
68 & {\dn d D y} & {\dn\symbol{'217}} & yes &
103 & {\dn h r} & {\dn\symbol{'240}} & yes \\
34 & {\dn C y} & {\dn\symbol{'320}} & yes &
69 & {\dn d D v} & {\dn\symbol{'371}} & yes &
104 & {\dn h l} & {\dn\symbol{'236}} & yes \\
35 & {\dn j r} & {\dn\symbol{'205}} & yes &
70 & {\dn d B y} & {\dn\symbol{'216}} & yes &
105 & {\dn h v} & {\dn\symbol{'237}} & yes \\ \hline
\end{tabular}
\end{center}
\caption{Supported Devan\=agar{\=\i} Ligatures}
\label{ligs}
\end{table}

\end{document}
