diff --git a/make-includes/build_lecture_rules.make b/make-includes/build_lecture_rules.make index 5c1b0bb..5d1243e 100755 --- a/make-includes/build_lecture_rules.make +++ b/make-includes/build_lecture_rules.make @@ -347,9 +347,15 @@ # 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. +# something else. See build_content_rules.make for explanation of ps2eps +# options. +# +# 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. # %.pdf: %.svg inkscape --file=$< --export-text-to-path --without-gui --export-eps=$(IMGDIR)/$*.eps - ps2eps --ignoreBB --nohires --loose < $(IMGDIR)/$*.eps | ps2pdf -dEPSCrop - $(IMGDIR)/$@ + ps2eps --ignoreBB --nohires --loose --gsbbox < $(IMGDIR)/$*.eps | ps2pdf -dEPSCrop - $(IMGDIR)/$@ rm -f $(IMGDIR)/$*.eps