%
% otibet.tex
% (c) 1997 Norbert Preining
% This file is part of the otibet package
%
\def\setbelow#1#2\relax{%
  \leavevmode\vtop{\baselineskip0pt \lineskip0pt %
  \ialign{##\crcr#2\relax\crcr\hidewidth#1\hidewidth\crcr}}}
\def\setabove#1#2\relax{%
  \leavevmode\vbox{\baselineskip0pt \lineskip0pt %
  \ialign{##\crcr\hidewidth#1\hidewidth\crcr#2\relax\crcr}}}
\def\turn#1#2\stop{%
  #2\stop #1}
\def\stop{\relax}
\ocp\tibin=tibinwylie
\ocp\tibuniuni=tibuniuni
\ocp\tibout=tibout
\ocp\tibspecial=tibspecial
\ocp\tibvowel=tibvowel
\ocp\tibadjusttsheg=tibadjusttsheg
\ocplist\tibetantrans=
\addbeforeocplist 1 \tibin
\addbeforeocplist 2 \tibadjusttsheg
\addbeforeocplist 3 \tibuniuni
\addbeforeocplist 4 \tibspecial
\addbeforeocplist 5 \tibvowel
\addbeforeocplist 6 \tibout
\nullocplist
\let\latintrans=\nullocplist
\let\TibetanInputOcpList=\tibetantrans
\font\tibetan=otibetan
\let\TibetanActualFont=\tibetan
\def\tbfamily{\pushocplist\TibetanInputOcpList\TibetanActualFont }
                                % internals
\newskip\doubleshadskipamount
\doubleshadskipamount=\bigskipamount
\newskip\shadskipamount
\shadskipamount=\bigskipamount
\def\makeendsym{{\tbfamily
\leavevmode\vtop{\ialign{##\cr
\char"1030 \cr
\noalign{\kern -2pt\nointerlineskip}
{\hskip1pt\rm-}\cr
\noalign{\nointerlineskip}
\char"1030 \cr }} 
}}

%\def\makeom{{\tbfamily
%\leavevmode\vbox{\ialign{##\cr
%\hskip4pt \accent"1030\cr 
%\noalign{\kern-3pt\nointerlineskip}
%\hfil\accent"10F4\char"1061\hfil\cr}}\char"102E %
%}}
                                %
% everythin else

% selecting input mode
\def\inputwylie{\ocp\tibin=tibinwylie}
\def\inputunicode{\ocp\tibin=tibinunicode}
% selecting output mode
\def\outputtibetan{\let\TibetanInputOcpList=\tibetantrans%
  \let\TibetanActualFont=\tibetan}
\def\outputlatin{\let\TibetanInputOcpList=\latintrans%
  \let\TibetanActualFont=\relax}
% unicode characters
\def\vowelaa{\char"E1 }
\def\vowelii{\char"E3 }
\def\voweluu{\char"E5 }
\def\vowelr{\char"E6 }
\def\vowelrr{\char"E7 }
\def\vowell{\char"E8 }
\def\vowelll{\char"E9 }
\def\vowelee{\char"EB }
\def\voweloo{\char"ED }
\def\anusvara{\char"EE }
\def\rnambcad{\char"EF }
\def\reversedi{\char"F0 }
\def\reversedii{\char"F1 }
\def\nyizlanaada{\char"F2 }
\def\snaldan{\char"F3 }
\def\halanta{\char"F4 }
\def\paluta{\char"F5 }
\def\lcirtags{\char"F6 }
\def\yangrtags{\char"F7 }
\def\lcetsacan{\char"F8 }
\def\mchucan{\char"F9 }
\def\grucanrgyings{\char"FA }
\def\grumedrgyings{\char"FB }
\def\om{{\tbfamily\char"FC }}
\def\gtertsheg{\char"FD }
\def\endsym{{\tbfamily\gtertsheg}}
\def\swasti{{\tbfamily \char"FE }}

\def\prot@ctor{\char"FF }
\def\subjoin#1{\prot@ctor#1}
\def\protectvowel#1{\prot@ctor#1}
\def\ai{'i}
\def\hrih{{\tbfamily hr'i }}
\def\dme{{\tbfamily d\subjoin{m}e}}
\def\hung{{\tbfamily h\vowelaa u\anusvara}}
\def\altm#1{#1\anusvara}
\def\altmu#1{#1u\anusvara}
\def\achung#1{#1\vowelaa}
\def\subm#1{#1\subjoin{0}}
\endinput

%%% Local Variables: 
%%% mode: plain-tex
%%% TeX-master: t
%%% End: 
