From 0ccccba206b1401b7478dd9629fb2386887c5ec6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 15 Feb 2013 23:59:27 +0000 Subject: contracard (15feb13) git-svn-id: svn://tug.org/texlive/trunk@29130 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/contracard/LICENSE | 13 + Master/texmf-dist/doc/latex/contracard/Makefile | 183 ++++++++++ Master/texmf-dist/doc/latex/contracard/README | 3 + .../texmf-dist/doc/latex/contracard/contracard.pdf | Bin 0 -> 220687 bytes .../source/latex/contracard/contracard.dtx | 373 +++++++++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/contracard.tlpsrc | 0 8 files changed, 574 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/contracard/LICENSE create mode 100644 Master/texmf-dist/doc/latex/contracard/Makefile create mode 100644 Master/texmf-dist/doc/latex/contracard/README create mode 100644 Master/texmf-dist/doc/latex/contracard/contracard.pdf create mode 100644 Master/texmf-dist/source/latex/contracard/contracard.dtx create mode 100644 Master/tlpkg/tlpsrc/contracard.tlpsrc diff --git a/Master/texmf-dist/doc/latex/contracard/LICENSE b/Master/texmf-dist/doc/latex/contracard/LICENSE new file mode 100644 index 00000000000..43d372e7df0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/contracard/LICENSE @@ -0,0 +1,13 @@ +# License + +Copyright 2013 Samuel Whited + +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 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. diff --git a/Master/texmf-dist/doc/latex/contracard/Makefile b/Master/texmf-dist/doc/latex/contracard/Makefile new file mode 100644 index 00000000000..963e13c200c --- /dev/null +++ b/Master/texmf-dist/doc/latex/contracard/Makefile @@ -0,0 +1,183 @@ +# Makefile for contracard. +# Copied almost exactly from the fontspec makefile. + +#### MAKEFILE CONFIG #### + +SHELL = /bin/sh +.SUFFIXES: +.SILENT: + +#### BEGIN #### + +help: + @echo 'CONTRACARD makefile targets:' + @echo ' ' + @echo ' help - (this message)' + @echo ' unpack - extracts all files' + @echo ' doc - compile documentation' + @echo ' gendoc - compile git-aware documentation' + @echo ' ctan - generate archive for CTAN' + @echo ' all - unpack & doc' + @echo ' world - all & ctan' + @echo ' clean - remove all generated and built files' + @echo ' preview - preview the documentation' + @echo ' ' + @echo ' install - install the complete class into your home texmf tree' + @echo ' cls-install - install the class code only' + @echo ' install TEXMFROOT= - install the class into the path ' + + +NAME = contracard +DOC = $(NAME).pdf +DTX = $(NAME).dtx + +# Redefine this to print output if you need: +REDIRECT = > /dev/null + +# Files grouped by generation mode +COMPILED = $(DOC) +UNPACKED = $(NAME).cls +SOURCE = $(DTX) Makefile README LICENSE +GENERATED = $(COMPILED) $(UNPACKED) + +CTAN_FILES = $(SOURCE) $(COMPILED) + +UNPACKED_DOC = + +RUNFILES = $(filter-out $(UNPACKED_DOC), $(UNPACKED)) +DOCFILES = $(COMPILED) README LICENSE $(UNPACKED_DOC) +SRCFILES = $(DTX) Makefile + +ALL_FILES = $(RUNFILES) $(DOCFILES) $(SRCFILES) + +# Installation locations +FORMAT = latex +RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME) +DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME) +SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME) +TEXMFROOT = $(shell kpsewhich --var-value TEXMFHOME) + +CTAN_ZIP = $(NAME).zip +TDS_ZIP = $(NAME).tds.zip +ZIPS = $(CTAN_ZIP) $(TDS_ZIP) + +DO_LATEX = pdflatex --interaction=nonstopmode $< $(REDIRECT) +DO_LATEX_WRITE18 = pdflatex --shell-escape --interaction=nonstopmode $< $(REDIRECT) +DO_TEX = tex --interaction=nonstopmode $< $(REDIRECT) +DO_MAKEINDEX = makeindex -s gind.ist $(subst .dtx,,$<) $(REDIRECT) 2>&1 +DO_MAKECHANGES = makeindex -s gglo.ist -o $(NAME).gls $(NAME).glo $< $(REDIRECT) 2>&1 + +all: $(GENERATED) +doc: $(COMPILED) +unpack: $(UNPACKED) +ctan: $(CTAN_ZIP) +tds: $(TDS_ZIP) +world: all ctan + +gendoc: $(DTX) + @echo "Compiling documentation" + $(DO_LATEX_WRITE18) + $(DO_MAKEINDEX) + $(DO_MAKECHANGES) + while ($(DO_LATEX_WRITE18) ; \ + grep -q "Rerun to get" $(NAME).log ) do true; \ + done + +COMMAND = command -v $(1) >/dev/null 2>&1 +preview: $(DOC) + ($(COMMAND) evince && evince $(NAME).pdf) || ($(COMMAND) open && open $(NAME).pdf) + +$(DOC): $(DTX) + @echo "Compiling documentation" + $(DO_LATEX_WRITE18) + $(DO_MAKEINDEX) + $(DO_MAKECHANGES) + while ($(DO_LATEX_WRITE18) ; \ + grep -q "Rerun to get" $(NAME).log ) do true; \ + done + + +$(UNPACKED): $(DTX) + @$(DO_TEX) + +$(CTAN_ZIP): $(CTAN_FILES) + @echo "Making $@ for CTAN upload." + @$(RM) -- $@ + @mkdir -p $(NAME)/ + @cp $^ $(NAME)/ + @zip -9 $@ $(NAME)/* >/dev/null + @rm -rf $(NAME)/ + +define run-install +@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR) +@mkdir -p $(DOCDIR) && cp $(DOCFILES) $(DOCDIR) +@mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR) +endef + +define run-cls-install +@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR) +endef + +$(TDS_ZIP): TEXMFROOT=./tmp-texmf +$(TDS_ZIP): $(ALL_FILES) + @echo "Making TDS-ready archive $@." + @$(RM) -- $@ + $(run-install) + @cd $(TEXMFROOT) && zip -9 ../$@ -r . >/dev/null + @$(RM) -r -- $(TEXMFROOT) + +# Rename the README for CTAN +README: README.md + cp $< $@ + +# Rename the LICENSE for CTAN +LICENSE: LICENSE.md + cp $< $@ + +.PHONY: install manifest clean mrproper + +install: $(ALL_FILES) + @if test ! -n "$(TEXMFROOT)" ; then \ + echo "Cannot locate your home texmf tree. Specify manually with\n\n make install TEXMFROOT=/path/to/texmf\n" ; \ + false ; \ + fi ; + @echo "Installing in '$(TEXMFROOT)'." + $(run-install) + +cls-install: $(RUNFILES) + @if test ! -n "$(TEXMFROOT)" ; then \ + echo "Cannot locate your home texmf tree. Specify manually with\n\n make install TEXMFROOT=/path/to/texmf\n" ; \ + false ; \ + fi ; + @echo "Installing in '$(TEXMFROOT)'." + $(run-install) + +manifest: + @echo "Source files:" + @for f in $(SOURCE); do echo $$f; done + @echo "" + @echo "Derived files:" + @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) -- $(GENERATED) $(ZIPS) + @$(RM) -- $(builddir)/* + + +############# +# TESTSUITE # +############# + +#### Needed to compile and make stuff #### + +builddir=build +lprefix=L +xprefix=X +both=F + +COPY = cp -a +MOVE = mv -f +COMPARE_OPTS = -density 300x300 -metric ae -fuzz 35% + +LTXSOURCE = $(NAME).cls diff --git a/Master/texmf-dist/doc/latex/contracard/README b/Master/texmf-dist/doc/latex/contracard/README new file mode 100644 index 00000000000..e1d6c28aac3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/contracard/README @@ -0,0 +1,3 @@ +# Contra Card + +A TeX package designed to generate calling cards for contra and square dances. diff --git a/Master/texmf-dist/doc/latex/contracard/contracard.pdf b/Master/texmf-dist/doc/latex/contracard/contracard.pdf new file mode 100644 index 00000000000..fe4f590ab4e Binary files /dev/null and b/Master/texmf-dist/doc/latex/contracard/contracard.pdf differ diff --git a/Master/texmf-dist/source/latex/contracard/contracard.dtx b/Master/texmf-dist/source/latex/contracard/contracard.dtx new file mode 100644 index 00000000000..aa0fb35c2a8 --- /dev/null +++ b/Master/texmf-dist/source/latex/contracard/contracard.dtx @@ -0,0 +1,373 @@ +% \iffalse +%<*internal> +\begingroup +\input docstrip.tex +\keepsilent +\usedir{tex/latex/contracard} +\preamble + + 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. + +\endpreamble +\postamble + + ___________ + 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.cls + and contracard.pdf + +\endpostamble +\askforoverwritefalse + +\generate{\file{contracard.cls}{\from{contracard.dtx}{contracard}}} +\generate{\file{contracard-style.sty}{\from{contracard.dtx}{doc-style}}} + +\obeyspaces +\Msg{****************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the *} +\Msg{* following file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* contracard.cls *} +\Msg{* *} +\Msg{****************************************************} + +\endgroup +% +% +%<*driver> +\ProvidesFile{contracard.dtx} +% +% +%<*contracard> +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesClass{contracard}[2013/02/07] +\AtEndOfClass{\LoadClass{article}} +%% +% +%<*driver> +\documentclass[a4paper]{ltxdoc} +\usepackage{contracard-style} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{\jobname.dtx} +\end{document} +% +% +% \fi +% +% \GetFileInfo{contracard.dtx} +% \makeatletter +% \errorcontextlines=999 +% +% \title{The \textsf{contracard} class} +% \author{ +% \name{Sam Whited}\\ +% \texttt{sam@samwhited.com} +% } +% \date{\today\\\gittag} +% +% \maketitle +% \tableofcontents +% +% \section{Introduction} +% +% The \pkg{contracard} class is designed to aid in the formatting and +% typesetting of caller cards for traditional square and line dances. +% +% \subsection{Rationale} +% +% 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. +% +% \subsection{License / about the source} +% +% 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 +% your opinion) any later version. The latest version of this license is in: +% +% \url{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. +% +% 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} +% +% \begin{macrocode} +%<*contracard> +% \end{macrocode} +% +% \paragraph{Building} +% +% Before building \pkg{contracard} you should verify that the following +% dependencies are installed: +% +% \begin{macrocode} +\AtEndOfClass{\RequirePackage{intcalc}} +\AtEndOfClass{\RequirePackage{hyperref}} +\AtEndOfClass{\RequirePackage{ifthen}} +\AtEndOfClass{\RequirePackage{geometry}} +\AtEndOfClass{\usepackage{fancyhdr}} +\AtEndOfClass{\RequirePackage[compact]{titlesec}} +% \end{macrocode} +% 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: +% +% \begin{Verbatim} +% $ pdflatex --shell-escape contracard.dtx +% \end{Verbatim} +% +% \paragraph{Options} +% +% \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{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}% +} +% \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} +% +% \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{macrocode} +\AtBeginDocument{\renewcommand{\headrulewidth}{0pt}} +\AtBeginDocument{\pagestyle{empty}} +% \end{macrocode} +% +% \begin{macro}{dancecount} +% Next, we'll create the \code{dancecount} counter that will help us keep track +% of timing in the dance: +% \begin{macrocode} +\newcounter{dancecount} +% \end{macrocode} +% \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{macrocode} +\newcommand*{\defaultcontraenv}{flushleft} +% \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. +% +% \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 +% \code{dancecount} and displays some information about the dance. +% \begin{macrocode} +\newenvironment{contra}[4][\defaultcontraenv]{% + \clearpage + \setcounter{dancecount}{0} + \thispagestyle{fancy} + \rhead{#4} + \section*{#2} + {#3} + \newcommand*{\@contraenv}{#1} + \begin{\@contraenv} +}{% + \end{\@contraenv} +} +% \end{macrocode} +% \end{macro} +% +% \subsection{The \code{\textbackslash move} command} +% +% \begin{macro}{\move} +% \changes{0.1}{2013/02/14}{Add move command} +% 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 beats +% the move takes. If no beats are specified, it is assumed it takes up a full +% 16. +% \begin{macrocode} +\newcommand*{\move}[2][16]{% + \ifthenelse{\intcalcMod{\value{dancecount}}{64}=0}{A1.\ }{% + \ifthenelse{\intcalcMod{\value{dancecount}-16}{64}=0}{A2.\ }{% + \ifthenelse{\intcalcMod{\value{dancecount}-32}{64}=0}{B1.\ }{% + \ifthenelse{\intcalcMod{\value{dancecount}-48}{64}=0}{B2.\ }{}% + }% + }% + }% + \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}{% + \pagebreak[1]\vspace{1em}}{}% + \ifthenelse{\intcalcMod{\value{dancecount}}{16}=0}{\newline}{}% +} +% \end{macrocode} +% \end{macro} +% +% \section{Examples} +% +% A few examples are contained below: +% +% \subsection{Code's Compiling by Sam Whited} +% +% \begin{Verbatim} +% \begin{contra}{Code's Compiling}{Sam Whited}{Duple becket} +% \move[8]{Neighbor dosido} +% \move[8]{Partner see saw} +% \move{Shadow swing} +% \move[8]{Balance and petronella} +% \move[8]{Balance and petronella} +% \move[8]{Partner swing} +% \move[8]{Left diagonal: Right and left through} +% \end{contra} +% \end{Verbatim} +% +% \subsection{Cherokee Shuffle by David Kaynor} +% +% \begin{Verbatim} +% \begin{contra}{Cherokee Shuffle}{David Kaynor}{Duple improper} +% \move[8]{Circle left} +% \move[8]{Neighbor dosido} +% \move{Neighbor balance and swing} +% \move[4]{Men allemande left \textonehalf} +% \move[4]{Balance in a wave} +% \move[8]{Partner swing} +% \move[8]{Circle left \textthreequarters} +% \move[4]{Balance the ring} +% \move[4]{Partner california twirl} +% \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 +% +% \end{macrocode} +% +% \clearpage +% \setcounter{IndexColumns}{2} +% \phantomsection +% \addcontentsline{toc}{section}{Index} +% \PrintIndex +% +% \makeatletter +% \renewenvironment{theglossary}{% +% \glossary@prologue +% \setlength\emergencystretch{5em} +% \GlossaryParms \let\item\@idxitem \ignorespaces}{} +% \makeatother +% \clearpage +% \phantomsection +% \addcontentsline{toc}{section}{Change History} +% \PrintChanges +% \Finale +% +% \iffalse +%<*doc-style> +% \begin{macrocode} +\ProvidesPackage{contracard-style} +\usepackage{fancyvrb,hologo,framed,multicol,url} +\usepackage[pdfborder=0, bookmarks, colorlinks=false, hidelinks]{hyperref} +\usepackage[parfill]{parskip} + +\fvset{gobble=2} + +\newcommand*{\gittag}{% + \immediate\write18{% + rm gittag.tex 2> /dev/null; (git describe --tags --dirty || echo "v0.0") 2> /dev/null > gittag.tex + }% + \InputIfFileExists{gittag.tex}{}{}\unskip% + \immediate\write18{% + rm gittag.tex 2> /dev/null + }% +} + +\newcommand*\name[1]{\textsc{#1}} +\newcommand*\fname[1]{\textsf{#1}} +\newcommand*\pkg[1]{\textsf{#1}} +\newcommand*\code[1]{\texttt{#1}} +% \end{macrocode} +% +%\fi +\endinput diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index cffb988331e..6efc09702ea 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -117,7 +117,7 @@ my @TLP_working = qw( context-notes-zh-cn context-rst context-ruby context-simplefonts context-simpleslides context-typearea context-typescripts context-vim - contour + contour contracard cooking cookingsymbols cool coollist coolstr coolthms cooltooltips coordsys copyrightbox coseoul countriesofeurope counttexruns courier-scaled courseoutline coursepaper diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 68c37e05460..9356a62f17e 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -141,6 +141,7 @@ depend concepts depend concprog depend constants depend contour +depend contracard depend cooking depend cool depend coollist diff --git a/Master/tlpkg/tlpsrc/contracard.tlpsrc b/Master/tlpkg/tlpsrc/contracard.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3