Mercurial > dottes
view makeBooke.sh @ 19:305e701c5dc2
Set output to A5 landscape. Begin content and content on fresh page.
Also shrink the rather generous margins. All tunes now fit onto a single
page, so no more blank pages in A5 landscape mode.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Wed, 29 Feb 2012 14:01:57 +0000 |
parents | 780f49972b68 |
children | b61b090cd4c7 |
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,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