# HG changeset patch # User Jim Hague # Date 1373225247 -3600 # Node ID 67dc98ae481647e58fbe77e736975a283ebf5d0d # Parent a1839449824b0a38d360c9443b4d7cd973f75880 Crop PDFs after generation so that they don't have white borders - document can do that. diff -r a1839449824b -r 67dc98ae4816 makeGraphics.sh --- a/makeGraphics.sh Sun Jul 07 20:26:41 2013 +0100 +++ b/makeGraphics.sh Sun Jul 07 20:27:27 2013 +0100 @@ -27,12 +27,18 @@ # Make $name.eps so we can build with LaTeX. mv $graphicsdir/${name}001.eps $graphicsdir/${name}.eps # And make the corresponding PDF. - epstopdf --outfile=$graphicsdir/$name.pdf $graphicsdir/${name}.eps + epstopdf --outfile=$graphicsdir/$name-tocrop.pdf $graphicsdir/${name}.eps + # And crop it, so the graphic is as big as possible on the page. + pdfcrop $graphicsdir/$name-tocrop.pdf $graphicsdir/$name.pdf + rm $graphicsdir/$name-tocrop.pdf # and make the first line graphic. $dir/abcfirstline.py $filename > firstline.abc abcm2ps +c -M +Q -E -O $graphicsdir/firstline-$name.eps firstline.abc mv $graphicsdir/firstline-${name}001.eps $graphicsdir/firstline-${name}.eps rm firstline.abc - epstopdf --outfile=$graphicsdir/firstline-$name.pdf $graphicsdir/firstline-${name}.eps + epstopdf --outfile=$graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-${name}.eps + # And crop it, so the graphic is as big as possible on the page. + pdfcrop $graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-$name.pdf + rm $graphicsdir/firstline-$name-tocrop.pdf done