#!/bin/csh -f
set file=`echo $1 | sed 's/\([^/]*\)\.[ch]$/latex\/\1.latex/'`
echo $file
set date=`ls -l $1 | awk '{ print $5 " " $6 " " $7 }'`
cat > $file <<EOF
\documentstyle[12pt,thesiscode]{article}
\markboth{{\bf $1 \today}}{{\bf $1 \today}}
\title{$1}
\author{$USER}
\date{$date}
\begin{document}
\maketitle
\newpage
\rm
\begin{tabbing}
EOF
sed -f bin/gr.sed < $1 >> $file
cat >> $file <<EOF
\end{tabbing}
\end{document}
EOF


