% otamil.sty -- macros for typesetting Tamil using Omega
%
% Alex A.J. <indicTeX@gmail.com>
%
%
% 16 Jun 2005 : Page header bug fixed
% 27 Mar 2005 : Massive Update
% 18 Mar 2005 : Update to UTF-8 input
% 08 Apr 2003 : Initial version (ASCII Transliteration)
%
%
%% Copyright 2003,2007 Alex AJ
%
% This program may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of LaTeX
% version 1999/12/01 or later.
%

\ProvidesFile{otamil.sty}



\def\externalfont{\fontfamily{\rmdefault}\selectfont}



\ocp\tamilA=tamil-uni2uni1
\ocp\tamilB=tamil-uni2uni2
\ocp\uniwntamil=tamil-uni2wntamil
\ocp\uniismtamil=tamil-uni2ism
\ocp\unitamtamil=tamil-uni2tam
\ocp\tamilutf=inutf8

\ocplist\wntamil= 
\addbeforeocplist 1 \tamilA
\addbeforeocplist 1 \tamilB
\addbeforeocplist 1 \uniwntamil
\nullocplist

\ocplist\ismtamil=
\addbeforeocplist 1 \tamilA
\addbeforeocplist 1 \tamilB
\addbeforeocplist 1 \uniismtamil
\nullocplist

\ocplist\tamtamil=
\addbeforeocplist 1 \tamilA
\addbeforeocplist 1 \tamilB
\addbeforeocplist 1 \unitamtamil
\nullocplist

\InputTranslation currentfile \tamilutf


% put #1 centered on top of #2,
\def\puton#1#2{\hskip0pt{\setbox0=\hbox{#2}\setbox1=\hbox{#1}%
    \dimen0=.5\wd0\advance\dimen0by.5\wd1%
    \dimen1=\ht0\advance\dimen1by\dp1%
    \dimen3=.5\wd0\advance\dimen3by-.5\wd1%
    \box0\kern-\dimen0\box1\kern\dimen3}}


%%%%%% single letter commands

\def\K#1{\kern#1em}
\def\X{\leavevmode\hbox}
\def\<#1>{\leavevmode{\char#1}}
\def\T#1#2{\puton{#1}{#2}}

% Macros for the default font (wntamil)

%\def\tamil{\fontencoding{U}\fontfamily{tawn}\selectfont\pushocplist\wntamil}
\def\tamil{\pushocplist\wntamil\fontencoding{U}\fontfamily{tawn}\selectfont}



% Fonts from ISM

