summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tkz-orm/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/tkz-orm/Makefile')
-rw-r--r--Master/texmf-dist/doc/latex/tkz-orm/Makefile24
1 files changed, 19 insertions, 5 deletions
diff --git a/Master/texmf-dist/doc/latex/tkz-orm/Makefile b/Master/texmf-dist/doc/latex/tkz-orm/Makefile
index a208f6babd7..c85dea39b6e 100644
--- a/Master/texmf-dist/doc/latex/tkz-orm/Makefile
+++ b/Master/texmf-dist/doc/latex/tkz-orm/Makefile
@@ -4,11 +4,12 @@
help:
@echo ""
- @echo " make clean - clean out directory"
- @echo " make tidy - clean out directory some more"
- @echo " make ctan - create a CTAN-ready archive"
- @echo " make doc - typeset documentation"
- @echo " make install - install files in local texmf tree"
+ @echo " make clean - clean out directory"
+ @echo " make tidy - clean out directory some more"
+ @echo " make examples - create examples as PDF and PNG"
+ @echo " make ctan - create a CTAN-ready archive"
+ @echo " make doc - typeset documentation"
+ @echo " make install - install files in local texmf tree"
@echo ""
################################################################
@@ -91,6 +92,17 @@ $(PACKAGE).blg $(PACKAGE).bbl: $(PACKAGE).tex $(PACKAGE).bib $(PACKAGE).aux
rm -f $$NAME.$$I ; \
done
+%.png: %.tex
+ @sed 's/^\\begin{document}/\
+\\pgfrealjobname{dummy}\\begin{document}\\beginpgfgraphicnamed{example}/' $< | \
+sed 's/^\\end{document}/\\endpgfgraphicnamed\\end{document}/' > example.tex ; \
+ pdflatex --jobname=example example.tex ; \
+ gs -dNOPAUSE -r120 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sDEVICE=png16m \
+-sOutputFile=$@ -dBATCH example.pdf ; \
+ convert -thumbnail 200 $@ $(addsuffix .thumb.png, $(basename $@)) ; \
+ mv example.pdf $(addsuffix .pdf, $(basename $<)) ; rm example.*
+
+
################################################################
# User make options #
################################################################
@@ -123,6 +135,8 @@ ctan: doc
doc: $(foreach FILE,$(INCLUDEPDF),$(FILE).pdf)
+examples: $(foreach FILE,$(wildcard examples/*.tex),$(basename $(FILE)).png)
+
install:
echo Installing $(PACKAGE).sty
TEXMFHOME=`kpsewhich --var-value=TEXMFHOME` ; \