#!/bin/csh -f

if ($#argv != 1) then
  echo "Usage: ivm2ps file"
  exit(1)
endif

set fileroot = $1:r

echo -n "\documentstyle[inchmargs,headsup]{article}\
\nofiles % Uncomment this line if there are no cross references.\
\begin{document}\
\input{livritex} % invokes ivritex plus lhebfonts plus a bit\
\font\tenheb = DeadSea\
\
|\
" > ${fileroot}.ivr

cat $1 | tr 'Oo' 'ps' | awk '{print; print ""}' >> ${fileroot}.ivr

echo "|\
\end{document}" >> ${fileroot}.ivr

ivrtotex -p -m ~rig/tex/modplato ${fileroot}

latex ${fileroot}.tex

dvips ${fileroot}.dvi