\def\abhirami{\fontencoding{U}\fontfamily{tmabhirami}\selectfont\pushocplist\ismtamil}
\def\amala{\fontencoding{U}\fontfamily{tmamala}\selectfont\pushocplist\ismtamil}
\def\appar{\fontencoding{U}\fontfamily{tmappar}\selectfont\pushocplist\ismtamil}
\def\archana{\fontencoding{U}\fontfamily{tmarchana}\selectfont\pushocplist\ismtamil}
\def\aruna{\fontencoding{U}\fontfamily{tmaruna}\selectfont\pushocplist\ismtamil}
\def\arunagiri{\fontencoding{U}\fontfamily{tmarunagiri}\selectfont\pushocplist\ismtamil}
\def\avvai{\fontencoding{U}\fontfamily{tmavvai}\selectfont\pushocplist\ismtamil}
\def\chanakya{\fontencoding{U}\fontfamily{tmchanakya}\selectfont\pushocplist\ismtamil}
\def\chandra{\fontencoding{U}\fontfamily{tmchandra}\selectfont\pushocplist\ismtamil}
\def\chetan{\fontencoding{U}\fontfamily{tmchetan}\selectfont\pushocplist\ismtamil}
\def\chitra{\fontencoding{U}\fontfamily{tmchitra}\selectfont\pushocplist\ismtamil}
\def\gopur{\fontencoding{U}\fontfamily{tmgopur}\selectfont\pushocplist\ismtamil}
\def\heena{\fontencoding{U}\fontfamily{tmheena}\selectfont\pushocplist\ismtamil}
\def\heenaheavy{\fontencoding{U}\fontfamily{tmheenaheavy}\selectfont\pushocplist\ismtamil}
\def\hema{\fontencoding{U}\fontfamily{tmhema}\selectfont\pushocplist\ismtamil}
\def\ilango{\fontencoding{U}\fontfamily{tmilango}\selectfont\pushocplist\ismtamil}
\def\kalyani{\fontencoding{U}\fontfamily{tmkalyani}\selectfont\pushocplist\ismtamil}
\def\kamal{\fontencoding{U}\fontfamily{tmkamal}\selectfont\pushocplist\ismtamil}
\def\kamban{\fontencoding{U}\fontfamily{tmkamban}\selectfont\pushocplist\ismtamil}
\def\kannadasan{\fontencoding{U}\fontfamily{tmkannadasan}\selectfont\pushocplist\ismtamil}
\def\kannagi{\fontencoding{U}\fontfamily{tmkannagi}\selectfont\pushocplist\ismtamil}
\def\kapilan{\fontencoding{U}\fontfamily{tmkapilan}\selectfont\pushocplist\ismtamil}
\def\komala{\fontencoding{U}\fontfamily{tmkomala}\selectfont\pushocplist\ismtamil}
\def\krishna{\fontencoding{U}\fontfamily{tmkrishna}\selectfont\pushocplist\ismtamil}
\def\lalitha{\fontencoding{U}\fontfamily{tmlalitha}\selectfont\pushocplist\ismtamil}
\def\lalithaheavy{\fontencoding{U}\fontfamily{tmlalithaheavy}\selectfont\pushocplist\ismtamil}
\def\lathika{\fontencoding{U}\fontfamily{tmlathika}\selectfont\pushocplist\ismtamil}
\def\madhu{\fontencoding{U}\fontfamily{tmmadhu}\selectfont\pushocplist\ismtamil}
\def\madhuram{\fontencoding{U}\fontfamily{tmmadhuram}\selectfont\pushocplist\ismtamil}
\def\nakkeran{\fontencoding{U}\fontfamily{tmnakkeran}\selectfont\pushocplist\ismtamil}
\def\nambi{\fontencoding{U}\fontfamily{tmnambi}\selectfont\pushocplist\ismtamil}
\def\neha{\fontencoding{U}\fontfamily{tmneha}\selectfont\pushocplist\ismtamil}
\def\padma{\fontencoding{U}\fontfamily{tmpadma}\selectfont\pushocplist\ismtamil}
\def\pattinathar{\fontencoding{U}\fontfamily{tmpattinathar}\selectfont\pushocplist\ismtamil}
\def\poornima{\fontencoding{U}\fontfamily{tmpoornima}\selectfont\pushocplist\ismtamil}
\def\poovai{\fontencoding{U}\fontfamily{tmpoovai}\selectfont\pushocplist\ismtamil}
\def\radhika{\fontencoding{U}\fontfamily{tmradhika}\selectfont\pushocplist\ismtamil}
\def\rajarajan{\fontencoding{U}\fontfamily{tmrajarajan}\selectfont\pushocplist\ismtamil}
\def\rama{\fontencoding{U}\fontfamily{tmrama}\selectfont\pushocplist\ismtamil}
\def\ramiya{\fontencoding{U}\fontfamily{tmramiya}\selectfont\pushocplist\ismtamil}
\def\ratna{\fontencoding{U}\fontfamily{tmratna}\selectfont\pushocplist\ismtamil}
\def\ravi{\fontencoding{U}\fontfamily{tmravi}\selectfont\pushocplist\ismtamil}
\def\ravindra{\fontencoding{U}\fontfamily{tmravindra}\selectfont\pushocplist\ismtamil}
\def\rekha{\fontencoding{U}\fontfamily{tmrekha}\selectfont\pushocplist\ismtamil}
\def\seema{\fontencoding{U}\fontfamily{tmseema}\selectfont\pushocplist\ismtamil}
\def\shashi{\fontencoding{U}\fontfamily{tmshashi}\selectfont\pushocplist\ismtamil}
\def\shiva{\fontencoding{U}\fontfamily{tmshiva}\selectfont\pushocplist\ismtamil}
\def\sudhir{\fontencoding{U}\fontfamily{tmsudhir}\selectfont\pushocplist\ismtamil}
\def\swetha{\fontencoding{U}\fontfamily{tmswetha}\selectfont\pushocplist\ismtamil}
\def\umesh{\fontencoding{U}\fontfamily{tmumesh}\selectfont\pushocplist\ismtamil}
\def\valluvar{\fontencoding{U}\fontfamily{tmvalluvar}\selectfont\pushocplist\ismtamil}
\def\vaman{\fontencoding{U}\fontfamily{tmvaman}\selectfont\pushocplist\ismtamil}
\def\venu{\fontencoding{U}\fontfamily{tmvenu}\selectfont\pushocplist\ismtamil}
\def\virendra{\fontencoding{U}\fontfamily{tmvirendra}\selectfont\pushocplist\ismtamil}
% from fontpack tarball
\def\ava{\fontencoding{U}\fontfamily{tmava}\selectfont\pushocplist\tamtamil}
\def\aaezhai{\fontencoding{U}\fontfamily{tmaaezhai}\selectfont\pushocplist\tamtamil}
\def\nalinam{\fontencoding{U}\fontfamily{tmnalinam}\selectfont\pushocplist\tamtamil}


