# HG changeset patch # User Jim Hague # Date 1330332645 0 # Node ID 232a778181e31f113cd9d2fac14d4f585d846e95 # Parent 5f39bec3f0fbcb873484cfb0892e6330b6e79662 First go at LaTeX booklet. diff -r 5f39bec3f0fb -r 232a778181e3 dottes.tex.header --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dottes.tex.header Mon Feb 27 08:50:45 2012 +0000 @@ -0,0 +1,39 @@ +\documentclass[a5paper,landscape,10pt]{article} +\usepackage{abc} +\usepackage{graphicx} + +\setlength{\parindent}{0pt} + +% ----- + +\begin{document} + +\title{The Crie Havock Booke of Dottes} + +\author{Jim Hague} + +\date{\today} + +\maketitle + +\tableofcontents + +% ----- + +\section{Introduction} + +This book is aimed at providing the dots for all tunes commonly played at Cry Havoc music +sessions. + +The commands to typeset this file are: + +\begin{verbatim} + pdflatex -shell-escape tunebook-sample.tex + pdflatex -shell-escape tunebook-sample.tex +\end{verbatim} + +Read the \LaTeX{} source carefully to see how it works. + +% ----- + +\section{Tunes} diff -r 5f39bec3f0fb -r 232a778181e3 makeBooke.sh --- 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 " @@ -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}{} +# \begin{abc}[name=] +# ... 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 diff -r 5f39bec3f0fb -r 232a778181e3 makeTestBooke.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/makeTestBooke.sh Mon Feb 27 08:50:45 2012 +0000 @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ $# != 1 ]; then + echo "Usage: make.sh " + exit 1 +fi + +booke=$1 + +find $booke -name "*.abc" | sort | xargs abcm2ps -F dottes.fmt -O $booke.ps