#!/bin/csh -f

#  Create reduce.tex

setenv man $reduce/doc/manual

cat $man/header.tex > reduce.tex
cat $man/macros.tex >> reduce.tex
echo "\
\makeindex\
\
\begin{document}\
\pagestyle{empty}" >> reduce.tex
cat $man/title.tex >> reduce.tex
echo "\pagestyle{headings}\
\setcounter{page}{0}\
\tableofcontents\
" >> reduce.tex
cat $man/abstract.tex >> reduce.tex
cat $man/acknowl.tex >> reduce.tex
cat $man/intro.tex >> reduce.tex
cat $man/progstr.tex >> reduce.tex
cat $man/exprn.tex >> reduce.tex
cat $man/list.tex >> reduce.tex
cat $man/statemnt.tex >> reduce.tex
cat $man/command.tex >> reduce.tex
cat $man/oper.tex >> reduce.tex
cat $man/solve.tex >> reduce.tex
cat $man/oper2.tex >> reduce.tex
cat $man/structr.tex >> reduce.tex
cat $man/polyrat.tex >> reduce.tex
cat $man/subst.tex >> reduce.tex
cat $man/io.tex >> reduce.tex
cat $man/inter.tex >> reduce.tex
cat $man/matrix.tex >> reduce.tex
cat $man/proc.tex >> reduce.tex
cat $man/rememb.tex >> reduce.tex
cat $man/user.tex >> reduce.tex
cat $man/symbolic.tex >> reduce.tex
cat $man/rlisp88.tex >> reduce.tex
cat $man/rlispref.tex >> reduce.tex
cat $man/hephys.tex >> reduce.tex
cat $man/util.tex >> reduce.tex
cat $man/maintain.tex >> reduce.tex
cat $man/appenda.tex >> reduce.tex
echo "\
\printindex\
\
\end{document}" >> reduce.tex

expand reduce.tex > ,tmp
sed 's/  *$//g' ,tmp > reduce.tex
rm ,tmp
