it: make main.pdf FIGS_FIG = $(wildcard fig/*.fig) FIGS_PS = $(patsubst %.fig,%.ps,$(FIGS_FIG)) .SUFFIXES: .png .tif .gif .jpg .pdf .pbm .pgm .ppm .dvi .fig \ .eps .ps .tex $(SUFFIXES) .tex.pdf: rm -f $*.ps $*.pdf mpost mp/figure make $(FIGS_PS) latex $< || { rm -f $*.dvi $*.aux $*.idx && false ; } bibtex $* while grep 'Rerun to get ' $*.log ; do \ latex $< || { rm -f $*.dvi $*.aux $*.idx && false ; } ; done dvips $*.dvi -o - | gs -q -dNOPAUSE -dBATCH \ -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress\ -dCompatibilityLevel=1.3 \ -dCompressPages=true -dUseFlateCompression=false \ -sPAPERSIZE=letter \ -dSubsetFonts=true -dEmbedAllFonts=true \ -dProcessColorModel=/DeviceGray \ -dDetectBlends=true -dOptimize=true \ -dDownsampleColorImages=true -dColorImageResolution=1200 \ -dColorImageDownsampleType=/Average -dColorImageFilter=/FlateEncode \ -dAutoFilterColorImages=false -dAntiAliasColorImages=false \ -dColorImageDownsampleThreshold=1.50000 \ -dDownsampleGrayImages=true -dGrayImageResolution=1200 \ -dGrayImageDownsampleType=/Average -dGrayImageFilter=/FlateEncode \ -dAutoFilterGrayImages=false -dAntiAliasGrayImages=false \ -dGrayImageDownsampleThreshold=1.50000 \ -dDownsampleMonoImages=true -dMonoImageResolution=1200 \ -dMonoImageDownsampleType=/Average -dMonoImageFilter=/FlateEncode \ -dAutoFilterMonoImages=false -dAntiAliasMonoImages=false \ -dMonoImageDownsampleThreshold=1.50000 \ -sOutputFile=$*.pdf \ -c save pop - # dvips -t letterSize -j0 -G0 $*.dvi -o $*.ps # ps2pdf -dEmbedAllFonts=true -dOptimize=true \ # -dPDFsettings=/prepress -dAutoFilterColorImages=false \ # -dColorImageFilter=/FlateEncode $*.ps $*.pdf .fig.ps: fig2dev -L pstex_t -m 1.3 -p $*.ps $< $*.ps_t fig2dev -L pstex -m 1.3 $< $*.ps clean: rm -f *.dvi *.lof *.log *.bak *.aux *.bbl *.blg *.brf *.idx *.ps *.out *.toc figure.* mp/*.mpx fig/*.ps* *~