Mercurial > dottes
view makeBooke.sh @ 32:b05fca550d33
Revert to putting Change: notices into the notes.
W: is for words/lyrics. None at present in Session tunes, but they do
exist in Morris tunes, and who knows what might happen in sessions in
future. I want to keep the option of adding words.
So move Change: notices back to N:, and have all notes printed.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Fri, 02 Mar 2012 10:46:43 +0000 |
parents | b61b090cd4c7 |
children | 80af9457d566 |
line wrap: on
line source
#!/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>" exit 1 fi dir=`pwd` booke=$dir/$1 builddir=$dir/build output=dottes.tex mkdir -p $builddir cp dottes.tex.header $builddir/$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 | head -1 | sed -e "s/^T: *//"` name=`basename $filename .abc` echo "\\\\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output echo "\\\\begin{abc}[options=-j0 +c -n,name=$name]" >> $builddir/$output cat $filename >> $builddir/$output echo "\\\\end{abc}" >> $builddir/$output done cat dottes.tex.footer >> $builddir/$output cd $builddir pdflatex -shell-escape $output pdflatex -shell-escape $output cd $dir pdflatex dottesona4.tex