#!/usr/bin/perl

require 'latexmk';

$tth = 'tth';
#$tth_args = '-i -e2';		# -i italic math, -e2 generate figures
$tth_args = '-i';		# -i italic math

$makeindex = 'makeindex';
$filename = 'tutorial';



### write this to do the following:

# 1. generate dvi file
# 2. generate ps file
# 3. generate html file with pictures if necessary
# 4. create archive of html file and pictures
# 5. move all files to the proper place


&latexmk::latexmk("$filename.tex","-flavor",'latex',"-ps"); # creates ps and dvi
system("$makeindex $filename.tex");
system("$tth $tth_args -L$filename <$filename.tex > $filename.html");
system("tar -zcvf $filename.tgz $filename.html *.gif");
