From 9ce97ffc8b611f5b402115efefd313e3b49555db Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Wed, 9 Dec 2015 19:30:20 +0100 Subject: [PATCH] Scripts to compile a book from scores --- lybook/bass_book.tex | 22 ++++++ lybook/clean | 2 + lybook/drums_book.tex | 22 ++++++ lybook/full_book.tex | 22 ++++++ lybook/init | 50 ++++++++++++ lybook/load_scores | 34 ++++++++ lybook/makebook | 162 ++++++++++++++++++++++++++++++++++++++ lybook/pipes_book.tex | 22 ++++++ lybook/side_book.tex | 22 ++++++ lybook/tenor_book.tex | 22 ++++++ lybook/tex/main.tex | 100 +++++++++++++++++++++++ lybook/tex/main_bass.tex | 17 ++++ lybook/tex/main_drums.tex | 20 +++++ lybook/tex/main_full.tex | 13 +++ lybook/tex/main_pipes.tex | 14 ++++ lybook/tex/main_side.tex | 58 ++++++++++++++ lybook/tex/main_tenor.tex | 24 ++++++ lybook/tex/score_book.cls | 36 +++++++++ lybook/tex/titlepage.tex | 6 ++ 19 files changed, 668 insertions(+) create mode 100644 lybook/bass_book.tex create mode 100644 lybook/clean create mode 100644 lybook/drums_book.tex create mode 100644 lybook/full_book.tex create mode 100644 lybook/init create mode 100644 lybook/load_scores create mode 100644 lybook/makebook create mode 100644 lybook/pipes_book.tex create mode 100644 lybook/side_book.tex create mode 100644 lybook/tenor_book.tex create mode 100644 lybook/tex/main.tex create mode 100644 lybook/tex/main_bass.tex create mode 100644 lybook/tex/main_drums.tex create mode 100644 lybook/tex/main_full.tex create mode 100644 lybook/tex/main_pipes.tex create mode 100644 lybook/tex/main_side.tex create mode 100644 lybook/tex/main_tenor.tex create mode 100644 lybook/tex/score_book.cls create mode 100644 lybook/tex/titlepage.tex diff --git a/lybook/bass_book.tex b/lybook/bass_book.tex new file mode 100644 index 0000000..52b951d --- /dev/null +++ b/lybook/bass_book.tex @@ -0,0 +1,22 @@ +\documentclass{tex/score_book} + +\title{Seaforth Highlanders of Holland\\Scores Bass} +\author{Eric Teunis de Boone} + +\begin{document} + +\input{./tex/titlepage.tex} + +\newpage +\cleardoublepage +\phantomsection +\addcontentsline{toc}{section}{\contentsname} +\begin{multicols}{2} + \tableofcontents +\end{multicols} + +%\newpage +%\input{./tex/playlist} +\newpage +\input{./tex/main_bass.tex} +\end{document} diff --git a/lybook/clean b/lybook/clean new file mode 100644 index 0000000..936460e --- /dev/null +++ b/lybook/clean @@ -0,0 +1,2 @@ +#!/bin/sh +rm -v *.log *.aux *.pyc diff --git a/lybook/drums_book.tex b/lybook/drums_book.tex new file mode 100644 index 0000000..5c0a96c --- /dev/null +++ b/lybook/drums_book.tex @@ -0,0 +1,22 @@ +\documentclass{tex/score_book} + +\title{Seaforth Highlanders of Holland\\Drumscores} +\author{Eric Teunis de Boone} + +\begin{document} + +\input{./tex/titlepage.tex} + +\newpage +\cleardoublepage +\phantomsection +\addcontentsline{toc}{section}{\contentsname} +\begin{multicols}{2} + \tableofcontents +\end{multicols} + +%\newpage +%\input{./tex/playlist} +\newpage +\input{./tex/main_drums.tex} +\end{document} diff --git a/lybook/full_book.tex b/lybook/full_book.tex new file mode 100644 index 0000000..6f171bc --- /dev/null +++ b/lybook/full_book.tex @@ -0,0 +1,22 @@ +\documentclass{tex/score_book} + +\title{Seaforth Highlanders of Holland\\Fullscores} +\author{Eric Teunis de Boone} + +\begin{document} + +\input{./tex/titlepage.tex} + +\newpage +\cleardoublepage +\phantomsection +\addcontentsline{toc}{section}{\contentsname} +\begin{multicols}{2} + \tableofcontents +\end{multicols} + +%\newpage +%\input{./tex/playlist} +\newpage +\input{./tex/main_full.tex} +\end{document} diff --git a/lybook/init b/lybook/init new file mode 100644 index 0000000..f467544 --- /dev/null +++ b/lybook/init @@ -0,0 +1,50 @@ +#!/bin/bash + +SHELLCMD='sh' +PYTHONCMD='python3.4' +LATEXCMD='pdflatex' + +#$SHELLCMD load_scores + +#$PYTHONCMD makebook -o tex/main_full.tex full +#$PYTHONCMD makebook -o tex/main_drums.tex drums +#$PYTHONCMD makebook -o tex/main_pipes.tex pipes +#$PYTHONCMD makebook -o tex/main_bass.tex bass +#$PYTHONCMD makebook -o tex/main_tenor.tex tenor +#$PYTHONCMD makebook -o tex/main_side.tex side snare + +for ins in tenor; +do + printf "\\documentclass{tex/score_book} + +\\title{Seaforth Highlanders of Holland\\\\ %s Scores} +\\author{Eric Teunis de Boone} + +\\begin{document} + +\\input{./tex/titlepage.tex} + +\\newpage +\\cleardoublepage +\\phantomsection +\\addcontentsline{toc}{section}{\contentsname} +\\begin{multicols}{2} + \\tableofcontents +\\end{multicols} + +%\\newpage +%\\input{./tex/playlist} +\\newpage +\\input{./tex/main_%s.tex} +\\end{document} +" "$instr" "$instr" +done; + +echo "All setup!" + +read -p "Press [Enter] to compile *.tex" + +for f in ./*.tex; +do + $LATEXCMD $f +done; diff --git a/lybook/load_scores b/lybook/load_scores new file mode 100644 index 0000000..3bf4203 --- /dev/null +++ b/lybook/load_scores @@ -0,0 +1,34 @@ +#!/bin/bash +MKDRUM_DIR="../" +MKDRUMCOMMAND=$MKDRUM_DIR"makedrum" +SCORES_DIR="./scores/" + +trap "echo Aborted!; exit;" SIGINT SIGTERM + +another_dir () { + d=$1 + for f in $d/* + do + if [ -d $f ]; then + another_dir $f + continue + fi + + if [ ! -f $f ]; then + continue + fi + + if [[ ! "$f" == *.ly ]]; then + continue + fi + + mkdir -p $SCORES_DIR${d/$MKDRUM_DIR} + #echo $SCORES_DIR${f/$MKDRUM_DIR} + $MKDRUMCOMMAND $f -d $SCORES_DIR${d/$MKDRUM_DIR} + done; +} + +for d in ${MKDRUM_DIR}*_marches ${MKDRUM_DIR}strathspeys ${MKDRUM_DIR}standards ${MKDRUM_DIR}jigs ${MKDRUM_DIR}airs ${MKDRUM_DIR}hornpipes ${MKDRUM_DIR}other +do + another_dir $d +done; diff --git a/lybook/makebook b/lybook/makebook new file mode 100644 index 0000000..782b56a --- /dev/null +++ b/lybook/makebook @@ -0,0 +1,162 @@ +#!/usr/bin/python3.4 + +# To be Run: python3.4 makebook -v -o ./tex/main_pipes.tex pipes +# Uses a copy of the filestructure of pipeband-drumming to generate the body of a tex file + +import os +from argparse import ArgumentParser + +class MakeBook: + OUT = './tex/main.tex' + MASTER_DIR = os.path.dirname(os.path.abspath(__file__)) + RUN_DIR = os.path.abspath(os.curdir) + SCORES_DIR = './scores/' + LY_DIR = '../' + INSTRUMENTS = ['full','drums', 'pipes', 'bass', 'tenor', 'side','snare'] + def __init__(self): + + usage = __file__ + parser = ArgumentParser(usage) + parser.add_argument('-v','--verbose',default=False,action='store_true',dest='verbose', help='verbose') + parser.add_argument('instrument',default=False,nargs='*',help='Instruments to be included in the book') + parser.add_argument('-o','--output',default=self.OUT,help='Output file') + + self.args = parser.parse_args() + + if self.args.verbose: + self.vprint('Verbose output') + standards = ['standards'] + marches = ['2-4_marches', '3-4_marches', '4-4_marches', '5-4_marches', '6-8_marches'] + watch_folders = [ 'hornpipes', 'jigs', 'strathspeys', 'reels','other'] + watch_folders = marches + watch_folders + + # Run Path_walker over dirs + tune_dirs = [] + for d in watch_folders: + if d in marches: + continue + tune_dirs.append(d) + + # Ready f.out + try: + self.fout = open(self.args.output,'w+') + + self.fwrite(u'\\addcontentsline{toc}{section}{Standards}') + for d in standards: + self.vprint(os.path.join(self.SCORES_DIR,d)) + self.path_walker(os.path.join(self.SCORES_DIR,d), level=1, content_line_level=1) + self.fwrite(u'\\addcontentsline{toc}{section}{Marches}') + for d in marches: + self.vprint(os.path.join(self.SCORES_DIR,d)) + self.path_walker(os.path.join(self.SCORES_DIR,d), level=1, content_line_level=2) + + for d in tune_dirs: + self.vprint(os.path.join(self.SCORES_DIR,d)) + self.path_walker(os.path.join(self.SCORES_DIR,d)) + except IOError: + print('Cannot open {}'.format(self.OUT)) + except: + self.fout.close() + raise + + def vprint(self,line): + if self.args.verbose: + print(line) + + def fwrite(self,line): + self.fout.write(line+'\n') + + def include_pdf (self,file, level): + title = False + self.vprint(file) + lilydir = file[:file.rfind('/')].replace(self.SCORES_DIR,self.LY_DIR) + if os.path.isdir(lilydir): + path = file[:file.rfind('/')] + #Try to load title from config file + if os.path.isfile(os.path.join(lilydir,'config.ily')): + self.vprint('Loading config file') + with open(os.path.join(lilydir,'config.ily'),'r') as f: + for line in iter(f): + if line.startswith('title'): + title = line[line.find('=')+1:]#Strip 'title=' + title = title[1:-1] #Strip Quotes + continue + + lilyfile = os.path.join(lilydir, file[file.rfind('-')+1:].replace('.pdf','.ly')) + if not title and os.path.isfile(lilyfile): + self.vprint('Look through lilyfile') + with open(lilyfile, 'r') as f: + for line in iter(f): + if line.strip().startswith('title'): + title = line[line.find('=')+1:]#Strip 'title=' + title = title[1:-1] #Strip Quotes + continue + if title: + ref = title + forbid = ' /!@#$%^&*()<>?\|;:\'"' + for s in forbid: + ref = ref.replace(s,'_') + if not title: + self.vprint('No title yet Found!') + last_slash = file.rfind('/') + last_dot = file.rfind('.') + + if file[file.rfind('.',0,last_dot)+1:file.rfind('.')] in self.INSTRUMENTS: + ref = file[file.rfind('/')+1:file.rfind('.')] + else : + ref = file[file.rfind('/',0,last_slash-1)+1:file.rfind('.')].replace('/','-') + # Make title from filename + title = ref + #Remove references to Instruments + for inst in self.INSTRUMENTS: + title = title.replace('-'+inst, '') + title = title.replace('.'+inst, '') + #Remove chars + title = title.replace('-','').replace('_',' ').title() + + title = title[1:-1].replace('\\n',' ') + + if not self.args.instrument: + for inst in self.INSTRUMENTS: + if inst in file: + title = title + ' ('+inst+')' + self.vprint('= '+title) + ref = 'p'+ref.strip('_').lower() + #string = u'\\includepdf[pages=-, addtotoc={1,'+('sub'*level)+'section,'+str(level+1)+','+title+','+ref+'}, pagecommand={}]{'+file+'}' + string = u'\\includepdf[pages=-, addtotoc={1,'+('sub'*level)+'section,'+str(level+1)+',{'+title+'},'+ref+'}, pagecommand={}]{'+file+'}' + + self.fwrite(string) + return string + + def path_walker(self, a, level=None, content_line_level=None): + if not a: + return + if level is None: + level = 0 + if content_line_level is None: + content_line_level = 1 + # Do stuff + if level < content_line_level: + self.fwrite(u'\\mysection{'+('sub'*level)+'section}{'+a[a.rfind('/')+1:].replace('_',' ').replace('-','/').title()+'}') + newline = False + for root, dirs, files in os.walk(a,False): + for f in files: + if not f.endswith('.pdf'): + continue + if self.args.instrument: + instr_in_file = False + for instr in self.args.instrument: + if instr in f: + self.vprint(instr) + instr_in_file = True + break + if not instr_in_file: + continue + # Include file + if newline: + self.fwrite(u'\\newpage') + + newline = True + self.include_pdf(os.path.join(root,f), level+1) +# Run above +MakeBook(); diff --git a/lybook/pipes_book.tex b/lybook/pipes_book.tex new file mode 100644 index 0000000..e0d65e6 --- /dev/null +++ b/lybook/pipes_book.tex @@ -0,0 +1,22 @@ +\documentclass{tex/score_book} + +\title{Seaforth Highlanders of Holland\\Pipe Scores} +\author{Eric Teunis de Boone} + +\begin{document} + +\input{./tex/titlepage.tex} + +\newpage +\cleardoublepage +\phantomsection +\addcontentsline{toc}{section}{\contentsname} +\begin{multicols}{2} + \tableofcontents +\end{multicols} + +%\newpage +%\input{./tex/playlist} +\newpage +\input{./tex/main_pipes.tex} +\end{document} diff --git a/lybook/side_book.tex b/lybook/side_book.tex new file mode 100644 index 0000000..f4fc484 --- /dev/null +++ b/lybook/side_book.tex @@ -0,0 +1,22 @@ +\documentclass{tex/score_book} + +\title{Seaforth Highlanders of Holland\\Side Scores} +\author{Eric Teunis de Boone} + +\begin{document} + +\input{./tex/titlepage.tex} + +\newpage +\cleardoublepage +\phantomsection +\addcontentsline{toc}{section}{\contentsname} +\begin{multicols}{2} + \tableofcontents +\end{multicols} + +%\newpage +%\input{./tex/playlist} +\newpage +\input{./tex/main_side.tex} +\end{document} diff --git a/lybook/tenor_book.tex b/lybook/tenor_book.tex new file mode 100644 index 0000000..ce5678b --- /dev/null +++ b/lybook/tenor_book.tex @@ -0,0 +1,22 @@ +\documentclass{tex/score_book} + +\title{Seaforth Highlanders of Holland\\Tenor Scores} +\author{Eric Teunis de Boone} + +\begin{document} + +\input{./tex/titlepage.tex} + +\newpage +\cleardoublepage +\phantomsection +\addcontentsline{toc}{section}{\contentsname} +\begin{multicols}{2} + \tableofcontents +\end{multicols} + +%\newpage +%\input{./tex/playlist} +\newpage +\input{./tex/main_tenor.tex} +\end{document} diff --git a/lybook/tex/main.tex b/lybook/tex/main.tex new file mode 100644 index 0000000..7195c1f --- /dev/null +++ b/lybook/tex/main.tex @@ -0,0 +1,100 @@ +\addcontentsline{toc}{section}{Marches} +\mysection{subsection}{Standards} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{2/4 Standards (side)},p2_4_standards}, pagecommand={}]{./scores/standards/standards-24_standards.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{3/4 Standards Setting 1 (side)},p3_4_standards_nsetting_1}, pagecommand={}]{./scores/standards/standards-34_standards1.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{3/4 Standards Setting 2 (side)},p3_4_standards_n_setting_2}, pagecommand={}]{./scores/standards/standards-34_standards2.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{3/4 Standards Setting 3 (side)},p3_4_standards_n_setting_3}, pagecommand={}]{./scores/standards/standards-34_standards3.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{4/4 Standards (side)},p4_4_standards}, pagecommand={}]{./scores/standards/standards-44_standards.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{6/8 Standards (side)},p6_8_standards}, pagecommand={}]{./scores/standards/standards-68_standards.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{6/8 Standard (bass)},p6_8_standard}, pagecommand={}]{./scores/standards/standards-standards.bass.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{6/8 Standards (tenor)},p6_8_standards}, pagecommand={}]{./scores/standards/standards-standards.tenor.pdf} +\mysection{subsection}{2/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Black Bear (side)},pblack_bear}, pagecommand={}]{./scores/2-4_marches/black_bear/2-4_marches-black_bear-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Duncan McInnes (side)},pduncan_mcinnes}, pagecommand={}]{./scores/2-4_marches/duncan_mcinness/2-4_marches-duncan_mcinness-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{MacKenzie Highlanders (side)},pmackenzie_highlanders}, pagecommand={}]{./scores/2-4_marches/mackenzie_highlanders/2-4_marches-mackenzie_highlanders-side.alt.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{MacKenzie Highlanders (side)},pmackenzie_highlanders}, pagecommand={}]{./scores/2-4_marches/mackenzie_highlanders/2-4_marches-mackenzie_highlanders-side.pdf} +\mysection{subsection}{3/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Castle Dangerous (tenor)},pcastle_dangerous}, pagecommand={}]{./scores/3-4_marches/castle_dangerous/3-4_marches-castle_dangerous-tenor.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{On the Road to Passchendaele (side)},pon_the_road_to_passchendaele}, pagecommand={}]{./scores/3-4_marches/on_the_road_to_passchendaele/3-4_marches-on_the_road_to_passchendaele-side.pdf} +\mysection{subsection}{4/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{51st Highland Division (side)},p51st_highland_division}, pagecommand={}]{./scores/4-4_marches/51st_highland_division/4-4_marches-51st_highland_division-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Flett from Flotta (side)},pflett_from_flotta}, pagecommand={}]{./scores/4-4_marches/flett_from_flotta/4-4_marches-flett_from_flotta-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Minstrel Boy (side)},pminstrel_boy}, pagecommand={}]{./scores/4-4_marches/minstrel_boy/4-4_marches-minstrel_boy-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Rowan Tree (side)},prowan_tree}, pagecommand={}]{./scores/4-4_marches/rowan_tree/4-4_marches-rowan_tree-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Scotland the Brave (side)},pscotland_the_brave}, pagecommand={}]{./scores/4-4_marches/scotland_the_brave/4-4_marches-scotland_the_brave-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Leaving of Liverpool (drums)},pthe_leaving_of_liverpool}, pagecommand={}]{./scores/4-4_marches/the_leaving_of_liverpool/4-4_marches-the_leaving_of_liverpool-drums.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Leaving of Liverpool (side)},pthe_leaving_of_liverpool}, pagecommand={}]{./scores/4-4_marches/the_leaving_of_liverpool/4-4_marches-the_leaving_of_liverpool-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Leaving of Liverpool (tenor)},pthe_leaving_of_liverpool}, pagecommand={}]{./scores/4-4_marches/the_leaving_of_liverpool/4-4_marches-the_leaving_of_liverpool-tenor.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Old Rustic Bridge (tenor)},pthe_old_rustic_bridge}, pagecommand={}]{./scores/4-4_marches/the_old_rustic_bridge/4-4_marches-the_old_rustic_bridge-tenor.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Pikeman's March (drums)},pthe_pikeman_s_march}, pagecommand={}]{./scores/4-4_marches/the_pikemans_march/4-4_marches-the_pikemans_march-drums.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Pikeman's March (side)},pthe_pikeman_s_march}, pagecommand={}]{./scores/4-4_marches/the_pikemans_march/4-4_marches-the_pikemans_march-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Pikeman's March (tenor)},pthe_pikeman_s_march}, pagecommand={}]{./scores/4-4_marches/the_pikemans_march/4-4_marches-the_pikemans_march-tenor.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Wings (side)},pwings}, pagecommand={}]{./scores/4-4_marches/wings/4-4_marches-wings-side.pdf} +\mysection{subsection}{5/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay (bass)},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-bass.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay (drums)},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-drums.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay (side)},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay (tenor)},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-tenor.pdf} +\mysection{subsection}{6/8 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Hills of Glenorchy (side)},phills_of_glenorchy}, pagecommand={}]{./scores/6-8_marches/hills_of_glenorchy/6-8_marches-hills_of_glenorchy-side.pdf} +\mysection{section}{Hornpipes} +\includepdf[pages=-, addtotoc={1,subsection,2,{Itchy Fingers (pipes) (side)},pitchy_fingers}, pagecommand={}]{./scores/hornpipes/itchy_fingers/hornpipes-itchy_fingers-side.pdf} +\mysection{section}{Jigs} +\includepdf[pages=-, addtotoc={1,subsection,2,{Seaforth Sticks (drums)},pseaforth_sticks}, pagecommand={}]{./scores/jigs/seaforth_sticks/jigs-seaforth_sticks-drums.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Seaforth Sticks (side)},pseaforth_sticks}, pagecommand={}]{./scores/jigs/seaforth_sticks/jigs-seaforth_sticks-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Seaforth Sticks (tenor)},pseaforth_sticks}, pagecommand={}]{./scores/jigs/seaforth_sticks/jigs-seaforth_sticks-tenor.pdf} +\mysection{section}{Strathspeys} +\includepdf[pages=-, addtotoc={1,subsection,2,{A. A. Cameron's Strathspey (side)},pa._a._cameron_s_strathspey}, pagecommand={}]{./scores/strathspeys/aa_camerons/strathspeys-aa_camerons-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (bass)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-bass.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (drums)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-drums.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (full)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-full.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (pipes)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-pipes.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (side)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (tenor)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-tenor.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (bass)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-bass.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (drums)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-drums.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (side)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (tenor)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-tenor.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (side)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-rolls.side.pdf} +\mysection{section}{Reels} +\mysection{section}{Other} +\includepdf[pages=-, addtotoc={1,subsection,2,{Band of Brothers (snare)},pband_of_brothers}, pagecommand={}]{./scores/other/other-band_of_brothers.snare.pdf} diff --git a/lybook/tex/main_bass.tex b/lybook/tex/main_bass.tex new file mode 100644 index 0000000..2062be1 --- /dev/null +++ b/lybook/tex/main_bass.tex @@ -0,0 +1,17 @@ +\addcontentsline{toc}{section}{Standards} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{6/8 Standard},p6_8_standard}, pagecommand={}]{./scores/standards/standards-standards.bass.pdf} +\addcontentsline{toc}{section}{Marches} +\mysection{subsection}{2/4 Marches} +\mysection{subsection}{3/4 Marches} +\mysection{subsection}{4/4 Marches} +\mysection{subsection}{5/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-bass.pdf} +\mysection{subsection}{6/8 Marches} +\mysection{section}{Hornpipes} +\mysection{section}{Jigs} +\mysection{section}{Strathspeys} +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-bass.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-bass.pdf} +\mysection{section}{Reels} +\mysection{section}{Other} diff --git a/lybook/tex/main_drums.tex b/lybook/tex/main_drums.tex new file mode 100644 index 0000000..2529961 --- /dev/null +++ b/lybook/tex/main_drums.tex @@ -0,0 +1,20 @@ +\addcontentsline{toc}{section}{Standards} +\addcontentsline{toc}{section}{Marches} +\mysection{subsection}{2/4 Marches} +\mysection{subsection}{3/4 Marches} +\mysection{subsection}{4/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Leaving of Liverpool},pthe_leaving_of_liverpool}, pagecommand={}]{./scores/4-4_marches/the_leaving_of_liverpool/4-4_marches-the_leaving_of_liverpool-drums.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Pikeman's March},pthe_pikeman_s_march}, pagecommand={}]{./scores/4-4_marches/the_pikemans_march/4-4_marches-the_pikemans_march-drums.pdf} +\mysection{subsection}{5/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-drums.pdf} +\mysection{subsection}{6/8 Marches} +\mysection{section}{Hornpipes} +\mysection{section}{Jigs} +\includepdf[pages=-, addtotoc={1,subsection,2,{Seaforth Sticks},pseaforth_sticks}, pagecommand={}]{./scores/jigs/seaforth_sticks/jigs-seaforth_sticks-drums.pdf} +\mysection{section}{Strathspeys} +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-drums.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-drums.pdf} +\mysection{section}{Reels} +\mysection{section}{Other} diff --git a/lybook/tex/main_full.tex b/lybook/tex/main_full.tex new file mode 100644 index 0000000..f7b6de8 --- /dev/null +++ b/lybook/tex/main_full.tex @@ -0,0 +1,13 @@ +\addcontentsline{toc}{section}{Standards} +\addcontentsline{toc}{section}{Marches} +\mysection{subsection}{2/4 Marches} +\mysection{subsection}{3/4 Marches} +\mysection{subsection}{4/4 Marches} +\mysection{subsection}{5/4 Marches} +\mysection{subsection}{6/8 Marches} +\mysection{section}{Hornpipes} +\mysection{section}{Jigs} +\mysection{section}{Strathspeys} +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-full.pdf} +\mysection{section}{Reels} +\mysection{section}{Other} diff --git a/lybook/tex/main_pipes.tex b/lybook/tex/main_pipes.tex new file mode 100644 index 0000000..06b3d59 --- /dev/null +++ b/lybook/tex/main_pipes.tex @@ -0,0 +1,14 @@ +\addcontentsline{toc}{section}{Standards} +\addcontentsline{toc}{section}{Marches} +\mysection{subsection}{2/4 Marches} +\mysection{subsection}{3/4 Marches} +\mysection{subsection}{4/4 Marches} +\mysection{subsection}{5/4 Marches} +\mysection{subsection}{6/8 Marches} +\mysection{section}{Hornpipes} +\includepdf[pages=-, addtotoc={1,subsection,2,{Itchy Fingers},pitchy_fingers}, pagecommand={}]{./scores/hornpipes/itchy_fingers/hornpipes-itchy_fingers-side.pdf} +\mysection{section}{Jigs} +\mysection{section}{Strathspeys} +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-pipes.pdf} +\mysection{section}{Reels} +\mysection{section}{Other} diff --git a/lybook/tex/main_side.tex b/lybook/tex/main_side.tex new file mode 100644 index 0000000..d3a0555 --- /dev/null +++ b/lybook/tex/main_side.tex @@ -0,0 +1,58 @@ +\addcontentsline{toc}{section}{Standards} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{2/4 Standards},p2_4_standards}, pagecommand={}]{./scores/standards/standards-24_standards.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{3/4 Standards Setting 1},p3_4_standards_nsetting_1}, pagecommand={}]{./scores/standards/standards-34_standards1.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{3/4 Standards Setting 2},p3_4_standards_n_setting_2}, pagecommand={}]{./scores/standards/standards-34_standards2.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{3/4 Standards Setting 3},p3_4_standards_n_setting_3}, pagecommand={}]{./scores/standards/standards-34_standards3.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{4/4 Standards},p4_4_standards}, pagecommand={}]{./scores/standards/standards-44_standards.side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{6/8 Standards},p6_8_standards}, pagecommand={}]{./scores/standards/standards-68_standards.side.pdf} +\addcontentsline{toc}{section}{Marches} +\mysection{subsection}{2/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Black Bear},pblack_bear}, pagecommand={}]{./scores/2-4_marches/black_bear/2-4_marches-black_bear-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Duncan McInnes},pduncan_mcinnes}, pagecommand={}]{./scores/2-4_marches/duncan_mcinness/2-4_marches-duncan_mcinness-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{MacKenzie Highlanders},pmackenzie_highlanders}, pagecommand={}]{./scores/2-4_marches/mackenzie_highlanders/2-4_marches-mackenzie_highlanders-side.alt.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{MacKenzie Highlanders},pmackenzie_highlanders}, pagecommand={}]{./scores/2-4_marches/mackenzie_highlanders/2-4_marches-mackenzie_highlanders-side.pdf} +\mysection{subsection}{3/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{On the Road to Passchendaele},pon_the_road_to_passchendaele}, pagecommand={}]{./scores/3-4_marches/on_the_road_to_passchendaele/3-4_marches-on_the_road_to_passchendaele-side.pdf} +\mysection{subsection}{4/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{51st Highland Division},p51st_highland_division}, pagecommand={}]{./scores/4-4_marches/51st_highland_division/4-4_marches-51st_highland_division-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Flett from Flotta},pflett_from_flotta}, pagecommand={}]{./scores/4-4_marches/flett_from_flotta/4-4_marches-flett_from_flotta-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Minstrel Boy},pminstrel_boy}, pagecommand={}]{./scores/4-4_marches/minstrel_boy/4-4_marches-minstrel_boy-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Rowan Tree},prowan_tree}, pagecommand={}]{./scores/4-4_marches/rowan_tree/4-4_marches-rowan_tree-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Scotland the Brave},pscotland_the_brave}, pagecommand={}]{./scores/4-4_marches/scotland_the_brave/4-4_marches-scotland_the_brave-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Leaving of Liverpool},pthe_leaving_of_liverpool}, pagecommand={}]{./scores/4-4_marches/the_leaving_of_liverpool/4-4_marches-the_leaving_of_liverpool-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Pikeman's March},pthe_pikeman_s_march}, pagecommand={}]{./scores/4-4_marches/the_pikemans_march/4-4_marches-the_pikemans_march-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Wings},pwings}, pagecommand={}]{./scores/4-4_marches/wings/4-4_marches-wings-side.pdf} +\mysection{subsection}{5/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-side.pdf} +\mysection{subsection}{6/8 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Hills of Glenorchy},phills_of_glenorchy}, pagecommand={}]{./scores/6-8_marches/hills_of_glenorchy/6-8_marches-hills_of_glenorchy-side.pdf} +\mysection{section}{Hornpipes} +\includepdf[pages=-, addtotoc={1,subsection,2,{Itchy Fingers},pitchy_fingers}, pagecommand={}]{./scores/hornpipes/itchy_fingers/hornpipes-itchy_fingers-side.pdf} +\mysection{section}{Jigs} +\includepdf[pages=-, addtotoc={1,subsection,2,{Seaforth Sticks},pseaforth_sticks}, pagecommand={}]{./scores/jigs/seaforth_sticks/jigs-seaforth_sticks-side.pdf} +\mysection{section}{Strathspeys} +\includepdf[pages=-, addtotoc={1,subsection,2,{A. A. Cameron's Strathspey},pa._a._cameron_s_strathspey}, pagecommand={}]{./scores/strathspeys/aa_camerons/strathspeys-aa_camerons-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-side.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-rolls.side.pdf} +\mysection{section}{Reels} +\mysection{section}{Other} +\includepdf[pages=-, addtotoc={1,subsection,2,{Band of Brothers},pband_of_brothers}, pagecommand={}]{./scores/other/other-band_of_brothers.snare.pdf} diff --git a/lybook/tex/main_tenor.tex b/lybook/tex/main_tenor.tex new file mode 100644 index 0000000..1e034a4 --- /dev/null +++ b/lybook/tex/main_tenor.tex @@ -0,0 +1,24 @@ +\addcontentsline{toc}{section}{Standards} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{6/8 Standards},p6_8_standards}, pagecommand={}]{./scores/standards/standards-standards.tenor.pdf} +\addcontentsline{toc}{section}{Marches} +\mysection{subsection}{2/4 Marches} +\mysection{subsection}{3/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Castle Dangerous},pcastle_dangerous}, pagecommand={}]{./scores/3-4_marches/castle_dangerous/3-4_marches-castle_dangerous-tenor.pdf} +\mysection{subsection}{4/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Leaving of Liverpool},pthe_leaving_of_liverpool}, pagecommand={}]{./scores/4-4_marches/the_leaving_of_liverpool/4-4_marches-the_leaving_of_liverpool-tenor.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Old Rustic Bridge},pthe_old_rustic_bridge}, pagecommand={}]{./scores/4-4_marches/the_old_rustic_bridge/4-4_marches-the_old_rustic_bridge-tenor.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Pikeman's March},pthe_pikeman_s_march}, pagecommand={}]{./scores/4-4_marches/the_pikemans_march/4-4_marches-the_pikemans_march-tenor.pdf} +\mysection{subsection}{5/4 Marches} +\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-tenor.pdf} +\mysection{subsection}{6/8 Marches} +\mysection{section}{Hornpipes} +\mysection{section}{Jigs} +\includepdf[pages=-, addtotoc={1,subsection,2,{Seaforth Sticks},pseaforth_sticks}, pagecommand={}]{./scores/jigs/seaforth_sticks/jigs-seaforth_sticks-tenor.pdf} +\mysection{section}{Strathspeys} +\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-tenor.pdf} +\newpage +\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-tenor.pdf} +\mysection{section}{Reels} +\mysection{section}{Other} diff --git a/lybook/tex/score_book.cls b/lybook/tex/score_book.cls new file mode 100644 index 0000000..635ca0e --- /dev/null +++ b/lybook/tex/score_book.cls @@ -0,0 +1,36 @@ +\LoadClass{article} +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{score_book} +% +% Load packages +\RequirePackage[a4paper,margin=1in,landscape]{geometry} +\RequirePackage{pdfpages}%Includepdf +\RequirePackage{amsmath} +\RequirePackage{graphicx} +\RequirePackage{grffile} +\RequirePackage[dutch]{babel} +\RequirePackage{multicol}%Needed for toc +\RequirePackage{bookmark}%Needed for bookmark to toc +\RequirePackage{background} + \backgroundsetup{scale=0.7} + \backgroundsetup{angle=0} + \backgroundsetup{opacity=0.1} + \backgroundsetup{contents={\includegraphics[width=\textheight]{./images/seaforth_capbadge.jpg}}} +\RequirePackage{hyperref} + \hypersetup{colorlinks=false} +\RequirePackage{tocloft} +\PassOptionsToPackage{unicode}{hyperref} +\PassOptionsToPackage{naturalnames}{hyperref} +%\RequirePackage{chngpage} +% +% (Re)Set counters +\setcounter{secnumdepth}{-2}%Hides section no's +% +% Define commands +\newcommand{\mysection}[2]{ + \phantomsection + \stepcounter{#1} + \addtocontents{toc}{\cftpagenumbersoff{#1}}%cft for disabling page numbering + \addcontentsline{toc}{#1}{#2} + \addtocontents{toc}{\cftpagenumberson{#1}}%cft for enabling page numbering +} diff --git a/lybook/tex/titlepage.tex b/lybook/tex/titlepage.tex new file mode 100644 index 0000000..341ac10 --- /dev/null +++ b/lybook/tex/titlepage.tex @@ -0,0 +1,6 @@ +\NoBgThispage +\maketitle +\begin{center} +\includegraphics[width=0.3\textwidth]{./images/SEAFORTH_logo_PMS.pdf} +\end{center} +