Mercurial > hgbook
diff en/Makefile @ 11:e9d5b4c3d16b
First SVG image!
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 29 Jun 2006 00:32:35 -0700 |
parents | 339e75288632 |
children | 81454425eee9 |
line wrap: on
line diff
--- a/en/Makefile Wed Jun 28 20:29:21 2006 -0700 +++ b/en/Makefile Thu Jun 29 00:32:35 2006 -0700 @@ -4,6 +4,9 @@ 99defs.tex \ mq.tex +image-sources := \ + mq-stack.svg + example-sources := \ examples/run-example \ examples/mq.qinit-help \ @@ -18,7 +21,7 @@ pdf: pdf/hgbook.pdf -pdf/hgbook.pdf: $(sources) examples +pdf/hgbook.pdf: $(sources) $(image-sources:%.svg=%_pdf.png) examples mkdir -p $(dir $@) pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) cp 99book.bib $(dir $@) @@ -42,13 +45,22 @@ perl -pi -e 's/�([0-7][0-9a-f]);/chr(hex($$1))/egi' $(dir $(1))/*.html endef -html/onepage/hgbook.html: $(sources) examples +html/onepage/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples $(call htlatex,$@,$<) + cp $(image-sources:%.svg=%.png) $(dir $@) + +html/split/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples + $(call htlatex,$@,$<,2) + cp $(image-sources:%.svg=%.png) $(dir $@) -html/split/hgbook.html: $(sources) examples - $(call htlatex,$@,$<,2) +%.png: %.svg + inkscape -D -e $@ $< -.PHONY: examples +%_pdf.png: %.svg + inkscape -D -d 300 -e $@ $< + +%.eps: %.svg + inkscape -E $@ $< examples: examples/.run @@ -56,4 +68,4 @@ cd examples && ./run-example clean: - rm -rf html pdf *.aux *.dvi *.log *.out examples/*.out examples/.run + rm -rf html pdf *.eps *.png *.aux *.dvi *.log *.out examples/*.out examples/.run