Mercurial > dottes
changeset 42:0e7d2830cb8b
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.
author | Jim Hague <jim.hague@laicatc.com> |
---|---|
date | Sun, 04 Mar 2012 12:00:30 +0000 |
parents | 62da0abc23d8 |
children | d92717f8130c |
files | .hgignore makeBooke.sh makeGraphics.sh |
diffstat | 3 files changed, 35 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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/
--- 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 <book dir name>" @@ -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
--- /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/<book>. +# + +if [ $# != 1 ]; then + echo "Usage: makeGraphics.sh <book dir name>" + 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