summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/contracard/Makefile13
-rw-r--r--Master/texmf-dist/doc/latex/contracard/README6
-rw-r--r--Master/texmf-dist/doc/latex/contracard/contracard-style.sty13
-rw-r--r--Master/texmf-dist/doc/latex/contracard/contracard.pdfbin221844 -> 253956 bytes
-rw-r--r--Master/texmf-dist/doc/latex/contracard/contracard.sty133
-rw-r--r--Master/texmf-dist/source/latex/contracard/contracard.dtx523
-rw-r--r--Master/texmf-dist/tex/latex/contracard/contracard.cls51
7 files changed, 552 insertions, 187 deletions
diff --git a/Master/texmf-dist/doc/latex/contracard/Makefile b/Master/texmf-dist/doc/latex/contracard/Makefile
index 963e13c200c..0ba7eaad186 100644
--- a/Master/texmf-dist/doc/latex/contracard/Makefile
+++ b/Master/texmf-dist/doc/latex/contracard/Makefile
@@ -74,7 +74,16 @@ ctan: $(CTAN_ZIP)
tds: $(TDS_ZIP)
world: all ctan
-gendoc: $(DTX)
+resources: by.png by-nc.png
+
+by.png:
+ wget http://mirrors.creativecommons.org/presskit/buttons/80x15/png/by.png
+
+by-nc.png:
+ wget http://mirrors.creativecommons.org/presskit/buttons/80x15/png/by-nc.png
+
+
+gendoc: $(DTX) resources
@echo "Compiling documentation"
$(DO_LATEX_WRITE18)
$(DO_MAKEINDEX)
@@ -160,7 +169,7 @@ 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
+ @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.glo *.gls *.example *.out *.synctex* *.tmp *.cls *.sty *.ins *.pdf *.dvi README LICENSE *.lot *.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 cdb282ba00e..0acf3d9ccde 100644
--- a/Master/texmf-dist/doc/latex/contracard/README
+++ b/Master/texmf-dist/doc/latex/contracard/README
@@ -8,5 +8,7 @@ Development of this package occurs primarily on
[GitHub](https://github.com/SamWhited/contra-card). Issues and pull requests
should be submitted there.
-The current release version of **Contra Card** is available from
-[CTAN](http://ctan.org/pkg/contracard).
+The current [release version](http://ctan.org/tex-archive/macros/latex/contrib/contracard)
+of **Contra Card** and associated
+[documentation](http://mirrors.ctan.org/macros/latex/contrib/contracard/contracard.pdf)
+[PDF] is available from [CTAN](http://ctan.org/pkg/contracard).
diff --git a/Master/texmf-dist/doc/latex/contracard/contracard-style.sty b/Master/texmf-dist/doc/latex/contracard/contracard-style.sty
index 335d953dc7a..1dd0b6dda29 100644
--- a/Master/texmf-dist/doc/latex/contracard/contracard-style.sty
+++ b/Master/texmf-dist/doc/latex/contracard/contracard-style.sty
@@ -19,12 +19,20 @@
%% LaTeX version 2008/05/04 or later.
%%
\ProvidesPackage{contracard-style}
-\usepackage{fancyvrb,hologo,framed,multicol,url}
+\usepackage[utf8x]{inputenc}
+\usepackage{fancyvrb,hologo,framed,multicol,url,textcomp,cclicenses,graphicx,contracard}
\usepackage[pdfborder=0, bookmarks, colorlinks=false, hidelinks]{hyperref}
\usepackage[parfill]{parskip}
\fvset{gobble=2}
+\newenvironment*{exampledance}{%
+ \begin{minipage}{\textwidth}
+ \vspace{3em}
+}{%
+ \end{minipage}
+}
+
\newcommand*{\gittag}{%
\immediate\write18{%
rm gittag.tex 2> /dev/null; (git describe --tags --dirty || echo "v0.0") 2> /dev/null > gittag.tex
@@ -47,7 +55,8 @@
%% Public key: 0xEC2C9934
%%
%% This work consists of this file contracard.dtx
-%% and the derived files contracard.cls
+%% and the derived files contracard.sty
+%% and contracard.cls
%% and contracard.pdf
%%
%%
diff --git a/Master/texmf-dist/doc/latex/contracard/contracard.pdf b/Master/texmf-dist/doc/latex/contracard/contracard.pdf
index 9b0c5603973..eec6bf00b45 100644
--- a/Master/texmf-dist/doc/latex/contracard/contracard.pdf
+++ b/Master/texmf-dist/doc/latex/contracard/contracard.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/contracard/contracard.sty b/Master/texmf-dist/doc/latex/contracard/contracard.sty
new file mode 100644
index 00000000000..527e696423c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/contracard/contracard.sty
@@ -0,0 +1,133 @@
+%%
+%% This is file `contracard.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% contracard.dtx (with options: `contracard-pkg')
+%%
+%% Copyright 2012 Samuel Whited
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of
+%% LaTeX version 2008/05/04 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{contracard}[2013/02/20]
+\RequirePackage{intcalc}
+\RequirePackage{ifthen}
+\newcommand*{\defaultcontraenv}{flushleft}
+\newcommand*{\dancetitleenv}{flushleft}
+\newcommand*{\dancetitleformat}{\section*}
+\newcommand*{\danceauthorformat}{\subsection*}
+\newcommand*{\danceformformat}{\hfill}
+\newcommand*{\movedelimiter}{,}
+\newcommand*{\partdelimiter}{.}
+\newcommand*{\midpartdelimiter}{;}
+\newcounter{dancecount}
+\newcounter{partcount}
+\newcounter{phrasecount}
+\newcounter{dancepart}
+\newcounter{dancephrase}
+\newcommand*{\resetdancephrase}{%
+ \ifthenelse{\value{partcount}=16}{\newline}{}%
+ \@ifstar{\@resetdancephraseStar}{\@resetdancephraseNoStar}%
+}
+\newcommand*{\@resetdancephraseStar}{%
+ \setcounter{dancephrase}{1}%
+ \setcounter{phrasecount}{0}%
+ \resetdancepart*
+}
+\newcommand*{\@resetdancephraseNoStar}{%
+ \ifthenelse{\value{dancephrase}=1}{}{%
+ \setcounter{dancephrase}{1}%
+ \setcounter{phrasecount}{0}%
+ \resetdancepart
+ }%
+}
+\newcommand*{\resetdancepart}{%
+ \@ifstar{\@resetdancepartStar}{\@resetdancepartNoStar}%
+}
+\newcommand*{\@resetdancepartStar}{%
+ \setcounter{dancepart}{1}%
+ \setcounter{partcount}{0}%
+}
+\newcommand*{\@resetdancepartNoStar}{%
+ \ifthenelse{\value{dancepart}=1}{}{%
+ \setcounter{dancepart}{1}%
+ \setcounter{partcount}{0}%
+ }%
+}
+\newcommand*{\newdancephrase}{%
+ \ifthenelse{\not\value{phrasecount}=0\and\not\value{phrasecount}=32}{\newline}{}%
+ \addtocounter{dancephrase}{1}%
+ \setcounter{phrasecount}{0}%
+ \resetdancepart*
+}
+\newcommand*{\newdancepart}{%
+ \addtocounter{dancepart}{1}%
+ \setcounter{partcount}{0}%
+}
+\newenvironment{contra}[4][\defaultcontraenv]{%
+ \setcounter{dancecount}{0}
+ \resetdancepart*
+ \resetdancephrase*
+ \ifdefined\@ccisclass\clearpage\fi%
+ \begin{\dancetitleenv}
+ \ifdefined\@ccisclass%
+ \pagestyle{myheadings}
+ \thispagestyle{myheadings}
+ \markboth{}{\danceformformat{#4}}
+ \else%
+ {\danceformformat{#4}}%
+ \fi%
+ {\dancetitleformat{#2}}%
+ {\danceauthorformat{#3}}%
+ \end{\dancetitleenv}
+ \newcommand*{\@contraenv}{#1}
+ \begin{\@contraenv}
+}{%
+ \end{\@contraenv}
+}
+\newcommand*{\move}[2][16]{%
+ \ifthenelse{\value{partcount}=16}{\newline}{}%
+ \ifthenelse{\value{phrasecount}=32}{%
+ \newdancephrase%
+ }{%
+ \ifthenelse{\value{partcount}=16}{%
+ \newdancepart%
+ }{}%
+ }
+ \ifthenelse{\intcalcMod{\value{dancecount}}{16}=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{partcount}=8}{\midpartdelimiter\nopagebreak}{%
+ \ifthenelse{\not\value{partcount}=16}{\movedelimiter\nopagebreak\nolinebreak[2]}{}}%
+}
+%%
+%% ___________
+%% Maintainer: Sam Whited
+%% Website: https://samwhited.com
+%% Contact: sam@samwhited.com
+%% Public key: 0xEC2C9934
+%%
+%% This work consists of this file contracard.dtx
+%% and the derived files contracard.sty
+%% and contracard.cls
+%% and contracard.pdf
+%%
+%%
+%% End of file `contracard.sty'.
diff --git a/Master/texmf-dist/source/latex/contracard/contracard.dtx b/Master/texmf-dist/source/latex/contracard/contracard.dtx
index 2c5088ec48e..d63da61e50e 100644
--- a/Master/texmf-dist/source/latex/contracard/contracard.dtx
+++ b/Master/texmf-dist/source/latex/contracard/contracard.dtx
@@ -28,13 +28,15 @@
Public key: 0xEC2C9934
This work consists of this file contracard.dtx
- and the derived files contracard.cls
+ and the derived files contracard.sty
+ and contracard.cls
and contracard.pdf
\endpostamble
\askforoverwritefalse
-\generate{\file{contracard.cls}{\from{contracard.dtx}{contracard}}}
+\generate{\file{contracard.sty}{\from{contracard.dtx}{contracard-pkg}}}
+\generate{\file{contracard.cls}{\from{contracard.dtx}{contracard-cls}}}
\generate{\file{contracard-style.sty}{\from{contracard.dtx}{doc-style}}}
\obeyspaces
@@ -43,6 +45,7 @@
\Msg{* To finish the installation you have to move the *}
\Msg{* following file into a directory searched by TeX: *}
\Msg{* *}
+\Msg{* contracard.sty *}
\Msg{* contracard.cls *}
\Msg{* *}
\Msg{****************************************************}
@@ -54,11 +57,15 @@
\ProvidesFile{contracard.dtx}
%</driver>
%
-%<*contracard>
+%<*contracard-pkg>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{contracard}[2013/02/17]
+\ProvidesPackage{contracard}[2013/02/20]
+%</contracard-pkg>
+%<*contracard-cls>
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{contracard}[2013/02/20]
\AtEndOfClass{\LoadClass{article}}
-%</contracard>%
+%</contracard-cls>
%
%<*driver>
\documentclass[a4paper]{ltxdoc}
@@ -77,7 +84,7 @@
% \makeatletter
% \errorcontextlines=999
%
-% \title{The \textsf{contracard} class}
+% \title{The Contra Card Project}
% \author{
% \name{Sam Whited}\\
% \texttt{sam@samwhited.com}
@@ -89,17 +96,20 @@
%
% \section{Introduction}
%
-% The \pkg{contracard} class is designed to aid in the formatting and
+% The \textbf{Contra Card} project is designed to aid in the formatting and
% typesetting of caller cards for traditional square and line dances.
%
-% \subsection{Rationale}
+% The project comprises a \LaTeX\ package (\fname{contracard.sty}) and a
+% \LaTeX\ class (\fname{contracard.cls}). The package provides the core
+% functionality of Contra Card while the class file acts as a convenience
+% wrapper for making calling cards.
+%
+% \subsection{About the source}
%
-% There is little to no purpose for this class. I was tired of seeing caller
-% cards that were written in difficult to read shorthand, or, when they were
-% presented in a digital format, using some ugly 90s-looking HTML or MS Word
-% template. This is my attempt to make calling cards more beautiful.
+% Contributions are welcome, and the latest development version of the project
+% can always be found at \url{https://github.com/samwhited/contra-card}.
%
-% \subsection{License / about the source}
+% \subsection{License}
%
% This project may be distributed and/or modified under the conditions of the
% \LaTeX\ Project Public License, either version 1.3c of this license or (at
@@ -110,166 +120,235 @@
% and version 1.3c or later is part of all distributions of \LaTeX\ version
% 2008/05/04 or later.
%
-% Contributions are welcome, and the latest development version of the project
-% can always be found at \url{https://github.com/samwhited/contracard}.
-%
% \StopEventually{}
% \changes{0.1}{2013/02/09}{Created boilerplate for class}
-% \section{Package building and loading}
+% \changes{0.3}{2013/02/20}{Split core functionality out into package}
+%
+% \section{Building and using \pkg{contracard}}
+%
+% \paragraph{Dependencies} Before building the \pkg{contracard} package you should verify that the
+% following dependencies are installed:
%
% \begin{macrocode}
-%<*contracard>
+%<*contracard-pkg>
+\RequirePackage{intcalc}
+\RequirePackage{ifthen}
+%</contracard-pkg>
% \end{macrocode}
%
-% \paragraph{Building}
-%
-% Before building \pkg{contracard} you should verify that the following
-% dependencies are installed:
+% If you're using the class, you'll want the following additional dependencies:
%
% \begin{macrocode}
-\AtEndOfClass{\RequirePackage{intcalc}}
-\AtEndOfClass{\RequirePackage{hyperref}}
-\AtEndOfClass{\RequirePackage{ifthen}}
+%<*contracard-cls>
\AtEndOfClass{\RequirePackage{geometry}}
-\AtEndOfClass{\RequirePackage{fancyhdr}}
\AtEndOfClass{\RequirePackage[compact]{titlesec}}
+\AtEndOfClass{\RequirePackage{contracard}}
+%</contracard-cls>
% \end{macrocode}
-% Once you have all the required packages, building \pkg{contracard} from source
+% \begin{macrocode}
+%<*contracard-pkg>
+% \end{macrocode}d
+%
+% \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
% \code{make help} will tell you everything you need to know. To manually
% extract the files and generate the documentation simply run \code{pdflatex}
-% against \fname{contracard.dtx} with the \code{-{}-shell-escape} option:
+% against \fname{contracard.dtx}:
%
% \begin{Verbatim}
% $ pdflatex --shell-escape contracard.dtx
% \end{Verbatim}
%
-% \paragraph{Options}
+% The \code{-{}-shell-escape} option is only required if you want the output to
+% contain version information. This will also require that you have \pkg{git}
+% installed as the version is determined by running
%
-% \hypertarget{CONTRACARD:OPTIONS}{}
-% \begin{macro}{small}
-% \begin{macro}{medium}
-% \begin{macro}{large}
-% \begin{macro}{a7paper}
-% The class can also be loaded with any of the following options:
+% \begin{Verbatim}
+% $ git describe --tags
+% \end{Verbatim}
+%
+% \paragraph{Using \pkg{contracard}} Building results in two main files, a class
+% and a package. In general, if you want to make a calling card, use the
+% \pkg{contracard} class and if you want to print a contra dance in a book or
+% article, use a different class and require the \pkg{contracard} package.
+%
+% \section{Formatting}
+%
+% These options determine how the dance will look.
+%
+% \begin{macro}{\defaultcontraenv}
+% \begin{macro}{\dancetitleenv}
+% \changes{0.1}{2013/02/14}{Allow user to format moves}
+% \changes{0.3}{2013/02/20}{Allow user to format dance title block}
+% By default, all contra moves and the title block are wrapped in the
+% \code{flushleft} environment. To change this you can renew
+% the following macros:
% \begin{macrocode}
-\DeclareOption{small}{%
- \AtBeginDocument{%
- \titleformat{\section}{\normalsize\bfseries}{\thesection}{1em}{}%
- }
- \PassOptionsToPackage{%
- margin=0.25in,top=0.75in,paperwidth=5in,paperheight=3in%
- }{geometry}%
-}
-\DeclareOption{medium}{%
- \AtBeginDocument{\large}
- \PassOptionsToPackage{%
- margin=0.5in,top=0.75in,paperwidth=6in,paperheight=4in%
- }{geometry}%
-}
-\DeclareOption{large}{%
- \AtBeginDocument{\Large}
- \PassOptionsToPackage{%
- margin=0.75in,top=1in,paperwidth=8in,paperheight=5in%
- }{geometry}%
-}
-\DeclareOption{a7paper}{%
- \AtBeginDocument{%
- \titleformat{\section}{\normalsize\bfseries}{\thesection}{1em}{}%
- }
- \PassOptionsToPackage{%
- margin=5mm,top=15mm,paperwidth=105mm,paperheight=74mm%
- }{geometry}%
-}
-\DeclareOption*{%
- \PassOptionsToClass{\CurrentOption}{article}%
-}
+\newcommand*{\defaultcontraenv}{flushleft}
+\newcommand*{\dancetitleenv}{flushleft}
% \end{macrocode}
-% The \code{small} option creates a 127.0 by 76.2 mm (5 by 3 in) card.
-% The \code{medium} option creates a 152.4 by 101.6 mm (6 by 4 in) card.
-% The \code{large} option creates a 203.2 by 27.0 mm (8 by 5 in) card.
-% The \code{a7paper} option creates a 105 by 74 mm (4.1 by 2.9 in) card.
-% Any unrecognized options are passed to the \pkg{article} class.
% \end{macro}
% \end{macro}
+%
+% \begin{macro}{\dancetitleformat}
+% \begin{macro}{\danceauthorformat}
+% \begin{macro}{\danceformformat}
+% \changes{0.3}{2013/02/20}{Allow the user to change the dance title format}
+% \changes{0.3}{2013/02/20}{Allow the user to change the dance form format}
+% To change the formatting of a dance's title, author, or form, redefine the
+% following macros:
+% \begin{macrocode}
+\newcommand*{\dancetitleformat}{\section*}
+\newcommand*{\danceauthorformat}{\subsection*}
+\newcommand*{\danceformformat}{\hfill}
+% \end{macrocode}
+% \end{macro}
% \end{macro}
% \end{macro}
%
-% \section{Environment setup}
-%
-% First let's set up the basic environment. We'll start by turning off headers,
-% and removing the header rule inserted by \pkg{fancyhdr} on pages that will
-% have headers later:
-%
+% \begin{macro}{\movedelimiter}
+% \changes{0.3}{2013/02/20}{Allow customizing the move delimiter character}
+% \begin{macro}{\partdelimiter}
+% \changes{0.3}{2013/02/20}{Allow customizing the part delimiter}
+% \begin{macro}{\midpartdelimiter}
+% \changes{0.3}{2013/02/20}{Allow customizing the mid-part delimiter}
+% These commands define delimiters that are used between moves, or at the midway
+% point in a part.
% \begin{macrocode}
-\AtBeginDocument{\renewcommand{\headrulewidth}{0pt}}
-\AtBeginDocument{\pagestyle{empty}}
+\newcommand*{\movedelimiter}{,}
+\newcommand*{\partdelimiter}{.}
+\newcommand*{\midpartdelimiter}{;}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \section{The Meat}
+%
+% Next we'll define the meat of the \pkg{contracard} package. These are the
+% functions, counters, and environments that actually deal with generating a
+% dance.
+%
+% \subsection{Musical counts and phrases}
%
% \begin{macro}{dancecount}
% \begin{macro}{partcount}
% \changes{0.2}{2013/02/15}{Create a counter for the current musical part}
+% \changes{0.3}{2013/02/21}{Change to contain the count, not the part itself}
% \begin{macro}{phrasecount}
% \changes{0.2}{2013/02/15}{Create a counter for the current musical phrase}
-% Next, we'll create some counters that will help us keep track the counts (or
-% `steps') in the dance. The \code{dancecount} is reset at the start of each new
-% dance, the \code{partcount} is reset at the begining of each part (eg. \code{%
-% A1} or \code{B1}), and the \code{phrasecount} is reset every time the part
-% changes (eg. from \code{A} to \code{B}).
+% \changes{0.3}{2013/02/21}{Change to contain the count, not the phrase itself}
+% \begin{macro}{dancepart}
+% \changes{0.3}{2013/02/21}{Create a new counter for the current phrase}
+% \begin{macro}{dancephrase}
+% \changes{0.3}{2013/02/21}{Create a new counter for the current phrase}
+% First we'll create some counters that will help us keep track of the counts
+% (or `steps') in the dance. The \code{dancecount} is reset at the start of each
+% new dance, the \code{partcount} is reset at the begining of each part (eg.
+% \code{A1} or \code{B1}), and the \code{phrasecount} is reset every time the
+% part changes (eg. from \code{A} to \code{B}). The \code{dancepart} and
+% \code{dancephrase} counters contain the number of the part of phrase in the dance
+% (instead of the number of steps).
% \begin{macrocode}
\newcounter{dancecount}
\newcounter{partcount}
\newcounter{phrasecount}
+\newcounter{dancepart}
+\newcounter{dancephrase}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\progressed}
+% \begin{macro}{\resetdancephrase}
+% \begin{macro}{\resetdancepart}
% \changes{0.2}{2013/02/15}{Allow the user to reset the phrase}
+% \changes{0.3}{2013/02/21}{Change name of \code{\textbackslash progressed}}
% The phrase will continue to increment (\code{A}, \code{B}, \code{C}) unless
-% the user resets it by calling \code{\textbackslash progressed}. This does not
-% strictly indicate progression, but it will be intuitive for most callers.
+% the user resets it by calling \code{\textbackslash resetdancephrase}. The user
+% can also manually reset the part. If the value of the phrase or part would be
+% the same after resetting, no action is taken.
% \begin{macrocode}
-\newcommand*{\progressed}{\setcounter{phrasecount}{1}}
+\newcommand*{\resetdancephrase}{%
+ \ifthenelse{\value{partcount}=16}{\newline}{}%
+ \@ifstar{\@resetdancephraseStar}{\@resetdancephraseNoStar}%
+}
+\newcommand*{\@resetdancephraseStar}{%
+ \setcounter{dancephrase}{1}%
+ \setcounter{phrasecount}{0}%
+ \resetdancepart*
+}
+\newcommand*{\@resetdancephraseNoStar}{%
+ \ifthenelse{\value{dancephrase}=1}{}{%
+ \setcounter{dancephrase}{1}%
+ \setcounter{phrasecount}{0}%
+ \resetdancepart
+ }%
+}
+\newcommand*{\resetdancepart}{%
+ \@ifstar{\@resetdancepartStar}{\@resetdancepartNoStar}%
+}
+\newcommand*{\@resetdancepartStar}{%
+ \setcounter{dancepart}{1}%
+ \setcounter{partcount}{0}%
+}
+\newcommand*{\@resetdancepartNoStar}{%
+ \ifthenelse{\value{dancepart}=1}{}{%
+ \setcounter{dancepart}{1}%
+ \setcounter{partcount}{0}%
+ }%
+}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
-% \subsection{Formatting}
-%
-% There are also some options to determine how the environment will be
-% formatted.
-%
-% \begin{macro}{\defaultcontraenv}
-% \changes{0.1}{2013/02/14}{Allow user to format moves}
-% By default, all contra moves are wrapped in the \code{flushleft} environment.
-% To change this you can renew \code{\textbackslash defaultcontraenv}.
+% \begin{macro}{\newdancephrase}
+% \changes{0.3}{2013/02/21}{Allow user to manually start a new phrase}
+% \begin{macro}{\newdancepart}
+% \changes{0.3}{2013/02/21}{Allow user to manually start a new part}
+% The user can also manually start a new phrase or part:
% \begin{macrocode}
-\newcommand*{\defaultcontraenv}{flushleft}
+\newcommand*{\newdancephrase}{%
+ \ifthenelse{\not\value{phrasecount}=0\and\not\value{phrasecount}=32}{\newline}{}%
+ \addtocounter{dancephrase}{1}%
+ \setcounter{phrasecount}{0}%
+ \resetdancepart*
+}
+\newcommand*{\newdancepart}{%
+ \addtocounter{dancepart}{1}%
+ \setcounter{partcount}{0}%
+}
% \end{macrocode}
% \end{macro}
-%
-% \section{The Meat}
-%
-% Next we'll define the meat of the \pkg{contracard} package: The \code{contra}
-% environment and the \code{\textbackslash move} command.
+% \end{macro}
%
% \subsection{The \code{contra} environment}
%
% \begin{macro}{contra}
% \changes{0.1}{2013/02/14}{Create contra environment}
-% The contra environment is pretty simple. It clears the page, resets the
-% various counters, and displays some information about the dance.
+% The contra environment is pretty simple. It resets the various counters, and
+% displays some information about the dance---if it is used inside of the
+% \pkg{contracard} class, it also clears the page and moves the dance form into
+% the header.
% \begin{macrocode}
\newenvironment{contra}[4][\defaultcontraenv]{%
- \clearpage
\setcounter{dancecount}{0}
- \setcounter{partcount}{1}
- \setcounter{phrasecount}{1}
- \thispagestyle{fancy}
- \rhead{#4}
- \section*{#2}
- {#3}
+ \resetdancepart*
+ \resetdancephrase*
+ \ifdefined\@ccisclass\clearpage\fi%
+ \begin{\dancetitleenv}
+ \ifdefined\@ccisclass%
+ \pagestyle{myheadings}
+ \thispagestyle{myheadings}
+ \markboth{}{\danceformformat{#4}}
+ \else%
+ {\danceformformat{#4}}%
+ \fi%
+ {\dancetitleformat{#2}}%
+ {\danceauthorformat{#3}}%
+ \end{\dancetitleenv}
\newcommand*{\@contraenv}{#1}
\begin{\@contraenv}
}{%
@@ -282,28 +361,119 @@
%
% \begin{macro}{\move}
% \changes{0.1}{2013/02/14}{Add move command}
+% \changes{0.3}{2013/02/21}{Simplify dance logic using new counters}
% The next thing we need to define is the \code{\textbackslash move} command.
% This command takes in a move to display, and (optionally) the number of counts
% 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}{%
+ \newdancephrase%
+ }{%
+ \ifthenelse{\value{partcount}=16}{%
+ \newdancepart%
+ }{}%
+ }
\ifthenelse{\intcalcMod{\value{dancecount}}{16}=0}{%
- \Alph{phrasecount}\arabic{partcount}.\ %
+ \Alph{dancephrase}\arabic{dancepart}\partdelimiter\ %
}{}%
\addtocounter{dancecount}{#1}%
+ \addtocounter{phrasecount}{#1}%
+ \addtocounter{partcount}{#1}%
#2%
- \ifthenelse{\intcalcMod{\value{dancecount}}{8}=0
- \and\not\intcalcMod{\value{dancecount}}{16}=0}{;}{\nopagebreak}%
- \ifthenelse{\not\intcalcMod{\value{dancecount}}{8}=0}{,}{\nopagebreak}%
- \ifthenelse{\intcalcMod{\value{dancecount}}{32}=0}{%
- \addtocounter{phrasecount}{1}\setcounter{partcount}{0}\pagebreak[1]%
- \vspace{1em}}{}%
- \ifthenelse{\intcalcMod{\value{dancecount}}{16}=0}{%
- \addtocounter{partcount}{1}\newline}{}%
+ \ifthenelse{\value{phrasecount}=32}{%
+ \pagebreak[1]\vspace{1em}%
+ }{}%
+ \ifthenelse{\value{partcount}=8}{\midpartdelimiter\nopagebreak}{%
+ \ifthenelse{\not\value{partcount}=16}{\movedelimiter\nopagebreak\nolinebreak[2]}{}}%
}
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+%</contracard-pkg>
+%<*contracard-cls>
+% \end{macrocode}
+%
+% \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
+% trouble of looking up standard card sizes and figuring out margins and where
+% to put headings and the like.
+%
+% \subsection{Options}
+%
+% \hypertarget{CONTRACARD:OPTIONS}{}
+% \begin{macro}{small}
+% \begin{macro}{medium}
+% \begin{macro}{large}
+% \begin{macro}{a7paper}
+% The class can be loaded with any of the following options:
+% \begin{macrocode}
+\DeclareOption{small}{%
+ \AtBeginDocument{%
+ \titleformat{\section}{\normalsize\bfseries}{\thesection}{1em}{}%
+ \titleformat{\subsection}{\normalsize}{\thesection}{1em}{}%
+ }
+ \PassOptionsToPackage{%
+ margin=0.25in,top=0.75in,paperwidth=5in,paperheight=3in%
+ }{geometry}%
+}
+\DeclareOption{medium}{%
+ \AtBeginDocument{\large}
+ \PassOptionsToPackage{%
+ margin=0.5in,top=0.75in,paperwidth=6in,paperheight=4in%
+ }{geometry}%
+}
+\DeclareOption{large}{%
+ \AtBeginDocument{\Large}
+ \PassOptionsToPackage{%
+ margin=0.75in,top=1in,paperwidth=8in,paperheight=5in%
+ }{geometry}%
+}
+\DeclareOption{a7paper}{%
+ \AtBeginDocument{%
+ \titleformat{\section}{\normalsize\bfseries}{\thesection}{1em}{}%
+ \titleformat{\subsection}{\normalsize}{\thesection}{1em}{}%
+ }
+ \PassOptionsToPackage{%
+ margin=5mm,top=15mm,paperwidth=105mm,paperheight=74mm%
+ }{geometry}%
+}
+\DeclareOption*{%
+ \PassOptionsToClass{\CurrentOption}{article}%
+}
+% \end{macrocode}
+% The \code{small} option creates a 127.0 by 76.2 mm (5 by 3 in) card.
+% The \code{medium} option creates a 152.4 by 101.6 mm (6 by 4 in) card.
+% The \code{large} option creates a 203.2 by 27.0 mm (8 by 5 in) card.
+% The \code{a7paper} option creates a 105 by 74 mm (4.1 by 2.9 in) card.
+% Any unrecognized options are passed to the \pkg{article} class.
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Environment setup}
+%
+% The \pkg{contracard} class does a little extra work to turn off headers, and
+% prevent page numbering:
+%
+% \begin{macrocode}
+\AtBeginDocument{\pagestyle{empty}}
+\AtBeginDocument{\pagenumbering{gobble}}
+% \end{macrocode}
+% It also defines a command \code{\textbackslash @ccisclass} to let the
+% \pkg{contracard} package know that it was called via the class:
+% \begin{macrocode}
+\newcommand*{\@ccisclass}{}
+\ProcessOptions\relax
+%</contracard-cls>
+% \end{macrocode}
+%
% \section{Examples}
%
% A few examples are contained below:
@@ -319,31 +489,98 @@
% \move[8]{Balance and petronella}
% \move[8]{Partner swing}
% \move[8]{Left diagonal: Right and left through}
+% \vspace*{2em}
+% \begin{flushright}
+% \href{http://creativecommons.org/licenses/by/3.0/}{%
+% \IfFileExists{by.png}{\includegraphics[width=40px]{by.png}}{\cc\by}}
+% \end{flushright}
% \end{contra}
% \end{Verbatim}
%
-% \subsection{Cherokee Shuffle by David Kaynor}
-%
-% \begin{Verbatim}
-% \begin{contra}{Cherokee Shuffle}{David Kaynor}{Duple improper}
-% \move[8]{Circle left}
+% \begin{exampledance}
+% \begin{contra}{Code's Compiling}{Sam Whited}{Duple becket}
% \move[8]{Neighbor dosido}
-% \move{Neighbor balance and swing}
-% \move[4]{Men allemande left \textonehalf}
-% \move[4]{Balance in a wave}
+% \move[8]{Partner see saw}
+% \move{Shadow swing}
+% \move[8]{Balance and petronella}
+% \move[8]{Balance and petronella}
% \move[8]{Partner swing}
-% \move[8]{Circle left \textthreequarters}
-% \move[4]{Balance the ring}
-% \move[4]{Partner california twirl}
+% \move[8]{Left diagonal: Right and left through}
+% \vspace*{2em}
+% \begin{flushright}
+% \href{http://creativecommons.org/licenses/by/3.0/}{%
+% \IfFileExists{by.png}{\includegraphics[width=40px]{by.png}}{\cc\by}}
+% \end{flushright}
+% \end{contra}
+% \end{exampledance}
+%
+% \subsection{Untitled Blues Contras by Seth Tepfer}
+%
+% \begin{Verbatim}
+% \renewcommand*{\partdelimiter}{:}
+% \begin{contra}{Untitled Blues \textnumero\ 1}{\href{http://www.dancerhapsody.com/calling/dances.html}{Seth Tepfer}}{Duple Minor Im.}
+% \move[8]{Neighbor gypsy}
+% \move[8]{Ladies gypsy}
+% \newdancephrase
+% \move[16]{Partner balance and swing}
+% \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}
+% \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}
%
-% Now that everything is defined we can process any
-% \hyperlink{CONTRACARD:OPTIONS}{options} that were passed in by the user:
-% \begin{macrocode}
-\ProcessOptions\relax
-%</contracard>
-% \end{macrocode}
+% \begin{exampledance}
+% \renewcommand*{\partdelimiter}{:}
+% \begin{contra}{Untitled Blues \textnumero\ 1}{\href{http://www.dancerhapsody.com/calling/dances.html}{Seth Tepfer}}{Duple Minor Im.}
+% \move[8]{Neighbor gypsy}
+% \move[8]{Ladies gypsy}
+% \newdancephrase
+% \move[16]{Partner balance and swing}
+% \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}
+% \end{exampledance}
+% \begin{exampledance}
+% \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}
+% \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{exampledance}
%
% \clearpage
% \setcounter{IndexColumns}{2}
@@ -367,12 +604,20 @@
%<*doc-style>
% \begin{macrocode}
\ProvidesPackage{contracard-style}
-\usepackage{fancyvrb,hologo,framed,multicol,url}
+\usepackage[utf8x]{inputenc}
+\usepackage{fancyvrb,hologo,framed,multicol,url,textcomp,cclicenses,graphicx,contracard}
\usepackage[pdfborder=0, bookmarks, colorlinks=false, hidelinks]{hyperref}
\usepackage[parfill]{parskip}
\fvset{gobble=2}
+\newenvironment*{exampledance}{%
+ \begin{minipage}{\textwidth}
+ \vspace{3em}
+}{%
+ \end{minipage}
+}
+
\newcommand*{\gittag}{%
\immediate\write18{%
rm gittag.tex 2> /dev/null; (git describe --tags --dirty || echo "v0.0") 2> /dev/null > gittag.tex
diff --git a/Master/texmf-dist/tex/latex/contracard/contracard.cls b/Master/texmf-dist/tex/latex/contracard/contracard.cls
index e473f047bfe..309ac71be49 100644
--- a/Master/texmf-dist/tex/latex/contracard/contracard.cls
+++ b/Master/texmf-dist/tex/latex/contracard/contracard.cls
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% contracard.dtx (with options: `contracard')
+%% contracard.dtx (with options: `contracard-cls')
%%
%% Copyright 2012 Samuel Whited
%%
@@ -19,17 +19,15 @@
%% LaTeX version 2008/05/04 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{contracard}[2013/02/17]
+\ProvidesClass{contracard}[2013/02/20]
\AtEndOfClass{\LoadClass{article}}
-\AtEndOfClass{\RequirePackage{intcalc}}
-\AtEndOfClass{\RequirePackage{hyperref}}
-\AtEndOfClass{\RequirePackage{ifthen}}
\AtEndOfClass{\RequirePackage{geometry}}
-\AtEndOfClass{\RequirePackage{fancyhdr}}
\AtEndOfClass{\RequirePackage[compact]{titlesec}}
+\AtEndOfClass{\RequirePackage{contracard}}
\DeclareOption{small}{%
\AtBeginDocument{%
\titleformat{\section}{\normalsize\bfseries}{\thesection}{1em}{}%
+ \titleformat{\subsection}{\normalsize}{\thesection}{1em}{}%
}
\PassOptionsToPackage{%
margin=0.25in,top=0.75in,paperwidth=5in,paperheight=3in%
@@ -50,6 +48,7 @@
\DeclareOption{a7paper}{%
\AtBeginDocument{%
\titleformat{\section}{\normalsize\bfseries}{\thesection}{1em}{}%
+ \titleformat{\subsection}{\normalsize}{\thesection}{1em}{}%
}
\PassOptionsToPackage{%
margin=5mm,top=15mm,paperwidth=105mm,paperheight=74mm%
@@ -58,42 +57,9 @@
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}%
}
-\AtBeginDocument{\renewcommand{\headrulewidth}{0pt}}
\AtBeginDocument{\pagestyle{empty}}
-\newcounter{dancecount}
-\newcounter{partcount}
-\newcounter{phrasecount}
-\newcommand*{\progressed}{\setcounter{phrasecount}{1}}
-\newcommand*{\defaultcontraenv}{flushleft}
-\newenvironment{contra}[4][\defaultcontraenv]{%
- \clearpage
- \setcounter{dancecount}{0}
- \setcounter{partcount}{1}
- \setcounter{phrasecount}{1}
- \thispagestyle{fancy}
- \rhead{#4}
- \section*{#2}
- {#3}
- \newcommand*{\@contraenv}{#1}
- \begin{\@contraenv}
-}{%
- \end{\@contraenv}
-}
-\newcommand*{\move}[2][16]{%
- \ifthenelse{\intcalcMod{\value{dancecount}}{16}=0}{%
- \Alph{phrasecount}\arabic{partcount}.\ %
- }{}%
- \addtocounter{dancecount}{#1}%
- #2%
- \ifthenelse{\intcalcMod{\value{dancecount}}{8}=0
- \and\not\intcalcMod{\value{dancecount}}{16}=0}{;}{\nopagebreak}%
- \ifthenelse{\not\intcalcMod{\value{dancecount}}{8}=0}{,}{\nopagebreak}%
- \ifthenelse{\intcalcMod{\value{dancecount}}{32}=0}{%
- \addtocounter{phrasecount}{1}\setcounter{partcount}{0}\pagebreak[1]%
- \vspace{1em}}{}%
- \ifthenelse{\intcalcMod{\value{dancecount}}{16}=0}{%
- \addtocounter{partcount}{1}\newline}{}%
-}
+\AtBeginDocument{\pagenumbering{gobble}}
+\newcommand*{\@ccisclass}{}
\ProcessOptions\relax
%%
%% ___________
@@ -103,7 +69,8 @@
%% Public key: 0xEC2C9934
%%
%% This work consists of this file contracard.dtx
-%% and the derived files contracard.cls
+%% and the derived files contracard.sty
+%% and contracard.cls
%% and contracard.pdf
%%
%%