\DeclareOption{abhirami}{%
\def\tamil{\fontencoding{U}\fontfamily{tmabhirami}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{amala}{%
\def\tamil{\fontencoding{U}\fontfamily{tmamala}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{appar}{%
\def\tamil{\fontencoding{U}\fontfamily{tmappar}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{archana}{%
\def\tamil{\fontencoding{U}\fontfamily{tmarchana}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{aruna}{%
\def\tamil{\fontencoding{U}\fontfamily{tmaruna}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{arunagiri}{%
\def\tamil{\fontencoding{U}\fontfamily{tmarunagiri}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{avvai}{%
\def\tamil{\fontencoding{U}\fontfamily{tmavvai}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{chanakya}{%
\def\tamil{\fontencoding{U}\fontfamily{tmchanakya}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{chandra}{%
\def\tamil{\fontencoding{U}\fontfamily{tmchandra}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{chetan}{%
\def\tamil{\fontencoding{U}\fontfamily{tmchetan}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{chitra}{%
\def\tamil{\fontencoding{U}\fontfamily{tmchitra}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{gopur}{%
\def\tamil{\fontencoding{U}\fontfamily{tmgopur}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{heena}{%
\def\tamil{\fontencoding{U}\fontfamily{tmheena}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{heenaheavy}{%
\def\tamil{\fontencoding{U}\fontfamily{tmheenaheavy}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{hema}{%
\def\tamil{\fontencoding{U}\fontfamily{tmhema}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{ilango}{%
\def\tamil{\fontencoding{U}\fontfamily{tmilango}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{kalyani}{%
\def\tamil{\fontencoding{U}\fontfamily{tmkalyani}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{kamal}{%
\def\tamil{\fontencoding{U}\fontfamily{tmkamal}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{kamban}{%
\def\tamil{\fontencoding{U}\fontfamily{tmkamban}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{kannadasan}{%
\def\tamil{\fontencoding{U}\fontfamily{kannadasan}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{kannagi}{%
\def\tamil{\fontencoding{U}\fontfamily{tmkannagi}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{kapilan}{%
\def\tamil{\fontencoding{U}\fontfamily{tmkapilan}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{komala}{%
\def\tamil{\fontencoding{U}\fontfamily{tmkomala}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{krishna}{%
\def\tamil{\fontencoding{U}\fontfamily{tmkrishna}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{lalitha}{%
\def\tamil{\fontencoding{U}\fontfamily{tmlalitha}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{lalithaheavy}{%
\def\tamil{\fontencoding{U}\fontfamily{tmlalithaheavy}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{lathika}{%
\def\tamil{\fontencoding{U}\fontfamily{tmlathika}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{madhu}{%
\def\tamil{\fontencoding{U}\fontfamily{tmmadhu}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{madhuram}{%
\def\tamil{\fontencoding{U}\fontfamily{tmmadhuram}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{nakkeran}{%
\def\tamil{\fontencoding{U}\fontfamily{tmnakkeran}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{nambi}{%
\def\tamil{\fontencoding{U}\fontfamily{tmnambi}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{neha}{%
\def\tamil{\fontencoding{U}\fontfamily{tmneha}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{padma}{%
\def\tamil{\fontencoding{U}\fontfamily{tmpadma}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{pattinathar}{%
\def\tamil{\fontencoding{U}\fontfamily{tmpattinathar}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{poornima}{%
\def\tamil{\fontencoding{U}\fontfamily{tmpoornima}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{poovai}{%
\def\tamil{\fontencoding{U}\fontfamily{tmpoovai}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{radhika}{%
\def\tamil{\fontencoding{U}\fontfamily{tmradhika}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{rajarajan}{%
\def\tamil{\fontencoding{U}\fontfamily{tmrajarajan}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{rama}{%
\def\tamil{\fontencoding{U}\fontfamily{tmrama}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{ramiya}{%
\def\tamil{\fontencoding{U}\fontfamily{tmramiya}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{ratna}{%
\def\tamil{\fontencoding{U}\fontfamily{tmratna}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{ravi}{%
\def\tamil{\fontencoding{U}\fontfamily{tmravi}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{ravindra}{%
\def\tamil{\fontencoding{U}\fontfamily{tmravindra}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{rekha}{%
\def\tamil{\fontencoding{U}\fontfamily{tmrekha}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{seema}{%
\def\tamil{\fontencoding{U}\fontfamily{tmseema}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{shashi}{%
\def\tamil{\fontencoding{U}\fontfamily{tmshashi}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{shiva}{%
\def\tamil{\fontencoding{U}\fontfamily{tmshiva}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{sudhir}{%
\def\tamil{\fontencoding{U}\fontfamily{tmsudhir}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{swetha}{%
\def\tamil{\fontencoding{U}\fontfamily{tmswetha}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{umesh}{%
\def\tamil{\fontencoding{U}\fontfamily{tmumesh}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{valluvar}{%
\def\tamil{\fontencoding{U}\fontfamily{tmvalluvar}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{vaman}{%
\def\tamil{\fontencoding{U}\fontfamily{tmvaman}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{venu}{%
\def\tamil{\fontencoding{U}\fontfamily{tmvenu}\selectfont\pushocplist\ismtamil}
}
\DeclareOption{virendra}{%
\def\tamil{\fontencoding{U}\fontfamily{tmvirendra}\selectfont\pushocplist\ismtamil}
}
%fontpack-1.0
\DeclareOption{ava}{%
\def\tamil{\fontencoding{U}\fontfamily{tmava}\selectfont\pushocplist\tamtamil}
}
\DeclareOption{aaezhai}{%
\def\tamil{\fontencoding{U}\fontfamily{tmaaezhai}\selectfont\pushocplist\tamtamil}
}
\DeclareOption{nalinam}{%
\def\tamil{\fontencoding{U}\fontfamily{tmnalinam}\selectfont\pushocplist\tamtamil}
}
\ProcessOptions\relax



\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}


%\endinput

%%%%%% end of otamil.sty
