Irish Songbook
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3677 lines
102 KiB

13 years ago
%%
%% This is file `songs.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% songs.dtx (with options: `package')
%%
%% This is a generated file.
%%
%% Copyright (C) 2011 by Kevin W. Hamlen
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3a of this license
%% or (at your option) any later version. The latest version of this
%% license is in:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3a or later is part of all distributions of LaTeX version
%% 2004/10/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{songs}
[2011/01/09 v2.12 Songs package]
\newif\ifSB@etex
\ifx\eTeXversion\undefined\else
\ifx\eTeXversion\relax\else
\SB@etextrue
\IfFileExists{etex.sty}{\RequirePackage{etex}}{}
\fi
\fi
\newif\ifSB@pdf\SB@pdffalse
\ifx\pdfoutput\undefined\else
\ifx\pdfoutput\relax\else
\ifnum\pdfoutput<\@ne\else
\SB@pdftrue
\fi
\fi
\fi
\newif\ifSB@preamble
\SB@preambletrue
\newif\ifSB@test
\newcommand\SB@temp{}
\newcommand\SB@tempii{}
\newcommand\SB@tempiii{}
\newcommand\SB@tempiv{}
\newcommand\SB@tempv{}
\newdimen\SB@dimen
\newdimen\SB@dimenii
\newdimen\SB@dimeniii
\newdimen\SB@dimeniv
\newbox\SB@box
\newbox\SB@boxii
\newbox\SB@boxiii
\newtoks\SB@toks
\newcount\SB@cnt
\newcount\SB@cntii
\newskip\SB@skip
\RequirePackage{keyval}
\newcommand\lyricfont{\normalfont\normalsize}
\newcommand\stitlefont{%
\ifslides\sffamily\Huge\else\sffamily\slshape\Large\fi%
}
\newcommand\versefont{}
\newcommand\chorusfont{}
\newcommand\notefont{}
\newcommand\scripturefont{%
\usefont{OT1}{pzc}{mb}{it}%
\shiftdblquotes{-1.1\p@}\z@{-2\p@}\z@%
}
\newcommand\printscrcite[1]{\sffamily\small#1}
\newcommand\snumbgcolor{SongbookShade}
\newcommand\notebgcolor{SongbookShade}
\newcommand\idxbgcolor{SongbookShade}
\newcommand\versejustify{\justifyleft}
\newcommand\chorusjustify{\justifyleft}
\newcommand\notejustify{%
\advance\baselineskip\p@\relax%
\leftskip\z@skip\rightskip\z@skip%
\parfillskip\@flushglue\parindent\z@%
}
\newcommand\placenote[1]{%
\leftskip\z@skip\rightskip\@flushglue\SB@cbarshift%
\noindent#1\par%
}
\newcounter{songnum}
\newcounter{versenum}
\renewcommand\thesongnum{\songnumstyle{songnum}}
\newcommand\songnumstyle{}
\let\songnumstyle\arabic
\renewcommand\theversenum{\versenumstyle{versenum}}
\newcommand\versenumstyle{}
\let\versenumstyle\arabic
\newcommand\printsongnum[1]{\sffamily\bfseries\LARGE#1}
\newcommand\printversenum[1]{\lyricfont#1.\ }
\newcommand\placeversenum[1]{%
\hskip-\leftskip\hskip-\parindent\relax%
\box#1%
}
\newcommand\everyverse{}
\newcommand\everychorus{}
\newcommand\printchord[1]{\sffamily\slshape\large#1}
\newcommand\chordlocals{}
\newskip\versesep
\versesep123456789sp\relax
\newskip\baselineadj
\baselineadj\z@skip
\parindent.25in
\newlength\idxheadwidth
\setlength\idxheadwidth{1.5cm}
\newlength\songnumwidth
\settowidth\songnumwidth{\printsongnum{999.}}
\newlength\versenumwidth
\settowidth\versenumwidth{\printversenum{9\kern1em}}
\newlength\cbarwidth
\setlength\cbarwidth\p@
\newlength\sbarheight
\setlength\sbarheight\p@
\interlinepenalty\@m
\newcount\vvpenalty\vvpenalty200
\newcount\ccpenalty\ccpenalty200
\newcount\vcpenalty\vcpenalty200
\newcount\cvpenalty\cvpenalty200
\newcount\brkpenalty\brkpenalty200
\newcount\spenalty\spenalty100
\newcommand\songmark{}
\newcommand\versemark{}
\newcommand\chorusmark{}
\newcommand\extendprelude{\showrefs\showauthors}
\newcommand\extendpostlude{\songcopyright\ \songlicense\unskip}
\newcommand\idxheadfont{\sffamily\bfseries\LARGE}
\newcommand\idxtitlefont{\sffamily\slshape}
\newcommand\idxlyricfont{\rmfamily}
\newcommand\idxscripfont{\sffamily\small\slshape}
\newcommand\idxauthfont{\small\bfseries}
\newcommand\idxrefsfont{\normalfont\normalsize}
\newcommand\idxbook[1]{\small\bfseries#1}
\newcommand\idxcont[1]{\small\textbf{#1} (continued)}
\newcommand\colbotglue{}
\let\colbotglue\z@skip
\newcommand\lastcolglue{}
\let\lastcolglue\@flushglue
\newcount\minfrets\minfrets4
\newdimen\SB@colwidth
\DeclareOption{slides}{\slides}
\newcommand\slides{%
\slidestrue%
\def\lyricfont{\normalfont\huge}%
\def\chorusfont{\slshape}%
\def\versejustify{\justifycenter}%
\let\chorusjustify\versejustify
\def\placenote##1{\justifycenter\noindent##1\par}%
\scriptureoff%
\onesongcolumn%
\ifSB@preamble\ifSB@chordedspec\else\SB@chordsoff\fi\fi%
\spenalty-\@M%
\let\colbotglue\@flushglue%
\setlength\cbarwidth\z@%
\setlength\sbarheight\z@%
}
\newcommand\justifyleft{%
\leftskip\parindent%
\ifSB@inverse\advance\leftskip\versenumwidth\fi%
\SB@cbarshift%
\parindent-\parindent%
}
\newcommand\justifycenter{%
\centering\SB@cbarshift\rightskip\leftskip%
\def\placeversenum##1{%
\hskip-\leftskip\hskip-\parindent\relax%
\hangindent-\wd##1\hangafter\m@ne%
\box##1\hfil%
}%
}
\newcommand\SB@outer{\outer}
\DeclareOption{unouter}{\let\SB@outer\relax}
\DeclareOption{rawtext}{\rawtexttrue\indexesoff}
\DeclareOption{nopdfindex}{\pdfindexfalse}
\DeclareOption{noshading}{\SB@colorboxesfalse}
\DeclareOption{noindexes}{\indexesoff}
\newcommand\indexeson{%
\ifSB@preamble%
\SB@genindexestrue%
\else%
\ifSB@genindexes\else\SB@warnigen\fi%
\fi%
\songindexestrue%
}
\newcommand\indexesoff{%
\ifSB@preamble\SB@genindexesfalse\fi%
\songindexesfalse%
}
\newif\ifSB@measurespec
\newif\ifSB@chordedspec
\DeclareOption{chorded}{\chordson}
\DeclareOption{lyric}{\chordsoff}
\newcommand\chordson{\SB@chordedspectrue\SB@chordson}
\newcommand\chordsoff{\SB@chordedspectrue\SB@chordsoff}
\newcommand\SB@chordson{%
\ifrawtext%
\SB@errrtopt%
\else%
\chordedtrue\lyricfalse%
\let\SB@bracket\SB@chord%
\let\SB@rechord\SB@@rechord%
\let\SB@ch\SB@ch@on%
\ifSB@measurespec%
\ifmeasures\SB@measureson\else\SB@measuresoff\fi%
\else%
\SB@measureson%
\fi%
\ifSB@preamble\def\colbotglue{\z@\@plus.5\textheight}\fi%
\SB@setbaselineskip%
\fi%
}
\newcommand\SB@chordsoff{%
\chordedfalse\lyrictrue%
\def\SB@bracket##1]{\ignorespaces}%
\let\SB@rechord\relax%
\let\SB@ch\SB@ch@off%
\ifSB@measurespec%
\ifmeasures\SB@measureson\else\SB@measuresoff\fi%
\else%
\SB@measuresoff%
\fi%
\ifSB@preamble\let\colbotglue\z@skip\fi%
\SB@setbaselineskip%
}
\DeclareOption{showmeasures}{\measureson}
\DeclareOption{nomeasures}{\measuresoff}
\newcommand\measureson{\SB@measurespectrue\SB@measureson}
\newcommand\measuresoff{\SB@measurespectrue\SB@measuresoff}
\newcommand\SB@measureson{%
\measurestrue%
\let\SB@mbar\SB@makembar%
\ifchorded%
\let\SB@mch\SB@mch@on%
\else%
\let\SB@mch\SB@mch@m%
\fi%
\ifSB@inverse\SB@loadactives\fi%
\ifSB@inchorus\SB@loadactives\fi%
}
\newcommand\SB@measuresoff{%
\measuresfalse%
\let\SB@mbar\@gobbletwo%
\ifchorded%
\let\SB@mch\SB@ch@on%
\else%
\let\SB@mch\SB@ch@off%
\fi%
\ifSB@inverse\SB@loadactives\fi%
\ifSB@inchorus\SB@loadactives\fi%
}
\DeclareOption{transposecapos}{\transcapostrue}
\DeclareOption{noscripture}{\SB@omitscriptrue}
\newcommand\scriptureon{\SB@omitscripfalse}
\newcommand\scriptureoff{\SB@omitscriptrue}
\DeclareOption{twosongcolumns}{\SB@numcols\tw@}
\DeclareOption{onesongcolumn}{\SB@numcols\@ne}
\newcommand\songcolumns[1]{%
\SB@cnt#1\relax%
\ifnum\SB@cnt=\SB@numcols\else%
\ifSB@preamble\else{\SB@clearpage}\fi%
\fi%
\SB@numcols\SB@cnt%
\ifnum\SB@numcols>\z@%
\SB@colwidth-\columnsep%
\multiply\SB@colwidth\SB@numcols%
\advance\SB@colwidth\columnsep%
\advance\SB@colwidth\textwidth%
\divide\SB@colwidth\SB@numcols%
\else%
\ifrepchorus\SB@warnrc\fi%
\fi%
}
\newcommand\onesongcolumn{\songcolumns\@ne}
\newcommand\twosongcolumns{\songcolumns\tw@}
\newcommand\songlist{}
\newcommand\includeonlysongs[1]{%
\ifSB@songsenv\SB@errpl\else%
\partiallisttrue%
\renewcommand\songlist{#1}%
\fi%
}
\newcommand\nosongnumbers{\setlength\songnumwidth\z@}
\newcommand\noversenumbers{%
\renewcommand\printversenum[1]{}%
\setlength\versenumwidth\z@%
}
\ifSB@etex
\newcommand\repchoruses{%
\ifnum\SB@numcols<\@ne\SB@warnrc\fi%
\repchorustrue%
}
\else
\newcommand\repchoruses{\SB@erretex}
\fi
\newcommand\norepchoruses{\repchorusfalse}
\newcommand\sepverses{%
\vvpenalty-\@M%
\ccpenalty100 %
\vcpenalty\vvpenalty%
\cvpenalty\vvpenalty%
\let\colbotglue\@flushglue%
}
\AtBeginDocument{
\SB@setversesep
\songcolumns\SB@numcols
\SB@preamblefalse
}
\newbox\SB@songbox
\newcount\SB@numcols\SB@numcols\tw@
\newcount\SB@colnum
\newbox\SB@colbox
\newbox\SB@pgbox
\newbox\SB@mrkbox
\newcommand\SB@maxmin[3]{\ifdim#1#2#3#1#3\fi}
\newcommand\SB@mkpage[3]{%
\begingroup%
\splitmaxdepth\maxdepth\splittopskip\z@skip%
\global\setbox#1\vbox{%
\unvbox#1%
\nointerlineskip%
\null%
\vfil%
}%
\loop\ifnum#2<\SB@numcols%
\setbox\SB@box\vsplit#1to#3\relax%
\ifvoid#1%
#2\SB@numcols%
\else%
\SB@updatepage%
\global\advance#2\@ne%
\ifrepchorus\ifvoid\SB@chorusbox\else%
\SB@insertchorus#1%
\fi\fi%
\fi%
\repeat%
\global\setbox#1\vbox{%
\unvbox\SB@box%
\unvbox#1%
\unskip%
\setbox\SB@box\lastbox%
}%
\endgroup%
}
\newcommand\SB@updatepage{%
\global\setbox\SB@mrkbox\vbox{%
\unvbox\SB@mrkbox%
\edef\SB@temp{\splitfirstmark}%
\ifx\SB@temp\@empty\else\mark{\splitfirstmark}\fi%
\edef\SB@temp{\splitbotmark}%
\ifx\SB@temp\@empty\else\mark{\splitbotmark}\fi%
}%
\global\setbox\SB@pgbox\hbox{%
\SB@dimen\SB@colwidth%
\advance\SB@dimen\columnsep%
\multiply\SB@dimen\SB@colnum%
\advance\SB@dimen-\wd\SB@pgbox%
\unhbox\SB@pgbox%
\ifdim\SB@dimen=\z@\else\hskip\SB@dimen\relax\fi%
\box\SB@box%
}%
}
\newcommand\SB@droppage{\setbox\SB@box\box\voidb@x}
\newcommand\SB@output{%
\ifnum\SB@numcols>\z@\begingroup%
\loop%
\SB@dimen\textheight%
\ifinner\else\advance\SB@dimen-\pagetotal\fi%
\SB@mkpage\SB@colbox\SB@colnum\SB@dimen%
\ifnum\SB@colnum<\SB@numcols\else%
\unvbox\SB@mrkbox%
\ifinner\else\kern\z@\fi%
\box\SB@pgbox%
\ifinner\else\vfil\break\vskip\vsize\relax\fi%
\global\SB@colnum\z@%
\repeat%
\endgroup\else%
\unvbox\SB@colbox\unskip%
\fi%
}
\newcommand\SB@putboxes[1]{%
\SB@dimen\ifnum\SB@numcols>\z@\ht\SB@colbox\else\p@\fi%
#1\SB@colbox%
\ifdim\SB@dimen>\z@%
\SB@breakpoint\spenalty%
\ifdim\sbarheight>\z@%
\vskip-\sbarheight\relax%
\fi%
\fi%
#1\SB@songbox%
}
\newcommand\SB@nextcol[2]{%
\ifnum#1>\z@%
\ifnum\SB@numcols>\z@%
\global\setbox\SB@colbox\vbox{%
\SB@cnt#1\relax%
\SB@dimen\ht\SB@colbox%
\unvbox\SB@colbox%
\unskip%
\ifdim\SB@dimen>\z@%
\vskip#2\relax%
\break%
\advance\SB@cnt\m@ne%
\fi%
\loop\ifnum\SB@cnt>\z@%
\nointerlineskip%
\null%
\vfil%
\break%
\advance\SB@cnt\m@ne%
\repeat%
}%
\SB@output%
\else%
\ifnum\lastpenalty=-\@M\null\fi%
\break%
\fi%
\fi%
}
\newcommand\SB@selectcol{}
\newcommand\SB@@selectcol{%
\begingroup%
\SB@cnt\z@%
\vbadness\@M\vfuzz\maxdimen%
\let\SB@updatepage\SB@droppage%
\SB@dimen\textheight%
\ifinner\else\advance\SB@dimen-\pagetotal\fi%
\setbox\SB@boxii\vbox{\SB@putboxes\unvcopy}%
\SB@cntii\SB@colnum%
\SB@mkpage\SB@boxii\SB@cntii\SB@dimen%
\SB@spos%
\global\SB@cnt\SB@cnt%
\endgroup%
\SB@nextcol\SB@cnt\colbotglue%
}
\newcommand\SB@spbegnew{%
\setbox\SB@boxiii\copy\SB@songbox%
\SB@cntii\z@%
\SB@mkpage\SB@boxiii\SB@cntii\textheight%
}
\newcommand\SB@spextold{%
\ifodd\c@page\else%
\SB@cntii\z@%
\SB@mkpage\SB@boxii\SB@cntii\textheight%
\fi%
}
\newcommand\SB@spextnew{%
\SB@cntii\z@%
\SB@mkpage\SB@boxiii\SB@cntii\textheight%
}
\newcommand\SB@spdblpg{%
\ifnum\SB@cntii<\SB@numcols%
\SB@cnt\SB@numcols%
\advance\SB@cnt-\SB@colnum%
\if@twoside\ifodd\c@page\else%
\advance\SB@cnt\SB@numcols%
\fi\fi%
\fi%
}
\newcommand\SB@sposi{%
\ifnum\SB@cntii<\SB@numcols\else\if@twoside%
\SB@spextold%
\fi\fi%
\ifnum\SB@cntii<\SB@numcols\else%
\SB@spbegnew%
\ifnum\SB@cntii<\SB@numcols\else\if@twoside%
\SB@spextnew%
\fi\fi%
\SB@spdblpg%
\fi%
}
\newcommand\SB@sposii{%
\ifnum\SB@cntii<\SB@numcols\else%
\SB@spbegnew%
\ifnum\SB@cntii<\SB@numcols%
\SB@cnt\SB@numcols%
\advance\SB@cnt-\SB@colnum%
\else%
\if@twoside%
\SB@spextold%
\ifnum\SB@cntii<\SB@numcols\else%
\SB@spextnew%
\SB@spdblpg%
\fi%
\fi%
\fi%
\fi%
}
\newcommand\SB@sposiii{%
\ifnum\SB@cntii>\SB@colnum%
\SB@cnt\SB@colnum%
\advance\SB@cnt\@ne%
\ifnum\SB@cnt<\SB@numcols%
\setbox\SB@boxiii\copy\SB@songbox%
\SB@mkpage\SB@boxiii\SB@cnt\SB@dimen%
\advance\SB@cnt\m@ne%
\fi%
\ifnum\SB@cnt>\SB@colnum%
\SB@cnt\z@%
\SB@sposii%
\else%
\SB@cnt\@ne%
\fi%
\fi%
}
\newcommand\songpos[1]{%
\ifcase#1%
\let\SB@selectcol\relax%
\let\SB@spos\relax%
\or%
\let\SB@selectcol\SB@@selectcol%
\let\SB@spos\SB@sposi%
\or%
\let\SB@selectcol\SB@@selectcol%
\let\SB@spos\SB@sposii%
\or%
\let\SB@selectcol\SB@@selectcol%
\let\SB@spos\SB@sposiii%
\else%
\SB@errspos%
\fi%
}
\newcommand\SB@spos{}
\songpos\thr@@
\newcommand\SB@clearpage{%
\SB@testtrue%
\ifvoid\SB@pgbox\ifvoid\SB@colbox\SB@testfalse\fi\fi%
\ifSB@test%
\SB@cnt\SB@numcols%
\advance\SB@cnt-\SB@colnum%
\SB@nextcol\SB@cnt\lastcolglue%
\fi%
}
\newcommand\SB@cleardpage{%
\SB@clearpage%
\if@twoside\ifodd\c@page%
\SB@nextcol\SB@numcols\@flushglue%
\fi\fi%
}
\newcommand\SB@stype{\SB@stypcol}
\newcommand\SB@stypcol{%
\ifnum\SB@numcols>\z@%
\SB@selectcol%
\global\setbox\SB@colbox\vbox{\SB@putboxes\unvbox}%
\SB@output%
\else%
\unvbox\voidb@x%
\SB@breakpoint\spenalty%
\ifdim\sbarheight>\z@%
\vskip-\sbarheight\relax%
\fi%
\unvbox\SB@songbox%
\fi%
}
\newcommand\SB@styppage{%
\ifnum\SB@numcols>\z@%
\SB@clearpage%
\unvbox\SB@songbox%
\null\nointerlineskip%
\else%
\unvbox\SB@songbox%
\fi%
}
\newcommand\SB@sgroup{}
\let\SB@sgroup\@empty
\newcount\SB@groupcnt
\newcommand\SB@submitpart{%
\ifx\SB@sgroup\@empty\else%
\@for\SB@temp:=\songlist\do{%
\ifx\SB@temp\SB@sgroup%
\edef\SB@tempii{\SB@sgroup @\the\SB@groupcnt}%
\expandafter\newbox\csname songbox@\SB@tempii\endcsname%
\global\expandafter\setbox
\csname songbox@\SB@tempii\endcsname\box\SB@songbox%
\global\expandafter\let%
\csname stype@\SB@tempii\endcsname\SB@stype%
\ifrepchorus\ifvoid\SB@chorusbox\else%
\expandafter\newbox\csname chbox@\SB@tempii\endcsname%
\global\expandafter\setbox%
\csname chbox@\SB@tempii\endcsname\box\SB@chorusbox%
\fi\fi%
\fi%
}%
\global\advance\SB@groupcnt%
\ifnum\SB@groupcnt<\z@\m@ne\else\@ne\fi%
\fi%
\setbox\SB@songbox\box\voidb@x%
\setbox\SB@chorusbox\box\voidb@x%
}
\newcommand\SB@submitsong{%
\ifpartiallist\SB@submitpart\else\SB@stype\fi%
}
\newcommand\SB@songlistbrk{}
\def\SB@songlistbrk{brk}
\newcommand\SB@songlistnc{}
\def\SB@songlistnc{nextcol}
\newcommand\SB@songlistcp{}
\def\SB@songlistcp{sclearpage}
\newcommand\SB@songlistcdp{}
\def\SB@songlistcdp{scleardpage}
\newcommand\SB@finloop{%
\loop\edef\SB@tempii{\SB@temp @\the\SB@groupcnt}%
\expandafter\ifx%
\csname songbox@\SB@tempii\endcsname\relax\else%
\setbox\SB@songbox\expandafter\box%
\csname songbox@\SB@tempii\endcsname%
\expandafter\ifx\csname chbox@\SB@tempii\endcsname\relax%
\repchorusfalse%
\else%
\repchorustrue%
\setbox\SB@chorusbox\expandafter\box%
\csname chbox@\SB@tempii\endcsname%
\fi%
\csname stype@\SB@tempii\endcsname%
\advance\SB@groupcnt\ifnum\SB@groupcnt<\z@\m@ne\else\@ne\fi%
\repeat%
}
\newcommand\commitsongs{%
\ifpartiallist%
\ifnum\SB@numcols>\z@%
\@for\SB@temp:=\songlist\do{%
\ifx\SB@temp\SB@songlistnc\SB@nextcol\@ne\@flushglue\else%
\ifx\SB@temp\SB@songlistbrk\SB@nextcol\@ne\colbotglue\else%
\ifx\SB@temp\SB@songlistcp\SB@clearpage\else%
\ifx\SB@temp\SB@songlistcdp\SB@cleardpage\else%
\SB@groupcnt\m@ne\SB@finloop%
\SB@groupcnt\z@\SB@finloop%
\fi\fi\fi\fi%
}%
\else%
\@for\SB@temp:=\songlist\do{%
\ifx\SB@temp\SB@songlistnc\vfil\break\else%
\ifx\SB@temp\SB@songlistbrk\break\else%
\ifx\SB@temp\SB@songlistcp\clearpage\else%
\ifx\SB@temp\SB@songlistcdp%
\clearpage%
\ifodd\c@page\null\newpage\fi%
\else%
\SB@groupcnt\m@ne\SB@finloop%
\SB@groupcnt\z@\SB@finloop%
\fi\fi\fi\fi%
}%
\fi%
\fi%
\SB@clearpage%
}
\newcommand\SB@insertchorus[1]{{%
\vbadness\@M\vfuzz\maxdimen%
\setbox\SB@box\copy#1%
\setbox\SB@box\vsplit\SB@box to\maxdimen%
\edef\SB@temp{\splitfirstmarks\SB@nocmarkclass}%
\ifx\SB@temp\SB@nocmark\else%
\edef\SB@temp{\splitfirstmarks\SB@cmarkclass}%
\ifx\SB@temp\SB@cmark%
\SB@dimen4096\p@%
\SB@dimenii\maxdimen%
\SB@dimeniii\SB@dimen%
\loop%
\SB@dimeniii.5\SB@dimeniii%
\setbox\SB@box\copy#1%
\setbox\SB@box\vsplit\SB@box to\SB@dimen%
\edef\SB@temp{\splitfirstmarks\SB@cmarkclass}%
\ifx\SB@temp\SB@cmark%
\SB@dimenii\SB@dimen%
\advance\SB@dimen-\SB@dimeniii%
\else%
\advance\SB@dimen\SB@dimeniii%
\fi%
\ifdim\SB@dimeniii>2\p@\repeat%
\setbox\SB@box\vsplit#1to\SB@dimenii%
\global\setbox#1\vbox{%
\unvbox\SB@box\unskip%
\SB@inversefalse\SB@prevversetrue\SB@stanzabreak%
\SB@putbox\unvcopy\SB@chorusbox%
\SB@inversetrue\SB@prevversefalse\SB@stanzabreak%
\unvbox#1%
}%
\else\ifx\SB@temp\SB@lastcmark%
\global\setbox#1\vbox{%
\unvbox#1%
\unskip%
\ifdim\sbarheight>\z@%
\setbox\SB@box\lastbox%
\unskip\unpenalty%
\fi%
\setbox\SB@box\lastbox%
\unskip\unskip%
\SB@inversefalse\SB@prevversetrue\SB@stanzabreak%
\marks\SB@nocmarkclass{\SB@nocmark}%
\unvcopy\SB@chorusbox%
\vskip\versesep\vskip2\p@\@plus4\p@%
\nointerlineskip\box\SB@box%
\ifdim\sbarheight>\z@%
\nobreak\vskip2\p@\@plus\p@%
\hrule\@height\sbarheight\@width\SB@colwidth%
\fi%
}%
\fi\fi%
\fi%
}}
\newcommand\nextcol{%
\@ifstar{\SB@nextcol\@ne\@flushglue}%
{\ifpartiallist\else\SB@nextcol\@ne\@flushglue\fi}%
}
\newcommand\sclearpage{%
\@ifstar\SB@clearpage{\ifpartiallist\else\SB@clearpage\fi}%
}
\newcommand\scleardpage{%
\@ifstar\SB@cleardpage{\ifpartiallist\else\SB@cleardpage\fi}%
}
\newcommand\SB@lop[1]{\expandafter\SB@@lop\the#1\SB@@lop#1}
\newcommand\SB@@lop{}
\def\SB@@lop\\#1\\#2\SB@@lop#3#4{\global#3{\\#2}\global#4{#1}}
\newcommand\SB@emptylist{}
\def\SB@emptylist{\\}
\newcommand\SB@ifempty[3]{%
\edef\SB@temp{\the#1}%
\ifx\SB@temp\SB@emptylist#2\else#3\fi%
}
\newtoks\SB@titlelist
\newtoks\SB@titletail
\newcommand\songtitle{}
\newcommand\resettitles{%
\global\SB@titletail\SB@titlelist%
\nexttitle%
}
\newcommand\nexttitle{%
\SB@ifempty\SB@titletail{%
\global\let\songtitle\relax%
}{%
\SB@lop\SB@titletail\SB@toks%
\edef\songtitle{\the\SB@toks}%
}%
}
\newcommand\foreachtitle[1]{%
\ifx\songtitle\relax\else%
\loop#1\nexttitle\ifx\songtitle\relax\else\repeat%
\fi%
}
\newif\ifSB@songsenv\SB@songsenvfalse
\newif\ifSB@insong\SB@insongfalse
\newif\ifSB@intersong\SB@intersongfalse
\newif\ifSB@inverse\SB@inversefalse
\newif\ifSB@inchorus\SB@inchorusfalse
\newcommand\SB@closeall{}
\newcommand\SB@rawrefs{}
\newcommand\songauthors{}
\newcommand\songcopyright{}
\newcommand\songlicense{}
\newcommand\songrefs{}
\newcommand\setlicense{\gdef\songlicense}
\newcommand\SB@clearbskeys{}
\newcommand\newsongkey[2]{%
\expandafter\gdef\expandafter\SB@clearbskeys\expandafter%
{\SB@clearbskeys#2}%
\define@key{beginsong}{#1}%
}
\newsongkey{sr}{\def\SB@rawrefs{}\gdef\songrefs{}}
{\def\SB@rawrefs{#1}\SB@parsesrefs{#1}}
\newsongkey{by}{\def\songauthors{}}{\def\songauthors{#1}}
\newsongkey{cr}{\def\songcopyright{}}{\def\songcopyright{#1}}
\newsongkey{li}{\setlicense{}}{\setlicense{#1}}
\newsongkey{index}{}{\indexentry{#1}}
\newsongkey{ititle}{}{\indextitleentry{#1}}
\newenvironment{song}{\beginsong}{\SB@endsong}
\newcommand\beginsong[1]{%
\ifSB@insong\SB@errboo\SB@closeall\fi%
\ifSB@intersong\SB@errbor\SB@closeall\fi%
\SB@insongtrue%
\def\SB@closeall{\endsong}%
\SB@parsetitles{#1}%
\global\setbox\SB@songwrites\box\voidb@x%
\SB@clearbskeys%
\@ifnextchar[\SB@bskvfmt\SB@@beginsong%
}
\newcommand\SB@@beginsong{%
\@ifnextchar\bgroup\SB@bsoldfmt\SB@@@beginsong%
}
\newcommand\SB@bsoldfmt[3]{%
\SB@bskvfmt[sr={#1},by={#2},cr={#3}]%
}
\newcommand\SB@bskvfmt{}
\def\SB@bskvfmt[#1]{%
\setkeys{beginsong}{#1}%
\SB@@@beginsong%
}
\newcommand\SB@@@beginsong{%
\global\SB@stanzafalse%
\setbox\SB@chorusbox\box\voidb@x%
\SB@gotchorusfalse%
\setbox\SB@songbox\vbox\bgroup\begingroup%
\ifnum\SB@numcols>\z@\hsize\SB@colwidth\fi%
\leftskip\z@skip\rightskip\z@skip%
\parfillskip\@flushglue\parskip\z@skip%
\SB@raggedright%
\global\SB@transposefactor\z@%
\global\SB@cr@{\\}%
\protected@edef\@currentlabel{\p@songnum\thesongnum}%
\setcounter{versenum}{1}%
\SB@prevversetrue%
\meter44%
\resettitles%
\SB@addtoindexes\songtitle\SB@rawrefs\songauthors%
\nexttitle%
\foreachtitle{\expandafter\SB@addtotitles\expandafter{\songtitle}}%
\resettitles%
\lyricfont%
\SB@setbaselineskip%
}
\newcommand\SB@endsong{%
\ifSB@insong%
\ifSB@inverse\SB@erreov\endverse\fi%
\ifSB@inchorus\SB@erreoc\endchorus\fi%
\global\SB@skip\versesep%
\unskip%
\ifrepchorus\ifvoid\SB@chorusbox\else%
\ifSB@prevverse\ifvnumbered%
\marks\SB@cmarkclass{\SB@lastcmark}%
\fi\fi%
\fi\fi%
\endgroup\egroup%
\setbox\SB@songbox\vbox{%
\songmark%
\unvbox\SB@songwrites%
\ifnum\SB@numcols>\z@\hsize\SB@colwidth\fi%
\leftskip\z@skip\rightskip\z@skip%
\parfillskip\@flushglue\parskip\z@skip\parindent\z@%
\ifdim\sbarheight>\z@%
\hrule\@height\sbarheight\@width\hsize%
\nobreak\vskip5\p@%
\fi%
\ifpdfindex\begingroup%
\ifx\pdfbookmark\undefined\else%
\ifx\pdfbookmark\relax\else%
\resettitles%
\pdfbookmark[\ifnum\c@section=\z@1\else2\fi]%
{\thesongnum. \songtitle}%
{song\theSB@songsnum-\thesongnum}%
\fi\fi%
\endgroup\fi%
\vbox{\makeprelude}%
\nobreak\vskip\SB@skip%
\vskip2\p@\@plus4\p@%
\unvbox\SB@songbox%
\nobreak\vskip\SB@skip%
\vskip2\p@\@plus4\p@%
\nointerlineskip%
\vbox{\makepostlude}%
\ifdim\sbarheight>\z@%
\nobreak\vskip2\p@\@plus\p@%
\nointerlineskip%
\hbox{\vrule\@height\sbarheight\@width\hsize}%
\fi%
}%
\SB@insongfalse%
\edef\SB@sgroup{\thesongnum}%
\global\SB@groupcnt\z@%
\SB@submitsong%
\ifnum\SB@grouplvl=\z@\let\SB@sgroup\@empty\fi%
\stepcounter{songnum}%
\else%
\ifSB@intersong\SB@erreor\SB@closeall%
\else\SB@erreot\fi%
\fi%
}
\newcommand\SB@setbaselineskip{%
\SB@dimen\f@size\p@%
\baselineskip\SB@dimen\relax%
\ifchorded%
\setbox\SB@box\hbox{{\printchord{ABCDEFG\shrp\flt/j7}}}%
\advance\baselineskip\ht\SB@box%
\fi%
\ifslides%
\advance\baselineskip.2\SB@dimen\@plus.5\SB@dimen%
\@minus.2\SB@dimen%
\else%
\advance\baselineskip\z@\@plus.1\SB@dimen\relax%
\fi%
\advance\baselineskip\baselineadj%
}
\newcommand\SB@setversesep{%
\SB@dimen123456789sp%
\edef\SB@temp{\the\SB@dimen}%
\edef\SB@tempii{\the\versesep}%
\ifx\SB@temp\SB@tempii%
\begingroup%
\lyricfont%
\SB@dimen\f@size\p@%
\ifchorded%
\setbox\SB@box\hbox{{\printchord{ABCDEFG\shrp\flt/j7}}}%
\advance\SB@dimen\ht\SB@box%
\fi%
\ifslides%
\global\versesep1.2\SB@dimen\@plus.3\SB@dimen%
\@minus.3\SB@dimen%
\else%
\global\versesep.75\SB@dimen\@plus.25\SB@dimen%
\@minus.13\SB@dimen%
\fi%
\endgroup%
\fi%
}
\newcommand\makeprelude{%
\resettitles%
\ifslides%
\hbox to\hsize{{%
\hfil\stitlefont\songtitle\hfil%
}}%
\vskip5\p@%
\hbox to\hsize{%
\hfil%
\vbox{%
\divide\hsize\tw@\parskip\p@\relax%
\centering\small\extendprelude%
}%
\hfil%
}%
\else%
\ifdim\songnumwidth>\z@%
\setbox\SB@boxii\hbox{{\SB@colorbox\snumbgcolor{%
\hbox to\songnumwidth{%
\printsongnum{\thesongnum}\hfil%
}%
}}}%
\fi%
\setbox\SB@box\vbox{%
\ifnum\SB@numcols>\z@\hsize\SB@colwidth\fi%
\ifdim\songnumwidth>\z@%
\advance\hsize-\wd\SB@boxii%
\advance\hsize-3\p@%
\fi%
\SB@raggedright\offinterlineskip\lineskip\p@%
{\stitlefont%
\songtitle\par%
\nexttitle%
\foreachtitle{(\songtitle)\par}}%
\ifdim\prevdepth=\z@\kern\p@\fi%
\parskip\p@\relax\tiny%
\extendprelude%
\kern\z@%
}%
\ifdim\songnumwidth>\z@%
\hbox{%
\ifdim\ht\SB@boxii>\ht\SB@box%
\box\SB@boxii%
\kern3\p@%
\vtop{\box\SB@box}%
\else%
\SB@colorbox\snumbgcolor{\vbox to\ht\SB@box{{%
\hbox to\songnumwidth{%
\printsongnum{\thesongnum}\hfil%
}\vfil%
}}}%
\kern3\p@%
\box\SB@box%
\fi%
}%
\else%
\unvbox\SB@box%
\fi%
\fi%
}
\newcommand\makepostlude{%
\SB@raggedright\baselineskip\z@skip\parskip\z@skip\parindent\z@%
\tiny\extendpostlude%
}
\newcommand\showauthors{%
\setbox\SB@box\hbox{\bfseries\sfcode`.\@m\songauthors}%
\ifdim\wd\SB@box>\z@\unhbox\SB@box\par\fi%
}
\newcommand\showrefs{%
\setbox\SB@box\hbox{\slshape\songrefs\vphantom,}%
\ifdim\wd\SB@box>\z@\unhbox\SB@box\par\fi%
}
\newcommand\SB@next{}
\newcommand\SB@donext{}
\newcommand\SB@dothis{}
\newcommand\SB@nextname{}
\newcommand\SB@appendsp[1]{#1\expandafter{\the#1 }}
\newcommand\SB@parsetitles[1]{%
\begingroup%
\global\SB@titlelist{\\}%
\SB@toks{}%
\let\\\SB@titlesep%
\let\SB@dothis\SB@pthead%
\SB@ptstart#1\SB@endparse%
\endgroup%
}
\newcommand\SB@ptstart{\futurelet\SB@next\SB@dothis}
\newcommand\SB@pthead{%
\ifcat\noexpand\SB@next\noexpand\@sptoken%
\expandafter\SB@ptsp%
\else%
\SB@toks{}%
\let\SB@dothis\SB@ptmain%
\expandafter\SB@ptmain%
\fi%
}
\newcommand\SB@ptmain{%
\ifcat\noexpand\SB@next\noexpand\@sptoken%
\let\SB@donext\SB@ptsp%
\else\ifcat\noexpand\SB@next\noexpand\bgroup%
\let\SB@donext\SB@ptbg%
\else\ifx\SB@next\SB@endparse%
\global\SB@titlelist\expandafter{\the\SB@titlelist\\}%
\let\SB@donext\@gobble%
\else%
\ifx\SB@next\\%
\SB@toks{}%
\let\SB@dothis\SB@pthead%
\fi%
\let\SB@donext\SB@ptstep%
\fi\fi\fi%
\SB@donext%
}
\newcommand\SB@ptstep[1]{%
\global\SB@titlelist\expandafter\expandafter\expandafter{%
\expandafter\the\expandafter\SB@titlelist\the\SB@toks#1}%
\SB@toks{}%
\SB@ptstart%
}
\newcommand\SB@ptbg[1]{\SB@ptstep{{#1}}}
\newcommand\SB@ptsp{
\SB@appendsp\SB@toks%
\afterassignment\SB@ptstart%
\let\SB@next= }
\newcommand\SB@titlesep{SB@titlesep}
\newcommand\SB@endparse{%
\SB@Error{Title parsing failed}{This error should not occur.}%
}
\newcommand\SB@testdigit[1]{%
\SB@testfalse%
\ifcat1\noexpand#1\SB@@testdigit#1\fi%
}
\newcommand\SB@@testdigit[1]{%
\ifx0#1\SB@testtrue\else%
\ifx1#1\SB@testtrue\else%
\ifx2#1\SB@testtrue\else%
\ifx3#1\SB@testtrue\else%
\ifx4#1\SB@testtrue\else%
\ifx5#1\SB@testtrue\else%
\ifx6#1\SB@testtrue\else%
\ifx7#1\SB@testtrue\else%
\ifx8#1\SB@testtrue\else%
\ifx9#1\SB@testtrue%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}
\newcommand\SB@parsesrefs[1]{%
\begingroup%
\SB@toks{\begingroup\SB@sractives}%
\SB@prloop#1\SB@endparse%
\xdef\songrefs{\the\SB@toks\endgroup}%
\endgroup%
}
\newcommand\SB@prloop{\futurelet\SB@next\SB@prstep}
\newcommand\SB@prstep{%
\ifcat\noexpand\SB@next A%
\expandafter\SB@prcpy%
\else%
\expandafter\SB@@prstep%
\fi%
}
\newcommand\SB@@prstep{%
\ifcat\noexpand\SB@next\noexpand\@sptoken%
\let\SB@donext\SB@prspace%
\else\ifx\SB@next-%
\let\SB@donext\SB@prhyphen%
\else\ifx\SB@next,%
\let\SB@donext\SB@prcomma%
\else\ifx\SB@next\SB@endparse
\let\SB@donext\@gobble%
\else\ifcat\noexpand\SB@next\bgroup%
\let\SB@donext\SB@prgr%
\else%
\let\SB@donext\SB@prcpy%
\fi\fi\fi\fi\fi%
\SB@donext%
}
\newcommand\SB@prcpy[1]{\SB@toks\expandafter{\the\SB@toks#1}\SB@prloop}
\newcommand\SB@prgr[1]{\SB@toks\expandafter{\the\SB@toks{#1}}\SB@prloop}
\newcommand\SB@prcomma[1]{}
{\catcode`,\active
\gdef\SB@prcomma#1{\SB@toks\expandafter{\the\SB@toks,}\SB@prloop}}
\newcommand\SB@prhyphen[1]{}
{\catcode`-\active
\gdef\SB@prhyphen#1{\SB@toks\expandafter{\the\SB@toks-}\SB@prloop}}
\newcommand\SB@prspace[1]{}
{\obeyspaces
\gdef\SB@prspace{\SB@toks\expandafter{\the\SB@toks }\SB@@prspace}}
\newcommand\SB@@prspace{\afterassignment\SB@prloop\let\SB@temp= }
\newcommand\SB@sractives{}
{\catcode`,\active\catcode`-\active\obeyspaces\catcode`\^^M\active%
\gdef\SB@sractives{%
\let,\SB@srcomma\let-\SB@srhyphen%
\let \SB@srspace\let^^M\SB@srspace%
\SB@srspacing}%
}
\newcommand\SB@srspacing{%
\nonfrenchspacing\sfcode`\;=1500\sfcode`\,=1250\relax%
}
\newcommand\SB@srcomma{,\futurelet\SB@next\SB@@srcomma}
\newcommand\SB@@srcomma{%
\ifx\SB@next\SB@srspace\else%
\nobreak\thinspace%
\fi%
}
\newcommand\SB@srhyphen{\futurelet\SB@next\SB@@srhyphen}
\newcommand\SB@@srhyphen{%
\ifx\SB@next\SB@srhyphen\expandafter\SB@srdash\else--\fi%
}
\newcommand\SB@srdash[1]{\futurelet\SB@next\SB@@srdash}
\newcommand\SB@@srdash{%
\ifx\SB@next\SB@srhyphen---\expandafter\@gobble\else--\fi%
}
\newcommand\SB@srspace{\futurelet\SB@next\SB@@srspace}
\newcommand\SB@@srspace{%
\let\SB@donext\relax%
\ifx\SB@next\SB@srspace\else%
\ifnum\spacefactor>\@m%
\ifnum\spacefactor>1499 %
\ifcat\noexpand\SB@next0%
\let\SB@donext\SB@srcso%
\else%
\penalty-5\enskip%
\fi%
\else%
\space%
\fi%
\else%
\nobreak\space%
\fi%
\fi%
\SB@donext%
}
\newcommand\SB@srcso[1]{\futurelet\SB@temp\SB@@srcso}
\newcommand\SB@@srcso{%
\ifx\SB@temp\SB@srspace%
\penalty-5\enskip%
\else%
\space%
\fi%
\SB@next%
}
\newif\ifSB@stanza
\newcommand\SB@stanzabreak{%
\ifhmode\par\fi%
\ifSB@stanza%
\SB@breakpoint{%
\ifSB@inverse%
\ifSB@prevverse\vvpenalty\else\cvpenalty\fi%
\else%
\ifSB@prevverse\vcpenalty\else\ccpenalty\fi%
\fi%
}%
\vskip\versesep%
\fi%
}
\newcommand\SB@breakpoint[1]{%
\begingroup%
\ifnum#1<\@M%
\SB@skip\colbotglue\relax%
\SB@skip-\SB@skip%
\else%
\SB@skip\z@skip%
\fi%
\advance\SB@skip\lastskip%
\unskip%
\nobreak%
\ifnum#1<\@M%
\vskip\colbotglue\relax%
\penalty#1%
\fi%
\vskip\SB@skip%
\endgroup%
}
\newcommand\SB@putbox[2]{%
\begingroup%
\SB@dimen\dp#2%
#1#2%
\setbox\SB@box\hbox{{\lyricfont p}}%
\ifdim\SB@dimen<\dp\SB@box%
\advance\SB@dimen-\dp\SB@box%
\vskip-\SB@dimen%
\fi%
\setbox\SB@box\box\voidb@x%
\endgroup%
}
\newcommand\SB@obeylines{%
\let\par\SB@par%
\obeylines%
\let\@par\SB@@par%
}
\newcommand\SB@par{%
\ifhmode%
\SB@cnt\interlinepenalty%
\interlinepenalty\@M%
\endgraf%
\interlinepenalty\SB@cnt%
\ifSB@inchorus%
\ifdim\cbarwidth>\z@\nobreak\else\SB@ilpenalty\fi%
\else%
\SB@ilpenalty%
\fi%
\fi%
}
\newcommand\SB@ilpenalty{%
\ifnum\interlinepenalty=\z@\else%
\penalty\interlinepenalty%
\fi%
}
\newcommand\SB@@par{\let\par\SB@par\par}
\newdimen\SB@parindent
\newcommand\SB@everypar{}
\newcommand\SB@raggedright{%
\SB@parindent\parindent%
\raggedright%
\parindent\SB@parindent%
}
\newif\ifvnumbered
\newif\ifSB@prevverse
\CheckCommand\verse{%
\let\\\@centercr%
\list{}{%
\itemsep\z@%
\itemindent-1.5em%
\listparindent\itemindent%
\rightmargin\leftmargin%
\advance\leftmargin1.5em%
}%
\item\relax%
}
\renewenvironment{verse}
{\vnumberedfalse\SB@beginverse}
{\SB@endverse}
\newenvironment{verse*}
{\vnumberedtrue\SB@beginverse}
{\SB@endverse}
\newcommand\beginverse{%
\begingroup%
\SB@loadactives%
\@ifstar{\endgroup\vnumberedfalse\SB@beginverse}%
{\endgroup\vnumberedtrue\SB@beginverse}%
}
\newcommand\SB@beginverse{%
\ifSB@insong%
\ifSB@inverse\SB@errbvv\endverse\fi%
\ifSB@inchorus\SB@errbvc\endchorus\fi%
\else%
\SB@errbvt\beginsong{Unknown Song}%
\fi%
\ifrepchorus\ifvoid\SB@chorusbox\else%
\SB@gotchorustrue%
\ifSB@prevverse\ifvnumbered%
\marks\SB@cmarkclass{\SB@cmark}%
\fi\fi%
\fi\fi%
\SB@inversetrue%
\def\SB@closeall{\endverse\endsong}%
\SB@stanzabreak%
\versemark\nobreak%
\global\SB@stanzatrue%
\SB@ifempty\SB@cr@\memorize{\replay[]}%
\setbox\SB@box\vbox\bgroup\begingroup%
\ifvnumbered%
\protected@edef\@currentlabel{\p@versenum\theversenum}%
\def\SB@everypar{%
\setbox\SB@box\hbox{{%
\printversenum{\theversenum}%
}}%
\ifdim\wd\SB@box<\versenumwidth%
\setbox\SB@box%
\hbox to\versenumwidth{\unhbox\SB@box\hfil}%
\fi%
\ifchorded\vrule\@height\baselineskip\@width\z@\@depth\z@\fi%
{\placeversenum\SB@box}%
\gdef\SB@everypar{}%
}%
\else%
\def\SB@everypar{%
\ifchorded\vrule\@height\baselineskip\@width\z@\@depth\z@\fi%
\gdef\SB@everypar{}%
}%
\fi%
\everypar{\SB@everypar\everypar{}}%
\versefont\versejustify%
\SB@loadactives%
\SB@obeylines%
\penalty12345 %
\everyverse\relax%
}
\newcommand\SB@endverse{%
\ifSB@insong%
\ifSB@inverse%
\unpenalty%
\endgroup\egroup%
\SB@putbox\unvbox\SB@box%
\SB@inversefalse%
\def\SB@closeall{\endsong}%
\ifvnumbered\stepcounter{versenum}\fi%
\SB@prevversetrue%
\else\ifSB@inchorus\SB@errevc\endchorus%
\else\SB@errevo\fi\fi%
\else%
\SB@errevt%
\fi%
}
\newif\ifSB@chorustop
\newbox\SB@chorusbox
\newif\ifSB@gotchorus
\ifSB@etex
\@ifundefined{newmarks}{
\@ifundefined{newmark}{
\mathchardef\SB@cmarkclass83
\mathchardef\SB@nocmarkclass84
}{
\newmark\SB@cmarkclass
\newmark\SB@nocmarkclass
}
}{
\newmarks\SB@cmarkclass
\newmarks\SB@nocmarkclass
}
\fi
\newcommand\SB@cmark{}
\def\SB@cmark{SB@cmark}
\newcommand\SB@lastcmark{}
\def\SB@lastcmark{SB@lastcmark}
\newcommand\SB@nocmark{}
\def\SB@nocmark{SB@nocmark}
\newenvironment{chorus}{\beginchorus}{\SB@endchorus}
\newcommand\beginchorus{%
\ifSB@insong
\ifSB@inverse\SB@errbcv\endverse\fi%
\ifSB@inchorus\SB@errbcc\endchorus\fi%
\else%
\SB@errbct\beginsong{Unknown Song}%
\fi%
\SB@inchorustrue%
\def\SB@closeall{\endchorus\endsong}%
\SB@chorustoptrue%
\vnumberedfalse%
\SB@stanzabreak%
\chorusmark%
\ifrepchorus%
\ifSB@gotchorus\else\ifSB@prevverse\else%
\global\setbox\SB@chorusbox\vbox{%
\unvbox\SB@chorusbox%
\SB@stanzabreak%
\chorusmark%
}%
\fi\fi%
\fi%
\global\SB@stanzatrue%
\replay[]%
\SB@@beginchorus%
\everychorus\relax%
}
\newcommand\SB@@beginchorus{%
\ifrepchorus\marks\SB@cmarkclass{}\fi%
\setbox\SB@box\vbox\bgroup\begingroup%
\ifchorded%
\def\SB@everypar{%
\vrule\@height\baselineskip\@width\z@\@depth\z@%
\gdef\SB@everypar{}%
}%
\everypar{\SB@everypar\everypar{}}%
\fi%
\chorusfont\chorusjustify%
\SB@loadactives%
\SB@obeylines%
\penalty12345 %
}
\newcommand\SB@endchorus{%
\ifSB@insong%
\ifSB@inchorus%
\unpenalty%
\endgroup\egroup%
\SB@inchorusfalse%
\def\SB@closeall{\endsong}%
\setbox\SB@box\vbox{%
\SB@chorusbar\SB@box%
\SB@putbox\unvbox\SB@box%
}
\ifrepchorus\ifSB@gotchorus\else%
\global\setbox\SB@chorusbox\vbox{%
\unvbox\SB@chorusbox%
\unvcopy\SB@box%
}%
\fi\fi%
\unvbox\SB@box%
\SB@prevversefalse%
\else\ifSB@inverse\SB@errecv\endverse%
\else\SB@erreco\fi\fi%
\else%
\SB@errect%
\fi%
}
\newcommand\SB@cbarshift{%
\ifSB@inchorus\ifdim\cbarwidth>\z@%
\advance\leftskip\cbarwidth%
\advance\leftskip5\p@\relax%
\fi\fi%
}
\newcommand\SB@chorusbar[1]{%
\ifdim\cbarwidth>\z@%
\SB@dimen\ht#1%
\SB@dimenii\dp#1%
\advance\SB@dimen%
\ifSB@chorustop\ifchorded\else2\fi\fi\SB@dimenii%
\SB@skip\SB@dimen\relax%
\SB@computess\SB@skip1\@plus#1%
\SB@computess\SB@skip{-1}\@minus#1%
\nointerlineskip\null\nobreak%
\leaders\vrule\@width\cbarwidth\vskip\SB@skip%
\ifSB@chorustop\ifchorded\else%
\advance\SB@skip-\SB@dimenii%
\fi\fi%
\nobreak\vskip-\SB@skip%
\fi%
}
\newcommand\SB@computess[4]{%
\begingroup%
\vbadness\@M\vfuzz\maxdimen%
\SB@dimen4096\p@%
\setbox\SB@box\vbox spread#2\SB@dimen{\unvcopy#4}%
\ifnum\badness=\z@%
\global\advance#1\z@#31fil\relax%
\else%
\SB@dimenii\SB@dimen%
\loop%
\SB@dimenii.5\SB@dimenii%
\ifnum\badness<100 %
\advance\SB@dimen\SB@dimenii%
\else
\advance\SB@dimen-\SB@dimenii%
\fi%
\setbox\SB@box\vbox spread#2\SB@dimen{\unvcopy#4}%
\ifnum\badness=100 \SB@dimenii\z@\fi%
\ifdim\SB@dimenii>.1\p@\repeat%
\ifdim\SB@dimen<.1\p@\SB@dimen\z@\fi%
\global\advance#1\z@#3\SB@dimen\relax%
\fi%
\endgroup%
}
\newcommand\brk{%
\ifSB@insong%
\ifhmode\penalty-5 \else%
\unpenalty%
\ifSB@inchorus%
\ifdim\cbarwidth=\z@%
\ifrepchorus\marks\SB@cmarkclass{}\fi%
\SB@breakpoint\brkpenalty%
\else%
\endgroup\egroup%
\ifrepchorus\ifSB@gotchorus\else%
\global\setbox\SB@chorusbox\vbox{%
\unvbox\SB@chorusbox%
\SB@chorusbar\SB@box%
\unvcopy\SB@box%
\SB@breakpoint\brkpenalty%
}%
\fi\fi%
\SB@chorusbar\SB@box%
\unvbox\SB@box%
\SB@breakpoint\brkpenalty%
\SB@chorustopfalse%
\SB@@beginchorus%
\fi%
\else%
\SB@breakpoint\brkpenalty%
\fi%
\fi%
\else%
\ifpartiallist\else\SB@nextcol\@ne\colbotglue\fi%
\fi%
}
\newcommand\SB@boxup[1]{%
\setbox\SB@box\hbox{{\notefont#1}}%
\SB@dimen\wd\SB@box%
\advance\SB@dimen6\p@%
\advance\SB@dimen\leftskip%
\advance\SB@dimen\rightskip%
\ifdim\SB@dimen>\hsize%
\vbox{{%
\advance\hsize-6\p@%
\advance\hsize-\leftskip%
\advance\hsize-\rightskip%
\notejustify%
\unhbox\SB@box\par%
\kern\z@%
}}%
\else%
\vbox{\box\SB@box\kern\z@}%
\fi%
}
\newcommand\textnote[1]{%
\ifhmode\par\fi%
\ifnum\lastpenalty=12345\else%
\ifSB@inverse%
\vskip2\p@\relax%
\else\ifSB@inchorus%
\vskip2\p@\relax%
\else\ifSB@stanza%
\nobreak\vskip\versesep%
\fi\fi\fi%
\fi%
\begingroup%
\everypar{}%
\ifchorded\chordedfalse\SB@setbaselineskip\chordedtrue\fi%
\placenote{\SB@colorbox\notebgcolor{\SB@boxup{#1}}}%
\endgroup%
\nobreak%
\ifSB@inverse%
\vskip2\p@\relax%
\else\ifSB@inchorus%
\vskip2\p@\relax%
\else\ifSB@stanza\else%
\nobreak\vskip\versesep%
\fi\fi\fi%
}
\newcommand\musicnote[1]{\ifchorded\textnote{#1}\fi}
\ifSB@etex
\newcommand\echo{\begingroup\@sanitize\SB@echo}
\newcommand\SB@echo[1]{%
\endgroup%
\begingroup%
\ifdim\fontdimen\@ne\font>\z@\upshape\else\slshape\fi%
\endlinechar\m@ne%
\scantokens{(#1)}%
\endgroup%
}
\else
\newcommand\echo{%
\begingroup%
\ifdim\fontdimen\@ne\font>\z@\upshape\else\slshape\fi%
\afterassignment\SB@echo%
\setbox\SB@box\hbox%
}
\newcommand\SB@echo{\aftergroup\SB@@echo(}
\newcommand\SB@@echo{\unhbox\SB@box)\endgroup}
\fi
\newcommand\rep[1]{%
(\raise.25ex\hbox{%
\fontencoding{OMS}\fontfamily{cmsy}\selectfont\char\tw@%
}#1)%
}
\newenvironment{songgroup}{%
\ifnum\SB@grouplvl=\z@%
\edef\SB@sgroup{\thesongnum}%
\global\SB@groupcnt\m@ne%
\fi%
\advance\SB@grouplvl\@ne%
}{%
\advance\SB@grouplvl\m@ne%
\ifnum\SB@grouplvl=\z@\let\SB@sgroup\@empty\fi%
}
\newcount\SB@grouplvl
\newenvironment{intersong}{%
\ifSB@insong\SB@errbro\SB@closeall\fi%
\ifSB@intersong\SB@errbrr\SB@closeall\fi%
\setbox\SB@chorusbox\box\voidb@x%
\SB@intersongtrue%
\def\SB@closeall{\end{intersong}}%
\setbox\SB@songbox\vbox\bgroup\begingroup%
\ifnum\SB@numcols>\z@\hsize\SB@colwidth\fi%
\ifdim\sbarheight>\z@%
\hrule\@height\sbarheight\@width\hsize%
\nobreak%
\fi%
}{%
\ifSB@intersong
\ifdim\sbarheight>\z@%
\ifhmode\par\fi%
\SB@skip\lastskip%
\unskip\nobreak\vskip\SB@skip%
\hbox{\vrule\@height\sbarheight\@width\hsize}%
\fi%
\endgroup\egroup%
\ifSB@omitscrip%
\setbox\SB@songbox\box\voidb@x%
\else%
\SB@submitsong%
\fi%
\SB@intersongfalse%
\else%
\ifSB@insong\SB@errero\SB@closeall\else\SB@errert\fi%
\fi%
}
\newenvironment{intersong*}{%
\ifSB@insong\SB@errbro\SB@closeall\fi%
\ifSB@intersong\SB@errbrr\SB@closeall\fi%
\setbox\SB@chorusbox\box\voidb@x%
\SB@intersongtrue%
\def\SB@closeall{\end{intersong*}}%
\setbox\SB@songbox\vbox\bgroup\begingroup%
}{%
\ifSB@intersong%
\endgroup\egroup%
\ifSB@omitscrip%
\setbox\SB@songbox\box\voidb@x%
\else%
\def\SB@stype{\SB@styppage}%
\SB@submitsong%
\def\SB@stype{\SB@stypcol}%
\fi%
\SB@intersongfalse%
\else%
\ifSB@insong\SB@errero\SB@closeall\else\SB@errert\fi%
\fi%
}
\newbox\SB@srbox
\newenvironment{scripture}{\beginscripture}{\SB@endscripture}
\newcommand\beginscripture[1]{%
\begin{intersong}%
\SB@parsesrefs{#1}%
\setbox\SB@srbox\hbox{{\printscrcite\songrefs}}%
\def\SB@closeall{\endscripture}%
\nobreak\vskip5\p@%
\SB@parindent\parindent\parindent\z@%
\parskip\z@skip\parfillskip\@flushglue%
\leftskip\SB@parindent\rightskip\SB@parindent\relax%
\scripturefont%
\baselineskip\f@size\p@\@plus\p@\relax%
\advance\baselineskip\p@\relax%
\emergencystretch.3em%
}
\newcommand\SB@endscripture{%
\ifSB@intersong
\scitehere%
\ifhmode\par\fi%
\vskip-3\p@%
\end{intersong}%
\fi%
}
\newcommand\scitehere{%
\ifSB@intersong%
\ifvoid\SB@srbox\else%
\ifvmode%
\setbox\SB@box\lastbox%
\nointerlineskip\noindent\hskip-\leftskip%
\unhbox\SB@box\unskip%
\fi%
\unskip\nobreak\hfil\penalty50\hskip.8em\null\nobreak\hfil%
\box\SB@srbox\kern-\SB@parindent%
{\parfillskip\z@\finalhyphendemerits2000\par}%
\fi%
\else%
\SB@errscrip\scitehere%
\fi%
}
\newcommand\Acolon{\SB@colon2\Acolon}
\newcommand\Bcolon{\SB@colon1\Bcolon}
\newcommand\SB@colon[2]{%
\ifSB@intersong\else%
\SB@errscrip#2%
\beginscripture{Unknown}%
\fi%
\ifhmode\par\fi%
\begingroup%
\rightskip\SB@parindent\@plus4em%
\advance\leftskip2\SB@parindent%
\advance\parindent-#1\SB@parindent%
\def\par{\endgraf\endgroup}%
\obeylines%
}
\newcommand\strophe{%
\ifSB@intersong\else%
\SB@errscrip\strophe\beginscripture{Unknown}%
\fi%
\vskip.9ex\@plus.45ex\@minus.68ex\relax%
}
\newcommand\SB@scripdent[2]{%
\ifSB@intersong\else%
\SB@errscrip#2\beginscripture{Unknown}%
\fi%
\ifhmode\par\fi%
\advance\leftskip#1\SB@parindent\relax%
}
\newcommand\scripindent{\SB@scripdent1\scripindent}
\newcommand\scripoutdent{\SB@scripdent-\scripoutdent}
\newcommand\SB@quotesactive{%
\catcode`'\active%
\catcode``\active%
}
\newcommand\shiftdblquotes[4]{}
\newcommand\SB@ldqleft{}
\newcommand\SB@ldqright{}
\newcommand\SB@rdqleft{}
\newcommand\SB@rdqright{}
\newcommand\SB@scanlq{}
\newcommand\SB@scanrq{}
\newcommand\SB@dolq{}
\newcommand\SB@dorq{}
{
\SB@quotesactive
\gdef\shiftdblquotes#1#2#3#4{%
\def\SB@ldqleft{\kern#1}%
\def\SB@ldqright{\kern#2}%
\def\SB@rdqleft{\kern#3}%
\def\SB@rdqright{\kern#4}%
\SB@quotesactive%
\def`{\futurelet\SB@next\SB@scanlq}%
\def'{\futurelet\SB@next\SB@scanrq}%
}
\gdef\SB@scanlq{%
\ifx\SB@next`%
\expandafter\SB@dolq%
\else%
\expandafter\lq%
\fi%
}
\gdef\SB@scanrq{%
\ifx\SB@next'%
\expandafter\SB@dorq%
\else%
\expandafter\rq%
\fi%
}
\gdef\SB@dolq`{%
\ifvmode\leavevmode\else\/\fi%
\vadjust{}%
\SB@ldqleft\lq\lq\SB@ldqright%
\vadjust{}%
}
\gdef\SB@dorq'{%
\ifvmode\leavevmode\else\/\fi%
\vadjust{}%
\SB@rdqleft\rq\rq\SB@rdqright%
\vadjust{}%
}
}
\newcount\SB@transposefactor
\newif\ifSB@convertnotes
\newcommand\notenameA{}
\newcommand\notenameB{}
\newcommand\notenameC{}
\newcommand\notenameD{}
\newcommand\notenameE{}
\newcommand\notenameF{}
\newcommand\notenameG{}
\newcommand\printnoteA{}
\newcommand\printnoteB{}
\newcommand\printnoteC{}
\newcommand\printnoteD{}
\newcommand\printnoteE{}
\newcommand\printnoteF{}
\newcommand\printnoteG{}
\newcommand\notenamesin[7]{%
\def\notenameA{#1}%
\def\notenameB{#2}%
\def\notenameC{#3}%
\def\notenameD{#4}%
\def\notenameE{#5}%
\def\notenameF{#6}%
\def\notenameG{#7}%
\SB@convertnotestrue%
}
\newcommand\notenamesout[7]{%
\def\printnoteA{#1}%
\def\printnoteB{#2}%
\def\printnoteC{#3}%
\def\printnoteD{#4}%
\def\printnoteE{#5}%
\def\printnoteF{#6}%
\def\printnoteG{#7}%
\SB@convertnotestrue%
}
\newcommand\notenames[7]{%
\notenamesin{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
\notenamesout{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
\SB@convertnotesfalse%
}
\newcommand\alphascale{\notenames ABCDEFG}
\newcommand\solfedge{\notenames{LA}{SI}{DO}{RE}{MI}{FA}{SOL}}
\alphascale
\newif\ifSB@prefshrps
\newif\ifSB@needkey
\newcommand\transpose[1]{%
\advance\SB@transposefactor by#1\relax%
\SB@cnt\SB@transposefactor%
\divide\SB@cnt12 %
\multiply\SB@cnt12 %
\advance\SB@transposefactor-\SB@cnt%
\SB@needkeytrue%
}
\newcommand\capo[1]{%
\iftranscapos\transpose{#1}\else\musicnote{capo #1}\fi%
}
\newcommand\prefersharps{\SB@prefshrpstrue\SB@needkeyfalse}
\newcommand\preferflats{\SB@prefshrpsfalse\SB@needkeyfalse}
\newcommand\transposehere[1]{%
\ifnum\SB@transposefactor=\z@%
\ifSB@convertnotes%
\SB@dotranspose{#1}%
\the\SB@toks%
\else%
#1%
\fi%
\else%
\ifSB@convertnotes%
{\SB@transposefactor\z@%
\SB@dotranspose{#1}%
\xdef\SB@tempv{\the\SB@toks}}%
\else%
\def\SB@tempv{#1}%
\fi%
\SB@dotranspose{#1}%
\expandafter\trchordformat\expandafter{\SB@tempv}{\the\SB@toks}%
\fi%
}
\newcommand\SB@dotranspose[1]{%
\SB@toks{}%
\let\SB@dothis\SB@trmain%
\SB@trscan#1\SB@trend%
}
\newcommand\trchordformat[2]{#2}
\newcommand\SB@trscan{\futurelet\SB@next\SB@dothis}
\newcommand\SB@trmain{%
\ifx\SB@next\bgroup%
\let\SB@donext\SB@trgroup%
\else\ifx\SB@next\egroup%
\SB@toks\expandafter{\the\SB@toks\egroup}%
\let\SB@donext\SB@trskip%
\else\ifcat\noexpand\SB@next\noexpand\@sptoken%
\SB@appendsp\SB@toks%
\let\SB@donext\SB@trskip%
\else%
\let\SB@donext\SB@trstep%
\fi\fi\fi%
\SB@donext%
}
\newcommand\SB@trgroup[1]{%
\SB@toks\expandafter{\the\SB@toks{#1}}%
\SB@trscan%
}
\newcommand\SB@trskip{%
\afterassignment\SB@trscan%
\let\SB@next= }
\newcommand\SB@trstep[1]{%
\let\SB@donext\SB@trscan%
\ifcat\noexpand\SB@next A%
\ifnum\uccode`#1=`#1%
\def\SB@temp{#1}%
\let\SB@dothis\SB@trnote%
\else%
\SB@toks\expandafter{\the\SB@toks#1}%
\fi%
\else\ifx\SB@next\gtab%
\let\SB@donext\SB@trtab%
\else\ifx\SB@next\SB@trend
\let\SB@donext\relax%
\else%
\SB@toks\expandafter{\the\SB@toks#1}%
\fi\fi\fi%
\SB@donext%
}
\newcommand\SB@trnote{%
\ifcat\noexpand\SB@next A%
\let\SB@donext\SB@trnotestep%
\else\ifnum\SB@transposefactor=\z@%
\SB@cnt\z@%
\let\SB@donext\SB@trtrans%
\else\ifx\SB@next\flt%
\SB@cnt\m@ne%
\let\SB@donext\SB@tracc%
\else\ifx\SB@next\shrp%
\SB@cnt\@ne%
\let\SB@donext\SB@tracc%
\else%
\SB@cnt\z@%
\let\SB@donext\SB@trtrans%
\fi\fi\fi\fi%
\SB@donext%
}
\newcommand\SB@trnotestep[1]{%
\ifnum\uccode`#1=`#1%
\expandafter\def\expandafter\SB@temp\expandafter{\SB@temp#1}%
\expandafter\SB@trscan%
\else%
\SB@cnt\z@%
\expandafter\SB@trtrans\expandafter#1%
\fi%
}
\newcommand\SB@tracc[1]{\futurelet\SB@next\SB@trtrans}
\newcommand\SB@trtrans{%
\advance\SB@cnt%
\ifx\SB@temp\notenameA\z@%
\else\ifx\SB@temp\notenameB\tw@%
\else\ifx\SB@temp\notenameC\thr@@%
\else\ifx\SB@temp\notenameD5 %
\else\ifx\SB@temp\notenameE7 %
\else\ifx\SB@temp\notenameF8 %
\else\ifx\SB@temp\notenameG10 %
\else-99 \fi\fi\fi\fi\fi\fi\fi%
\ifnum\SB@cnt<\m@ne%
\SB@toks\expandafter\expandafter\expandafter{%
\expandafter\the\expandafter\SB@toks\SB@temp}%
\else%
\advance\SB@cnt\SB@transposefactor%
\ifnum\SB@cnt<\z@\advance\SB@cnt12 \fi%
\ifnum\SB@cnt>11 \advance\SB@cnt-12 \fi%
\ifSB@needkey\ifnum\SB@transposefactor=\z@\else\SB@setkeysig\fi\fi%
\edef\SB@temp{%
\the\SB@toks%
\ifSB@prefshrps%
\ifcase\SB@cnt\printnoteA\or\printnoteA\noexpand\shrp\or%
\printnoteB\or\printnoteC\or\printnoteC\noexpand\shrp\or%
\printnoteD\or\printnoteD\noexpand\shrp\or\printnoteE\or%
\printnoteF\or\printnoteF\noexpand\shrp\or\printnoteG\or%
\printnoteG\noexpand\shrp\fi%
\else%
\ifcase\SB@cnt\printnoteA\or\printnoteB\noexpand\flt\or%
\printnoteB\or\printnoteC\or\printnoteD\noexpand\flt\or%
\printnoteD\or\printnoteE\noexpand\flt\or\printnoteE\or%
\printnoteF\or\printnoteG\noexpand\flt\or\printnoteG\or%
\printnoteA\noexpand\flt\fi%
\fi}%
\SB@toks\expandafter{\SB@temp}%
\fi%
\let\SB@dothis\SB@trmain%
\SB@trscan%
}
\newcommand\SB@setkeysig{%
\global\SB@needkeyfalse%
\ifcase\SB@cnt%
\global\SB@prefshrpstrue\or% A
\global\SB@prefshrpsfalse\or% Bb
\global\SB@prefshrpstrue\or% B
\ifx\SB@next m% C
\global\SB@prefshrpsfalse%
\else%
\global\SB@prefshrpstrue%
\fi\or%
\global\SB@prefshrpstrue\or% C#
\ifx\SB@next m% D
\global\SB@prefshrpsfalse%
\else%
\global\SB@prefshrpstrue%
\fi\or%
\global\SB@prefshrpsfalse\or% Eb
\global\SB@prefshrpstrue\or% E
\global\SB@prefshrpsfalse\or% F
\global\SB@prefshrpstrue\or% F#
\ifx\SB@next m% G
\global\SB@prefshrpsfalse%
\else%
\global\SB@prefshrpstrue%
\fi\or%
\global\SB@prefshrpsfalse\else% Ab
\global\SB@needkeytrue% non-chord
\fi%
}
\newcommand\SB@trtab{\expandafter\SB@trscan\@firstoftwo}
\newcommand\SB@trend{%
\SB@Error{Internal Error: Transposition failed}%
{This error should not occur.}%
}
\newcommand\SB@metertop{}
\newcommand\SB@meterbot{}
\newcommand\meter[2]{\gdef\SB@metertop{#1}\gdef\SB@meterbot{#2}}
\newcommand\SB@measuremark{SB@IsMeasure}
\newcommand\SB@makembar[2]{%
\ifSB@inverse\else%
\ifSB@inchorus\else\SB@errmbar\fi%
\fi%
\ifhmode%
\SB@skip\lastskip\unskip%
\setbox\SB@box\lastbox%
\copy\SB@box%
\ifvbox\SB@box%
\begingroup%
\setbox\SB@boxii\copy\SB@box%
\vbadness\@M\vfuzz\maxdimen%
\setbox\SB@boxii%
\vsplit\SB@boxii to\maxdimen%
\endgroup%
\long\edef\SB@temp{\splitfirstmark}%
\ifx\SB@temp\SB@measuremark%
\penalty100\hskip1em%
\else%
\penalty100\hskip\SB@skip%
\fi%
\else%
\penalty100\hskip\SB@skip%
\fi%
\fi%
\setbox\SB@box\hbox{\tiny\sffamily{#1}}%
\setbox\SB@boxii\hbox{\tiny\sffamily{#2}}%
\ifdim\wd\SB@box>\wd\SB@boxii%
\SB@dimen\wd\SB@box\relax%
\else%
\SB@dimen\wd\SB@boxii\relax%
\fi%
\ifdim\SB@dimen<.5\p@%
\SB@dimen.5\p@%
\fi%
\SB@dimenii\baselineskip%
\advance\SB@dimenii-2\p@%
\advance\SB@dimenii-\ht\SB@box%
\advance\SB@dimenii-\dp\SB@box%
\advance\SB@dimenii-\ht\SB@boxii%
\advance\SB@dimenii-\dp\SB@boxii%
\ifvmode\leavevmode\fi%
\vbox{%
\mark{\SB@measuremark}%
\hbox to\SB@dimen{%
\hfil%
\box\SB@box%
\hfil%
}%
\nointerlineskip%
\hbox to\SB@dimen{%
\hfil%
\box\SB@boxii%
\hfil%
}%
\nointerlineskip%
\hbox to\SB@dimen{%
\hfil%
\vrule\@width.5\p@\@height\SB@dimenii%
\hfil%
}%
}%
}
\newcommand\mbar{\SB@mbar}
\newcommand\measurebar{%
\mbar\SB@metertop\SB@meterbot%
\meter{}{}%
}
\newcommand\SB@repcolon{{%
\usefont{OT1}{cmss}{m}{n}\selectfont%
\ifchorded%
\baselineskip.5\SB@dimen%
\vbox{\hbox{:}\hbox{:}\kern.5\p@}%
\else%
\raise.5\p@\hbox{:}%
\fi%
}}
\newcommand\lrep{%
\SB@dimen\baselineskip%
\advance\SB@dimen-2\p@%
\vrule\@width1.5\p@\@height\SB@dimen\@depth\p@%
\kern1.5\p@%
\vrule\@width.5\p@\@height\SB@dimen\@depth\p@%
\SB@repcolon%
}
\newcommand\rrep{%
\SB@dimen\baselineskip%
\advance\SB@dimen-2\p@%
\SB@repcolon%
\vrule\@width.5\p@\@height\SB@dimen\@depth\p@%
\kern1.5\p@%
\vrule\@width1.5\p@\@height\SB@dimen\@depth\p@%
}
\newif\ifSB@wordends
\newif\ifSB@brokenword
\newtoks\SB@lyric
\newcount\SB@numhyps
\newtoks\SB@lyricnohyp
\newbox\SB@lyricbox
\newbox\SB@chordbox
\newcommand\SB@chbstok{}
\newcommand\SB@setchord{}
{
\catcode`^\active
\catcode`!7
\gdef\SB@setchord#1{%
\SB@gettabindtrue\SB@nohattrue%
\setbox\SB@chordbox\hbox{%
\unhbox\SB@chordbox%
\begingroup%
\ifSB@trackch%
\def\SB@activehat{\ifmmode!\else\global\SB@nohatfalse\fi}%
\else%
\def\SB@activehat{%
\ifmmode!\else\SB@lop\SB@ctail\SB@toks\the\SB@toks\fi%
}%
\fi%
\let^\SB@activehat%
\printchord{%
\ifSB@firstchord\else\kern.15em\fi%
\vphantom/%
\transposehere{#1}%
\kern.2em%
}%
\endgroup%
}%
\SB@gettabindfalse%
\ifSB@trackch\ifSB@nohat%
\global\SB@creg\expandafter{\the\SB@creg#1\\}%
\fi\fi%
\let\SB@noreplay\@firstofone%
}
}
\newcommand\SB@outertest{}
\edef\SB@outertest#1{%
\noexpand\SB@@outertest#1%
\string\outer%
\noexpand\SB@@outertest%
}
\newcommand\SB@@outertest{}
\expandafter\def\expandafter\SB@@outertest%
\expandafter#\expandafter1\string\outer#2\SB@@outertest{%
\def\SB@temp{#2}%
\ifx\SB@temp\@empty\else\SB@testtrue\fi%
}
\newcommand\SB@UTFtest{}
\edef\SB@UTFtest#1{%
\noexpand\SB@UTFtester#1%
\string\UTFviii@zero@octets%
\noexpand\SB@UTFtester%
}
\begingroup
\escapechar\m@ne
\xdef\SB@two{\string\two}
\xdef\SB@three{\string\three}
\xdef\SB@four{\string\four}
\xdef\SB@temp{\string\@octets}
\endgroup
\edef\SB@temp{##1\string\UTFviii@##2\SB@temp##3}
\expandafter\def\expandafter\SB@UTFtester\SB@temp\SB@UTFtester{%
\def\SB@temp{#2}%
\ifx\SB@temp\SB@two%
\SB@cnt\tw@%
\else\ifx\SB@temp\SB@three%
\SB@cnt\thr@@%
\else\ifx\SB@temp\SB@four%
\SB@cnt4 %
\else%
\SB@cnt\z@%
\fi\fi\fi%
}
\newcommand\SB@declare[3]{%
\afterassignment\iffalse\let\SB@next= #3\relax\fi%
\expandafter\SB@UTFtest\expandafter{\meaning\SB@next}%
\ifcase\SB@cnt%
\ifcat\noexpand#3\relax%
\SB@addNtest\SB@macrotests#1#2#3%
\else\ifcat\noexpand#3.%
\SB@addDtest\SB@othertests#1#2#3%
\else\ifcat\noexpand#3A%
\SB@addDtest\SB@lettertests#1#2#3%
\else%
\SB@addDtest\relax0#2#3%
\fi\fi\fi%
\or%
\SB@addNtest\SB@macrotests#1#2#3%
\else%
\SB@addMtest\SB@multitests#1#2{#3}%
\fi%
}
\newcommand\DeclareLyricChar{\SB@declare\SB@testtrue0}
\newcommand\DeclareNonLyric{%
\SB@declare\SB@testfalse\SB@testfalse%
}
\newcommand\DeclareNoHyphen{%
\SB@declare\SB@testfalse\SB@testtrue%
}
\newcommand\SB@lettertests{}
\newcommand\SB@macrotests{}
\newcommand\SB@multitests{}
\newcommand\SB@othertests{}
\newcommand\SB@hyphtests{}
\newcommand\SB@addtest[2]{%
\expandafter\gdef\expandafter#1\expandafter{#1#2}%
}
\newcommand\SB@addDtest[4]{%
\ifx0#2\else\SB@addtest#1{\ifx\SB@next#4#2\fi}\fi%
\ifx0#3\else\SB@addtest\SB@hyphtests{\ifx\SB@next#4#3\fi}\fi%
}
\newcommand\SB@addNtest[4]{%
\ifx0#2\else%
\SB@addtest#1{%
\edef\SB@temp{\string#4}\ifx\SB@temp\SB@nextname#2\fi%
}%
\fi%
\ifx0#3\else%
\SB@addtest\SB@hyphtests{%
\edef\SB@temp{\string#4}\ifx\SB@temp\SB@nextname#3\fi%
}%
\fi%
}
\newcommand\SB@addMtest[4]{%
\ifx0#2\else%
\SB@addtest#1{\def\SB@temp{#4}\ifx\SB@next\SB@temp#2\fi}%
\fi%
\ifx0#3\else\SB@addtest\SB@hyphtests{%
\def\SB@temp{#4}\ifx\SB@next\SB@temp#3\fi}%
\fi%
}
\DeclareLyricChar\`
\DeclareLyricChar\'
\DeclareLyricChar\^
\DeclareLyricChar\"
\DeclareLyricChar\~
\DeclareLyricChar\=
\DeclareLyricChar\.
\DeclareLyricChar\u
\DeclareLyricChar\v
\DeclareLyricChar\H
\DeclareLyricChar\t
\DeclareLyricChar\c
\DeclareLyricChar\d
\DeclareLyricChar\b
\DeclareLyricChar\oe
\DeclareLyricChar\OE
\DeclareLyricChar\ae
\DeclareLyricChar\AE
\DeclareLyricChar\aa
\DeclareLyricChar\AA
\DeclareLyricChar\o
\DeclareLyricChar\O
\DeclareLyricChar\l
\DeclareLyricChar\L
\DeclareLyricChar\ss
\DeclareLyricChar\i
\DeclareLyricChar\j
\DeclareLyricChar\/
\DeclareLyricChar\-
\DeclareLyricChar\discretionary
\DeclareNoHyphen\par
\newcommand\SB@bracket{}
\newcommand\SB@chord{\SB@begincname\SB@@chord}
\newcommand\SB@begincname{}
{\catcode`\^^M\active
\gdef\SB@begincname{%
\begingroup%
\catcode`##\active\catcode`&\active%
\catcode`:12\relax%
\catcode`\^^M\active\SB@outer\def^^M{}%
\SB@outer\def\[{}%
\chordlocals%
}
}
\newcommand\SB@endcname{}
\let\SB@endcname\endgroup
\newcommand\SB@nbsp{}
\def\SB@nbsp{\nobreakspace{}}
\newif\ifSB@firstchord\SB@firstchordtrue
\newcommand*\SB@@chord{}
\def\SB@@chord#1]{%
\SB@endcname%
\ifSB@firstchord%
\setbox\SB@lyricbox\hbox{\kern\SB@tabindent}%
\global\SB@tabindent\z@%
\SB@lyric{}%
\SB@numhyps\z@%
\SB@spcinit%
\setbox\SB@chordbox\box\voidb@x%
\fi%
\SB@setchord{#1}%
\SB@firstchordfalse%
\let\SB@dothis\SB@chstart%
\SB@chscan%
}
\newcommand\SB@spcinit{}
\newcommand\MultiwordChords{%
\def\SB@spcinit{%
\let\SB@chdone\SB@chlyrdone%
\def\SB@chimpspace{\let\SB@donext\SB@chdone}%
\def\SB@chexpspace{\let\SB@donext\SB@chdone}%
\let\SB@chespace\SB@chendspace%
}%
}
\newcommand\SB@chscan{%
\let\SB@nextname\relax%
\futurelet\SB@next\SB@chmain%
}
\newcommand\SB@chmain{\SB@dothis\SB@donext}
\newcommand\SB@chstart{%
\ifx\SB@next\[%
\let\SB@donext\relax%
\else\ifx\SB@next\SB@activehat%
\let\SB@donext\relax%
\else\ifx\SB@next\ch%
\let\SB@donext\relax%
\else\ifx\SB@next\mch%
\let\SB@donext\relax%
\else\ifx\SB@next`%
\let\SB@donext\SB@chstep%
\else\ifx\SB@next'%
\let\SB@donext\SB@chstep%
\else\ifx\SB@next"%
\let\SB@donext\SB@chstep%
\else%
\the\SB@lyric%
\SB@lyric{}%
\SB@firstchordtrue%
\let\SB@dothis\SB@chnorm%
\SB@chnorm%
\fi\fi\fi\fi\fi\fi\fi%
}
\newcommand\SB@chnorm{%
\ifcat\noexpand\SB@next A%
\SB@testtrue\SB@lettertests%
\ifSB@test%
\SB@chespace\let\SB@donext\SB@chstep%
\else%
\let\SB@donext\SB@chdone%
\fi%
\else%
\SB@chtrymacro%
\fi%
}
\newcommand\SB@chtrymacro{%
\ifcat\noexpand\SB@next\relax%
\SB@chmacro%
\else%
\SB@chother%
\fi%
}
\newcommand\SB@chother{%
\ifcat\noexpand\SB@next\noexpand\@sptoken%
\SB@chexpspace%
\else\ifcat\noexpand\SB@next\noexpand\bgroup%
\SB@chespace\let\SB@donext\SB@chbgroup%
\else\ifcat\noexpand\SB@next\noexpand\egroup%
\SB@chespace\let\SB@donext\SB@chegroup%
\else\ifx\SB@next-%
\SB@numhyps\@ne\relax%
\SB@lyricnohyp\expandafter{\the\SB@lyric}%
\let\SB@dothis\SB@chhyph%
\SB@chespace\let\SB@donext\SB@chstep%
\else\ifcat\noexpand\SB@next.%
\SB@testtrue\SB@othertests%
\ifSB@test%
\SB@chespace\let\SB@donext\SB@chstep%
\else%
\let\SB@donext\SB@chdone%
\fi%
\else%
\SB@chespace\let\SB@donext\SB@chstep%
\fi\fi\fi\fi\fi%
}
\newcommand\SB@chmacro{%
\SB@testfalse%
\expandafter\SB@outertest\expandafter{\meaning\SB@next}%
\ifSB@test%
\let\SB@donext\SB@chdone%
\else%
\let\SB@donext\SB@chgetname%
\fi%
}
\newcommand\SB@chgetname[1]{%
\edef\SB@nextname{\string#1}%
\SB@@chmacro\SB@donext#1%
}
\newcommand\SB@@chmacro{%
\ifx\SB@next\SB@activehat%
\let\SB@donext\SB@chdone%
\else\ifx\SB@next\SB@par%
\let\SB@donext\SB@chdone%
\else\ifx\SB@next\measurebar%
\SB@chmbar%
\else\ifx\SB@next\mbar%
\SB@chmbar%
\else\ifx\SB@next\ch%
\SB@chespace\let\SB@donext\SB@chlig%
\else\ifx\SB@next\mch%
\SB@chespace\let\SB@donext\SB@mchlig%
\else\ifx\SB@next\ %
\SB@chimpspace%
\else\ifx\SB@next\SB@nbsp%
\SB@chimpspace%
\else%
\expandafter\SB@UTFtest\expandafter{\meaning\SB@next}%
\ifcase\SB@cnt\SB@chothermac%
\or\or\SB@chespace\let\SB@donext\SB@chsteptwo%
\or\SB@chespace\let\SB@donext\SB@chstepthree%
\or\SB@chespace\let\SB@donext\SB@chstepfour\fi%
\fi\fi\fi\fi\fi\fi\fi\fi%
}
\newcommand\SB@chothermac{%
\SB@testfalse%
\afterassignment\iffalse%
\SB@cnt\expandafter`\SB@nextname x\fi%
\ifnum\the\catcode\SB@cnt=\z@\else\SB@testtrue\fi%
\SB@macrotests%
\ifSB@test%
\SB@chespace\let\SB@donext\SB@chstep%
\else%
\let\SB@donext\SB@chdone%
\fi%
}
\newcommand\SB@chstep[1]{%
\SB@lyric\expandafter{\the\SB@lyric#1}%
\SB@chscan%
}
\newcommand\SB@chsteptwo[2]{\SB@chmulti{#1#2}}
\newcommand\SB@chstepthree[3]{\SB@chmulti{#1#2#3}}
\newcommand\SB@chstepfour[4]{\SB@chmulti{#1#2#3#4}}
\newcommand\SB@chmulti[1]{%
\def\SB@next{#1}%
\let\SB@nextname\relax%
\SB@testtrue\SB@multitests%
\ifSB@test%
\SB@lyric\expandafter{\the\SB@lyric#1}%
\expandafter\SB@chscan%
\else%
\expandafter\SB@chmstop%
\fi%
}
\newcommand\SB@chmstop{\expandafter\SB@chdone\SB@next}
\newcommand\SB@chhyph{%
\ifx\SB@next-%
\advance\SB@numhyps\@ne\relax%
\let\SB@donext\SB@chstep%
\else%
\let\SB@donext\SB@chdone%
\fi%
}
\newcommand\SB@chimpspace{\let\SB@donext\SB@chdone}
\newcommand\SB@chexpspace{\let\SB@donext\SB@chdone}
\newcommand\SB@chespace{}
\newcommand\SB@chendspace{%
\let\SB@chdone\SB@chlyrdone%
\def\SB@chexpspace{\SB@chbspace\SB@chexpspace}%
\def\SB@chimpspace{\SB@chbspace\SB@chimpspace}%
\def\SB@chespace{}%
}
\newcommand\SB@chbspace{%
\setbox\SB@lyricbox\hbox{%
\unhbox\SB@lyricbox%
\the\SB@lyric%
}%
\SB@lyric{}%
\ifdim\wd\SB@lyricbox<\wd\SB@chordbox%
\let\SB@chbstok= \SB@next%
\def\SB@chexpspace{\let\SB@donext\SB@chgetspace}%
\def\SB@chimpspace{\let\SB@donext\SB@chstep}%
\let\SB@chespace\SB@chendspace%
\let\SB@chdone\SB@chspcdone%
\else%
\def\SB@chimpspace{\let\SB@donext\SB@chdone}%
\def\SB@chexpspace{\let\SB@donext\SB@chdone}%
\fi%
}
\newcommand\SB@chgetspace{%
\SB@appendsp\SB@lyric%
\let\SB@nextname\relax%
\afterassignment\SB@chscan%
\let\SB@next= }
\newcommand\SB@chmbar{%
\ifmeasures%
\let\SB@donext\SB@chdone%
\else%
\SB@chespace\let\SB@donext\SB@chstep%
\fi%
}
\newcommand\SB@chbgroup[1]{%
\SB@lyric\expandafter{\the\SB@lyric{#1}}%
\SB@chscan%
}
\newcommand\SB@chegroup{%
\let\SB@nextname\relax%
\afterassignment\SB@chegrpscan%
\let\SB@next= }
\newcommand\SB@chegrpscan{%
\futurelet\SB@next\SB@chegrpmacro%
}
\newcommand\SB@chegrpmacro{%
\ifcat\noexpand\SB@next\relax%
\expandafter\SB@chegrpouter%
\else%
\expandafter\SB@chegrpdone%
\fi%
}
\newcommand\SB@chegrpouter{%
\SB@testfalse%
\expandafter\SB@outertest\expandafter{\meaning\SB@next}%
\ifSB@test%
\expandafter\SB@chegrpdone%
\else%
\expandafter\SB@chegrpname%
\fi%
}
\newcommand\SB@chegrpname[1]{%
\edef\SB@nextname{\string#1}%
\SB@chegrpdone#1%
}
\newcommand\SB@chegrpdone{\SB@chdone\egroup}
\newcommand\SB@chlig[5]{%
\gdef\SB@ligpre{{#3}}%
\gdef\SB@ligpost{\[#2]{#4}}%
\gdef\SB@ligfull{\[\SB@noreplay{\hphantom{{\lyricfont#3}}}#2]{#5}}%
\SB@chdone%
}
\newcommand\SB@mchlig[5]{%
\SB@lyric\expandafter{\the\SB@lyric#3}%
\let\SB@next\measurebar%
\edef\SB@nextname{\string\measurebar}%
\gdef\SB@ligpost{\measurebar\[#2]{#4}}%
\gdef\SB@ligfull{\measurebar\[#2]{#4}}%
\SB@chdone%
}
\newcommand\SB@chlyrdone{%
\setbox\SB@lyricbox\hbox{%
\unhbox\SB@lyricbox%
\ifnum\SB@numhyps=\@ne%
\the\SB@lyricnohyp%
\else%
\the\SB@lyric%
\fi%
}%
\SB@emitchord%
}
\newcommand\SB@chspcdone{%
\let\SB@nextname\relax%
\let\SB@next= \SB@chbstok%
\expandafter\SB@emitchord\the\SB@lyric%
}
\newcommand\SB@chdone{}
\let\SB@chdone\SB@chlyrdone
\newcommand\SB@ligpre{}
\newcommand\SB@ligpost{}
\newcommand\SB@ligfull{}
\newcommand\SB@clearlig{%
\gdef\SB@ligpre{}%
\gdef\SB@ligpost{}%
\gdef\SB@ligfull{}%
}
\newcommand\SB@emitchord{%
\ifSB@inverse\else\ifSB@inchorus\else\SB@errchord\fi\fi%
\SB@testfalse%
\ifcat\noexpand\SB@next\noexpand\@sptoken\SB@testtrue\fi%
\ifcat\noexpand\SB@next.\SB@testtrue\fi%
\ifx\SB@next\SB@par\SB@testtrue\fi%
\ifx\SB@next\egroup\SB@testtrue\fi%
\ifx\SB@next\endgroup\SB@testtrue\fi%
\SB@hyphtests%
\ifSB@test\SB@wordendstrue\else\SB@wordendsfalse\fi%
\SB@dimen\wd\SB@chordbox%
\ifvmode\leavevmode\fi%
\SB@brokenwordfalse%
\ifdim\wd\SB@lyricbox>\z@%
\ifdim\SB@dimen>\wd\SB@lyricbox%
\ifSB@wordends\else\SB@brokenwordtrue\fi%
\fi%
\else%
\SB@skip\lastskip%
\unskip\penalty200\hskip\SB@skip%
\fi%
\ifnum\SB@numhyps>\z@%
\ifnum\SB@numhyps>\@ne%
\SB@brokenwordfalse%
\else%
\SB@brokenwordtrue%
\fi%
\fi%
\SB@testfalse%
\ifnolyrics\ifdim\wd\SB@lyricbox=\z@\SB@testtrue\fi\fi%
\ifSB@test%
\unhbox\SB@chordbox%
\gdef\SB@temp{\expandafter\SB@clearlig\SB@ligfull}%
\else%
\vbox{\baselineskip\f@size\p@\kern2\p@%
\ifSB@brokenword%
\global\setbox\SB@lyricbox\hbox{%
\unhbox\SB@lyricbox%
\SB@ligpre%
}%
\SB@maxmin\SB@dimen<{\wd\SB@lyricbox}%
\advance\SB@dimen.5em%
\hbox to\SB@dimen{\unhbox\SB@chordbox\hfil}%
\kern-2\p@%
\hbox to\SB@dimen{%
\unhcopy\SB@lyricbox\hfil\char\hyphenchar\font\hfil%
}%
\global\SB@cnt\@m%
\gdef\SB@temp{\expandafter\SB@clearlig\SB@ligpost}%
\else%
\hbox{\unhbox\SB@chordbox\hfil}%
\kern-2\p@%
\hbox{%
\unhcopy\SB@lyricbox%
\global\SB@cnt\spacefactor%
\hfil%
}%
\gdef\SB@temp{\expandafter\SB@clearlig\SB@ligfull}%
\fi%
}%
\ifSB@wordends%
\ifdim\wd\SB@lyricbox>\z@\else\nobreak\fi%
\else%
\penalty%
\ifnum\SB@numhyps>\z@\exhyphenpenalty%
\else\ifSB@brokenword\hyphenpenalty%
\else\@M\fi\fi%
\spacefactor\SB@cnt%
\fi%
\fi%
\SB@temp%
}
\newcommand\SB@accidental[1]{{%
\/%
\m@th#1%
\SB@dimen-\fontdimen\@ne\font%
\advance\SB@dimen.088142\p@%
\ifdim\SB@dimen<\z@%
\kern\f@size\SB@dimen%
\fi%
}}
\newcommand\sharpsymbol{\ensuremath{^\#}}
\newcommand\flatsymbol{\raise.5ex\hbox{{\SB@flatsize$\flat$}}}
\newcommand\shrp{\SB@accidental\sharpsymbol}
\newcommand\flt{\SB@accidental\flatsymbol}
\newcommand\DeclareFlatSize[2]{%
\expandafter\xdef\csname SB@flatsize@#1\endcsname{#2}%
}
\DeclareFlatSize\@vpt\@vpt
\DeclareFlatSize\@vipt\@vipt
\DeclareFlatSize\@viipt\@vipt
\DeclareFlatSize\@viiipt\@viipt
\DeclareFlatSize\@ixpt\@viiipt
\DeclareFlatSize\@xpt\@ixpt
\DeclareFlatSize\@xipt\@xpt
\DeclareFlatSize\@xiipt\@xipt
\DeclareFlatSize\@xivpt\@xiipt
\DeclareFlatSize\@xviipt\@xivpt
\DeclareFlatSize\@xxpt\@xviipt
\DeclareFlatSize\@xxvpt\@xxpt
\newcommand\SB@flatsize{%
\@ifundefined{SB@flatsize@\f@size}{}{%
\expandafter\fontsize%
\csname SB@flatsize@\f@size\endcsname\f@baselineskip%
\selectfont%
}%
}
\newcommand\ch{\SB@ch}
\newcommand\SB@ch{}
\newcommand\SB@ch@on{\SB@begincname\SB@@ch}
\newcommand*\SB@@ch[1]{\SB@endcname\SB@@@ch{#1}}
\newcommand*\SB@@@ch[4]{\[\SB@noreplay{\hphantom{#2}}#1]#4}
\newcommand*\SB@ch@off[4]{#4}
\newcommand\mch{\SB@mch}
\newcommand\SB@mch{}
\newcommand*\SB@mch@m[4]{#2\measurebar#3}
\newcommand\SB@mch@on{\SB@begincname\SB@@mch}
\newcommand*\SB@@mch[1]{\SB@endcname\SB@@@mch{#1}}
\newcommand*\SB@@@mch[4]{#2\measurebar\[#1]#3}
\newcommand\SB@activehat{%
\ifmmode^\else\expandafter\SB@rechord\fi%
}
\newcommand\SB@loadactives{}
{
\catcode`&\active
\catcode`#\active
\catcode`|\active
\catcode`^\active
\global\let&\flt
\global\let#\shrp
\global\let|\measurebar
\global\let^\SB@activehat
\gdef\SB@loadactives{%
\catcode`^\ifchorded\active\else9 \fi%
\catcode`|\ifmeasures\active\else9 \fi%
\def\[{\SB@bracket}%
}
}
\newif\ifSB@trackch
\newtoks\SB@cr@
\newtoks\SB@ctail
\newcommand\SB@creg{}
\newcommand\newchords[1]{%
\@ifundefined{SB@cr@#1}{%
\expandafter\newtoks\csname SB@cr@#1\endcsname%
\global\csname SB@cr@#1\endcsname{\\}%
}{\SB@errdup{#1}}%
}
\newcommand\memorize{%
\@ifnextchar[\SB@memorize{\SB@memorize[]}%
}
\newcommand\SB@memorize{}
\def\SB@memorize[#1]{%
\@ifundefined{SB@cr@#1}{\SB@errreg{#1}}{%
\SB@trackchtrue%
\global\expandafter\let\expandafter\SB@creg%
\csname SB@cr@#1\endcsname%
\global\SB@creg{\\}%
}%
}
\newcommand\replay{\@ifnextchar[\SB@replay\SB@@replay}
\newcommand\SB@replay{}
\def\SB@replay[#1]{%
\@ifundefined{SB@cr@#1}{\SB@errreg{#1}}{%
\SB@trackchfalse%
\global\expandafter\let\expandafter\SB@creg%
\csname SB@cr@#1\endcsname%
\global\SB@ctail\SB@creg%
}%
}
\newcommand\SB@@replay{%
\SB@trackchfalse%
\global\SB@ctail\SB@creg%
}
\newcommand\SB@rechord{}
\newcommand\SB@@rechord{%
\SB@ifempty\SB@ctail{%
\SB@errreplay%
\SB@toks{}%
\let\SB@donext\@gobble%
}{%
\SB@lop\SB@ctail\SB@toks%
\let\SB@donext\SB@chord%
\let\SB@noreplay\@gobble%
}%
\expandafter\SB@donext\the\SB@toks]%
}
\newif\ifSB@nohat
\newcommand\SB@noreplay{}
\let\SB@noreplay\@firstofone
\newlength\SB@fretwidth
\setlength\SB@fretwidth{6\p@}
\newcommand\SB@fretnum[1]{{%
\sffamily\fontsize\@xpt\@xpt\selectfont#1%
}}
\newcommand\SB@onfret[1]{%
\rlap{\hbox to\SB@fretwidth{\hfil\vrule\@height6\p@\hfil}}%
\hbox to\SB@fretwidth{\hfil#1\hfil}%
}
\newcommand\SB@atopfret[1]{%
\hbox to\SB@fretwidth{\hfil#1\hfil}%
}
\newcommand\SB@fretbar{%
\nointerlineskip%
\hbox to\SB@dimen{%
\advance\SB@dimen-\SB@fretwidth%
\advance\SB@dimen.4\p@%
\hfil%
\vrule\@width\SB@dimen\@height.4\p@\@depth\z@%
\hfil%
}%
\nointerlineskip%
}
\newcommand\SB@topempty{\SB@atopfret\relax}
\newcommand\SB@topX{\SB@atopfret{%
\hbox{%
\kern-.2\p@%
\fontencoding{OMS}\fontfamily{cmsy}%
\fontseries{m}\fontshape{n}%
\fontsize\@viipt\@viipt\selectfont\char\tw@%
\kern-.2\p@%
}%
}}
\newcommand\SB@topO{\SB@atopfret{%
\vrule\@width\z@\@height4.3333\p@\@depth.8333\p@%
\lower.74\p@\hbox{%
\fontencoding{OMS}\fontfamily{cmsy}%
\fontseries{m}\fontshape{n}%
\fontsize\@xpt\@xpt\selectfont\char14%
}%
}}
\newcommand\SB@fretempty{\SB@onfret\relax}
\newcommand\SB@frethit{\SB@onfret{%
\hbox{%
\fontencoding{OMS}\fontfamily{cmsy}%
\fontseries{m}\fontshape{n}%
\fontsize\@xiipt\@xiipt\selectfont\char15%
}%
}}
\newcommand\SB@finger[1]{%
\SB@atopfret{\sffamily\fontsize\@vipt\@vipt\selectfont#1}%
}
\newif\ifSB@gettabind\SB@gettabindfalse
\newdimen\SB@tabindent
\newcommand\SB@targfret{}
\newcommand\SB@targstr{}
\newcommand\SB@targfing{}
\newcommand\SB@csify[2]{%
\SB@toks{}%
\SB@cnt\z@%
\SB@@csify#2\SB@@csify%
\edef#1{\the\SB@toks}%
}
\newcommand\SB@@csify[1]{%
\ifx#1\SB@@csify\else%
\advance\SB@cnt\@ne%
\SB@toks\expandafter{\the\SB@toks\csname#1\endcsname}%
\expandafter\SB@@csify%
\fi%
}
\newcommand\SB@gttop{%
\let\X\SB@topX\let\0\SB@topO\let\O\0\let\1\SB@topempty%
\let\2\1\let\3\1\let\4\1\let\5\1%
\let\6\1\let\7\1\let\8\1\let\9\1%
}
\newcommand\SB@gtinit{%
\let\X\SB@fretempty\let\0\X\let\O\X\let\1\SB@frethit%
\let\2\X\let\3\X\let\4\X\let\5\X%
\let\6\X\let\7\X\let\8\X\let\9\X%
}
\newcommand\SB@gtinc{%
\let\9\8\let\8\7\let\7\6\let\6\5\let\5\4%
\let\4\3\let\3\2\let\2\1\let\1\0%
}
\newcommand\SB@gtset[2]{%
\let\X#1\let\0\X\let\O\X%
\def\1{#21}\def\2{#22}\def\3{#23}%
\def\4{#24}\def\5{#25}\def\6{#26}%
\def\7{#27}\def\8{#28}\def\9{#29}%
}
\newcommand\SB@gtmax[1]{\ifnum\SB@cnt<#1\SB@cnt#1\fi}
\newcommand\gtab{\SB@begincname\SB@gtab}
\newcommand*\SB@gtab[1]{%
\SB@endcname%
\begingroup%
\catcode`:12\relax%
\SB@@gtab{#1}%
}
\newcommand*\SB@@gtab[2]{%
\endgroup%
\let\SB@targfret\@empty%
\let\SB@targstr\@empty%
\let\SB@targfing\@empty%
\SB@tabargs#2:::\SB@tabargs%
\ifx\SB@targstr\@empty%
\def\SB@targstr{\0\0\0\0\0\0}%
\fi%
\ifvmode\leavevmode\fi%
\vbox{%
\normalfont\normalsize%
\setbox\SB@box\hbox{%
\thinspace{\printchord{#1\strut}}\thinspace%
}%
\setbox\SB@boxii\hbox{\SB@fretnum{\SB@targfret}}%
\setbox\SB@boxiii\hbox{{\SB@gttop\SB@targstr}}%
\hsize\wd\SB@box%
\ifSB@gettabind%
\global\SB@tabindent\wd\SB@boxii%
\global\advance\SB@tabindent.5\SB@fretwidth%
\global\advance\SB@tabindent-.5\p@%
\fi%
\SB@dimen\wd\SB@boxii%
\advance\SB@dimen\wd\SB@boxiii%
\ifdim\hsize<\SB@dimen%
\hsize\SB@dimen%
\else\ifSB@gettabind%
\SB@dimenii\hsize%
\advance\SB@dimenii-\SB@dimen%
\divide\SB@dimenii\tw@%
\global\advance\SB@tabindent\SB@dimenii%
\fi\fi%
\hbox to\hsize{\hfil\unhbox\SB@box\hfil}%
\kern-\p@\nointerlineskip%
\hbox to\hsize{%
\hfil%
\vtop{\kern\p@\kern2\p@\box\SB@boxii}%
\vtop{%
\SB@dimen\wd\SB@boxiii%
\box\SB@boxiii%
\SB@cnt\minfrets%
\SB@gtset\relax\SB@gtmax\SB@targstr%
\SB@gtinit%
\loop%
\SB@fretbar\hbox{\SB@targstr}%
\advance\SB@cnt\m@ne%
\ifnum\SB@cnt>\z@\SB@gtinc\repeat%
\SB@fretbar%
\ifx\SB@targsfing\@empty\else%
\kern1.5\p@%
\SB@gtset\SB@topempty\SB@finger%
\hbox{\SB@targfing}%
\fi%
}%
\hfil%
}%
\kern3\p@%
}%
\SB@gettabindfalse%
}
\newcommand\SB@ctoken{} \def\SB@ctoken{:}
\newcommand\SB@tabargs{}
\def\SB@tabargs#1:#2:#3:#4\SB@tabargs{%
\def\SB@temp{#4}%
\ifx\SB@temp\@empty%
\SB@csify\SB@targstr{#1}%
\else\ifx\SB@temp\SB@ctoken%
\SB@csify\SB@targstr{#1}%
\ifnum\SB@cnt>\@ne%
\SB@cntii\SB@cnt%
\SB@csify\SB@targfing{#2}%
\SB@cnt\SB@cntii%
\else%
\def\SB@targfret{#1}%
\SB@csify\SB@targstr{#2}%
\fi%
\else%
\def\SB@targfret{#1}%
\SB@csify\SB@targfing{#3}%
\SB@csify\SB@targstr{#2}%
\fi\fi%
}
\newcommand\songchapter{%
\let\SB@temp\@seccntformat%
\def\@seccntformat##1{}%
\@startsection{chapter}{0}{\z@}%
{3.5ex\@plus1ex\@minus.2ex}%
{.4ex\let\@seccntformat\SB@temp}%
{\sffamily\bfseries\LARGE\centering}%
}
\newcommand\songsection{%
\let\SB@temp\@seccntformat%
\def\@seccntformat##1{}%
\@startsection{section}{1}{\z@}%
{3.5ex\@plus1ex\@minus.2ex}%
{.4ex\let\@seccntformat\SB@temp}%
{\sffamily\bfseries\LARGE\centering}%
}
\newenvironment{songs}[1]{%
\ifSB@songsenv\SB@errnse\fi%
\gdef\SB@indexlist{#1}%
\SB@chkidxlst%
\stepcounter{SB@songsnum}%
\setcounter{songnum}{1}%
\let\SB@sgroup\@empty%
\ifinner\else\ifdim\pagetotal>\z@%
\null\nointerlineskip%
\fi\fi%
\songcolumns\SB@numcols%
\SB@songsenvtrue%
}{%
\commitsongs%
\global\let\SB@indexlist\@empty%
\ifinner\else\clearpage\fi%
\SB@songsenvfalse%
}
\newcounter{SB@songsnum}
\newcommand\SB@indexlist{}
\newcommand\SB@newindex[4]{%
\expandafter\newcommand\csname SB@idxfilename@#3\endcsname{#4}%
\expandafter\newcommand\csname SB@idxsel@#3\endcsname[3]{###1}%
\expandafter\newcommand\csname SB@idxref@#3\endcsname{\thesongnum}%
\AtBeginDocument{\SB@openindex{#2}{#3}{#4}}%
}
\newcommand\SB@openindex[3]{%
\ifSB@genindexes\begingroup%
\newwrite\SB@theindex%
\immediate\openout\SB@theindex=#3.sxd%
#1%
\global\expandafter\let\csname SB@index@#2\endcsname\SB@theindex%
\endgroup\fi%
}
\newcommand\newindex{\SB@newindex1\SB@titleinit}
\@onlypreamble\newindex
\newcommand\SB@titleinit{%
\immediate\write\SB@theindex{TITLE INDEX DATA FILE}%
}
\newcommand\newscripindex{\SB@newindex2\SB@scripinit}
\@onlypreamble\newscripindex
\newcommand\SB@scripinit{%
\immediate\write\SB@theindex{SCRIPTURE INDEX DATA FILE}%
}
\newcommand\newauthorindex{\SB@newindex3\SB@authinit}
\@onlypreamble\newauthorindex
\newcommand\SB@authinit{%
\immediate\write\SB@theindex{AUTHOR INDEX DATA FILE}%
}
\newcommand\indexsongsas[1]{%
\@ifundefined{SB@idxref@#1}%
{\SB@errnoidx{#1}\@gobble}%
{\expandafter\renewcommand\csname SB@idxref@#1\endcsname}%
}
\newcommand\SB@percent{}
{\catcode`\%=12\gdef\SB@percent{%}}
\newcommand\SB@idxcmd[2]{%
\expandafter\gdef\expandafter#1\expandafter{%
#1\immediate\write\SB@theindex{\SB@percent#2}%
}%
}
\newcommand\authsepword[1]{\SB@idxcmd\SB@authinit{sep #1}}
\@onlypreamble\authsepword
\newcommand\authbyword[1]{\SB@idxcmd\SB@authinit{after #1}}
\@onlypreamble\authbyword
\newcommand\authignoreword[1]{\SB@idxcmd\SB@authinit{ignore #1}}
\@onlypreamble\authignoreword
\newcommand\titleprefixword[1]{\SB@idxcmd\SB@titleinit{prefix #1}}
\@onlypreamble\titleprefixword
\newbox\SB@songwrites
\newcommand\SB@addtoindex[2]{%
\global\setbox\SB@songwrites\vbox{%
\unvbox\SB@songwrites%
\ifSB@genindexes%
\protected@write{\csname SB@index@#1\endcsname}{}{#2}%
\protected@write{\csname SB@index@#1\endcsname}{}%
{\csname SB@idxref@#1\endcsname}%
\protected@write{\csname SB@index@#1\endcsname}{}{%
song\theSB@songsnum-\thesongnum.%
\ifnum\c@section=\z@1\else2\fi}%
\fi%
}%
}
\newcommand\SB@addtoindexes[3]{%
\@for\SB@temp:=\SB@indexlist\do{%
\SB@addtoindex\SB@temp%
{\csname SB@idxsel@\SB@temp\endcsname{#1}{#2}{#3}}%
}%
}
\newcommand\SB@addtotitles[1]{%
\@for\SB@temp:=\SB@indexlist\do{%
\csname SB@idxsel@\SB@temp\endcsname%
{\SB@addtoindex\SB@temp{#1}}{}{}%
}%
}
\newcommand\SB@chkidxlst{%
\let\SB@temp\SB@indexlist%
\let\SB@indexlist\@empty%
\@for\SB@tempii:=\SB@temp\do{%
\@ifundefined{SB@idxsel@\SB@tempii}{\SB@errnoidx\SB@tempii}{%
\ifx\SB@indexlist\@empty%
\SB@toks\expandafter{\SB@tempii}%
\else%
\SB@toks\expandafter\expandafter\expandafter{%
\expandafter\SB@indexlist\expandafter,\SB@tempii}%
\fi%
\edef\SB@indexlist{\the\SB@toks}%
}%
}%
}
\newcommand\indexentry{\@ifnextchar[{\SB@idxentry*}{\SB@@idxentry*}}
\newcommand\SB@idxentry{}
\def\SB@idxentry#1[#2]#3{{%
\def\SB@indexlist{#2}%
\SB@chkidxlst%
\SB@addtoindexes{#1#3}{#3}{#3}%
}}
\newcommand\SB@@idxentry[2]{\SB@addtotitles{#1#2}}
\newcommand\indextitleentry{%
\@ifnextchar[{\SB@idxentry{}}{\SB@@idxentry{}}%
}
\newbox\SB@idxtitlebox
\newcommand\SB@idxlineskip[1]{%
\vskip#1\p@\@plus#1\p@\@minus#1\p@%
}
\newcommand\SB@ellipspread[2]{%
\begingroup%
\SB@dimen\z@%
\def\SB@temp{#1}%
\SB@toks{#2}%
\setbox\SB@box\hbox{{%
\SB@temp%
\leaders\hbox to.5em{\hss.\hss}\hskip2em\@plus1fil%
{\the\SB@toks}%
}}%
\ifdim\wd\SB@box>\hsize%
\SB@balancerows%
\else%
\hbox to\hsize{\unhbox\SB@box}\par%
\fi%
\endgroup%
}
\newcommand\SB@balancerows{%
\edef\SB@tempii{\the\SB@toks}%
\setbox\SB@box\vbox{%
\SB@toks\expandafter{\expandafter\\\the\SB@toks\\}%
\SB@lop\SB@toks\SB@toks%
\settowidth\SB@dimen{\the\SB@toks}%
\advance\SB@dimen-.5em%
\leftskip.5cm%
{\hbadness\@M\hfuzz\maxdimen%
\hskip-.5cm\relax\SB@temp\unskip\nobreak%
\hskip\SB@dimen\nobreak%
\rightskip2em\@plus1fil\par}%
\setbox\SB@box\lastbox%
\setbox\SB@box\hbox{%
\unhbox\SB@box%
\unskip\unskip\unpenalty%
\unpenalty\unskip\unpenalty%
}%
\expandafter%
}%
\expandafter\SB@dimenii\the\wd\SB@box\relax%
\SB@dimen\hsize%
\advance\SB@dimen-.5cm%
\setbox\SB@box\vbox{%
\SB@multiline{\hbadness\@M\hfuzz\maxdimen}%
}%
\SB@dimeniii.5\SB@dimen%
\SB@dimeniv\SB@dimeniii%
\loop%
\SB@dimeniv.5\SB@dimeniv%
\setbox\SB@boxii\vbox{%
\SB@dimen\SB@dimeniii%
\SB@multiline{\hbadness\@M\hfuzz\maxdimen}%
}%
\ifnum\SB@cnt<\@M%
\ifdim\ht\SB@boxii>\ht\SB@box%
\advance\SB@dimeniii\SB@dimeniv%
\else%
\SB@dimen\SB@dimeniii%
\advance\SB@dimeniii-\SB@dimeniv%
\fi%
\else%
\advance\SB@dimeniii\SB@dimeniv%
\fi%
\ifdim\SB@dimeniv>2\p@\repeat%
\setbox\SB@box\box\voidb@x%
\setbox\SB@boxii\box\voidb@x%
\SB@multiline\relax%
}
\newcommand\SB@multiline[1]{%
\begingroup%
\SB@dimen-\SB@dimen%
\advance\SB@dimen\hsize%
\SB@dimenii-\SB@dimenii%
\advance\SB@dimenii\SB@dimen%
{#1\hskip-.5cm\relax\SB@temp\unskip\nobreak%
\SB@maxmin\SB@dimenii<{1.5em}%
\leftskip.5cm\rightskip2em\@plus1fil%
\interlinepenalty\@M%
\leaders\hbox to.5em{\hss.\hss}\hskip\SB@dimenii\@plus1fill%
\nobreak{\SB@tempii\kern-2em}%
\par\global\SB@cnt\badness}%
\endgroup%
}%
\newcommand\SB@idxitemsep{%
,\kern-2em\penalty-8\hskip2.33em\@minus.11em%
\hskip-\SB@dimen\@plus-1fill%
\vadjust{}\nobreak%
\hskip\SB@dimen\@plus1fill\relax%
}
\newenvironment{idxblock}[1]{}{}
\newcommand\idxentry[2]{}
\newcommand\idxaltentry[2]{}
\newenvironment{SB@lgidx}[1]{}{}
\newenvironment{SB@smidx}[1]{}{}
\newcommand\SB@idxsetup[1]{%
\hsize\SB@colwidth%
\parskip\z@skip\parfillskip\z@skip\parindent\z@%
\baselineskip\f@size\p@\@plus\p@\@minus\p@%
\lineskiplimit\z@\lineskip\p@\@plus\p@\@minus\p@%
\hyphenpenalty\@M\exhyphenpenalty\@M%
}
\newcommand\SB@makeidxcolumn[1]{%
\ifdim\ht\SB@box=\z@%
\hskip\hsize\relax%
\else%
\splittopskip\z@skip\splitmaxdepth\maxdepth%
\vsplit\SB@box to\SB@dimen%
\global\setbox\SB@box\vbox{%
\SB@idxsetup{#1}%
\splitbotmark%
\unvbox\SB@box%
}%
\fi%
}
\newcommand\SB@oneidxpage{}
\newcommand\SB@displayindex[3]{%
\ifsongindexes\begingroup%
\SB@colwidth\hsize%
\advance\SB@colwidth-#1\columnsep%
\advance\SB@colwidth\columnsep%
\divide\SB@colwidth#1%
\setbox\SB@idxtitlebox\vbox{%
\let\SB@temp\songsection%
\ifx\chapter\undefined\else%
\ifx\chapter\relax\else%
\let\SB@temp\songchapter%
\fi%
\fi%
\SB@temp{#2}%
}%
\IfFileExists{\csname SB@idxfilename@#3\endcsname.sbx}{%
\ifx\hyperlink\undefined\let\hyperlink\@secondoftwo\fi%
\ifx\hyperlink\relax\let\hyperlink\@secondoftwo\fi%
\global\setbox\SB@box\vbox{%
\null%
\vfil%
\unvcopy\SB@idxtitlebox%
\vskip.5in\@minus.3in\relax%
\hbox to\hsize{%
\hfil%
\vbox{%
\hsize\SB@colwidth%
\renewenvironment{idxblock}[1]%
{\begin{SB@smidx}{####1}}{\end{SB@smidx}}%
\let\\\SB@idxitemsep%
\input{\csname SB@idxfilename@#3\endcsname.sbx}%
}%
\hfil%
}%
\vskip\z@\@plus2fil\relax%
}%
{\vbadness\@M\vfuzz\maxdimen%
\splitmaxdepth\maxdepth\splittopskip\z@skip%
\global\setbox\SB@boxii\vsplit\SB@box to\textheight}%
\ifvoid\SB@box%
\box\SB@boxii%
\else%
\global\setbox\SB@box\vbox{%
\renewenvironment{idxblock}[1]%
{\begin{SB@lgidx}{####1}}{\end{SB@lgidx}}%
\let\\\SB@idxitemsep%
\SB@idxsetup{#1}%
\input{\csname SB@idxfilename@#3\endcsname.sbx}%
\unskip%
}%
\SB@toks{\SB@makeidxcolumn{#1}}%
\SB@cnt#1\relax%
\loop\ifnum\SB@cnt>\@ne%
\SB@toks\expandafter{\the\SB@toks%
\kern\columnsep\SB@makeidxcolumn{#1}}%
\advance\SB@cnt\m@ne%
\repeat%
\edef\SB@oneidxpage{\the\SB@toks}%
\unvbox\SB@idxtitlebox%
\vskip.2in\relax%
\nointerlineskip%
\null%
\nointerlineskip%
\SB@cnt\vbadness\vbadness\@M%
\SB@dimenii\vfuzz\vfuzz\maxdimen%
\loop%
\SB@dimen\textheight%
\ifinner\else\kern\z@\advance\SB@dimen-\pagetotal\fi%
\global\setbox\SB@boxii\copy\SB@box%
\global\setbox\SB@boxiii\hbox{\SB@oneidxpage}%
\ifdim\ht\SB@box>\z@%
\box\SB@boxiii%
\vfil\break%
\repeat%
\SB@dimenii\ht\SB@boxii%
\divide\SB@dimenii#1\relax%
\SB@maxmin\SB@dimen>\SB@dimenii%
\loop%
\global\setbox\SB@box\copy\SB@boxii%
\global\setbox\SB@boxiii\hbox{\SB@oneidxpage}%
\ifdim\ht\SB@box>\z@%
\advance\SB@dimen\p@%
\repeat%
\box\SB@boxiii%
\global\setbox\SB@boxii\box\voidb@x%
\vbadness\SB@cnt\vfuzz\SB@dimenii%
\fi%
}%
{%
\vbox to\textheight{%
\vfil%
\unvbox\SB@idxtitlebox%
\vskip1em\relax%
\hbox to\hsize{\hfil[Index not yet generated.]\hfil}%
\vskip\z@\@plus2fil\relax%
}%
}%
\clearpage%
\endgroup\fi%
}
\newcommand\showindex[3][0]{%
\@ifundefined{SB@idxsel@#3}{\SB@errnoidx{#3}}{%
\expandafter\let\expandafter\SB@temp\csname SB@idxsel@#3\endcsname%
\SB@cnt#1\relax%
\ifnum\SB@cnt<\@ne\SB@cnt\SB@temp232\relax\fi%
\expandafter\SB@temp%
\expandafter\SB@maketitleindex%
\expandafter\SB@makescripindex%
\expandafter\SB@makeauthorindex%
\expandafter{\the\SB@cnt}%
{#2}{#3}%
}%
}
\newcommand\SB@maketitleindex{%
\renewenvironment{SB@lgidx}[1]{
\hbox{\SB@colorbox\idxbgcolor{\vbox{%
\hbox to\idxheadwidth{{\idxheadfont\relax##1}\hfil}%
}}}%
\nobreak\vskip3\p@\@plus2\p@\@minus2\p@\nointerlineskip%
}{\penalty-50\vskip5\p@\@plus5\p@\@minus4\p@}%
\renewenvironment{SB@smidx}[1]{}{}%
\renewcommand\idxentry[2]{%
\SB@ellipspread{\idxtitlefont\relax\ignorespaces##1\unskip}%
{{\idxrefsfont\relax##2}}%
}%
\renewcommand\idxaltentry[2]{%
\SB@ellipspread{\idxlyricfont\relax\ignorespaces##1\unskip}%
{{\idxrefsfont\relax##2}}%
}%
\SB@displayindex%
}
\newcommand\SB@idxcolhead{}
\newcommand\SB@idxheadsep{{%
\SB@dimen4\p@%
\advance\SB@dimen-\prevdepth%
\SB@maxmin\SB@dimen<\z@%
\SB@dimenii\SB@dimen%
\SB@maxmin\SB@dimenii>\p@%
\vskip\SB@dimen\@plus\p@\@minus\SB@dimenii%
}}
\newcommand\SB@idxcont[1]{%
\hbox to\hsize{{\idxcont{#1}}\hfil}%
\nobreak%
\SB@idxheadsep\nointerlineskip%
}
\newcommand\SB@makescripindex{%
\renewenvironment{SB@lgidx}[1]{%
\gdef\SB@idxcolhead{##1}%
\hbox to\hsize{{\idxbook{##1}}\hfil}%
\nobreak%
\SB@idxheadsep\nointerlineskip%
}{%
\mark{\noexpand\relax}%
\penalty-20\vskip3\p@\@plus3\p@\relax%
}%
\renewenvironment{SB@smidx}[1]
{\begin{SB@lgidx}{##1}}{\end{SB@lgidx}}%
\renewcommand\idxentry[2]{%
\SB@ellipspread{\hskip.25cm\idxscripfont\relax##1}%
{{\idxrefsfont\relax##2}}%
\SB@toks\expandafter{\SB@idxcolhead}%
\mark{\noexpand\SB@idxcont{\the\SB@toks}}%
}%
\renewcommand\idxaltentry[2]{\SB@erridx{a scripture}}%
\SB@displayindex%
}
\newcommand\SB@makeauthorindex{%
\renewenvironment{SB@lgidx}[1]{}{}%
\renewenvironment{SB@smidx}[1]{}{}%
\renewcommand\idxentry[2]{%
\SB@ellipspread{{\idxauthfont\relax\sfcode`.\@m##1}}%
{{\idxrefsfont##2}}%
}%
\renewcommand\idxaltentry[2]{\SB@erridx{an author}}%
\SB@displayindex%
}
\newcommand\SB@Error{\PackageError{songs}}
\newcommand\SB@Warn{\PackageWarning{songs}}
\newcommand\SB@errspos{%
\SB@Error{Illegal \protect\songpos\space argument}{The argume%
nt to \protect\songpos\space must be a number from 0 to 3.}%
}
\newcommand\SB@errnse{%
\SB@Error{Nested songs environments are not supported}{End th%
e previous songs environment before beginning the next one.}%
}
\newcommand\SB@errpl{%
\SB@Error{\protect\includeonlysongs\space not permitted with%
in a songs environment}{\protect\includeonlysongs\space can o%
nly be used in the document preamble or between songs environ%
ments in the document body.}%
}
\newcommand\SB@warnigen{%
\PackageWarning{songs}{Indexes shown but index-generation inh%
ibited. Index files may be out of date.}{Indexes were initial%
ly turned off by the end of the document preamble, which mean%
s that the auxiliary files used to keep the indexes up-to-da%
te were not generated. However, indexes were turned on withi%
n the document body using \protect\indexeson, which means th%
e indexes shown in the resulting document are being created f%
rom outdated files. To correct the problem, be sure that inde%
xes are turned on by the end of the preamble so that the auxi%
liary files will be updated.}%
}
\newcommand\SB@errrtopt{%
\SB@Error{Cannot display chords in a rawtext dump}{You have u%
sed the rawtext option in the \protect\usepackage\space lin%
e and have either used the chorded option as well or have use%
d the \protect\chordson\space macro subsequently.}%
}
\newcommand\SB@warnrc{%
\SB@Warn{The \protect\repchoruses\space feature will not wor%
k when the number of columns is set to zero}%
}
\newcommand\SB@errboo{%
\SB@Error{Encountered \protect\beginsong\space without seein%
g an \protect\endsong\space for the previous song}%
{Song \thesongnum\space might be missing a%
n \protect\endsong\space line.}%
}
\newcommand\SB@errbor{%
\SB@Error{Encountered \protect\beginsong\space without seein%
g an \protect\endscripture\space for the preceding scriptur%
e quotation}{A scripture quotation appearing after son%
g \thesongnum\space might be missing a%
n \protect\endscripture\space line.}%
}
\newcommand\SB@erreov{%
\SB@Error{Encountered \protect\endsong\space without seein%
g an \protect\endverse\space for the preceding verse}{Son%
g \thesongnum\space has a \protect\beginverse\space%
line with no matching \protect\endverse\space line.}%
}
\newcommand\SB@erreoc{%
\SB@Error{Encountered \protect\endsong\space without seein%
g an \protect\endchorus\space for the preceding chorus}{Son%
g \thesongnum\space has a \protect\beginchorus\space%
line with no matching \protect\endchorus\space line.}%
}
\newcommand\SB@erreor{%
\SB@Error{Encountered \protect\endsong\space without seein%
g an \protect\endscripture for the preceding scripture quot%
e}{A scripture quote appearing before song \thesongnum\space%
ended with \protect\endsong\space instead of wit%
h \protect\endscripture.}%
}
\newcommand\SB@erreot{%
\SB@Error{Encountered \protect\endsong\space with no matchin%
g \protect\beginsong}{Before song \thesongnum\space there wa%
s an \protect\endsong\space with no matchin%
g \protect\beginsong.}%
}
\newcommand\SB@errbvv{%
\SB@Error{Encountered \protect\beginverse\space without seein%
g an \protect\endverse\space for the preceding verse}{Son%
g \thesongnum\space might have a verse that has n%
o \protect\endendverse\space line.}%
}
\newcommand\SB@errbvc{%
\SB@Error{Encountered \protect\beginverse\space without seein%
g an \protect\endchorus\space for the preceding chorus}{Son%
g \thesongnum\space might have a chorus that has n%
o \protect\endchorus\space line.}%
}
\newcommand\SB@errbvt{%
\SB@Error{Encountered \protect\beginverse\space without firs%
t seeing a \protect\beginsong\space line}{Before son%
g \thesongnum, there is a \protect\beginverse\space line no%
t contained in any song.}%
}
\newcommand\SB@errevc{%
\SB@Error{Encountered \protect\endverse\space while process%
ing a chorus}{Song \thesongnum\space might hav%
e a \protect\beginchorus\space concluded by a%
n \protect\endverse\space instead of an \protect\endchorus.}%
}
\newcommand\SB@errevo{%
\SB@Error{Encountered \protect\endverse\space without firs%
t seeing a \protect\beginverse}{Song \thesongnum\space m%
ight have an \protect\endverse\space with no matchin%
g \protect\beginverse.}%
}
\newcommand\SB@errevt{%
\SB@Error{Encountered an \protect\endverse\space outside o%
f any song}{Before song \thesongnum, there is a%
n \protect\endverse\space line not preceded b%
y a \protect\beginsong\space line.}%
}
\newcommand\SB@erretex{%
\SB@Error{The \protect\repchoruses\space feature requires e-%
TeX compatibility}{Your version of LaTeX2e does not appear t%
o be e-TeX compatible. Find a distribution that includes e-T%
eX support in order to use this feature.}%
}
\newcommand\SB@errbcv{%
\SB@Error{Encountered \protect\beginchorus\space without see%
ing an \protect\endverse\space for the preceding verse}{Son%
g \thesongnum\space might hav%
e a \protect\beginverse\space with no match%
ing \protect\endverse.}%
}
\newcommand\SB@errbcc{%
\SB@Error{Encountered \protect\beginchorus\space without see%
ing an \protect\endchorus\space for the preceding chorus}%
{Song \thesongnum\space might have a \protect\beginchorus%
\space with no matching \protect\endchorus.}%
}
\newcommand\SB@errbct{%
\SB@Error{Encountered \protect\beginchorus\space without see%
ing a \protect\beginsong\space line first}{After son%
g \thesongnum\space there is a \protect\beginchorus\space%
line outside of any song.}%
}
\newcommand\SB@errecv{%
\SB@Error{Encountered an \protect\endchorus\space while proc%
essing a verse}{Song \thesongnum\space might hav%
e a \protect\beginverse\space concluded by \protect\endchorus%
\space instead of \protect\endverse.}%
}
\newcommand\SB@erreco{%
\SB@Error{Encountered \protect\endchorus\space without firs%
t seeing a \protect\beginchorus}{Song \thesongnum\space m%
ight have an \protect\endchorus\space with no match%
ing \protect\beginchorus.}%
}
\newcommand\SB@errect{%
\SB@Error{Encountered an \protect\endchorus\space outside o%
f any song}{Before song \thesongnum, there is a%
n \protect\endchorus\space line not preceded b%
y a \protect\beginsong\space line.}%
}
\newcommand\SB@errbro{%
\SB@Error{Missing \protect\endsong}%
{Nested song and intersong environments are not supported%
. Song \thesongnum\space might be missing a%
n \protect\endsong\space line.}%
}
\newcommand\SB@errbrr{%
\SB@Error{Nested intersong environments are not supported}%
{A scripture quote or other intersong environment before s%
ong \thesongnum\space is missing its ending line.}%
}
\newcommand\SB@errero{%
\SB@Error{Encountered an \protect\endscripture\space whil%
e processing a song}{Song \thesongnum\space ends wit%
h \protect\endscripture\space when it should end wit%
h \protect\endsong.}%
}
\newcommand\SB@errert{%
\SB@Error{Encountered an \protect\endscripture\space with%
out first seeing a \protect\beginscripture}{Before son%
g \thesongnum, there is an \protect\endscripture\space w%
ith no matching \protect\beginscripture.}%
}
\newcommand\SB@errscrip[1]{%
\SB@Error{Encountered a \protect#1\space outside a scriptu%
re quote}{\protect#1\space can only appear betwee%
n \protect\beginscripture\space an%
d \protect\endscripture\space lines.}%
}
\newcommand\SB@errchord{%
\SB@Error{Song \thesongnum\space seems to have chord%
s that appear outside of any verse or chorus}{All chords a%
nd lyrics should appear between \protect\beginverse\space%
and \protect\endverse, or between \protect\beginchorus\space%
and \protect\endchorus.}%
}
\newcommand\SB@errreplay{%
\SB@Error{Replayed chord has no matching chord}{Son%
g \thesongnum\space uses \protect^ more times than the%
re are chords in the previously memorized verse.}%
}
\newcommand\SB@errreg[1]{%
\SB@Error{Unknown chord-replay register name: #1}{Chord-re%
play registers must be declared with \protect\newchords.}%
}
\newcommand\SB@errdup[1]{%
\SB@Error{Duplicate definition of chord-replay register%
: #1}{\protect\newchords\space was used to declare the sa%
me chord-replay register twice.}%
}
\newcommand\SB@errmbar{%
\SB@Error{Song \thesongnum\space seems to have measur%
e bars that appear outside of any verse or chorus}{All mea%
sure bars (produced with \protect\mbar\space or |) must ap%
pear between \protect\beginverse\space an%
d \protect\endverse, or between \protect\beginchorus\space%
and \protect\endchorus.}%
}
\newcommand\SB@errtab{%
\SB@Error{Invalid argument to \protect\gtab\space macro. R%
eplacing it with \protect\0.}{Valid arguments consist onl%
y of: X, O, 0, 1, 2, 3, or 4.}%
}
\newcommand\SB@errnoidx[1]{%
\SB@Error{Unknown index identifier: #1}{This index identifie%
r was never declared using \protect\newindex.}%
}
\newcommand\SB@erridx[1]{%
\SB@Error{\protect\idxaltentry\space not allowed in #1 index}%
{This error should not occur. The index generation routines ha%
ve malfunctioned. Try deleting all temporary files and then re%
compiling.}%
}
\newif\ifchorded
\newif\iflyric\lyrictrue
\newif\ifslides
\newif\ifmeasures
\newif\ifpartiallist
\newif\ifrepchorus
\newif\iftranscapos
\newif\ifnolyrics
\newif\ifrawtext
\newif\ifpdfindex\pdfindextrue
\newif\ifsongindexes\songindexestrue
\newif\ifSB@colorboxes\SB@colorboxestrue
\newif\ifSB@genindexes\SB@genindexestrue
\newif\ifSB@omitscrip
\newcommand\nolyrics{}
\let\nolyrics\nolyricstrue
\SB@chordson
\ProcessOptions\relax
\ifSB@pdf\else\pdfindexfalse\fi
\ifSB@colorboxes
\RequirePackage{color}
\definecolor{SongbookShade}{gray}{.80}
\newcommand\SB@colorbox[2]{%
\ifx\@empty#1%
\vbox{%
\kern3\p@%
\hbox{\kern3\p@{#2}\kern3\p@}%
\kern3\p@%
}%
\else%
\colorbox{#1}{#2}%
\fi%
}
\else
\newcommand\SB@colorbox[2]{\vbox{%
\kern3\p@%
\hbox{\kern3\p@{#2}\kern3\p@}%
\kern3\p@%
}}
\fi
\ifrawtext
\newwrite\SB@txtout
\immediate\openout\SB@txtout=\jobname.txt
\newif\ifSB@doEOL
{\catcode`\^^M12 %
\catcode`\^^J12 %
\gdef\SB@printEOL{\ifSB@doEOL^^M^^J\fi}}
{\catcode`#12\gdef\SB@hash{#}}
{\catcode`&12\gdef\SB@amp{&}}
\renewcommand\SB@@@beginsong{%
\begingroup%
\def\'{}\def\`{}\def\v{}\def\u{}\def\={}\def\^{}%
\def\.{}\def\H{}\def\~{}\def\"{}\def\t{}%
\def\copyright{(c)}%
\let~\space%
\let\par\SB@printEOL%
\let\#\SB@hash%
\let\&\SB@amp%
\catcode`|9 %
\catcode`*9 %
\catcode`^9 %
\def\[##1]{}%
\resettitles%
\immediate\write\SB@txtout{\thesongnum. \songtitle}%
\nexttitle%
\foreachtitle{\immediate\write\SB@txtout{(\songtitle)}}%
\ifx\songauthors\@empty\else%
\immediate\write\SB@txtout{\songauthors}%
\fi%
\ifx\SB@rawrefs\@empty\else%
\immediate\write\SB@txtout{\SB@rawrefs}%
\fi%
\immediate\write\SB@txtout{}%
\SB@doEOLfalse%
\obeylines%
}
\renewcommand\SB@endsong{%
\SB@doEOLtrue%
\immediate\write\SB@txtout{\songcopyright\space%
\songlicense\SB@printEOL}%
\endgroup%
\SB@insongfalse%
\stepcounter{songnum}%
}
\def\SB@parsesrefs#1{\def\songrefs{#1}}
\long\def\beginverse#1#2\endverse{%
\SB@doEOLtrue\begingroup%
\def\textnote##1{##1}%
\def\SB@temp{#1}%
\def\SB@star{*}%
\ifx\SB@temp\SB@star%
\immediate\write\SB@txtout{\@gobble#2}%
\else%
\immediate\write\SB@txtout{#2}%
\fi%
\endgroup\SB@doEOLfalse}
\long\def\beginchorus#1\endchorus{%
\SB@doEOLtrue\begingroup%
\def\textnote##1{##1}%
\immediate\write\SB@txtout{Chorus:#1}%
\endgroup\SB@doEOLfalse}
\long\def\beginscripture#1\endscripture{}
\def\musicnote#1{}
\def\textnote#1{%
\SB@doEOLtrue%
\immediate\write\SB@txtout{#1\SB@printEOL}%
\SB@doEOLfalse}
\def\brk{}
\def\rep#1{(x#1)}
\def\echo#1{(#1)}
\def\mbar#1#2{}
\def\lrep{}
\def\rrep{}
\def\nolyrics{}
\renewcommand\memorize[1][]{}
\renewcommand\replay[1][]{}
\fi
\endinput
%%
%% End of file `songs.sty'.