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 | |
parent | 6ae299d9a018bc6526c2abbbead893e86f9344a3 (diff) |
contracard (1mar13)
git-svn-id: svn://tug.org/texlive/trunk@29253 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/contracard/Makefile | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/contracard/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/contracard/contracard-style.sty | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/contracard/contracard.lod | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/contracard/contracard.pdf | bin | 253956 -> 290433 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/contracard/contracard.sty | 31 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/contracard/contracard.dtx | 221 |
7 files changed, 206 insertions, 61 deletions
diff --git a/Master/texmf-dist/doc/latex/contracard/Makefile b/Master/texmf-dist/doc/latex/contracard/Makefile index 0ba7eaad186..af6a0772476 100644 --- a/Master/texmf-dist/doc/latex/contracard/Makefile +++ b/Master/texmf-dist/doc/latex/contracard/Makefile @@ -169,7 +169,9 @@ manifest: @for f in $(GENERATED); do echo $$f; done clean: - @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.glo *.gls *.example *.out *.synctex* *.tmp *.cls *.sty *.ins *.pdf *.dvi README LICENSE *.lot *.png + @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.glo *.gls *.example *.out + @$(RM) -- *.synctex* *.tmp *.cls *.sty *.ins *.pdf *.dvi README LICENSE *.lot + @$(RM) -- *.lod *.png @$(RM) -- $(GENERATED) $(ZIPS) @$(RM) -- $(builddir)/* diff --git a/Master/texmf-dist/doc/latex/contracard/README b/Master/texmf-dist/doc/latex/contracard/README index 0acf3d9ccde..9eee7a8412d 100644 --- a/Master/texmf-dist/doc/latex/contracard/README +++ b/Master/texmf-dist/doc/latex/contracard/README @@ -1,6 +1,6 @@ # Contra Card -A TeX class for contra and square dances calls. +A LaTeX package for contra and square dance calls. ## Download diff --git a/Master/texmf-dist/doc/latex/contracard/contracard-style.sty b/Master/texmf-dist/doc/latex/contracard/contracard-style.sty index 1dd0b6dda29..593cf349640 100644 --- a/Master/texmf-dist/doc/latex/contracard/contracard-style.sty +++ b/Master/texmf-dist/doc/latex/contracard/contracard-style.sty @@ -27,10 +27,12 @@ \fvset{gobble=2} \newenvironment*{exampledance}{% - \begin{minipage}{\textwidth} \vspace{3em} + \begin{framed} + \begin{minipage}[t][74mm][t]{\textwidth} }{% - \end{minipage} + \end{minipage} + \end{framed} } \newcommand*{\gittag}{% diff --git a/Master/texmf-dist/doc/latex/contracard/contracard.lod b/Master/texmf-dist/doc/latex/contracard/contracard.lod new file mode 100644 index 00000000000..b092cabd8f2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/contracard/contracard.lod @@ -0,0 +1,3 @@ +\contentsline {dance}{\numberline {1}Code's Compiling}{9}{dance.1} +\contentsline {dance}{\numberline {2}Untitled Blues \textnumero \ 1}{10}{dance.2} +\contentsline {dance}{\numberline {3}Untitled Blues \textnumero \ 2}{11}{dance.3} diff --git a/Master/texmf-dist/doc/latex/contracard/contracard.pdf b/Master/texmf-dist/doc/latex/contracard/contracard.pdf Binary files differindex eec6bf00b45..3883e504723 100644 --- a/Master/texmf-dist/doc/latex/contracard/contracard.pdf +++ b/Master/texmf-dist/doc/latex/contracard/contracard.pdf 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 diff --git a/Master/texmf-dist/source/latex/contracard/contracard.dtx b/Master/texmf-dist/source/latex/contracard/contracard.dtx index d63da61e50e..444a92104b6 100644 --- a/Master/texmf-dist/source/latex/contracard/contracard.dtx +++ b/Master/texmf-dist/source/latex/contracard/contracard.dtx @@ -123,16 +123,20 @@ % \StopEventually{} % \changes{0.1}{2013/02/09}{Created boilerplate for class} % \changes{0.3}{2013/02/20}{Split core functionality out into package} +% \changes{0.4}{2013/02/22}{Support swung dances} +% \changes{0.4}{2013/02/22}{Add list of dances} +% \changes{0.4}{2013/02/22}{Add \pkg{tocloft} package to requirements} % % \section{Building and using \pkg{contracard}} % -% \paragraph{Dependencies} Before building the \pkg{contracard} package you should verify that the -% following dependencies are installed: +% \paragraph{Dependencies} Before building the \pkg{contracard} package you +% should verify that the following dependencies are installed: % % \begin{macrocode} %<*contracard-pkg> \RequirePackage{intcalc} \RequirePackage{ifthen} +\RequirePackage{tocloft} %</contracard-pkg> % \end{macrocode} % @@ -147,7 +151,7 @@ % \end{macrocode} % \begin{macrocode} %<*contracard-pkg> -% \end{macrocode}d +% \end{macrocode} % % \paragraph{Building} Once you have all the required packages, building \pkg{contracard} from source % can be accomplished in multiple ways. If the Makefile is present running @@ -223,6 +227,21 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\phraseseparator} +% \changes{0.4}{2013/02/22}{Allow custom phrase separator character} +% \begin{macro}{\phrasevspace} +% \changes{0.4}{2013/02/22}{Allow custom phrase separation length} +% The \code{\textbackslash phraseseparator} macro is inserted between every +% musical phrase and --- by default --- inserts \code{phrasevspace} ammount of +% white space. +% \end{macro} +% \begin{macrocode} +\newlength{\phrasevspace} +\setlength{\phrasevspace}{1em} +\newcommand*{\phraseseparator}{\vspace{\phrasevspace}} +% \end{macrocode} +% \end{macro} +% % \section{The Meat} % % Next we'll define the meat of the \pkg{contracard} package. These are the @@ -262,6 +281,24 @@ % \end{macro} % \end{macro} % +% \begin{macro}{dancepartlength} +% \changes{0.4}{2013/02/22}{Create a new counter for the part length} +% \begin{macro}{dancephraselength} +% \changes{0.4}{2013/02/22}{Create a new counter for the phrase length} +% Most contra dances are composed of two 32 count phrases, each with two 16 +% count parts, however, it's sometimes useful to change these lengths (for swung +% dances and the like). It's important to fully understand how the move command +% works before modifying these values. Changing just one or the other can have +% unexpected consequences. +% \begin{macrocode} +\newcounter{dancepartlength} +\setcounter{dancepartlength}{16} +\newcounter{dancephraselength} +\setcounter{dancephraselength}{32} +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}{\resetdancephrase} % \begin{macro}{\resetdancepart} % \changes{0.2}{2013/02/15}{Allow the user to reset the phrase} @@ -311,12 +348,13 @@ % The user can also manually start a new phrase or part: % \begin{macrocode} \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}% } @@ -334,6 +372,8 @@ % the header. % \begin{macrocode} \newenvironment{contra}[4][\defaultcontraenv]{% + \refstepcounter{dance} + \addcontentsline{lod}{dance}{\protect\numberline{\thedance}#2} \setcounter{dancecount}{0} \resetdancepart* \resetdancephrase* @@ -367,30 +407,62 @@ % the move takes. If the count is not specified, 16 is used as the default. % \begin{macrocode} \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]}{}}% } % \end{macrocode} % \end{macro} % +% \section{Lists and Indices} +% +% \subsection{Lists} +% +% Just as many classes allow you to build a table of contents, or a list of +% figures, \pkg{contracard} allows you to create a list of dances. +% +% \begin{macro}{\listofdances} +% The list of dances is created by a call to \code{\textbackslash listofdance} +% by default, however, we define an alias: \code{\textbackslash listofdances} +% to prevent confusion. +% \begin{macrocode} +\newlistof{dance}{lod}{\lodtitle} +\newcommand*{\listofdances}{\listofdance} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\lodtitle} +% The title of the list of dances will be: +% \begin{macrocode} +\newcommand*{\lodtitle}{List of Dances} +% \end{macrocode} +% \end{macro} +% +% When printed, the list of dances looks something like this: +% +% \clearpage +% \begin{framed} +% \phantomsection +% \addcontentsline{toc}{subsubsection}{\lodtitle} +% \listofdances +% \end{framed} +% % \begin{macrocode} %</contracard-pkg> %<*contracard-cls> @@ -398,9 +470,9 @@ % % \section{The \pkg{contracard} class} % -% The Contra Card project also provides a class (also called \pkg{contracard}) -% that acts as a convenience wrapper around the core functionality provided by -% the package. This is useful for generating calling cards, and saves you the +% The Contra Card project also provides a class (\fname{contracard.cls}) which +% acts as a convenience wrapper around the core functionality provided by the +% package. This is useful for generating calling cards, and saves you the % trouble of looking up standard card sizes and figuring out margins and where % to put headings and the like. % @@ -476,10 +548,21 @@ % % \section{Examples} % -% A few examples are contained below: +% A few examples are contained below. Note that the output is wrapped in a frame +% for clarity; no attempt has been made to make the frame match the size, +% margins, etc. that a calling card would have (these examples don't use +% \fname{contracard.cls}, just the package). % % \subsection{Code's Compiling by Sam Whited} % +% This is a simple dance from the caller's perspective (not so for the dancers!) +% and doesn't do much to show off Contra Card's features. Each move is 8 counts, +% and it uses standard phrasing. Teaching it may be more difficult; at first +% glance it appears not to flow, but by adding a few turns and making sure that +% dancers know they don't have to stop and face forward before doing the see saw +% (almost as if it were a mad robin) it will flow smoothly. Overall it's a bit +% busy, and probably needs revision. +% % \begin{Verbatim} % \begin{contra}{Code's Compiling}{Sam Whited}{Duple becket} % \move[8]{Neighbor dosido} @@ -489,10 +572,19 @@ % \move[8]{Balance and petronella} % \move[8]{Partner swing} % \move[8]{Left diagonal: Right and left through} -% \vspace*{2em} +% \begin{flushleft} +% {\footnotesize \textbf{Notes} The Neighbor dosido into a partner see saw +% should be one fluid motion. Resist spinning in the dosido, and start +% revolving slowly over your right shoulder as you enter the see saw and +% everything will flow. Make sure lines have \textbf{lots} of space for the +% dosido.} +% \end{flushleft} +% \vspace*{\fill} % \begin{flushright} % \href{http://creativecommons.org/licenses/by/3.0/}{% -% \IfFileExists{by.png}{\includegraphics[width=40px]{by.png}}{\cc\by}} +% \IfFileExists{by.png}{% +% \includegraphics[width=40px]{by.png}% +% }{\cc\by}} % \end{flushright} % \end{contra} % \end{Verbatim} @@ -506,19 +598,36 @@ % \move[8]{Balance and petronella} % \move[8]{Partner swing} % \move[8]{Left diagonal: Right and left through} -% \vspace*{2em} +% \begin{flushleft} +% {\footnotesize \textbf{Notes} The Neighbor dosido into a partner see saw +% should be one fluid motion. Resist spinning in the dosido, and start +% revolving slowly over your right shoulder as you enter the see saw and +% everything will flow. Make sure lines have \textbf{lots} of space for the +% dosido.} +% \end{flushleft} +% \vspace*{\fill} % \begin{flushright} % \href{http://creativecommons.org/licenses/by/3.0/}{% -% \IfFileExists{by.png}{\includegraphics[width=40px]{by.png}}{\cc\by}} +% \IfFileExists{by.png}{% +% \includegraphics[width=40px]{by.png}% +% }{\cc\by}} % \end{flushright} % \end{contra} % \end{exampledance} % % \subsection{Untitled Blues Contras by Seth Tepfer} % +% These blues contras consist of three, 16 count phrases (\code{A1}, \code{B1}, +% and \code{C1}). The first employs the \code{\textbackslash newdancephrase} +% command to reset the phrase every 16 counts, the second changes the +% \code{dancephraselength} and lets \pkg{contracard} handle figuring out how to +% break up the phrases. +% +% \subsubsection*{Untitled Blues \textnumero\ 1} +% % \begin{Verbatim} % \renewcommand*{\partdelimiter}{:} -% \begin{contra}{Untitled Blues \textnumero\ 1}{\href{http://www.dancerhapsody.com/calling/dances.html}{Seth Tepfer}}{Duple Minor Im.} +% \begin{contra}{Untitled Blues \textnumero\ 1}{Seth Tepfer}{Duple Minor Im.} % \move[8]{Neighbor gypsy} % \move[8]{Ladies gypsy} % \newdancephrase @@ -526,24 +635,12 @@ % \newdancephrase % \move[8]{Ladies chain} % \move[8]{Left hand star} -% \vspace*{2em} -% \begin{flushright} -% \href{http://creativecommons.org/licenses/by-nc/3.0/}{% -% \IfFileExists{by-nc.png}{\includegraphics[width=40px]{by-nc.png}}{\cc\bync}} -% \end{flushright} -% \end{contra} -% \begin{contra}{Untitled Blues \textnumero\ 2}{\href{http://www.dancerhapsody.com/calling/dances.html}{Seth Tepfer}}{Duple Minor Im.} -% \move[8]{Neighbor gypsy} -% \move[8]{Gents allemande left 1\textonehalf} -% \newdancephrase -% \move[16]{Partner balance and swing} -% \newdancephrase -% \move[8]{\textonehalf\ promenade across set} -% \move[8]{Ladies chain} -% \vspace*{2em} +% \vspace*{\fill} % \begin{flushright} -% \href{http://creativecommons.org/licenses/by-nc/3.0/}{% -% \IfFileExists{by-nc.png}{\includegraphics[width=40px]{by-nc.png}}{\cc\bync}} +% \href{http://creativecommons.org/licenses/by-nc/3.0/}{% +% \IfFileExists{by-nc.png}{% +% \includegraphics[width=40px]{by-nc.png}% +% }{\cc\bync}} % \end{flushright} % \end{contra} % \end{Verbatim} @@ -558,26 +655,52 @@ % \newdancephrase % \move[8]{Ladies chain} % \move[8]{Left hand star} -% \vspace*{2em} +% \vspace*{\fill} % \begin{flushright} -% \href{http://creativecommons.org/licenses/by-nc/3.0/}{% -% \IfFileExists{by-nc.png}{\includegraphics[width=40px]{by-nc.png}}{\cc\bync}} +% \href{http://creativecommons.org/licenses/by-nc/3.0/}{% +% \IfFileExists{by-nc.png}{% +% \includegraphics[width=40px]{by-nc.png}% +% }{\cc\bync}} % \end{flushright} % \end{contra} % \end{exampledance} +% +% \subsubsection*{Untitled Blues \textnumero\ 2} +% +% \begin{Verbatim} +% \setlength{\phrasevspace}{0em} +% \setcounter{dancephraselength}{16} +% \begin{contra}{Untitled Blues \textnumero\ 2}{Seth Tepfer}{Duple Minor Im.} +% \move[8]{Neighbor gypsy} +% \move[8]{Gents allemande left 1\textonehalf} +% \move[16]{Partner balance and swing} +% \move[8]{\textonehalf\ promenade across set} +% \move[8]{Ladies chain} +% \vspace*{\fill} +% \begin{flushright} +% \href{http://creativecommons.org/licenses/by-nc/3.0/}{% +% \IfFileExists{by-nc.png}{% +% \includegraphics[width=40px]{by-nc.png}% +% }{\cc\bync}} +% \end{flushright} +% \end{contra} +% \end{Verbatim} +% % \begin{exampledance} +% \setlength{\phrasevspace}{0em} +% \setcounter{dancephraselength}{16} % \begin{contra}{Untitled Blues \textnumero\ 2}{\href{http://www.dancerhapsody.com/calling/dances.html}{Seth Tepfer}}{Duple Minor Im.} % \move[8]{Neighbor gypsy} % \move[8]{Gents allemande left 1\textonehalf} -% \newdancephrase % \move[16]{Partner balance and swing} -% \newdancephrase % \move[8]{\textonehalf\ promenade across set} % \move[8]{Ladies chain} -% \vspace*{2em} +% \vspace*{\fill} % \begin{flushright} -% \href{http://creativecommons.org/licenses/by-nc/3.0/}{% -% \IfFileExists{by-nc.png}{\includegraphics[width=40px]{by-nc.png}}{\cc\bync}} +% \href{http://creativecommons.org/licenses/by-nc/3.0/}{% +% \IfFileExists{by-nc.png}{% +% \includegraphics[width=40px]{by-nc.png}% +% }{\cc\bync}} % \end{flushright} % \end{contra} % \end{exampledance} @@ -612,10 +735,12 @@ \fvset{gobble=2} \newenvironment*{exampledance}{% - \begin{minipage}{\textwidth} \vspace{3em} + \begin{framed} + \begin{minipage}[t][74mm][t]{\textwidth} }{% - \end{minipage} + \end{minipage} + \end{framed} } \newcommand*{\gittag}{% |