-export TEXINPUTS=.:..:
+export TEXINPUTS=.:..//:
all: $P.pdf
-%.dvi: %.tex ../sgr.tex ../ga.bib
- csplain $< && if grep -q citation $*.aux ; then bibtex $* && csplain $< && csplain $< ; fi
+%.pdf: %.tex ../sgr.tex ../ga.bib
+ pdfcsplain $< && if grep -q citation $*.aux ; then bibtex $* && pdfcsplain $< && pdfcsplain $< ; fi
-%.ps: %.dvi
- dvips -D600 -o $@ -O-15.4mm,-15.4mm -t a5 $<
-
-%.pdf: %.ps
- ps2pdf $< $@
-
-%-2in1.pdf: %.pdf
+%-2in1.pdf: %-uncompressed.pdf
pspdftool 'nup(2, paper=a4)' $< $@
-%-booklet.pdf: %.pdf
+%-booklet.pdf: %-uncompressed.pdf
pspdftool 'book nup(2, paper=a4)' $< $@
+%-uncompressed.pdf: %.pdf
+ qpdf --object-streams=disable --stream-data=uncompress $< $@
+
+%.pdf: %.asy
+ asy -f pdf -tex pdftex $<
+
mostlyclean:
rm -f *.dvi *.log *~ core *.o *.aux *.bbl *.blg *.toc