Mercurial > dottes
comparison 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 |
comparison
equal
deleted
inserted
replaced
12:5f39bec3f0fb | 13:232a778181e3 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # | |
3 # Build the Booke. First assemble the book LaTeX, then build it | |
4 # into a PDF. | |
5 # | |
2 | 6 |
3 if [ $# != 1 ]; then | 7 if [ $# != 1 ]; then |
4 echo "Usage: make.sh <book dir name>" | 8 echo "Usage: make.sh <book dir name>" |
5 exit 1 | 9 exit 1 |
6 fi | 10 fi |
7 | 11 |
8 booke=$1 | 12 booke=$1 |
13 output=dottes.tex | |
9 | 14 |
10 find $booke -name "*.abc" | sort | xargs abcm2ps -F dottes.fmt -O $booke.ps | 15 cp dottes.tex.header $output |
16 | |
17 # Now, for each tune, add | |
18 # | |
19 # \addcontentsline{toc}{subsection}{<Tune title>} | |
20 # \begin{abc}[name=<filename>] | |
21 # ... ABC ... | |
22 # \end{abc} | |
23 | |
24 find $booke -name "*.abc" | sort | | |
25 while read filename | |
26 do | |
27 title=`grep "^T:" $filename | sed -e "s/^T: *//"` | |
28 name=`basename $filename .abc` | |
29 echo "\\\\addcontentsline{toc}{subsection}{$title}" >> $output | |
30 echo "\\\\begin{abc}[name=$name]" >> $output | |
31 cat $filename >> $output | |
32 echo "\\\\end{abc}" >> $output | |
33 done | |
34 | |
35 echo "\\\\end{document}" >> $output | |
36 | |
37 #pdflatex -shell-escape $output | |
38 #pdflatex -shell-escape $output |