Mercurial > dottes
diff makeBooke.sh @ 13:232a778181e3
First go at LaTeX booklet.
author | Jim Hague <jim.hague@laicatc.com> |
---|---|
date | Mon, 27 Feb 2012 08:50:45 +0000 |
parents | 215b3a1aa761 |
children | 780f49972b68 |
line wrap: on
line diff
--- a/makeBooke.sh Sun Feb 26 19:18:44 2012 +0000 +++ b/makeBooke.sh Mon Feb 27 08:50:45 2012 +0000 @@ -1,4 +1,8 @@ #!/bin/sh +# +# Build the Booke. First assemble the book LaTeX, then build it +# into a PDF. +# if [ $# != 1 ]; then echo "Usage: make.sh <book dir name>" @@ -6,5 +10,29 @@ fi booke=$1 +output=dottes.tex -find $booke -name "*.abc" | sort | xargs abcm2ps -F dottes.fmt -O $booke.ps +cp dottes.tex.header $output + +# Now, for each tune, add +# +# \addcontentsline{toc}{subsection}{<Tune title>} +# \begin{abc}[name=<filename>] +# ... ABC ... +# \end{abc} + +find $booke -name "*.abc" | sort | + while read filename + do + title=`grep "^T:" $filename | 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 + done + +echo "\\\\end{document}" >> $output + +#pdflatex -shell-escape $output +#pdflatex -shell-escape $output