#!/bin/sh
latex $1.tex; latex $1.tex; latex $1.tex; dvips -t letter -o $1.ps $1.dvi; \
ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 \
-dSubsetFonts=true -dEmbedAllFonts=true -dAntiAliasColorImages=false \
-dDownsampleColorImages=true -dColorImageDownsampleType=/Bicubic \
-dColorImageResolution=300 -dColorImageDepth=-1 \
-dColorImageDownsampleThreshold=1.50 -dEncodeColorImages=true \
-dColorImageFilter=/DCTEncode -dAutoFilterColorImages=true \
-dAntiAliasGrayImages=false -dDownsampleGrayImages=true \
-dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=300 \
-dGrayImageDepth=-1 -dGrayImageDownsampleThreshold=1.50 \
-dEncodeGrayImages=true -dGrayImageFilter=/DCTEncode \
-dAutoFilterGrayImages=true -r600x600 \
$1.ps; rm *.log *.dvi *.aux *.lof *.lot *.toc; 
