diff --git a/make-includes/build_lecture_rules.make b/make-includes/build_lecture_rules.make index e71be5a..5c1b0bb 100755 --- a/make-includes/build_lecture_rules.make +++ b/make-includes/build_lecture_rules.make @@ -36,6 +36,7 @@ vpath %.plo $(IMGDIR) vpath %.ps $(IMGDIR) vpath %.eps $(IMGDIR) +vpath %.svg $(IMGDIR) ################################################################################ @@ -342,3 +343,13 @@ # %.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. +# +%.pdf: %.svg + inkscape --file=$< --export-text-to-path --without-gui --export-eps=$(IMGDIR)/$*.eps + ps2eps --ignoreBB --nohires --loose < $(IMGDIR)/$*.eps | ps2pdf -dEPSCrop - $(IMGDIR)/$@ + rm -f $(IMGDIR)/$*.eps