From 2371843552c604f06982b1e7c1e833ecf2e9a74d Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Wed, 14 Feb 2018 14:25:21 +0100 Subject: [PATCH] Further tweaking on lytex book Tunebook.cls added --- book/book.lytex | 147 +++++++++++++++++++++++++++++++++------------- book/book.sly | 69 ++++++++++++++++++++-- book/build | 1 + book/tunebook.cls | 28 +++++++++ 4 files changed, 199 insertions(+), 46 deletions(-) create mode 100644 book/tunebook.cls diff --git a/book/book.lytex b/book/book.lytex index bb1372d..b4a1198 100644 --- a/book/book.lytex +++ b/book/book.lytex @@ -1,7 +1,8 @@ -\documentclass{article} -\usepackage{graphicx} -\usepackage{hyperref} -\usepackage[a4paper,top=2cm,bottom=3.2cm,left=1.25cm,right=1.25cm]{geometry} +\documentclass{tunebook} +\usepackage[a4paper,margin=.5in]{geometry} + +\newcommand{\chapterstart}{} + \author{Eric Teunis de Boone} \title{Tinwhistle Tunes} @@ -13,120 +14,182 @@ \tableofcontents \hrule -\cleardoublepage -\addcontentsline{toc}{section}{Polkas} +\chapterstart +\chapter{Polkas} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{John Ryan's Polka} -\lilypondfile[noindent]{./polkas/john_ryans_polka.ly} +\index{polkas:John Ryan's Polka} +\lilypondfile{./polkas/john_ryans_polka.ly} \end{minipage} +\vspace{.5in} + +\noindent \begin{minipage}{\columnwidth} -\addcontentsline{toc}{subsection}{The Ballydesmond Polks (1)} -\lilypondfile[noindent]{./polkas/the_ballydesmond_polka_1.ly} +\index{polkas:Ballydesmond Polka!(1)} +\noindent +\addcontentsline{toc}{subsection}{The Ballydesmond Polka (1)} +\lilypondfile{./polkas/the_ballydesmond_polka_1.ly} \end{minipage} -\cleardoublepage -\addcontentsline{toc}{section}{6/8 Marches} -\begin{minipage}{\columnwidth} -\addcontentsline{toc}{subsection}{PM Donald McLean of Lewis} -\lilypondfile[noindent]{./6-8_marches/pipe_major_donald_mclean_of_lewis.ly} -\end{minipage} +\chapterstart +\chapter{6/8 Marches} +\noindent \begin{minipage}{\columnwidth} +\noindent +\addcontentsline{toc}{subsection}{PM Donald MacLean of Lewis} +\lilypondfile{./6-8_marches/pipe_major_donald_maclean_of_lewis.ly} +\end{minipage} +\vspace{.5in} + +\noindent +\begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Pibroch o'Donald Dubh} -\lilypondfile[noindent]{./6-8_marches/pibroch_o_donald_dubh.ly} +\lilypondfile{./6-8_marches/pibroch_o_donald_dubh.ly} \end{minipage} -\cleardoublepage -\addcontentsline{toc}{section}{Airs} +\chapterstart +\chapter{Airs} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Sally Gardens} -\lilypondfile[noindent]{./airs/sally_gardens.ly} +\lilypondfile{./airs/sally_gardens.ly} \end{minipage} +\vspace{.5in} -\cleardoublepage -\addcontentsline{toc}{section}{Jigs} +\chapterstart +\chapter{Jigs} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Gander in the Pratie Hole} -\lilypondfile[noindent]{./jigs/gander_in_the_pratie_hole.ly} +\lilypondfile{./jigs/gander_in_the_pratie_hole.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Saddle the Pony} -\lilypondfile[noindent]{./jigs/saddle_the_pony.ly} +\lilypondfile{./jigs/saddle_the_pony.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Donnybrook Fair} -\lilypondfile[noindent]{./jigs/donnybrook_fair.ly} +\lilypondfile{./jigs/donnybrook_fair.ly} \end{minipage} +\vspace{.5in} -\cleardoublepage -\addcontentsline{toc}{section}{Hornpipes} +\chapterstart +\chapter{Hornpipes} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{The Greencastle Hornpipe} -\lilypondfile[noindent]{./hornpipes/the_greencastle_hornpipe.ly} +\lilypondfile{./hornpipes/the_greencastle_hornpipe.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Alexander's Hornpipe} -\lilypondfile[noindent]{./hornpipes/alexanders_hornpipe.ly} +\lilypondfile{./hornpipes/alexanders_hornpipe.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{The Harvest Home} -\lilypondfile[noindent]{./hornpipes/the_harvest_home.ly} +\lilypondfile{./hornpipes/the_harvest_home.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{The Honeysuckle} -\lilypondfile[noindent]{./hornpipes/the_honeysuckle.ly} +\lilypondfile{./hornpipes/the_honeysuckle.ly} \end{minipage} +\vspace{.5in} -\cleardoublepage -\addcontentsline{toc}{section}{Reels} +\chapterstart +\chapter{Reels} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{The Bag of Spuds} -\lilypondfile[noindent]{./reels/the_bag_of_spuds.ly} +\lilypondfile{./reels/the_bag_of_spuds.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{The Sunny Banks} -\lilypondfile[noindent]{./reels/the_sunny_banks.ly} +\lilypondfile{./reels/the_sunny_banks.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Rolling on the Rye Grass} -\lilypondfile[noindent]{./reels/rolling_on_the_rye_grass.ly} +\lilypondfile{./reels/rolling_on_the_rye_grass.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{The Blacksmith} -\lilypondfile[noindent]{./reels/the_blacksmith.ly} +\lilypondfile{./reels/the_blacksmith.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{The Wind that Shakes the Barley} -\lilypondfile[noindent]{./reels/the_wind_that_shakes_the_barley.ly} +\lilypondfile{./reels/the_wind_that_shakes_the_barley.ly} \end{minipage} +\vspace{.5in} -\cleardoublepage -\addcontentsline{toc}{section}{Slides} +\chapterstart +\chapter{Slides} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Danny Ab's Slide} -\lilypondfile[noindent]{./slides/danny_ab_s_slide.ly} +\lilypondfile{./slides/danny_ab_s_slide.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Thugamar F\'ein an Samhradh Linn} -\lilypondfile[noindent]{./slides/thugamar_fein_an_samhradh_linn.ly} +\lilypondfile{./slides/thugamar_fein_an_samhradh_linn.ly} \end{minipage} +\vspace{.5in} +\noindent \begin{minipage}{\columnwidth} +\noindent \addcontentsline{toc}{subsection}{Denis Murphy's Slide} -\lilypondfile[noindent]{./slides/denis_murphy_s_slide.ly} +\lilypondfile{./slides/denis_murphy_s_slide.ly} \end{minipage} +\vspace{.5in} \end{document} diff --git a/book/book.sly b/book/book.sly index 8ccb2b7..5d8c62d 100644 --- a/book/book.sly +++ b/book/book.sly @@ -1,11 +1,72 @@ %{ - Stylesheet for the "all" book + Lilypond Stylesheet for my tinwhistle tunebook %} \version "2.19.80" -\include "/home/ericteunis/projects/scoring/lib/styles/pipeband.sly" -\include "/home/ericteunis/projects/scoring/lib/styles/tinwhistle.sly" +% Default Titling per score +%\include "/home/ericteunis/projects/scoring/lib/styles/defs/header_default.ily" +%{0 + Header formatting for tunes. +%} +\version "2.16.0" + +\paper { + scoreTitleMarkup = \markup { + \override #'(baseline-skip . 3) + \column { + \fill-line { + \column { + \large \bold \fromproperty #'header:title + \bold \fromproperty #'header:subtitle + } + \fromproperty #'header:meter + \column \right-align { + \fromproperty #'header:instrument + \line { + \fromproperty #'header:composer + $(if (and (ly:get-option 'header:composer) (ly:get-option 'header:arranger)) + (markup " ")) + $(if (ly:get-option 'header:arranger) + (markup " Arr.")) + \italic \fromproperty #'header:arranger } + } + } + $(if (not (ly:get-option 'without-comment)) + (markup #:justify-field 'header:comment) + (markup)) + } + } + oddFooterMarkup = \markup { + \column { + \fill-line { \fromproperty #'header:copyright } + \fill-line { \fromproperty #'header:tagline } + } + } +} % Remove all book titling -\include "/home/ericteunis/projects/scoring/lib/styles/defs/no_book_header.ily" +%\include "/home/ericteunis/projects/scoring/lib/styles/defs/no_book_header.ily" +\paper { + bookTitleMarkup = {} +} + +% Get My own tagline +\include "/home/ericteunis/projects/scoring/lib/styles/defs/tagline.ily" + + +\layout { + indent = 0.0 + ragged-right = ##f + ragged-bottom = ##f + + \context { + \Staff + % Messes with indentation + \remove "Instrument_name_engraver" + + % Cool to see, whether it can be played + \consists "Ambitus_engraver" + } +} + diff --git a/book/build b/book/build index 7f4c228..bfa9f46 100755 --- a/book/build +++ b/book/build @@ -22,6 +22,7 @@ lilypond-book -P"${PROCESS}" --output=tex --pdf book.lytex # PDF cd $DIR/tex +ln -s $DIR/tunebook.cls . pdflatex book.tex cd $DIR cp $DIR/tex/book.pdf $DIR/book.pdf diff --git a/book/tunebook.cls b/book/tunebook.cls new file mode 100644 index 0000000..5d09c71 --- /dev/null +++ b/book/tunebook.cls @@ -0,0 +1,28 @@ +\LoadClass{book} +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{tunebook} +% +% Load packages +\RequirePackage[utf8]{inputenc} +%\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]{./tex/images/seaforth_capbadge.jpg}}} +\RequirePackage{hyperref} + \hypersetup{colorlinks=true} + \hypersetup{linkcolor=blue} +%\RequirePackage{tocloft} +\PassOptionsToPackage{unicode}{hyperref} +\PassOptionsToPackage{naturalnames}{hyperref} +%\RequirePackage{chngpage} +% +% (Re)Set counters +\setcounter{secnumdepth}{-1}%Hides section no's