From 1497b86192848950669e33be4a1a916199d768e0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 2 Nov 2018 20:53:02 +0000 Subject: onedown (2nov18) git-svn-id: svn://tug.org/texlive/trunk@49053 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/onedown/onedown.sty | 124 +++++++++++++----------- 1 file changed, 66 insertions(+), 58 deletions(-) (limited to 'Master/texmf-dist/tex/latex/onedown') diff --git a/Master/texmf-dist/tex/latex/onedown/onedown.sty b/Master/texmf-dist/tex/latex/onedown/onedown.sty index 258aba07424..ced883f1e67 100644 --- a/Master/texmf-dist/tex/latex/onedown/onedown.sty +++ b/Master/texmf-dist/tex/latex/onedown/onedown.sty @@ -21,7 +21,7 @@ %% 2005/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[2014/05/01] -\def\ODwstyleversion{1.1}\def\ODwstyledate{2018/09/23} +\def\ODwstyleversion{1.2}\def\ODwstyledate{2018/10/31} \ProvidesPackage{onedown} [\ODwstyledate\space v\ODwstyleversion\space Typeset Bridge Diagrams - Jacob Wiersma (C) 2016-2018] @@ -172,6 +172,7 @@ \ODw@set{colors/b+w/.code={\pgfkeys{/ODw/colors=1}}} \ODw@set{% colors/2/.code={% + \ODw@monochromefalse% \renewrobustcmd\Cl{\textcolor{black}% {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}% \renewrobustcmd\Di{\textcolor{red}% @@ -185,6 +186,7 @@ \ODw@set{colors/b+r/.code={\pgfkeys{/ODw/colors=2}}} \ODw@set{% colors/4A/.code={% + \ODw@monochromefalse% \renewrobustcmd\Cl{\textcolor{green}% {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}% \renewrobustcmd\Di{\textcolor{orange}% @@ -199,6 +201,7 @@ \ODw@set{colors/4a/.code={\pgfkeys{/ODw/colors=4A}}} \ODw@set{% colors/4B/.code={% + \ODw@monochromefalse% \renewrobustcmd\Cl{\textcolor{black}% {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}% \renewrobustcmd\Di{\textcolor{orange}% @@ -211,7 +214,6 @@ } \ODw@set{colors/fourB/.code={\pgfkeys{/ODw/colors=4B}}} \ODw@set{colors/4b/.code={\pgfkeys{/ODw/colors=4B}}} -\ODw@set{colors=2} \NewDocumentCommand\nt{s t!}{% \bgroup% \ODw@OtherFont% @@ -552,44 +554,44 @@ \newcommand\ODw@FirstBidCol[1]{% \IfEqCase{#1}{% {N}{% - \gdef\ODw@BidderI{\@ifstar{\ODw@North*}{\ODw@N*}}% - \gdef\ODw@BidderII{\@ifstar{\ODw@East*}{\ODw@E*}}% - \gdef\ODw@BidderIII{\@ifstar{\ODw@South*}{\ODw@S*}}% - \gdef\ODw@BidderIV{\@ifstar{\ODw@West*}{\ODw@W*}}% - \gdef\ODw@NameI{\ODw@North@Name}% - \gdef\ODw@NameII{\ODw@East@Name}% - \gdef\ODw@NameIII{\ODw@South@Name}% - \gdef\ODw@NameIV{\ODw@West@Name}% + \def\ODw@BidderI{\@ifstar{\ODw@North*}{\ODw@N*}}% + \def\ODw@BidderII{\@ifstar{\ODw@East*}{\ODw@E*}}% + \def\ODw@BidderIII{\@ifstar{\ODw@South*}{\ODw@S*}}% + \def\ODw@BidderIV{\@ifstar{\ODw@West*}{\ODw@W*}}% + \def\ODw@NameI{\ODw@North@Name}% + \def\ODw@NameII{\ODw@East@Name}% + \def\ODw@NameIII{\ODw@South@Name}% + \def\ODw@NameIV{\ODw@West@Name}% }% {E}{% - \gdef\ODw@BidderI{\@ifstar{\ODw@East*}{\ODw@E*}}% - \gdef\ODw@BidderII{\@ifstar{\ODw@South*}{\ODw@S*}}% - \gdef\ODw@BidderIII{\@ifstar{\ODw@West*}{\ODw@W*}}% - \gdef\ODw@BidderIV{\@ifstar{\ODw@North*}{\ODw@N*}}% - \gdef\ODw@NameI{\ODw@East@Name}% - \gdef\ODw@NameII{\ODw@South@Name}% - \gdef\ODw@NameIII{\ODw@West@Name}% - \gdef\ODw@NameIV{\ODw@North@Name}% + \def\ODw@BidderI{\@ifstar{\ODw@East*}{\ODw@E*}}% + \def\ODw@BidderII{\@ifstar{\ODw@South*}{\ODw@S*}}% + \def\ODw@BidderIII{\@ifstar{\ODw@West*}{\ODw@W*}}% + \def\ODw@BidderIV{\@ifstar{\ODw@North*}{\ODw@N*}}% + \def\ODw@NameI{\ODw@East@Name}% + \def\ODw@NameII{\ODw@South@Name}% + \def\ODw@NameIII{\ODw@West@Name}% + \def\ODw@NameIV{\ODw@North@Name}% }% {S}{% - \gdef\ODw@BidderI{\@ifstar{\ODw@South*}{\ODw@S*}}% - \gdef\ODw@BidderII{\@ifstar{\ODw@West*}{\ODw@W*}}% - \gdef\ODw@BidderIII{\@ifstar{\ODw@North*}{\ODw@N*}}% - \gdef\ODw@BidderIV{\@ifstar{\ODw@East*}{\ODw@E*}}% - \gdef\ODw@NameI{\ODw@South@Name}% - \gdef\ODw@NameII{\ODw@West@Name}% - \gdef\ODw@NameIII{\ODw@North@Name}% - \gdef\ODw@NameIV{\ODw@East@Name}% + \def\ODw@BidderI{\@ifstar{\ODw@South*}{\ODw@S*}}% + \def\ODw@BidderII{\@ifstar{\ODw@West*}{\ODw@W*}}% + \def\ODw@BidderIII{\@ifstar{\ODw@North*}{\ODw@N*}}% + \def\ODw@BidderIV{\@ifstar{\ODw@East*}{\ODw@E*}}% + \def\ODw@NameI{\ODw@South@Name}% + \def\ODw@NameII{\ODw@West@Name}% + \def\ODw@NameIII{\ODw@North@Name}% + \def\ODw@NameIV{\ODw@East@Name}% }% {W}{% - \gdef\ODw@BidderI{\@ifstar{\ODw@West*}{\ODw@W*}}% - \gdef\ODw@BidderII{\@ifstar{\ODw@North*}{\ODw@N*}}% - \gdef\ODw@BidderIII{\@ifstar{\ODw@East*}{\ODw@E*}}% - \gdef\ODw@BidderIV{\@ifstar{\ODw@South*}{\ODw@S*}}% - \gdef\ODw@NameI{\ODw@West@Name}% - \gdef\ODw@NameII{\ODw@North@Name}% - \gdef\ODw@NameIII{\ODw@East@Name}% - \gdef\ODw@NameIV{\ODw@South@Name}% + \def\ODw@BidderI{\@ifstar{\ODw@West*}{\ODw@W*}}% + \def\ODw@BidderII{\@ifstar{\ODw@North*}{\ODw@N*}}% + \def\ODw@BidderIII{\@ifstar{\ODw@East*}{\ODw@E*}}% + \def\ODw@BidderIV{\@ifstar{\ODw@South*}{\ODw@S*}}% + \def\ODw@NameI{\ODw@West@Name}% + \def\ODw@NameII{\ODw@North@Name}% + \def\ODw@NameIII{\ODw@East@Name}% + \def\ODw@NameIV{\ODw@South@Name}% }% }% IfEqCase }% ODw@FirstBidCol @@ -775,6 +777,7 @@ \ODw@ChkNrOfCards{#2}{suit}% \ODw@ChkSameCards{#2}{#1}% \bgroup% keep font change local + \ODw@GameSize% #1\ODw@Cards{#2}% \egroup% \xspace% @@ -837,7 +840,7 @@ \egroup% \IfBooleanTF#1{\end{center}}{}% }% showAll -\NewDocumentCommand\showNS{s t+ O{c}}{% +\NewDocumentCommand\showNS{s t+ O{c} d()}{% \gdef\ODw@Spades{\ODw@NSpades\ODw@SSpades}% \gdef\ODw@Hearts{\ODw@NHearts\ODw@SHearts}% \gdef\ODw@Diamonds{\ODw@NDiamonds\ODw@SDiamonds}% @@ -856,17 +859,17 @@ \sbox1{\ODw@Compass}% \sbox0{% \begin{tabular}[#3]{@{}r@{}c@{}l@{}}% - & \ODw@Nhand & \\ + & \IfNoValueTF{#4}{\ODw@Nhand}{\ifthenelse{\equal{#4}{N}}{\ODw@Nhand}{}} & \\ & \usebox{1} & \\ - & \ODw@Shand & \\ + & \IfNoValueTF{#4}{\ODw@Shand}{\ifthenelse{\equal{#4}{S}}{\ODw@Shand}{}} & \\ \end{tabular}% }% sbox0 \ODw@gsetlength\ODw@Diagram@Width{\wd0}% \begin{tabular}[#3]{@{}r@{}c@{}l@{}}% \ODw@ProcessHeader{3}% span 3 columns - & \ODw@Nhand & \\ + & \IfNoValueTF{#4}{\ODw@Nhand}{\ifthenelse{\equal{#4}{N}}{\ODw@Nhand}{}} & \\ & \usebox{1} & \\ - & \ODw@Shand & \\ + & \IfNoValueTF{#4}{\ODw@Shand}{\ifthenelse{\equal{#4}{S}}{\ODw@Shand}{}} & \\ \ODw@ProcessFooter{3}% span 3 columns \end{tabular}% \IfBooleanTF#2{% @@ -878,7 +881,7 @@ \egroup% \IfBooleanTF#1{\end{center}}{}% }% showNS -\NewDocumentCommand\showEW{s t+ O{c}}{% +\NewDocumentCommand\showEW{s t+ O{c} d()}{% \gdef\ODw@Spades{\ODw@ESpades\ODw@WSpades}% \gdef\ODw@Hearts{\ODw@EHearts\ODw@WHearts}% \gdef\ODw@Diamonds{\ODw@EDiamonds\ODw@WDiamonds}% @@ -895,14 +898,18 @@ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}% \sbox0{% \begin{tabular}[#3]{@{}r@{}c@{}l@{}}% - \ODw@Whand & \ODw@Compass & \ODw@Ehand \\ + \IfNoValueTF{#4}{\ODw@Whand}{\ifthenelse{\equal{#4}{W}}{\ODw@Whand}{}} + & \ODw@Compass & + \IfNoValueTF{#4}{\ODw@Ehand}{\ifthenelse{\equal{#4}{E}}{\ODw@Ehand}{}} \\ \end{tabular}% }% sbox \ODw@gsetlength{\ODw@Diagram@Width}{\wd0}% \begin{tabular}[#3]{@{}r@{}c@{}l@{}}% \ODw@ProcessHeader{3}% span 3 columns - & & \\ - \ODw@Whand & \ODw@Compass & \ODw@Ehand \\ + & & \\ + \IfNoValueTF{#4}{\ODw@Whand}{\ifthenelse{\equal{#4}{W}}{\ODw@Whand}{}} + & \ODw@Compass & + \IfNoValueTF{#4}{\ODw@Ehand}{\ifthenelse{\equal{#4}{E}}{\ODw@Ehand}{}} \\ \ODw@ProcessFooter{3}% span 3 columns \end{tabular}% \IfBooleanTF#2{% @@ -1292,7 +1299,7 @@ \fi% :\,#1% } -\newcommand{\alert}{{}\ensuremath{^\textbf{*}}} +\newcommand{\alert}{{}\ensuremath{^\textbf{\textasteriskcentered}}} \newcommand{\announce}{{}\ensuremath{^\textbf{\smaller A}}} \newcommand\markit{% \stepcounter{ODw@Nr}% @@ -1655,25 +1662,25 @@ compsize/.store in = \ODw@CompSize, } \ODw@set{compshow/.is choice} - \ODw@set{compshow/off/.code={\global\ODw@CompShowfalse}} - \ODw@set{compshow/on/.code={\global\ODw@CompShowtrue}} + \ODw@set{compshow/off/.code={\ODw@CompShowfalse}} + \ODw@set{compshow/on/.code={\ODw@CompShowtrue}} \ODw@set{compturn/.is choice} - \ODw@set{compturn/off/.code={\global\ODw@CompTurnfalse}} - \ODw@set{compturn/on/.code={\global\ODw@CompTurntrue}} + \ODw@set{compturn/off/.code={\ODw@CompTurnfalse}} + \ODw@set{compturn/on/.code={\ODw@CompTurntrue}} \ODw@set{bidders/.is choice} - \ODw@set{bidders/off/.code={\global\ODw@Biddersfalse}} - \ODw@set{bidders/on/.code={\global\ODw@Bidderstrue}} + \ODw@set{bidders/off/.code={\ODw@Biddersfalse}} + \ODw@set{bidders/on/.code={\ODw@Bidderstrue}} \ODw@set{bidfirst/.is choice} \ODw@set{bidfirst/N/.code=\ODw@FirstBidCol{N}} \ODw@set{bidfirst/E/.code=\ODw@FirstBidCol{E}} \ODw@set{bidfirst/S/.code=\ODw@FirstBidCol{S}} \ODw@set{bidfirst/W/.code=\ODw@FirstBidCol{W}} \ODw@set{bidline/.is choice} - \ODw@set{bidline/off/.code={\global\ODw@BidLinefalse}} - \ODw@set{bidline/on/.code={\global\ODw@BidLinetrue}} + \ODw@set{bidline/off/.code={\ODw@BidLinefalse}} + \ODw@set{bidline/on/.code={\ODw@BidLinetrue}} \ODw@set{bidlong/.is choice} - \ODw@set{bidlong/off/.code={\global\ODw@LongCallsfalse}} - \ODw@set{bidlong/on/.code={\global\ODw@LongCallstrue}} + \ODw@set{bidlong/off/.code={\ODw@LongCallsfalse}} + \ODw@set{bidlong/on/.code={\ODw@LongCallstrue}} \ODw@set{compshow/1/.code={\pgfkeys{/ODw/compshow=on}}} \ODw@set{compshow/true/.code={\pgfkeys{/ODw/compshow=on}}} \ODw@set{compturn/1/.code={\pgfkeys{/ODw/compturn=on}}} @@ -2015,7 +2022,7 @@ \egroup% \xspace% }% High Card Points -\def\HCP{\hpts*!} +\def\HCP{\,\hpts*!} \NewDocumentCommand{\lpts}{s t!}{% \bgroup% \ODw@OtherFont% @@ -2031,7 +2038,7 @@ \egroup% \xspace% }% Length Points -\def\LP{\lpts*!} +\def\LP{\,\lpts*!} \NewDocumentCommand{\dpts}{s t!}{% \bgroup% \ODw@OtherFont% @@ -2047,7 +2054,7 @@ \egroup% \xspace% }% Distribution Points -\def\DP{\dpts*!} +\def\DP{\,\dpts*!} \NewDocumentCommand{\tpts}{s t!}{% \bgroup% \ODw@OtherFont% @@ -2063,7 +2070,7 @@ \egroup% \xspace% }% Total Points -\def\TP{\tpts*!} +\def\TP{\,\tpts*!} \NewDocumentCommand{\gforce}{s t!}{% \bgroup% \ODw@OtherFont% @@ -2151,6 +2158,7 @@ \setdefaults{legend=\mdseries\rmfamily} \setdefaults{name=\mdseries\slshape} \setdefaults*{other=\bfseries\sffamily} +\setdefaults{colors=b+r} \setdefaults{compshow=on,compturn=off} \setdefaults{bidfirst=W,bidders=on,bidlong=on} \AtBeginDocument{% -- cgit v1.2.3