#!/bin/csh -f

set pdfname = $1
set htmlname = `echo $1 | awk -F. '{print $1".html"}'`

htlatex $pdfname

sed s/'src=\"img'/'style=\"max-width: 48em\" src=\"img'/ $htmlname               > tmp1
sed s/'<body '/'<body style=\"max-width: 48em\" bgcolor=\"\#5683c4\"'/      tmp1 > tmp2
sed s/'class=\"content\">'/'class=\"content\" style=\"max-width: 38em\">'/   tmp2 > tmp3

mv tmp3 $htmlname
rm tmp1 tmp2

