comparison makeGraphics.sh @ 303:67dc98ae4816

Crop PDFs after generation so that they don't have white borders - document can do that.
author Jim Hague <jim.hague@acm.org>
date Sun, 07 Jul 2013 20:27:27 +0100
parents 295ba8275ab4
children aa803fd1c3a6
comparison
equal deleted inserted replaced
302:a1839449824b 303:67dc98ae4816
25 # Make the tune graphic. 25 # Make the tune graphic.
26 abcm2ps -E -F singletune -O $graphicsdir/$name.eps $filename 26 abcm2ps -E -F singletune -O $graphicsdir/$name.eps $filename
27 # Make $name.eps so we can build with LaTeX. 27 # Make $name.eps so we can build with LaTeX.
28 mv $graphicsdir/${name}001.eps $graphicsdir/${name}.eps 28 mv $graphicsdir/${name}001.eps $graphicsdir/${name}.eps
29 # And make the corresponding PDF. 29 # And make the corresponding PDF.
30 epstopdf --outfile=$graphicsdir/$name.pdf $graphicsdir/${name}.eps 30 epstopdf --outfile=$graphicsdir/$name-tocrop.pdf $graphicsdir/${name}.eps
31 # And crop it, so the graphic is as big as possible on the page.
32 pdfcrop $graphicsdir/$name-tocrop.pdf $graphicsdir/$name.pdf
33 rm $graphicsdir/$name-tocrop.pdf
31 34
32 # and make the first line graphic. 35 # and make the first line graphic.
33 $dir/abcfirstline.py $filename > firstline.abc 36 $dir/abcfirstline.py $filename > firstline.abc
34 abcm2ps +c -M +Q -E -O $graphicsdir/firstline-$name.eps firstline.abc 37 abcm2ps +c -M +Q -E -O $graphicsdir/firstline-$name.eps firstline.abc
35 mv $graphicsdir/firstline-${name}001.eps $graphicsdir/firstline-${name}.eps 38 mv $graphicsdir/firstline-${name}001.eps $graphicsdir/firstline-${name}.eps
36 rm firstline.abc 39 rm firstline.abc
37 epstopdf --outfile=$graphicsdir/firstline-$name.pdf $graphicsdir/firstline-${name}.eps 40 epstopdf --outfile=$graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-${name}.eps
41 # And crop it, so the graphic is as big as possible on the page.
42 pdfcrop $graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-$name.pdf
43 rm $graphicsdir/firstline-$name-tocrop.pdf
38 done 44 done