#!/bin/sh
#
# dvi2pdf. SPQR 15/01/95
#
# This is a Unix shell script demonstrating how to use repere.
# It can easily be adapted to a DOS batch file or the like.
# The idea is to take the output from dvihps, preceded and followed
# by copies of the .rep file produced by the hyperref package,
# and process it with the repere program. This puts the main body
# of the PostScript back, but follows it by a set of pdfmarks
# which form a table of contents.
#
# repere is compiled from the Flex program repere.lex
#
F=`basename $1 .dvi`
shift
dvihps -z $* $F.dvi -o $F.ps
cat $F.rep $F.ps $F.rep | repere > $$.ps
mv $$.ps $F.ps
echo $F.ps ready for distillation
