#!/bin/sh

if [ $# -ne 1 ]
then
	echo "usage: output2latex < executable_file>"
	exit
fi

root=$1

echo "\begin{flushleft}" > $root.out.tex
echo "\hrulefill" >> $root.out.tex

echo "\begin{verbatim}" >> $root.out.tex

echo "a A Y 4 a A Y 3" | $root | expand >> $root.out.tex

echo "\end{verbatim}" >> $root.out.tex
echo >> $root.out.tex
echo "\vspace*{-6mm}" >> $root.out.tex
echo >> $root.out.tex
echo "\hrulefill" >> $root.out.tex
echo "\end{flushleft}" >> $root.out.tex
