Browse Source

New upstream release of the songs latex package.

This new release includes the long awaited translation of chords name
between alphabet names and solfege names. Some minor adjustment have
been also included but not yet interesting to the scope of the
patacrep songbook.
remotes/origin/translate_notes
Alexandre Dupas 14 years ago
parent
commit
b194e3209c
  1. 408
      songs.sty

408
songs.sty

@ -22,7 +22,7 @@
%% %%
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{songs} \ProvidesPackage{songs}
[2011/01/09 v2.12 Songs package] [2011/08/06 v2.13 Songs package]
\newif\ifSB@etex \newif\ifSB@etex
\ifx\eTeXversion\undefined\else \ifx\eTeXversion\undefined\else
\ifx\eTeXversion\relax\else \ifx\eTeXversion\relax\else
@ -104,8 +104,18 @@
\newcommand\chordlocals{} \newcommand\chordlocals{}
\newskip\versesep \newskip\versesep
\versesep123456789sp\relax \versesep123456789sp\relax
\newskip\afterpreludeskip
\afterpreludeskip=2\p@\@plus4\p@
\newskip\beforepostludeskip
\beforepostludeskip=2\p@\@plus4\p@
\newskip\baselineadj \newskip\baselineadj
\baselineadj\z@skip \baselineadj\z@skip
\newcommand\clineparams{%
\baselineskip\f@size\p@%
\advance\baselineskip-2\p@%
\lineskiplimit-2\p@%
\lineskip-2\p@%
}
\parindent.25in \parindent.25in
\newlength\idxheadwidth \newlength\idxheadwidth
\setlength\idxheadwidth{1.5cm} \setlength\idxheadwidth{1.5cm}
@ -179,18 +189,8 @@
\DeclareOption{nopdfindex}{\pdfindexfalse} \DeclareOption{nopdfindex}{\pdfindexfalse}
\DeclareOption{noshading}{\SB@colorboxesfalse} \DeclareOption{noshading}{\SB@colorboxesfalse}
\DeclareOption{noindexes}{\indexesoff} \DeclareOption{noindexes}{\indexesoff}
\newcommand\indexeson{% \newcommand\indexeson{\songindexestrue}
\ifSB@preamble% \newcommand\indexesoff{\songindexesfalse}
\SB@genindexestrue%
\else%
\ifSB@genindexes\else\SB@warnigen\fi%
\fi%
\songindexestrue%
}
\newcommand\indexesoff{%
\ifSB@preamble\SB@genindexesfalse\fi%
\songindexesfalse%
}
\newif\ifSB@measurespec \newif\ifSB@measurespec
\newif\ifSB@chordedspec \newif\ifSB@chordedspec
\DeclareOption{chorded}{\chordson} \DeclareOption{chorded}{\chordson}
@ -346,13 +346,16 @@
}% }%
\endgroup% \endgroup%
} }
\newcommand\SB@migrate[1]{%
\SB@toks\expandafter{#1}%
\edef\SB@temp{\the\SB@toks}%
\ifx\SB@temp\@empty\else\mark{\the\SB@toks}\fi%
}
\newcommand\SB@updatepage{% \newcommand\SB@updatepage{%
\global\setbox\SB@mrkbox\vbox{% \global\setbox\SB@mrkbox\vbox{%
\unvbox\SB@mrkbox% \unvbox\SB@mrkbox%
\edef\SB@temp{\splitfirstmark}% \SB@migrate\splitfirstmark%
\ifx\SB@temp\@empty\else\mark{\splitfirstmark}\fi% \SB@migrate\splitbotmark%
\edef\SB@temp{\splitbotmark}%
\ifx\SB@temp\@empty\else\mark{\splitbotmark}\fi%
}% }%
\global\setbox\SB@pgbox\hbox{% \global\setbox\SB@pgbox\hbox{%
\SB@dimen\SB@colwidth% \SB@dimen\SB@colwidth%
@ -602,23 +605,6 @@
\def\SB@songlistcp{sclearpage} \def\SB@songlistcp{sclearpage}
\newcommand\SB@songlistcdp{} \newcommand\SB@songlistcdp{}
\def\SB@songlistcdp{scleardpage} \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{% \newcommand\commitsongs{%
\ifpartiallist% \ifpartiallist%
\ifnum\SB@numcols>\z@% \ifnum\SB@numcols>\z@%
@ -648,6 +634,23 @@
\fi% \fi%
\SB@clearpage% \SB@clearpage%
} }
\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\SB@insertchorus[1]{{% \newcommand\SB@insertchorus[1]{{%
\vbadness\@M\vfuzz\maxdimen% \vbadness\@M\vfuzz\maxdimen%
\setbox\SB@box\copy#1% \setbox\SB@box\copy#1%
@ -692,7 +695,7 @@
\SB@inversefalse\SB@prevversetrue\SB@stanzabreak% \SB@inversefalse\SB@prevversetrue\SB@stanzabreak%
\marks\SB@nocmarkclass{\SB@nocmark}% \marks\SB@nocmarkclass{\SB@nocmark}%
\unvcopy\SB@chorusbox% \unvcopy\SB@chorusbox%
\vskip\versesep\vskip2\p@\@plus4\p@% \vskip\versesep\vskip\beforepostludeskip\relax%
\nointerlineskip\box\SB@box% \nointerlineskip\box\SB@box%
\ifdim\sbarheight>\z@% \ifdim\sbarheight>\z@%
\nobreak\vskip2\p@\@plus\p@% \nobreak\vskip2\p@\@plus\p@%
@ -844,10 +847,10 @@
\endgroup\fi% \endgroup\fi%
\vbox{\makeprelude}% \vbox{\makeprelude}%
\nobreak\vskip\SB@skip% \nobreak\vskip\SB@skip%
\vskip2\p@\@plus4\p@% \vskip\afterpreludeskip\relax%
\unvbox\SB@songbox% \unvbox\SB@songbox%
\nobreak\vskip\SB@skip% \nobreak\vskip\SB@skip%
\vskip2\p@\@plus4\p@% \vskip\beforepostludeskip\relax%
\nointerlineskip% \nointerlineskip%
\vbox{\makepostlude}% \vbox{\makepostlude}%
\ifdim\sbarheight>\z@% \ifdim\sbarheight>\z@%
@ -873,10 +876,11 @@
\ifchorded% \ifchorded%
\setbox\SB@box\hbox{{\printchord{ABCDEFG\shrp\flt/j7}}}% \setbox\SB@box\hbox{{\printchord{ABCDEFG\shrp\flt/j7}}}%
\advance\baselineskip\ht\SB@box% \advance\baselineskip\ht\SB@box%
\advance\baselineskip2\p@%
\fi% \fi%
\ifslides% \ifslides%
\advance\baselineskip.2\SB@dimen\@plus.5\SB@dimen% \advance\baselineskip.2\SB@dimen\@plus.5\SB@dimen%
\@minus.2\SB@dimen% \@minus.2\SB@dimen%
\else% \else%
\advance\baselineskip\z@\@plus.1\SB@dimen\relax% \advance\baselineskip\z@\@plus.1\SB@dimen\relax%
\fi% \fi%
@ -1095,10 +1099,9 @@
\newcommand\SB@@prspace{\afterassignment\SB@prloop\let\SB@temp= } \newcommand\SB@@prspace{\afterassignment\SB@prloop\let\SB@temp= }
\newcommand\SB@sractives{} \newcommand\SB@sractives{}
{\catcode`,\active\catcode`-\active\obeyspaces\catcode`\^^M\active% {\catcode`,\active\catcode`-\active\obeyspaces%
\gdef\SB@sractives{% \gdef\SB@sractives{%
\let,\SB@srcomma\let-\SB@srhyphen% \let,\SB@srcomma\let-\SB@srhyphen\let \SB@srspace%
\let \SB@srspace\let^^M\SB@srspace%
\SB@srspacing}% \SB@srspacing}%
} }
\newcommand\SB@srspacing{% \newcommand\SB@srspacing{%
@ -1814,6 +1817,12 @@
\expandafter\trchordformat\expandafter{\SB@tempv}{\the\SB@toks}% \expandafter\trchordformat\expandafter{\SB@tempv}{\the\SB@toks}%
\fi% \fi%
} }
\newcommand\notrans[1]{%
\begingroup%
\SB@transposefactor\z@%
\transposehere{#1}%
\endgroup%
}
\newcommand\SB@dotranspose[1]{% \newcommand\SB@dotranspose[1]{%
\SB@toks{}% \SB@toks{}%
\let\SB@dothis\SB@trmain% \let\SB@dothis\SB@trmain%
@ -1851,13 +1860,11 @@
\else% \else%
\SB@toks\expandafter{\the\SB@toks#1}% \SB@toks\expandafter{\the\SB@toks#1}%
\fi% \fi%
\else\ifx\SB@next\gtab%
\let\SB@donext\SB@trtab%
\else\ifx\SB@next\SB@trend \else\ifx\SB@next\SB@trend
\let\SB@donext\relax% \let\SB@donext\relax%
\else% \else%
\SB@toks\expandafter{\the\SB@toks#1}% \SB@toks\expandafter{\the\SB@toks#1}%
\fi\fi\fi% \fi\fi%
\SB@donext% \SB@donext%
} }
\newcommand\SB@trnote{% \newcommand\SB@trnote{%
@ -1956,7 +1963,6 @@
\global\SB@needkeytrue% non-chord \global\SB@needkeytrue% non-chord
\fi% \fi%
} }
\newcommand\SB@trtab{\expandafter\SB@trscan\@firstoftwo}
\newcommand\SB@trend{% \newcommand\SB@trend{%
\SB@Error{Internal Error: Transposition failed}% \SB@Error{Internal Error: Transposition failed}%
{This error should not occur.}% {This error should not occur.}%
@ -1990,6 +1996,7 @@
\penalty100\hskip\SB@skip% \penalty100\hskip\SB@skip%
\fi% \fi%
\fi% \fi%
\ifvmode\leavevmode\fi%
\setbox\SB@box\hbox{\tiny\sffamily{#1}}% \setbox\SB@box\hbox{\tiny\sffamily{#1}}%
\setbox\SB@boxii\hbox{\tiny\sffamily{#2}}% \setbox\SB@boxii\hbox{\tiny\sffamily{#2}}%
\ifdim\wd\SB@box>\wd\SB@boxii% \ifdim\wd\SB@box>\wd\SB@boxii%
@ -2006,7 +2013,6 @@
\advance\SB@dimenii-\dp\SB@box% \advance\SB@dimenii-\dp\SB@box%
\advance\SB@dimenii-\ht\SB@boxii% \advance\SB@dimenii-\ht\SB@boxii%
\advance\SB@dimenii-\dp\SB@boxii% \advance\SB@dimenii-\dp\SB@boxii%
\ifvmode\leavevmode\fi%
\vbox{% \vbox{%
\mark{\SB@measuremark}% \mark{\SB@measuremark}%
\hbox to\SB@dimen{% \hbox to\SB@dimen{%
@ -2559,7 +2565,7 @@
\unhbox\SB@chordbox% \unhbox\SB@chordbox%
\gdef\SB@temp{\expandafter\SB@clearlig\SB@ligfull}% \gdef\SB@temp{\expandafter\SB@clearlig\SB@ligfull}%
\else% \else%
\vbox{\baselineskip\f@size\p@\kern2\p@% \vbox{\clineparams\relax%
\ifSB@brokenword% \ifSB@brokenword%
\global\setbox\SB@lyricbox\hbox{% \global\setbox\SB@lyricbox\hbox{%
\unhbox\SB@lyricbox% \unhbox\SB@lyricbox%
@ -2568,15 +2574,13 @@
\SB@maxmin\SB@dimen<{\wd\SB@lyricbox}% \SB@maxmin\SB@dimen<{\wd\SB@lyricbox}%
\advance\SB@dimen.5em% \advance\SB@dimen.5em%
\hbox to\SB@dimen{\unhbox\SB@chordbox\hfil}% \hbox to\SB@dimen{\unhbox\SB@chordbox\hfil}%
\kern-2\p@%
\hbox to\SB@dimen{% \hbox to\SB@dimen{%
\unhcopy\SB@lyricbox\hfil\char\hyphenchar\font\hfil% \unhcopy\SB@lyricbox\hfil\char\hyphenchar\font\hfil%
}% }%
\global\SB@cnt\@m% \global\SB@cnt\@m%
\gdef\SB@temp{\expandafter\SB@clearlig\SB@ligpost}% \gdef\SB@temp{\expandafter\SB@clearlig\SB@ligpost}%
\else% \else%
\hbox{\unhbox\SB@chordbox\hfil}% \box\SB@chordbox%
\kern-2\p@%
\hbox{% \hbox{%
\unhcopy\SB@lyricbox% \unhcopy\SB@lyricbox%
\global\SB@cnt\spacefactor% \global\SB@cnt\spacefactor%
@ -2815,6 +2819,17 @@
} }
\newcommand*\SB@@gtab[2]{% \newcommand*\SB@@gtab[2]{%
\endgroup% \endgroup%
\ifnum\SB@transposefactor=\z@%
\SB@@@gtab{#1}{#2}%
\else%
\begingroup%
\let\gtab\SB@@@gtab%
\gtabtrans{#1}{#2}%
\endgroup%
\fi%
}
\newcommand\gtabtrans[2]{\transposehere{#1}}
\newcommand\SB@@@gtab[2]{%
\let\SB@targfret\@empty% \let\SB@targfret\@empty%
\let\SB@targstr\@empty% \let\SB@targstr\@empty%
\let\SB@targfing\@empty% \let\SB@targfing\@empty%
@ -2826,7 +2841,7 @@
\vbox{% \vbox{%
\normalfont\normalsize% \normalfont\normalsize%
\setbox\SB@box\hbox{% \setbox\SB@box\hbox{%
\thinspace{\printchord{#1\strut}}\thinspace% \thinspace{\printchord{\transposehere{#1}\strut}}\thinspace%
}% }%
\setbox\SB@boxii\hbox{\SB@fretnum{\SB@targfret}}% \setbox\SB@boxii\hbox{\SB@fretnum{\SB@targfret}}%
\setbox\SB@boxiii\hbox{{\SB@gttop\SB@targstr}}% \setbox\SB@boxiii\hbox{{\SB@gttop\SB@targstr}}%
@ -2932,68 +2947,69 @@
} }
\newcounter{SB@songsnum} \newcounter{SB@songsnum}
\newcommand\SB@indexlist{} \newcommand\SB@indexlist{}
\newcommand\SB@allindexes{}
\let\SB@allindexes\@empty
\newcommand\SB@out{}
\let\SB@out\relax
\newcommand\SB@newindex[4]{% \newcommand\SB@newindex[4]{%
\expandafter\newcommand\csname SB@idxfilename@#3\endcsname{#4}% \expandafter\newcommand\csname SB@idxfilename@#3\endcsname{#4}%
\expandafter\newcommand\csname SB@idxsel@#3\endcsname[3]{###1}% \expandafter\newcommand\csname SB@idxsel@#3\endcsname[3]{###1}%
\expandafter\newcommand\csname SB@idxref@#3\endcsname{\thesongnum}% \expandafter\newcommand\csname SB@idxref@#3\endcsname{\thesongnum}%
\AtBeginDocument{\SB@openindex{#2}{#3}{#4}}% \xdef\SB@allindexes{%
} \ifx\SB@allindexes\@empty\else\SB@allindexes,\fi#3%
\newcommand\SB@openindex[3]{% }%
\ifSB@genindexes\begingroup% \if@filesw%
\newwrite\SB@theindex% \ifx\SB@out\relax%
\immediate\openout\SB@theindex=#3.sxd% \newwrite\SB@out%
#1% \immediate\openout\SB@out=\jobname.sxc\relax%
\global\expandafter\let\csname SB@index@#2\endcsname\SB@theindex% \fi%
\endgroup\fi% \immediate\write\SB@out{\noexpand\SB@iwrite{#3}{#2}}%
\fi%
} }
\newcommand\newindex{\SB@newindex1\SB@titleinit} \newcommand\newindex{\SB@newindex1{TITLE INDEX DATA FILE}}
\@onlypreamble\newindex \@onlypreamble\newindex
\newcommand\SB@titleinit{% \newcommand\newscripindex{\SB@newindex2{SCRIPTURE INDEX DATA FILE}}
\immediate\write\SB@theindex{TITLE INDEX DATA FILE}%
}
\newcommand\newscripindex{\SB@newindex2\SB@scripinit}
\@onlypreamble\newscripindex \@onlypreamble\newscripindex
\newcommand\SB@scripinit{% \newcommand\newauthorindex{\SB@newindex3{AUTHOR INDEX DATA FILE}}
\immediate\write\SB@theindex{SCRIPTURE INDEX DATA FILE}%
}
\newcommand\newauthorindex{\SB@newindex3\SB@authinit}
\@onlypreamble\newauthorindex \@onlypreamble\newauthorindex
\newcommand\SB@authinit{% \newcommand\SB@cwrite[2]{%
\immediate\write\SB@theindex{AUTHOR INDEX DATA FILE}% \ifx\SB@out\relax\else%
} \protected@write\SB@out{}{\protect\SB@iwrite{#1}{#2}}%
\newcommand\indexsongsas[1]{% \fi%
\@ifundefined{SB@idxref@#1}%
{\SB@errnoidx{#1}\@gobble}%
{\expandafter\renewcommand\csname SB@idxref@#1\endcsname}%
} }
\newcommand\SB@percent{} \newcommand\SB@iwrite[2]{%
{\catcode`\%=12\gdef\SB@percent{%}} \def\SB@tempii{#1}%
\newcommand\SB@idxcmd[2]{% \ifx\SB@temp\SB@tempii%
\expandafter\gdef\expandafter#1\expandafter{% \SB@toks{#2}%
#1\immediate\write\SB@theindex{\SB@percent#2}% \immediate\write\SB@out{\the\SB@toks}%
}% \fi%
}
\newcommand\SB@uncombine{%
\ifx\SB@out\relax\else%
\immediate\closeout\SB@out%
\ifsongindexes%
\@for\SB@temp:=\SB@allindexes\do{%
\immediate\openout\SB@out=%
\csname SB@idxfilename@\SB@temp\endcsname.sxd\relax%
\begingroup\makeatletter\input{\jobname.sxc}\endgroup%
\immediate\closeout\SB@out%
}%
\fi%
\fi%
} }
\newcommand\authsepword[1]{\SB@idxcmd\SB@authinit{sep #1}} \AtEndDocument{\SB@uncombine}
\@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 \newbox\SB@songwrites
\newcommand\SB@addtoindex[2]{% \newcommand\SB@addtoindex[2]{%
\global\setbox\SB@songwrites\vbox{% \protected@edef\SB@tempii{#2}%
\unvbox\SB@songwrites% \ifx\SB@tempii\@empty\else%
\ifSB@genindexes% \global\setbox\SB@songwrites\vbox{%
\protected@write{\csname SB@index@#1\endcsname}{}{#2}% \unvbox\SB@songwrites%
\protected@write{\csname SB@index@#1\endcsname}{}% \SB@cwrite{#1}{#2}%
{\csname SB@idxref@#1\endcsname}% \SB@cwrite{#1}{\csname SB@idxref@#1\endcsname}%
\protected@write{\csname SB@index@#1\endcsname}{}{% \SB@cwrite{#1}{song\theSB@songsnum-\thesongnum.%
song\theSB@songsnum-\thesongnum.% \ifnum\c@section=\z@1\else2\fi}%
\ifnum\c@section=\z@1\else2\fi}% }%
\fi% \fi%
}%
} }
\newcommand\SB@addtoindexes[3]{% \newcommand\SB@addtoindexes[3]{%
\@for\SB@temp:=\SB@indexlist\do{% \@for\SB@temp:=\SB@indexlist\do{%
@ -3033,6 +3049,28 @@
\newcommand\indextitleentry{% \newcommand\indextitleentry{%
\@ifnextchar[{\SB@idxentry{}}{\SB@@idxentry{}}% \@ifnextchar[{\SB@idxentry{}}{\SB@@idxentry{}}%
} }
\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]{%
\ifx\SB@out\relax\else%
\immediate\write\SB@out{%
\noexpand\SB@iwrite{#1}{\noexpand\SB@percent#2}%
}%
\fi%
}
\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@idxtitlebox \newbox\SB@idxtitlebox
\newcommand\SB@idxlineskip[1]{% \newcommand\SB@idxlineskip[1]{%
\vskip#1\p@\@plus#1\p@\@minus#1\p@% \vskip#1\p@\@plus#1\p@\@minus#1\p@%
@ -3168,88 +3206,100 @@
\IfFileExists{\csname SB@idxfilename@#3\endcsname.sbx}{% \IfFileExists{\csname SB@idxfilename@#3\endcsname.sbx}{%
\ifx\hyperlink\undefined\let\hyperlink\@secondoftwo\fi% \ifx\hyperlink\undefined\let\hyperlink\@secondoftwo\fi%
\ifx\hyperlink\relax\let\hyperlink\@secondoftwo\fi% \ifx\hyperlink\relax\let\hyperlink\@secondoftwo\fi%
\global\setbox\SB@box\vbox{% \ifsepindexes%
\null% \global\setbox\SB@box\vbox{%
\vfil% \null%
\unvcopy\SB@idxtitlebox% \vfil%
\vskip.5in\@minus.3in\relax% \unvcopy\SB@idxtitlebox%
\hbox to\hsize{% \vskip.5in\@minus.3in\relax%
\hfil% \hbox to\hsize{%
\vbox{% \hfil%
\hsize\SB@colwidth% \vbox{%
\renewenvironment{idxblock}[1]% \hsize\SB@colwidth%
{\begin{SB@smidx}{####1}}{\end{SB@smidx}}% \renewenvironment{idxblock}[1]%
\let\\\SB@idxitemsep% {\begin{SB@smidx}{####1}}{\end{SB@smidx}}%
\input{\csname SB@idxfilename@#3\endcsname.sbx}% \let\\\SB@idxitemsep%
\input{\csname SB@idxfilename@#3\endcsname.sbx}%
}%
\hfil%
}% }%
\hfil% \vskip\z@\@plus2fil\relax%
}% }%
\vskip\z@\@plus2fil\relax% {\vbadness\@M\vfuzz\maxdimen%
}% \splitmaxdepth\maxdepth\splittopskip\z@skip%
{\vbadness\@M\vfuzz\maxdimen% \global\setbox\SB@boxii\vsplit\SB@box to\textheight}%
\splitmaxdepth\maxdepth\splittopskip\z@skip% \ifvoid\SB@box%
\global\setbox\SB@boxii\vsplit\SB@box to\textheight}% \box\SB@boxii%
\ifvoid\SB@box% \else%
\box\SB@boxii% \SB@lgindex{#1}{#3}%
\fi%
\else% \else%
\global\setbox\SB@box\vbox{% \SB@lgindex{#1}{#3}%
\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% \fi%
}% }%
{% {%
\vbox to\textheight{% \ifsepindexes%
\vfil% \vbox to\textheight{%
\vfil%
\unvbox\SB@idxtitlebox%
\vskip1em\relax%
\hbox to\hsize{\hfil[Index not yet generated.]\hfil}%
\vskip\z@\@plus2fil\relax%
}%
\else%
\unvbox\SB@idxtitlebox% \unvbox\SB@idxtitlebox%
\vskip1em\relax%
\hbox to\hsize{\hfil[Index not yet generated.]\hfil}% \hbox to\hsize{\hfil[Index not yet generated.]\hfil}%
\vskip\z@\@plus2fil\relax% \fi%
}%
}% }%
\clearpage% \ifsepindexes\clearpage\fi%
\endgroup\fi% \endgroup\fi%
} }
\newcommand\SB@lgindex[2]{%
\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@#2\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%
}
\newcommand\showindex[3][0]{% \newcommand\showindex[3][0]{%
\@ifundefined{SB@idxsel@#3}{\SB@errnoidx{#3}}{% \@ifundefined{SB@idxsel@#3}{\SB@errnoidx{#3}}{%
\expandafter\let\expandafter\SB@temp\csname SB@idxsel@#3\endcsname% \expandafter\let\expandafter\SB@temp\csname SB@idxsel@#3\endcsname%
@ -3342,18 +3392,6 @@
nly be used in the document preamble or between songs environ% nly be used in the document preamble or between songs environ%
ments in the document body.}% 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{% \newcommand\SB@errrtopt{%
\SB@Error{Cannot display chords in a rawtext dump}{You have u% \SB@Error{Cannot display chords in a rawtext dump}{You have u%
sed the rawtext option in the \protect\usepackage\space lin% sed the rawtext option in the \protect\usepackage\space lin%
@ -3565,8 +3603,8 @@
\newif\ifrawtext \newif\ifrawtext
\newif\ifpdfindex\pdfindextrue \newif\ifpdfindex\pdfindextrue
\newif\ifsongindexes\songindexestrue \newif\ifsongindexes\songindexestrue
\newif\ifsepindexes\sepindexestrue
\newif\ifSB@colorboxes\SB@colorboxestrue \newif\ifSB@colorboxes\SB@colorboxestrue
\newif\ifSB@genindexes\SB@genindexestrue
\newif\ifSB@omitscrip \newif\ifSB@omitscrip
\newcommand\nolyrics{} \newcommand\nolyrics{}
\let\nolyrics\nolyricstrue \let\nolyrics\nolyricstrue

Loading…
Cancel
Save