diff options
author | Karl Berry <karl@freefriends.org> | 2010-12-08 00:31:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-12-08 00:31:20 +0000 |
commit | ffcb74e60a180d671758213c607119609a64a689 (patch) | |
tree | bddf093fb79e1e0038ee401b4ac5937c92664b54 /Master/texmf-dist/tex/latex/ticket | |
parent | 5c02c71c840674cb98f49e13b193c7409a367b66 (diff) |
ticket 0.4b (7dec10)
git-svn-id: svn://tug.org/texlive/trunk@20679 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ticket')
-rw-r--r-- | Master/texmf-dist/tex/latex/ticket/ticket.sty | 54 |
1 files changed, 38 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/ticket/ticket.sty b/Master/texmf-dist/tex/latex/ticket/ticket.sty index 507ac40ee23..a39d083f73b 100644 --- a/Master/texmf-dist/tex/latex/ticket/ticket.sty +++ b/Master/texmf-dist/tex/latex/ticket/ticket.sty @@ -32,12 +32,14 @@ % % v0.4a added the flashcard-style invented by % Santiago Mejia <san_tico at yahoo dot com> +% v0.4b added 'rowmode' introduced by Wulf Coulmann +% <wulf at coulmann dot de> % % Many thanks for all contributions % % -\def\fileversion{v0.4a} -\def\filedate{2006/01/30} +\def\fileversion{v0.4b} +\def\filedate{2010/11/30} \ProvidesPackage{ticket}[\filedate\space\fileversion] \typeout{Package: `ticket' \fileversion\space <\filedate> (Thomas Emmel)} @@ -49,12 +51,14 @@ \newif\if@boxed \@boxedfalse \newif\if@extern \@externfalse \newif\if@backside \@backsidefalse +\newif\if@rowmode \@rowmodefalse \DeclareOption{boxed}{\@boxedtrue} \DeclareOption{crossmark}{\@crossmarktrue} \DeclareOption{circlemark}{\@circlemarktrue} \DeclareOption{emptycrossmark}{\@emptycrossmarktrue} \DeclareOption{cutmark}{\@cutmarktrue} +\DeclareOption{rowmode}{\@rowmodetrue} \DeclareOption*{\edef\ticketToUse{\CurrentOption.tdf}\@externtrue}% @@ -136,12 +140,11 @@ %% a restart \def\ticketreset{% + \setcounter{ticket@x}{1}\setcounter{ticket@y}{1}% \if@backside% - \setcounter{ticket@x}{1}\setcounter{ticket@y}{1}% \setlength{\ticket@shift@y}{0pt}% \setlength{\ticket@shift@x}{\back@shift}% \else% - \setcounter{ticket@x}{1}\setcounter{ticket@y}{1}% \setlength{\ticket@shift@y}{0pt}% \setlength{\ticket@shift@x}{0pt}% \fi} @@ -154,18 +157,37 @@ % the heart: a "counter" \newcommand{\ticket@counter}{% - \ifthenelse{\value{ticket@y}<\value{ticket@num@Y}}% - {\stepcounter{ticket@y}\\[-\baselineskip]}% - {\setcounter{ticket@y}{1}% - \ifthenelse{\value{ticket@x}<\value{ticket@num@X}}% - {\stepcounter{ticket@x}\\[-\baselineskip]}% - {\setcounter{ticket@x}{1}\setcounter{ticket@y}{1}\newpage}}% - \setlength{\ticket@shift@y}{(\ticketHeight+\ticket@dis@Y)*(\theticket@y-1)}% - \if@backside% - \setlength{\ticket@shift@x}{\back@shift-(\ticketWidth+\ticket@dis@X)*(\theticket@x-1)}% - \else% - \setlength{\ticket@shift@x}{(\ticketWidth+\ticket@dis@X)*(\theticket@x-1)}% - \fi}% + \if@rowmode% + \ifthenelse{\value{ticket@x}<\value{ticket@num@X}}% + {\stepcounter{ticket@x}\\[-\baselineskip]}% + % otherwise: + {\setcounter{ticket@x}{1}% + \ifthenelse{\value{ticket@y}<\value{ticket@num@Y}}% + {\stepcounter{ticket@y}\\[-\baselineskip]}% + % otherwise: + {\setcounter{ticket@y}{1}\setcounter{ticket@x}{1}\newpage}}% + \setlength{\ticket@shift@y}{(\ticketHeight+\ticket@dis@Y)*(\theticket@y-1)}% + \if@backside% + \setlength{\ticket@shift@x}{\back@shift-(\ticketWidth+\ticket@dis@X)*(\theticket@x-1)}% + \else% + \setlength{\ticket@shift@x}{(\ticketWidth+\ticket@dis@X)*(\theticket@x-1)}% + \fi% + \else% + \ifthenelse{\value{ticket@y}<\value{ticket@num@Y}}% + {\stepcounter{ticket@y}\\[-\baselineskip]}% + % otherwise: + {\setcounter{ticket@y}{1}% + \ifthenelse{\value{ticket@x}<\value{ticket@num@X}}% + {\stepcounter{ticket@x}\\[-\baselineskip]}% + % otherwise: + {\setcounter{ticket@x}{1}\setcounter{ticket@y}{1}\newpage}}% + \setlength{\ticket@shift@y}{(\ticketHeight+\ticket@dis@Y)*(\theticket@y-1)}% + \if@backside% + \setlength{\ticket@shift@x}{\back@shift-(\ticketWidth+\ticket@dis@X)*(\theticket@x-1)}% + \else% + \setlength{\ticket@shift@x}{(\ticketWidth+\ticket@dis@X)*(\theticket@x-1)}% + \fi% + \fi}% % default content... % users should renew this command |