summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/songbook
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-07 00:53:10 +0000
committerKarl Berry <karl@freefriends.org>2010-05-07 00:53:10 +0000
commit97b6c91cd1221dec79f63d88439d9902cb875b6e (patch)
treeed0cc989819867e30a97a9271e66f3a078520ae5 /Master/texmf-dist/tex/latex/songbook
parent6cc30c797670923267fcfc3cecb62cae4bb5b9c1 (diff)
songbook 4.5 (6may10)
git-svn-id: svn://tug.org/texlive/trunk@18136 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/songbook')
-rw-r--r--Master/texmf-dist/tex/latex/songbook/songbook.sty154
1 files changed, 113 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/latex/songbook/songbook.sty b/Master/texmf-dist/tex/latex/songbook/songbook.sty
index 39fcf4abf1d..3bfcaf65d4a 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.14 2010-03-31 02:06:52 rathc Exp $
+%% rcsid = @(#)$Id: songbook.dtx,v 1.16 2010-04-12 18:10:15 rathc Exp $
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{songbook}[2010/03/30 v4.4 All purpose Songbook style]
-\typeout{Document Subclass: songbook 2010/03/30 v4.4 All purpose Songbook style}
+\ProvidesPackage{songbook}[2010/04/30 v4.5 All purpose Songbook style]
+\typeout{Document Subclass: songbook 2010/04/30 v4.5 All purpose Songbook style}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
@@ -76,6 +76,7 @@
\newif\ifWordsOnly \WordsOnlyfalse
\newif\ifNotWordsOnly \NotWordsOnlyfalse
\newif\ifSBinSongEnv \SBinSongEnvfalse
+\newif\ifCompactAllMode \CompactAllModefalse
\newif\ifCompactSongMode\CompactSongModefalse
\newif\ifExcludeSong \ExcludeSongfalse
\newif\ifPrintAllSongs \PrintAllSongsfalse
@@ -121,6 +122,21 @@
\newcommand{\SBLyricNoteFont}{\footnotesize\sf} % = cmss10 at 10pt
\newcommand{\SBOHContTagFont}{\small\bf\sf\itshape} % = cmss10 at 10.9pt
+\newcommand{\ChBassFontCS}{\small\bf\sf} % = cmss12 at 11.0pt
+\newcommand{\ChFontCS}{\normalsize\fontfamily{\sfdefault}%
+ \fontseries{sbc}\fontshape{n}\selectfont} % = cmssbc12 at 12.0pt
+\newcommand{\ChBkFontCS}{\ChFont\fontseries{m} %
+ \selectfont} % = cmssm12 at 12.0pt
+\newcommand{\SBDefaultFontCS}{\normalsize} % = cmr12 at 12.0pt
+\newcommand{\SBOccursBrktFontCS}{\large\bf\sf} % = cmss10 at 10.9pt
+
+\newcommand{\ChBassFontSav}{\relax}%
+\newcommand{\ChFontSav}{\relax}%
+\newcommand{\ChBkFontSav}{\relax}%
+\newcommand{\SBDefaultFontSav}{\relax}%
+\newcommand{\SBOccursBrktFontSav}{\relax}%
+\newcommand{\SBFontSavVar}{\relax}%
+
%%========================================================
%% C O N F I G U R A B L E D I M E N S I O N S %
%%========================================================
@@ -146,6 +162,16 @@
\newlength{\chMiniSpace} \setlength{\chMiniSpace} {0.3mm}
\newlength{\sbBaselineSkipAmt} \setlength{\sbBaselineSkipAmt}{0pt}
+\newlength{\textwidthSav}
+\newlength{\evensidemarginSav}
+\newlength{\marginparsepSav}
+\newlength{\marginparwidthSav}
+\newlength{\chSpaceToleranceSav}
+\newcommand{\HangAmtSav}{}
+\newcommand{\LeftMarginSBChorusSav}{}
+\newcommand{\LeftMarginSBSectionSav}{}
+\newcommand{\LeftMarginSBVerseSav}{}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
@@ -212,12 +238,24 @@
}
%%=======================================================%
+%% C O M P A C T A L L S O N G S O P T I O N %
+%%=======================================================%
+\DeclareOption{compactallsongs}{%
+ %%%
+ % Set flag to indicate the user wants compact song mode
+ % for all songs.
+ \CompactAllModetrue
+}
+
+%%=======================================================%
%% C O M P A C T S O N G O P T I O N %
%%=======================================================%
\DeclareOption{compactsong}{%
- %%%
- % Set flag to indicate the user wants compact song mode.
- \CompactSongModetrue
+ \errmessage{The compactsong Songbook option has been
+removed and replaced with a combination of a global
+compactallsongs Songbook option and a per-song
+environment compactsong option. See the song
+environment's documentation}
}
%%=======================================================%
@@ -332,30 +370,6 @@
\fi\fi\fi\fi\fi\fi
\raggedbottom
-
- \ifCompactSongMode
- \renewcommand{\ChBassFont}{\small\bf\sf} % = cmss12 at 11.0pt
- \renewcommand{\ChFont}{\normalsize\fontfamily{\sfdefault}%
- \fontseries{sbc}\fontshape{n}\selectfont} %=cmssbc12 at 12.0pt
- \renewcommand{\ChBkFont}{\ChFont\fontseries{m} %
- \selectfont} % =cmssm12 at 12.0pt
- \renewcommand{\SBDefaultFont}{\normalsize} % = cmr12 at 12.0pt
- \renewcommand{\SBOccursBrktFont}{\large\bf\sf} % = cmss10 at 10.9pt
-
- \setlength{\columnsep}{0.25in}
-
- \addtolength{\textwidth} {\marginparsep + \marginparwidth}
- \addtolength{\evensidemargin}{-\marginparsep - \marginparwidth}
- \setlength {\marginparsep} {0in}
- \setlength {\marginparwidth}{0in}
-
- \setlength{\chSpaceTolerance}{1.0mm}
-
- \renewcommand{\HangAmt} {1.5em}
- \renewcommand{\LeftMarginSBChorus} {2em}
- \renewcommand{\LeftMarginSBSection}{\LeftMarginSBChorus}
- \renewcommand{\LeftMarginSBVerse} {\LeftMarginSBChorus}
- \fi
}
\DeclareOption{wordbk}{%
@@ -458,9 +472,9 @@
\raggedright
- \ifCompactSongMode
- \typeout{``compactsong'' mode not implemented for Wordbk mode.}
- \CompactSongModefalse
+ \ifCompactAllMode
+ \typeout{``compactallsongs'' mode not implemented for Wordbk mode.}
+ \CompactAllModefalse
\fi
}
@@ -577,9 +591,9 @@
\raggedright
\raggedbottom
- \ifCompactSongMode
- \typeout{``compactsong'' mode not implemented for Overhead mode.}
- \CompactSongModefalse
+ \ifCompactAllMode
+ \typeout{``compactallsongs'' mode not implemented for Overhead mode.}
+ \CompactAllModefalse
\fi
}
@@ -606,9 +620,9 @@
\RequirePackage{ifthen}
-\ifCompactSongMode
- \RequirePackage{multicol}[1999/05/25]
-\fi
+\RequirePackage{xstring}
+
+\RequirePackage{multicol}[1999/05/25]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -869,9 +883,13 @@
\STitleMarkboth{#2}{\relax}%
}
-\newenvironment{song}[7][Y]{ % Comment markers to negate
- \if#1Y\ExcludeSongfalse\else\ExcludeSongtrue\fi% the newline.
+\newenvironment{song}[7][YF]{ % Comment markers to negate
+ \IfSubStr{\uppercase{#1}}{N}{\ExcludeSongtrue}{\relax}% newlines.
+ \IfSubStr{\uppercase{#1}}{Y}{\ExcludeSongfalse}{\relax}%
\ifPrintAllSongs\ExcludeSongfalse\fi %
+ \IfSubStr{\uppercase{#1}}{C}{\CompactSongModetrue}{\relax}% newlines.
+ \IfSubStr{\uppercase{#1}}{F}{\CompactSongModefalse}{\relax}%
+ \ifCompactAllMode\CompactSongModetrue\fi %
\SongMarkboth{\relax}{\relax} %
\SBinSongEnvtrue %
\renewcommand{\SBinSongEnv}{\True} %
@@ -907,6 +925,44 @@
\ifSamepageMode%
\begin{samepage}%
\fi%
+ \ifCompactSongMode
+ \renewcommand{\ChBassFontSav}{\ChBassFont} %
+ \renewcommand{\ChFontSav}{\ChFont} %
+ \renewcommand{\ChBkFontSav}{\ChBkFont} %
+ \renewcommand{\SBDefaultFontSav}{\SBDefaultFont} %
+ \renewcommand{\SBOccursBrktFontSav}{\SBOccursBrktFont}%
+ %
+ \renewcommand{\ChBassFont}{\ChBassFontCS} %
+ \renewcommand{\ChFont}{\ChFontCS} %
+ \renewcommand{\ChBkFont}{\ChBkFontCS} %
+ \renewcommand{\SBDefaultFont}{\SBDefaultFontCS} %
+ \renewcommand{\SBOccursBrktFont}{\SBOccursBrktFontCS}%
+ \setlength{\columnsep}{0.25in}
+
+ \setlength{\textwidthSav} {\textwidth}
+ \setlength{\evensidemarginSav}{\evensidemargin}
+ \setlength{\marginparsepSav} {\marginparsep}
+ \setlength{\marginparwidthSav}{\marginparwidth}
+ %
+ \addtolength{\textwidth} {\marginparsep + \marginparwidth}
+ \addtolength{\evensidemargin}{-\marginparsep - \marginparwidth}
+ \setlength {\marginparsep} {0in}
+ \setlength {\marginparwidth}{0in}
+
+ \setlength{\chSpaceToleranceSav}{\chSpaceTolerance}
+ %
+ \setlength{\chSpaceTolerance}{1.0mm}
+
+ \renewcommand{\HangAmtSav} {\HangAmt}
+ \renewcommand{\LeftMarginSBChorusSav} {\LeftMarginSBChorus}
+ \renewcommand{\LeftMarginSBSectionSav}{\LeftMarginSBSection}
+ \renewcommand{\LeftMarginSBVerseSav} {\LeftMarginSBVerse}
+ %
+ \renewcommand{\HangAmt} {1.5em}
+ \renewcommand{\LeftMarginSBChorus} {2em}
+ \renewcommand{\LeftMarginSBSection}{\LeftMarginSBChorus}
+ \renewcommand{\LeftMarginSBVerse} {\LeftMarginSBChorus}
+ \fi
\begin{center}
\STitle[N]{\theSongTitle}{#3}\\
\vspace{-.5ex}
@@ -929,6 +985,22 @@
\end{samepage}%
\fi%
\ifCompactSongMode
+ \renewcommand{\ChBassFont}{\ChBassFontSav} %
+ \renewcommand{\ChFont}{\ChFontSav} %
+ \renewcommand{\ChBkFont}{\ChBkFontSav} %
+ \renewcommand{\SBDefaultFont}{\SBDefaultFontSav} %
+ \renewcommand{\SBOccursBrktFont}{\SBOccursBrktFontSav}%
+ %
+ \setlength{\textwidth} {\textwidthSav}
+ \setlength{\evensidemargin}{\evensidemarginSav}
+ \setlength{\marginparsep} {\marginparsepSav}
+ \setlength{\marginparwidth}{\marginparwidthSav}
+ %
+ \renewcommand{\HangAmt} {\HangAmtSav}
+ \renewcommand{\LeftMarginSBChorus} {\LeftMarginSBChorusSav}
+ \renewcommand{\LeftMarginSBSection}{\LeftMarginSBSectionSav}
+ \renewcommand{\LeftMarginSBVerse} {\LeftMarginSBVerseSav}
+ %
\end{multicols*}
\fi
\ifSongEject%