Bladeren bron

adjusted makefiles to add animation

Martin Thoma 11 jaren geleden
bovenliggende
commit
af1ac9266c

BIN
source-code/Pseudocode/Cholesky-Zerlegung/Animation/Animation.gif


+ 14 - 8
source-code/Pseudocode/Cholesky-Zerlegung/Animation/Makefile

@@ -1,29 +1,35 @@
 SOURCE = Animation
 DELAY = 80
 DENSITY = 300
-WIDTH = 500
-
+WIDTH = 512
+ 
 make:
 	pdflatex $(SOURCE).tex -output-format=pdf
 	make clean
-
+ 
 clean:
-	rm -rf  $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.toc *.snm *.out *.nav
 
 gif:
 	pdfcrop $(SOURCE).pdf
 	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
 	make clean
 
-png:
+animatedGif:
 	make
-	make svg
-	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
-
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
+ 
 transparentGif:
 	convert $(SOURCE).pdf -transparent white result.gif
 	make clean
 
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+ 
 svg:
 	make
 	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg

BIN
source-code/Pseudocode/Cholesky-Zerlegung/Cholesky-Zerlegung.gif


+ 14 - 8
source-code/Pseudocode/Cholesky-Zerlegung/Makefile

@@ -1,29 +1,35 @@
 SOURCE = Cholesky-Zerlegung
 DELAY = 80
 DENSITY = 300
-WIDTH = 500
-
+WIDTH = 512
+ 
 make:
 	pdflatex $(SOURCE).tex -output-format=pdf
 	make clean
-
+ 
 clean:
-	rm -rf  $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
+	rm -rf  $(TARGET) *.class *.html *.log *.aux *.toc *.snm *.out *.nav
 
 gif:
 	pdfcrop $(SOURCE).pdf
 	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
 	make clean
 
-png:
+animatedGif:
 	make
-	make svg
-	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
-
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
+ 
 transparentGif:
 	convert $(SOURCE).pdf -transparent white result.gif
 	make clean
 
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+ 
 svg:
 	make
 	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg

+ 18 - 4
tikz/bellman-ford-algorithm/Makefile

@@ -1,7 +1,7 @@
 SOURCE = bellman-ford-algorithm
- 
 DELAY = 80
 DENSITY = 300
+WIDTH = 512
  
 make:
 	pdflatex $(SOURCE).tex -output-format=pdf
@@ -9,8 +9,14 @@ make:
  
 clean:
 	rm -rf  $(TARGET) *.class *.html *.log *.aux *.toc *.snm *.out *.nav
- 
+
+gif:
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
+
 animatedGif:
+	make
 	pdfcrop $(SOURCE).pdf
 	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
 	make clean
@@ -18,10 +24,18 @@ animatedGif:
 transparentGif:
 	convert $(SOURCE).pdf -transparent white result.gif
 	make clean
+
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
  
 svg:
+	make
+	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
 	pdf2svg $(SOURCE).pdf $(SOURCE).svg
 	# Necessary, as pdf2svg does not always create valid svgs:
 	inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg
-	# Alternatively, only this one (produces worse results):
-	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
+	rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg
+	inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg
+	rm $(SOURCE)2.svg

BIN
tikz/bellman-ford-algorithm/bellman-ford-algorithm.gif


+ 9 - 3
tikz/graph-content-and-structure/Makefile

@@ -15,15 +15,21 @@ gif:
 	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
 	make clean
 
-png:
+animatedGif:
 	make
-	make svg
-	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+	pdfcrop $(SOURCE).pdf
+	convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
+	make clean
 
 transparentGif:
 	convert $(SOURCE).pdf -transparent white result.gif
 	make clean
 
+png:
+	make
+	make svg
+	inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
+
 svg:
 	make
 	#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg