% devnagri.sty by Ross Moore <ross@mpce.mq.edu.au> $
%% $Log: 
%
% LaTeX2e package for typesetting Devanagari script with the:
%
%  `devnag'  pre-processor and  dvng  fonts
%       by Frans J. Velthuis' <velthuis@rc.rug.nl>
%
%   and its  dev2e.sty  LaTeX-2e interface 
%       by Dominik Wujastyk <D.Wujastyk@ucl.ac.uk>
%
%  Furthermore it can be used with the transcription scheme
%  devised by Jeroen Hellingman, for his  `patc' pre-processor
%  requiring macro files:  dngmacs.tex  and  dntrmacs.tex
%
%
% These resources are *not* included with this package.
% Obtain them from CTAN:  http//ctan.tug.org/ctan
%
% ===================================================================
% This package has a corresponding implementation for  LaTeX2HTML 
% called:  devnagri.perl .
% With LaTeX2HTML the options on the \usepackage line specify which
% pre-processor and transcription mode to use.
%
% Usage:
%
%  \usepackage[devnag]{devnagri}     %|  uses Velthuis' pre-processor
%
%  \usepackage[patc]{devnagri}       %|  also uses Jeroen Hellingman's 
%  \usepackage[hindi]{devnagri}      %|    patc -p <option>.pat
%  \usepackage[marathi]{devnagri}    %|  with language options, and macros:
%  \usepackage[nepali]{devnagri}     %|   dngmacs.tex  dntrmacs.tex
%  \usepackage[sanskrit]{devnagri}   %|  
%
%  \usepackage[preprocess]{devnagri} %|  same as  \usepackage[devnag]{devnagri}
%
%  \usepackage{devnagri}             %|  source already pre-processed
%
% ===================================================================
%
\ProvidesFile{devnagri.sty}[1998/1/12]
%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{dev2e}
%
\DeclareOption{preprocess}{\ds@devnagri}
\DeclareOption{devnag}{\ds@devnag}
\DeclareOption{patc}{\ds@devnagri}
\DeclareOption{hindi}{\ds@devnagri}
\DeclareOption{marathi}{\ds@devnagri}
\DeclareOption{nepali}{\ds@devnagri}
\DeclareOption{sanskrit}{\ds@devnagri}
\DeclareOption*{\@latexerr{%
 \CurrentOption is an invalid option, using `preprocess' instead.}{}%
 \ds@devnagri}

%%  for output from   `patc'  pre-processor
\def\ds@devnagri{\def\devnagriloaded{}%
 \IfFileExists{dnmacs}{\AtBeginDocument{\input{dnmacs}}}{\typeout{ *** %
 The Devanagari language options require  dnmacs.tex  and the  dvng fonts.}}}
%%
%%
\let\ds@devnag=\ds@devnagri
%
\def\@loaddevnagri{\IfFileExists{dntrmacs}{\AtBeginDocument{\input{dntrmacs}}}%
{\typeout{ *** The file  dntrmacs.tex  could not be found; transcriptions may fail.}}}

\ProcessOptions*
\expandafter\ifx\csname devnagriloaded\endcsname\relax\expandafter\ds@devnagri\fi
\endinput

