diff options
author | Karl Berry <karl@freefriends.org> | 2013-03-02 00:05:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-03-02 00:05:49 +0000 |
commit | dba0daa5b185f7dea890f66969641e2df7f86372 (patch) | |
tree | c9abc610672857563259282336cc79a99a68d95b /Master/texmf-dist/doc/latex/contracard/contracard.sty | |
parent | 6ae299d9a018bc6526c2abbbead893e86f9344a3 (diff) |
contracard (1mar13)
git-svn-id: svn://tug.org/texlive/trunk@29253 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/contracard/contracard.sty')
-rw-r--r-- | Master/texmf-dist/doc/latex/contracard/contracard.sty | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/latex/contracard/contracard.sty b/Master/texmf-dist/doc/latex/contracard/contracard.sty index 527e696423c..ede9fe22a35 100644 --- a/Master/texmf-dist/doc/latex/contracard/contracard.sty +++ b/Master/texmf-dist/doc/latex/contracard/contracard.sty @@ -22,6 +22,7 @@ \ProvidesPackage{contracard}[2013/02/20] \RequirePackage{intcalc} \RequirePackage{ifthen} +\RequirePackage{tocloft} \newcommand*{\defaultcontraenv}{flushleft} \newcommand*{\dancetitleenv}{flushleft} \newcommand*{\dancetitleformat}{\section*} @@ -30,11 +31,18 @@ \newcommand*{\movedelimiter}{,} \newcommand*{\partdelimiter}{.} \newcommand*{\midpartdelimiter}{;} +\newlength{\phrasevspace} +\setlength{\phrasevspace}{1em} +\newcommand*{\phraseseparator}{\vspace{\phrasevspace}} \newcounter{dancecount} \newcounter{partcount} \newcounter{phrasecount} \newcounter{dancepart} \newcounter{dancephrase} +\newcounter{dancepartlength} +\setcounter{dancepartlength}{16} +\newcounter{dancephraselength} +\setcounter{dancephraselength}{32} \newcommand*{\resetdancephrase}{% \ifthenelse{\value{partcount}=16}{\newline}{}% \@ifstar{\@resetdancephraseStar}{\@resetdancephraseNoStar}% @@ -65,16 +73,19 @@ }% } \newcommand*{\newdancephrase}{% - \ifthenelse{\not\value{phrasecount}=0\and\not\value{phrasecount}=32}{\newline}{}% + \ifthenelse{\not\value{phrasecount}=0}{\newline}{}% \addtocounter{dancephrase}{1}% \setcounter{phrasecount}{0}% \resetdancepart* } \newcommand*{\newdancepart}{% + \newline \addtocounter{dancepart}{1}% \setcounter{partcount}{0}% } \newenvironment{contra}[4][\defaultcontraenv]{% + \refstepcounter{dance} + \addcontentsline{lod}{dance}{\protect\numberline{\thedance}#2} \setcounter{dancecount}{0} \resetdancepart* \resetdancephrase* @@ -96,27 +107,29 @@ \end{\@contraenv} } \newcommand*{\move}[2][16]{% - \ifthenelse{\value{partcount}=16}{\newline}{}% - \ifthenelse{\value{phrasecount}=32}{% + \ifthenelse{\value{phrasecount}=\value{dancephraselength}}{% \newdancephrase% }{% - \ifthenelse{\value{partcount}=16}{% + \ifthenelse{\value{partcount}=\value{dancepartlength}}{% \newdancepart% }{}% } - \ifthenelse{\intcalcMod{\value{dancecount}}{16}=0}{% + \ifthenelse{\intcalcMod{\value{dancecount}}{\value{dancepartlength}}=0}{% \Alph{dancephrase}\arabic{dancepart}\partdelimiter\ % }{}% \addtocounter{dancecount}{#1}% \addtocounter{phrasecount}{#1}% \addtocounter{partcount}{#1}% #2% - \ifthenelse{\value{phrasecount}=32}{% - \pagebreak[1]\vspace{1em}% + \ifthenelse{\value{phrasecount}=\value{dancephraselength}}{% + \pagebreak[1]\phraseseparator% }{}% - \ifthenelse{\value{partcount}=8}{\midpartdelimiter\nopagebreak}{% - \ifthenelse{\not\value{partcount}=16}{\movedelimiter\nopagebreak\nolinebreak[2]}{}}% + \ifthenelse{\value{partcount}=\intcalcDiv{\value{dancepartlength}}{2}}{\midpartdelimiter\nopagebreak}{% + \ifthenelse{\not\value{partcount}=\value{dancepartlength}}{\movedelimiter\nopagebreak\nolinebreak[2]}{}}% } +\newlistof{dance}{lod}{\lodtitle} +\newcommand*{\listofdances}{\listofdance} +\newcommand*{\lodtitle}{List of Dances} %% %% ___________ %% Maintainer: Sam Whited |