summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/songbook
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-10-19 00:24:47 +0000
committerKarl Berry <karl@freefriends.org>2006-10-19 00:24:47 +0000
commit4888ceffcebbbff65e9dfd805b5c062a4990ce18 (patch)
tree5b90a4164fbff80e4c4b7e722975a0dbd7d99650 /Master/texmf-dist/tex/latex/songbook
parentff920c7e23a7b1736eef9cb4ad2304a859cd0db8 (diff)
songbook 4.2 update (17oct06)
git-svn-id: svn://tug.org/texlive/trunk@2351 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/songbook')
-rw-r--r--Master/texmf-dist/tex/latex/songbook/songbook.sty41
1 files changed, 32 insertions, 9 deletions
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}%