changeset 13:232a778181e3

First go at LaTeX booklet.
author Jim Hague <jim.hague@laicatc.com>
date Mon, 27 Feb 2012 08:50:45 +0000
parents 5f39bec3f0fb
children d1234a11c049
files dottes.tex.header makeBooke.sh makeTestBooke.sh
diffstat 3 files changed, 78 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /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}
--- 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 <book dir name>"
@@ -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}{<Tune title>}
+# \begin{abc}[name=<filename>]
+# ... 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
--- /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 <book dir name>"
+    exit 1
+fi
+
+booke=$1
+
+find $booke -name "*.abc" | sort | xargs abcm2ps -F dottes.fmt -O $booke.ps