Mercurial > dottes
diff makeBooke.sh @ 16:780f49972b68
Update book making command.
Switched to A5 portrait. In landscape it stretches the image to fit the
width, and that causes a lot of longer tunes to become too high to fit
properly on the page.
Build the book in a separate build directory. The build generates lots
of .abc files and so forth, which it is convenient to have elsewhere
so you can ignore them. I did experimend with \abcinclude, but that has
a lot of expectations about the files being in the current directory.
If a tune has multiple titles, pick the first.
Adjust abcm2ps options to preserve the line breaks in the ABC.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Mon, 27 Feb 2012 13:04:37 +0000 |
parents | 232a778181e3 |
children | b61b090cd4c7 |
line wrap: on
line diff
--- a/makeBooke.sh Mon Feb 27 13:01:56 2012 +0000 +++ b/makeBooke.sh Mon Feb 27 13:04:37 2012 +0000 @@ -9,10 +9,15 @@ exit 1 fi -booke=$1 +dir=`pwd` + +booke=$dir/$1 +builddir=$dir/build output=dottes.tex -cp dottes.tex.header $output +mkdir -p $builddir + +cp dottes.tex.header $builddir/$output # Now, for each tune, add # @@ -24,15 +29,16 @@ find $booke -name "*.abc" | sort | while read filename do - title=`grep "^T:" $filename | sed -e "s/^T: *//"` + title=`grep "^T:" $filename | head -1 | sed -e "s/^T: *//"` name=`basename $filename .abc` - echo "\\\\addcontentsline{toc}{subsection}{$title}" >> $output - echo "\\\\begin{abc}[name=$name]" >> $output - cat $filename >> $output - echo "\\\\end{abc}" >> $output + echo "\\\\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output + echo "\\\\begin{abc}[options=-j0 +c,name=$name]" >> $builddir/$output + cat $filename >> $builddir/$output + echo "\\\\end{abc}" >> $builddir/$output done -echo "\\\\end{document}" >> $output +cat dottes.tex.footer >> $builddir/$output -#pdflatex -shell-escape $output -#pdflatex -shell-escape $output +cd $builddir +pdflatex -shell-escape $output +pdflatex -shell-escape $output