From 4888ceffcebbbff65e9dfd805b5c062a4990ce18 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 19 Oct 2006 00:24:47 +0000 Subject: songbook 4.2 update (17oct06) git-svn-id: svn://tug.org/texlive/trunk@2351 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/songbook/songbook.sty | 41 ++++++++++++++++++----- 1 file changed, 32 insertions(+), 9 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/songbook/songbook.sty b/Master/texmf-dist/tex/latex/songbook/songbook.sty index 208b1df4173..c1053a8d039 100644 --- a/Master/texmf-dist/tex/latex/songbook/songbook.sty +++ b/Master/texmf-dist/tex/latex/songbook/songbook.sty @@ -49,11 +49,11 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% -%% rcsid = @(#)$Id: songbook.dtx,v 1.11 2003/09/23 01:18:57 christopher Exp $ +%% rcsid = @(#)$Id: songbook.dtx,v 1.12 2006/10/15 15:49:50 rathc Exp $ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{songbook}[2003/08/31 v4.1a All purpose Songbook style] -\typeout{Document Subclass: songbook 2003/08/31 v4.1a All purpose Songbook style} +\ProvidesPackage{songbook}[2006/10/13 v4.2 All purpose Songbook style] +\typeout{Document Subclass: songbook 2006/10/13 v4.2 All purpose Songbook style} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% @@ -77,8 +77,8 @@ \newif\ifNotWordsOnly \NotWordsOnlyfalse \newif\ifSBinSongEnv \SBinSongEnvfalse \newif\ifCompactSongMode\CompactSongModefalse -\newif\ifExcludeSong \ExcludeSongfalse -\newif\ifPrintAllSongs \PrintAllSongsfalse +\newif\ifExcludeSong \ExcludeSongfalse +\newif\ifPrintAllSongs \PrintAllSongsfalse \newif\ifSamepageMode \SamepageModefalse \newif\ifSongEject \SongEjecttrue \newif\ifSBpaperAfour \SBpaperAfourfalse @@ -656,6 +656,7 @@ \newcommand{\Songbook} {\textrm{Song$\flat$ook}} \newcommand{\theSongComposer}{the Composer} +\newcommand{\theSongComposerU}{the ComposerU} \newcommand{\theSongCopyRt}{the Copyright} \newcommand{\theSongKey}{the Key} \newcommand{\theSongLicense}{the License} @@ -701,6 +702,22 @@ %% % %% A N D I N D I C E S % %%=======================================================% +\def\makeArtistIndex{\if@filesw \newwrite\@artistIndexfile + \immediate\openout\@artistIndexfile=\jobname.aIdx + \def\artistIndex{\@bsphack\begingroup + \def\protect####1{\string####1\space}\@sanitize + \@wrArtistIndex}\typeout + {Writing index file \jobname.aIdx }\fi} + +\def\@wrArtistIndex#1#2{\let\thepage\relax + \xdef\@gtempa{\write\@artistIndexfile{\string + \indexentry{#1}{#2}}}\endgroup\@gtempa + \if@nobreak \ifvmode\nobreak\fi\fi\@esphack} + +\def\artistIndex{\@bsphack\begingroup \@sanitize\@artistIndex} + +\def\@artistIndex#1#2{\endgroup\@esphack} + \def\makeKeyIndex{\if@filesw \newwrite\@keyIndexfile \immediate\openout\@keyIndexfile=\jobname.kIdx \def\keyIndex{\@bsphack\begingroup @@ -852,7 +869,7 @@ \newenvironment{song}[7][Y]{ % Comment markers to negate \if#1Y\ExcludeSongfalse\else\ExcludeSongtrue\fi% the newline. - \ifPrintAllSongs\ExcludeSongfalse\fi % + \ifPrintAllSongs\ExcludeSongfalse\fi % \SongMarkboth{\relax}{\relax} % \SBinSongEnvtrue % \renewcommand{\SBinSongEnv}{\True} % @@ -860,6 +877,11 @@ \setlength{\parindent}{0pt} % \fi % \renewcommand{\theSongComposer}{#5} % + \if\blank{#5} % + \renewcommand{\theSongComposerU}{\SBUnknownTag}% + \else % + \renewcommand{\theSongComposerU}{#5} % + \fi % \renewcommand{\theSongCopyRt}{#4} % \renewcommand{\theSongKey}{#3} % \renewcommand{\theSongLicense}{#7} % @@ -871,12 +893,13 @@ % \addtocounter{SBSongCnt}{1} % % - \ifExcludeSong % + \ifExcludeSong % \titleContentsSkip{\theSongTitle}{\theSongKey}% - \else % + \else % \titleIndex{\theSongTitle}{\theSBSongCnt} % \titleContents{\theSongTitle}{\theSongKey} % - \fi % + \artistIndex{\theSongComposerU+\theSongTitle}{\theSBSongCnt}% + \fi % \ifExcludeSong\setbox2=\vbox\bgroup\fi% \ifSamepageMode% \begin{samepage}% -- cgit v1.2.3