# HG changeset patch # User Jim Hague # Date 1330862430 0 # Node ID 0e7d2830cb8b5ad176c50fb6b8dec593325fbd23 # Parent 62da0abc23d8e9253c285a62af70fb64d68e456e Put making tune graphics required by web and book into separate dir and make separately. Web and book both require the tune PDF graphics. Break these out into a separate direction and make with a separate process. diff -r 62da0abc23d8 -r 0e7d2830cb8b .hgignore --- a/.hgignore Sun Mar 04 11:47:43 2012 +0000 +++ b/.hgignore Sun Mar 04 12:00:30 2012 +0000 @@ -8,3 +8,4 @@ syntax: regexp build/ +graphics/ diff -r 62da0abc23d8 -r 0e7d2830cb8b makeBooke.sh --- a/makeBooke.sh Sun Mar 04 11:47:43 2012 +0000 +++ b/makeBooke.sh Sun Mar 04 12:00:30 2012 +0000 @@ -3,6 +3,9 @@ # Build the Booke. First assemble the book LaTeX, then build it # into a PDF. # +# All EPS and PDF tune graphics must be present already. Run +# makeGraphics.sh to make these. +# if [ $# != 1 ]; then echo "Usage: makeBooke.sh " @@ -13,6 +16,7 @@ booke=$dir/$1 builddir=$dir/build +graphicsdir=$dir/graphics/$1 output=dottes.tex outputpdf=dottes.pdf outputa4=dottesona4.tex @@ -40,14 +44,8 @@ do title=`grep "^T:" $filename | head -1 | sed -e "s/^T: *//"` name=`basename $filename .abc` - abcm2ps -j0 +c -n -E -O $builddir/$name.eps $filename - # Make $name.eps so we can build with LaTeX. - mv $builddir/${name}001.eps $builddir/${name}.eps - # And make the corresponding PDF for pdflatex. - epstopdf --outfile=$builddir/$name.pdf $builddir/${name}.eps - echo -E "\begin{center}" >> $builddir/$output - echo -E "\includegraphics[width=\textwidth]{$name}" >> $builddir/$output + echo -E "\includegraphics[width=\textwidth]{$graphicsdir/$name}" >> $builddir/$output echo -E "\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output echo -E "\end{center}" >> $builddir/$output done diff -r 62da0abc23d8 -r 0e7d2830cb8b makeGraphics.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/makeGraphics.sh Sun Mar 04 12:00:30 2012 +0000 @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Make the tune graphics, EPS, PDF required by web and book into +# graphics/. +# + +if [ $# != 1 ]; then + echo "Usage: makeGraphics.sh " + exit 1 +fi + +dir=`pwd` + +booke=$dir/$1 +graphicsdir=$dir/graphics/$1 + +mkdir -p $graphicsdir + +# Now, for each tune, make the tune graphic. +find $booke -name "*.abc" | sort | + while read filename + do + name=`basename $filename .abc` + abcm2ps -j0 +c -n -E -O $graphicsdir/$name.eps $filename + # Make $name.eps so we can build with LaTeX. + mv $graphicsdir/${name}001.eps $graphicsdir/${name}.eps + # And make the corresponding PDF for pdflatex. + epstopdf --outfile=$graphicsdir/$name.pdf $graphicsdir/${name}.eps + done