+export TEXINPUTS=.:..:
+
all: $P.ps
%.dvi: %.tex ../sgr.tex ../ga.bib
csplain $< && if grep -q citation $*.aux ; then bibtex $* && csplain $< && csplain $< ; fi
-%.pdf: %.tex ../sgr.tex
- pdfcsplain $<
-
-%-700.tex: %.tex
- ( echo '\magnification=700' ; cat $< ) >$@
-
%.ps: %.dvi
- dvips -D600 -o $@ -O-0.5in,-0.5in -t a4 $<
+ dvips -D600 -o $@ -O-15.4mm,-15.4mm -t a5 $<
-%-a5.ps: %-700.dvi
- dvips -D600 -o $@ -O-1in,-1in -T148mm,210mm $<
+%.pdf: %.ps
+ ps2pdf $< $@
-%-booklet.ps: %-a5.ps
- psbook <$< | pstops '2:0L(210mm,0)+1L(210mm,148mm)' | sed 's/^%%BoundingBox: .*/%%BoundingBox: 0 0 595 842/' >$@
+%-2in1.pdf: %.pdf
+ pspdftool 'nup(2, paper=a4)' $< $@
-%-2in1.ps: %-a5.ps
- pstops '2:0L(212mm,0mm)+1L(212mm,150mm)' <$< | sed 's/^%%BoundingBox: .*/%%BoundingBox: 0 0 595 842/' >$@
+%-booklet.pdf: %.pdf
+ pspdftool 'book nup(2, paper=a4)' $< $@
mostlyclean:
- rm -f *.dvi *.log *~ core *.o *-700.tex *-a5.ps *.aux *.bbl *.blg
+ rm -f *.dvi *.log *~ core *.o *.aux *.bbl *.blg *.toc
clean:: mostlyclean
rm -f *.ps *.pdf
+ifndef CUSTOM_UPLOAD
upload::
- make $P.ps
- scp -C $P.ps jabberwock:www/vyuka/ga/$P.ps
+ make $P.pdf
+ scp -C $P.pdf jabberwock:www/vyuka/ga/
+endif
.SECONDARY: