Mercurial > dottes
annotate 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 |
| rev | line source |
|---|---|
| 0 | 1 #!/bin/sh |
| 13 | 2 # |
| 3 # Build the Booke. First assemble the book LaTeX, then build it | |
| 4 # into a PDF. | |
| 5 # | |
| 0 | 6 |
| 7 if [ $# != 1 ]; then | |
| 8 echo "Usage: make.sh <book dir name>" | |
| 9 exit 1 | |
| 10 fi | |
| 11 | |
| 16 | 12 dir=`pwd` |
| 13 | |
| 14 booke=$dir/$1 | |
| 15 builddir=$dir/build | |
| 13 | 16 output=dottes.tex |
| 0 | 17 |
| 16 | 18 mkdir -p $builddir |
| 19 | |
| 20 cp dottes.tex.header $builddir/$output | |
| 13 | 21 |
| 22 # Now, for each tune, add | |
| 23 # | |
| 24 # \addcontentsline{toc}{subsection}{<Tune title>} | |
| 25 # \begin{abc}[name=<filename>] | |
| 26 # ... ABC ... | |
| 27 # \end{abc} | |
| 28 | |
| 29 find $booke -name "*.abc" | sort | | |
| 30 while read filename | |
| 31 do | |
| 16 | 32 title=`grep "^T:" $filename | head -1 | sed -e "s/^T: *//"` |
| 13 | 33 name=`basename $filename .abc` |
| 16 | 34 echo "\\\\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output |
|
32
b05fca550d33
Revert to putting Change: notices into the notes.
Jim Hague <jim.hague@acm.org>
parents:
21
diff
changeset
|
35 echo "\\\\begin{abc}[options=-j0 +c -n,name=$name]" >> $builddir/$output |
| 16 | 36 cat $filename >> $builddir/$output |
| 37 echo "\\\\end{abc}" >> $builddir/$output | |
| 13 | 38 done |
| 39 | |
| 16 | 40 cat dottes.tex.footer >> $builddir/$output |
| 13 | 41 |
| 16 | 42 cd $builddir |
| 43 pdflatex -shell-escape $output | |
| 44 pdflatex -shell-escape $output | |
|
21
b61b090cd4c7
Produce an A4 PDF document with the A5 pages in booklet form.
Jim Hague <jim.hague@acm.org>
parents:
16
diff
changeset
|
45 |
|
b61b090cd4c7
Produce an A4 PDF document with the A5 pages in booklet form.
Jim Hague <jim.hague@acm.org>
parents:
16
diff
changeset
|
46 cd $dir |
|
b61b090cd4c7
Produce an A4 PDF document with the A5 pages in booklet form.
Jim Hague <jim.hague@acm.org>
parents:
16
diff
changeset
|
47 pdflatex dottesona4.tex |
