%(c) 1990,91 by Joel M. Hoffman
%vowels.tex.  Version 1.0.
%updated 5/13/91 by JMH

%Use of this material in a commercial venture of any sort requires
%permission from me.  Otherwise, you are free to use this for any
%legal, non-destructive purpose.  If you find this useful, a
%contribution to charity will be most appreciated.

%This file provides the following commands:
% \patach{ let }              % These are the basic vowel-commands.  Each
% \kamatz{ let }              % puts a vowel under the letter _let_.  Each
% \segol{ let }               % also has a corresponding \chatafxxxxxx
% \kibutz{ let }              % command (e.g., \chatafpatach) for a chataf-
% \chiriq{ let }              % vowel -- even when the vowel doesn't exist.
% \kamatzkatan{ let }         % (There's a \chatafchiriq.)  Additionally,
% \shva{ let }                % each has a capitalized version (\Patach, etc.)
% \meteg{ let }               % which puts a meteg with the vowel.  There
% \tzere{ let }               % is no way to put a meteg with a chataf-vowel.

%All of the above use the general \hvowel macro, which puts a vowel under
%any letter.  \hvowel automatically adjusts the vowel for certain letters
%(_resh_ and _daled_ require a horizontal adjustment, _final chaf_ a
%veritcal one.), and repalces \ayin with \vowelayin (which doesn't
%descend). Unfortunately, \Daled (a \daled with a _dagesh_) isn't yet
%handled correctly.

%BITNET:      hoffman@nyuacf.BITNET  <-- this will change soon
%CompuServe:  72700,402 -or- 72700.402@compuserve.com
%SNAIL:       Joel M. Hoffman
%             19 Hillcrest Lane
%             Rye, NY 10580
%             U.S.A.                            


%usage: \hvowel{letter}{vowel(s)}
\def\hvowel#1#2{\def\l{#1}% \def was \let
\def\hadjust{0}\def\vadjust{0}%
\if\l\ayin \let\l=\vowelayin\fi%
\if\l\fchaf \def\vadjust{.75}\fi%
\if\l\resh \def\hadjust{.2}\fi%
\if\l\daled \def\hadjust{.2}\fi%
\if\l\koof \def\hadjust{.1}\fi%
\hbox{\setbox0=\hbox{\l}%
\setbox1=\hbox to \wd0{\hss #2\hss}%
\kern\hadjust\wd0\raise\vadjust\ht0\box1\kern-\hadjust\wd0\kern-\wd0\box0}}

\def\patach#1{\hvowel#1{\char001}}
\def\kamatz#1{\hvowel#1{\char002}}
\def\segol#1{\hvowel{#1}{\char003}}
\def\kibutz#1{\hvowel{#1}{\char004}}
\def\chiriq#1{\hvowel{#1}{\char005}}
\def\kamatzkatan#1{\hvowel{#1}{\char006}}
\def\shva#1{\hvowel{#1}{\char007}}
\def\meteg#1{\hvowel{#1}{\char008}}
\def\tzere#1{\hvowel{#1}{\char009}}
\def\chatafpatach#1{\hvowel{#1}{\hbox{\char001\char007}}}
\def\chatafkamatz#1{\hvowel{#1}{\hbox{\char002\char007}}}
\def\chatafsegol#1{\hvowel{#1}{\hbox{\char003\char007}}}
\def\chatafkibutz#1{\hvowel{#1}{\hbox{\char004\char007}}}
\def\chatafhiriq#1{\hvowel{#1}{\hbox{\char00\char0075}}}%this doesn't exist!
\def\chatafkamatzkatan#1{\hvowel{#1}{\hbox{\char006\char007}}}
\def\Patach#1{\hvowel{#1}{\hbox{\char008\char001}}}
\def\Kamatz#1{\hvowel{#1}{\hbox{\char008\char002}}}
\def\Segol#1{\hvowel{#1}{\hbox{\char008\char003}}}
\def\Kibutz#1{\hvowel{#1}{\hbox{\char008\char004}}}
\def\Chiriq#1{\hvowel{#1}{\hbox{\char008\char005}}}
\def\Kamatzkatan#1{\hvowel{#1}{\hbox{\char008\char006}}}
\def\Tzere#1{\hvowel{#1}{\hbox{\char008\char009}}}


