diff --git a/make-includes/standard_rules.make b/make-includes/standard_rules.make index 6dc3b6e..0e7a956 100755 --- a/make-includes/standard_rules.make +++ b/make-includes/standard_rules.make @@ -31,7 +31,7 @@ # # PDF from LaTeX via DVI, typically for images drawn using PSTricks). # -%-print.pdf: $(IMGDIR)/%.tex +%.pdf %-print.pdf: $(IMGDIR)/%.tex latex --jobname=$(IMGDIR)/$* $< dvips -q -f $(IMGDIR)/$* | ps2eps -q -l | epstopdf -f -o=$(IMGDIR)/$@ # @@ -63,7 +63,7 @@ # # PDF and PNG from OmniGraffle. (We can't automate this.) # -%-print.pdf %-web.png: %.graffle +%.pdf %-print.pdf %.png %-web.png: %.graffle @echo "$(notdir $<): regenerate $(notdir $@)" @exit 1 # @@ -79,50 +79,39 @@ # # PNG from TIFF. # -%-print.png %-web.png: %.tif +%.png %-print.png %-web.png: %.tif convert "$<" $(IMGDIR)/$@ # # PNG from PICT. # -%-print.png %-web.png: %.pict +%.png %-print.png %-web.png: %.pict convert "$<" $(IMGDIR)/$@ # # PDF from Ploticus. # -%-print.pdf: %.plo +%.pdf %-print.pdf: %.plo ploticus -eps -tightcrop -o stdout $< | shiftbbox | epstopdf --filter --outfile=$(IMGDIR)/$@ # # PDF from PS # -%-print.pdf: %.ps +%.pdf %-print.pdf: %.ps ps2eps --ignoreBB --nohires --loose < $< | ps2pdf -dEPSCrop - $(IMGDIR)/$@ # # PDF from EPS # -%-print.pdf: %.eps +%.pdf %-print.pdf: %.eps ps2eps --ignoreBB --nohires --loose < $< | ps2pdf -dEPSCrop - $(IMGDIR)/$@ # # PDF from SVG (via Inkscape) # We remove the intermediate file manually rather than through the tidy/clean -# mechanism, because we might have EPS files that aren't generated by -# something else. See build_content_rules.make for explanation of ps2eps -# options. +# mechanism. # -# BIZARRENESS: While Inkscape produces correctly cropped EPSs in the first -# place, if we don't run them through ps2eps first, ps2pdf has a tendency to -# rotate the PDFs 90 degrees clockwise for no obvious reason and without any -# apparent pattern. -# -%-print.pdf: %.svg - inkscape --file=$< --export-text-to-path --without-gui --export-eps=$(IMGDIR)/$*.eps - ps2eps --ignoreBB --nohires --loose --gsbbox < $(IMGDIR)/$*.eps | ps2pdf -dEPSCrop - $(IMGDIR)/$@ - rm -f $(IMGDIR)/$*.eps +%.pdf %-print.pdf: %.svg + inkscape --file=$< --export-text-to-path --without-gui --export-pdf=$*-tmp.pdf + pdfcrop $*-tmp.pdf $@ + -rm -f $*-tmp.pdf # # PNG from SVG (via Inkscape) # -%-web.png: %.svg - inkscape --file=$< --export-text-to-path --without-gui --export-eps=$(IMGDIR)/$*.eps - ps2eps --ignoreBB --nohires --loose --gsbbox < $(IMGDIR)/$*.eps | \ - gs -q -dNOPAUSE -dBATCH -dSAFER -dEPSCrop -sDEVICE=png16m -r96 \ - -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=$(IMGDIR)/$@ - - rm -f $(IMGDIR)/$*.eps +%.png %-print.png %-web.png: %.svg + inkscape --file=$< --without-gui --export-area-drawing --export-background-opacity=1.0 --export-dpi=96 --export-png=$@