summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/onedown/README88
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/Bidding.tex238
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/Compass.tex139
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/ExpertQuiz.tex77
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/Hands.tex41
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/Languages.tex45
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/Legends.tex84
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/Play.tex80
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/Suits.tex65
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/Wrapping.tex98
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/bidAll.tex68
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/bidEW.tex51
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/bidNE.tex42
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/bidNS.tex91
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/bidNW.tex38
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/onedown-examples.pdfbin0 -> 841182 bytes
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/onedown-examples.tex171
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.pdfbin0 -> 208582 bytes
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex469
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/showAll.tex140
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/showNS-align.tex39
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/showNS-warn-I.tex29
-rw-r--r--Master/texmf-dist/doc/latex/onedown/examples/showNS-warn-II.tex57
-rw-r--r--Master/texmf-dist/doc/latex/onedown/onedown.pdfbin0 -> 1000370 bytes
-rw-r--r--Master/texmf-dist/source/latex/onedown/onedown.dtx5772
-rw-r--r--Master/texmf-dist/source/latex/onedown/onedown.ins56
-rw-r--r--Master/texmf-dist/tex/latex/onedown/ODw-danish.trsl158
-rw-r--r--Master/texmf-dist/tex/latex/onedown/ODw-dutch.trsl158
-rw-r--r--Master/texmf-dist/tex/latex/onedown/ODw-english.trsl158
-rw-r--r--Master/texmf-dist/tex/latex/onedown/ODw-fallback.trsl158
-rw-r--r--Master/texmf-dist/tex/latex/onedown/ODw-french.trsl158
-rw-r--r--Master/texmf-dist/tex/latex/onedown/ODw-german.trsl158
-rw-r--r--Master/texmf-dist/tex/latex/onedown/ODw-norwegian.trsl159
-rw-r--r--Master/texmf-dist/tex/latex/onedown/ODw-swedish.trsl160
-rw-r--r--Master/texmf-dist/tex/latex/onedown/ODw-turkish.trsl158
-rw-r--r--Master/texmf-dist/tex/latex/onedown/onedown.sty2177
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-games.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/onedown.tlpsrc0
39 files changed, 11582 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/onedown/README b/Master/texmf-dist/doc/latex/onedown/README
new file mode 100644
index 00000000000..02fa85f0ad9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/README
@@ -0,0 +1,88 @@
+--------------------------------------------------------------------------
+The OneDown package v1.0 - 2018/05/23
+A package to typeset diagrams for the game of bridge
+
+--------------------------------------------------------------------------
+Jacob Wiersma
+Web:
+E-Mail: jack46@online.de
+--------------------------------------------------------------------------
+Copyright 2018 Jacob Wiersma
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Jacob Wiersma.
+--------------------------------------------------------------------------
+LICENCE
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+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.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+--------------------------------------------------------------------------
+The OneDown package consists of
+
+the files
+ - README (this file)
+ onedown.dtx, onedown.ins,
+ onedown.sty, onedown.pdf
+
+ - ODw-danish.trsl ODw-english.trsl ODw-french.trsl
+ ODw-norwegian.trsl ODw-turkish.trsl ODw-dutch.trsl
+ ODw-fallback.trsl ODw-german.trsl ODw-swedish.trsl
+
+the directory examples with the files
+ - onedown-examples.pdf onedown-ref.pdf
+ and 21 *.tex files
+--------------------------------------------------------------------------
+INSTALLATION
+If onedown.sty is missing or you got a newer onedown.dtx/onedown.ins:
+1) Run LaTeX on onedown.ins to create a new onedown.sty
+2) Copy onedown.sty and the .trsl files in your latex path
+
+--------------------------------------------------------------------------
+DOCUMENTATION
+Available in onedown.pdf. This file may be created from onedown.dtx by
+running: pdflatex --shell-escape onedown.dtx
+
+In order to get the labels, indexes etc. you must run:
+pdflatex --shell-escape onedown.dtx
+makeindex -s gind.ist onedown.idx
+makeindex -s gglo.ist -o onedown.gls onedown.glo
+pdflatex --shell-escape onedown.dtx
+pdflatex --shell-escape onedown.dtx
+
+If you want a printable version without colors (for a monochrome printer),
+your last command should be:
+
+pdflatex --shell-escape '\AtBeginDocument{\NoColortrue}\input{onedown.dtx}'
+
+The option --shell-escape is necessary to build the list of user commands
+that are written in a separate file. Without this option this list will not
+be generated. Use this option at your own risk.
+
+MORE DOCUMENTATION
+- examples/onedown-examples.pdf
+- examples/onedown-ref.pdf
+
+--------------------------------------------------------------------------
+DESCRIPTION
+This packages provides macros to typeset bridge diagrams, including hands
+(stand alone or arround a compass), bidding tables (stand alone or in
+connection with hands/compass), trick tables and expert quizes.
+--------------------------------------------------------------------------
+REQUIREMENTS
+Allthough the package uses other packages, they are in every recent LaTeX
+distribution and will be loaded automatically. In other words: you don't
+need to install other packages.
+--------------------------------------------------------------------------
+If you have any ideas, questions, suggestions or bugs to report, please
+feel free to contact me.
+--------------------------------------------------------------------------
+DISCLAIMER
+This bundle is provided 'as is' without any warranty.
+
+Jacob Wiersma
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/Bidding.tex b/Master/texmf-dist/doc/latex/onedown/examples/Bidding.tex
new file mode 100644
index 00000000000..36ac601f3d1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/Bidding.tex
@@ -0,0 +1,238 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+%
+The first diagram reflects the default: the first column is for \west,
+full names are shown, the alignment is \textbf{c} and the long form is
+used: The lowercase |p| yields \Xfer{p} and an uppercase |P| yields
+\Xfer{P}. |X| yields \Xfer{X} and |R| yields \Xfer{R}. One can use
+'mixed-mode' for the entries in the table: both the abreviation |C| or the
+command |\Cl| for clubs are possible. \OneDown takes care of the spacing
+between the rank and the nomination, so you do not have to fiddle around
+with |\thinspace|, |\,| or the like.
+
+In the second diagram we use the short form of the non-bid calls, by
+calling |\setdefaults{bidlong=off}|.
+The alignment is \textbf{t} and we have put \north in the first column.
+
+In the third diagram we also use the short form for the table header by
+calling the bidding table with the token |!|. The alignment is \textbf{b}.
+\vfill
+%
+\begin{HBox}{{bidding, alignment and long/short forms}\hfill File: \FileName}
+%\gamefont{\smaller\smaller}
+A
+\begin{bidding}% default= [c]
+1\Cl & 1D & 1H & 1S \\
+1N & X & p & p \\
+R & P \\
+\end{bidding}
+B
+\\[2\baselineskip]
+A
+\setdefaults{bidlong=off,bidfirst=N}
+\begin{bidding}[t]
+1C & 1D & 1H & 1S \\
+1N & X & p & p \\
+R & P \\
+\end{bidding}
+B
+\\[2\baselineskip]
+A
+\setdefaults{bidlong=off}
+\begin{bidding}![b]
+1C & 1D & 1H & 1S \\
+1N & X & p & p \\
+R & p & p & p \\
+\end{bidding}
+B
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+We now show bidding diagrams with the real names of the players. In every
+of the four diagrams we have a different first column. Please observe that
+the association of the individuals with the \north, \east etc.\
+direction is preserved.
+\vfill
+\begin{HBox}{{bidding, names and first column}\hfill File: \FileName}
+\namesNS{Jan}{Joris}
+\namesEW{Piet}{Corneel}
+\setdefaults{bidfirst=N}
+\begin{bidding}
+1S & p & 3C & p\\
+3D & p & 3H & p\\
+3S & p & p & p\\
+\end{bidding}
+\par\hrulefill\par
+\setdefaults{bidfirst=E}
+\begin{bidding}
+1S & p & 3C & p\\
+3D & p & 3H & p\\
+3S & p & p & p\\
+\end{bidding}
+\par\hrulefill\par
+\setdefaults{bidfirst=S}
+\begin{bidding}
+1S & p & 3C & p\\
+3D & p & 3H & p\\
+3S & p & p & p\\
+\end{bidding}
+\par\hrulefill\par
+\setdefaults{bidfirst=W}
+\begin{bidding}
+1S & p & 3C & p\\
+3D & p & 3H & p\\
+3S & p & p & p\\
+\end{bidding}
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+Here we show the bidding diagram for only 2 bidders, with 4 different first
+columns. Observe that also here the real names stay in connection with
+their directions.
+\vfill
+\begin{HBox}{{biddingpairs, names and first column}\hfill File: \FileName}
+\namesNS{Jan}{Piet}
+\namesEW{Joris}{Corneel}
+\setdefaults{bidfirst=N}
+\begin{biddingpair}
+1S & 3C \\
+3D & 3H \\
+3S & p \\
+\end{biddingpair}
+\par\hrulefill\par
+\setdefaults{bidfirst=E}
+\begin{biddingpair}
+1S & 3C \\
+3D & 3H \\
+3S & p \\
+\end{biddingpair}
+\par\hrulefill\par
+\setdefaults{bidfirst=S}
+\begin{biddingpair}
+1S & 3C \\
+3D & 3H \\
+3S & p \\
+\end{biddingpair}
+\par\hrulefill\par
+\setdefaults{bidfirst=W}
+\begin{biddingpair}
+1S & 3C \\
+3D & 3H \\
+3S & p \\
+\end{biddingpair}
+\end{HBox}
+%
+\vfill
+\needspace{8\baselineskip}
+The next example shows how one can put a marker to a call with |\markit|
+and refer to it with by calling |\explainit|.
+These explanations must appear in the
+optional argument of the bidding table. You yourself are responsible that
+the order in which they appear corresponds with the order of the markers.
+The explanations are typeset like a footnote mechanism below the table and
+they will never extend beyond the right edge of the table, as you can see
+in the 2nd diagram. The width in a biddingpair table is even more limited,
+that's the reason why we use raggedright to obtain a result that is
+typographically acceptable. The last diagram shows that we can get an
+annotation without the need for |\markit| or |\explainit|.
+
+\vfill
+\begin{HBox}{bidding with (very long) annotation\hfill File: \FileName}
+\begin{bidding}(%
+ \explainit{Bergen}
+ \explainit{How strong?}
+ \explainit{Minimum hand})
+1\Sp & p & 3C\markit & p\\
+3D\markit & p & 3H\markit & p\\
+3S & p & p & p\\
+\end{bidding}
+\par\vspace{2\baselineskip}\noindent
+\begin{bidding}(%
+ \explainit{Here we have a very very
+ long annotation that does
+ not fit on one line})
+1\Sp & p & 3C\markit & p\\
+\end{bidding}
+\par\vspace{2\baselineskip}\noindent
+\begin{biddingpair}(%
+ \explainit{Here we have a very very
+ long annotation that does
+ not fit on one line})
+1S & 3C\markit \\
+\end{biddingpair}
+\qquad
+\begin{biddingpair}(%
+ no explain/markit here but still an annotation)
+1S & 3C \\
+\end{biddingpair}
+
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+In this examples we'll change some fonts to see what it accomplishes.\\
+By default the bidderfont is |\mdseries\sffamily| and the namefont is
+|\mdseries\slshape|, as you can clearly see in the header of the bidding
+diagram.
+\begin{itemize}[itemsep=0em]
+\item |\gamefont{...\Large}| enlarges everything, also where other fonts are
+active, e.g.\ in the header. (1st diagram)
+\item |\scalefont| scales all fonts, not only the |\gamefont|
+controlled stuff. (2nd diagram)
+\item If you change only the \emph{size} of e.g.\ the |\namefont|,
+without giving a font description, you 'lose the font' and the current font
+will be used instead of |namefont|. In diagrams most of the time this will
+be the |gamefont|. (3rd diagram)
+\end{itemize}
+We also used |\setdefaults{bidline=1}| to separate the header of the
+bidding table from the bidding sequence with a |\hline|.
+%
+\vfill
+\begin{HBox}{Same but with changed font\hfill File: \FileName}
+\gamefont{\sffamily\bfseries\Large}
+\setdefaults{bidline=1}
+\begin{bidding}[c](\explainit{Bergen})
+1S & p & 3C\markit & p\\
+3D & p & 3H & p\\
+3S & p & p & p\\
+\end{bidding}
+
+\gamefont{\sffamily\bfseries\normalsize}
+\gamefont{\sffamily\scalefont{2}}
+\begin{biddingpair}[c]%
+ (\explainit{Bergen})
+1S & 3C\markit \\
+3D & 3H \\
+3S & p \\
+\end{biddingpair}
+
+\gamefont{\sffamily\bfseries\normalsize}
+\namefont{\smaller}
+\begin{bidding}(\explainit{Bergen})
+1S & p & 3C\markit & p\\
+3D & p & 3H & p\\
+3S & p & p & p\\
+\end{bidding}
+\setdefaults{bidline=off}
+\end{HBox}
+\vfill
+Normally one uses shorthands in bidding tables. We already showed that one
+can use macros calls like |\Cl|. If a macro uses tokens, or if a shorthand
+appears as argument of another macro, one has to be careful. Note that the
+first entry (|\frame{2H}|) of row 2 does not produce the correct result,
+but |{\frame{2\He}}| does: We have to enclose these specials in braces
+(|{...}|) and not use the shorthand notation.
+\vfill
+\begin{HBox}{Special effects\hfill File: \FileName}
+\namesNS{}{}\namesEW{}{}
+\begin{bidding}
+p & X & R & P \\
+{\frame{2H}} & {\frame{2\He}} &
+{\textit{R}} & {\textit{\redouble}} \\
+{\Pass*!} & {\Redouble*!} & \Allpass\\
+\end{bidding}
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/Compass.tex b/Master/texmf-dist/doc/latex/onedown/examples/Compass.tex
new file mode 100644
index 00000000000..f538e67f4d6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/Compass.tex
@@ -0,0 +1,139 @@
+\documentclass[onedown-examples]{subfiles}
+%\usepackage{forloop}
+
+\gamefont{\larger\larger}
+\newcounter{Nr}
+\newcounter{Tmp}
+\makeatletter
+ \def\CP{\ODw@Compass}
+\makeatother
+
+\begin{document}
+\noindent
+Here we show the 16 possible combinations of dealership and vulnerability.
+We use the default |colors=2| (|black & red|) and so the vulners appear in
+red. The command |\CP| is defined in the preamble.
+\par\vspace{1em}\noindent
+%
+
+\begin{VBox}{The 16 combinations of dealer/vulner\hfill File: \FileName}
+\centering
+\setdefaults{compsize=1.3,compmid=\boardtext}
+\begin{tabular}{ll|ll}
+\forloop{Nr}{1}{\value{Nr} < 9}{%
+ \boardnr{\theNr} \theNr: \dealertext\vulnertext & \CP &%
+ \setcounter{Tmp}{8 + \theNr}%
+ \boardnr{\theTmp} \theTmp: \dealertext\vulnertext & \CP \\
+}
+\end{tabular}
+\end{VBox}
+\vfill
+\needspace{15\baselineskip}
+\vfill
+With |\setdefaults| we can influence the look of the compass in detail. The
+keys that control this are |compline| to set the thickness of the frame,
+|compshow| to hide/show the compass, |compsize| to multiply the compass
+size with a factor and |compturn| with which the letter 'E' and 'W' can be
+rotated over 90°. With the key |compass| one can set the font that is used
+for the letters in the compass.
+
+First we enlarge the compass 1.5$\times$. Note that this does influence
+neither the fontsize nor the frame thickness. Then we enlarge the fonsize.
+As you see, this does influence the size of the compass too. Finally
+the set the size factor back to 1. Notice the difference with the second
+compass.
+\vfill
+\begin{HBox}{controlling the compass I\hfill File: \FileName}
+\CP
+\setdefaults{compsize=1.5}\CP
+\setdefaults*{compass=\Large}\CP
+\setdefaults{compsize=1}\CP
+\end{HBox}
+\vfill
+As you see, we can make the frame very thick, very thin or let it
+disappear completely when we use factor 0.
+\vfill
+\begin{HBox}{controlling the compass II\hfill File: \FileName}
+\setdefaults{compsize=1.5}\CP
+\setdefaults{compline=3}\CP
+\setdefaults{compline=0.1}\CP
+\setdefaults{compline=0}\CP
+\end{HBox}
+\vfill
+If you watch the first compass carefully, you'll notice (maybe you must
+enlarge it to see what is meant) that the small |x| is exactly in the
+middle of the compass. Nevertheless the impressesion is that the |x| is
+closer to the '|W|'. This is because a '|W|' is wider than an '|E|'.
+It simply looks unbalanced. We can diminish this by enlarging the compass.
+Another trick is to rotate the |W| and |E| 90°, as shown in the third
+compass. In the second line we see a diagram with compass, but its
+frame is supressed. Finally we see a diagram where the total compass is
+suppressed. For clarity's sake we have added the \east and \west hand.
+\vfill
+\begin{HBox}{controlling the compass III\hfill File: \FileName}
+\boardnr{0}
+\setdefaults{compsize=1,compmid=x}\CP
+\setdefaults{compsize=1.5}\CP
+\setdefaults{compsize=1,compturn=on}\CP
+\setdefaults{compturn=off,compline=0}
+\gamefont{\footnotesize}
+\easthand{JT6}{764}{K43}{JT32}
+\westhand{Q952}{K92}{762}{AQ7}
+\showEW\hfill
+\setdefaults{compshow=off}
+\showEW
+\end{HBox}
+\vfill
+On the next page we show the compass for all available sizes. In order to
+get all diagrams in one color box, we combined the smallest with the
+largest etc. The first line gets out of the frame, but you'll get the idea
+all the same. Using |\scalefont| you can get even bigger diagrams.
+\vfill
+\begin{HBox}{onesuitAll for all sizes\hfill File: \FileName}
+\setdefaults{compshow=on}
+\gamefont{\sffamily\bfseries\tiny}
+\setdefaults{compmid=t}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+\gamefont{\sffamily\bfseries\HUGE}
+\setdefaults{compmid=U}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+%
+\gamefont{\sffamily\bfseries\ssmall}
+\setdefaults{compmid=s}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+\gamefont{\sffamily\bfseries\Huge}
+\setdefaults{compmid=H}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+%
+\gamefont{\sffamily\bfseries\scriptsize}
+\setdefaults{compmid=s}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+\gamefont{\sffamily\bfseries\huge}
+\setdefaults{compmid=h}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+%
+\gamefont{\sffamily\bfseries\footnotesize}
+\setdefaults{compmid=f}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+\gamefont{\sffamily\bfseries\LARGE}
+\setdefaults{compmid=A}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+%
+\gamefont{\sffamily\bfseries\small}
+\setdefaults{compmid=s}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+\gamefont{\sffamily\bfseries\Large}
+\setdefaults{compmid=L}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+%
+\gamefont{\sffamily\bfseries\normalsize}
+\setdefaults{compmid=n}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+\gamefont{\sffamily\bfseries\large}
+\setdefaults{compmid=l}
+\onesuitAll!{JT62}{AK53}{87}{Q94}
+\setdefaults{compmid=}
+\end{HBox}
+\vfill
+\end{document}
+\endinput
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/ExpertQuiz.tex b/Master/texmf-dist/doc/latex/onedown/examples/ExpertQuiz.tex
new file mode 100644
index 00000000000..ad52dc9b29d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/ExpertQuiz.tex
@@ -0,0 +1,77 @@
+\documentclass[onedown-examples]{subfiles}
+\begin{document}
+\iffalse
+\newgame\setdefaults{bidfirst=W}
+\dealer[\east]\vulner[\eastwest]
+\hand!{Q952}{K32}{765}{AQ7}
+
+\begin{bidding}(\explainit{gameforcing}
+ \explainit{natural, 6-card ab ab ab ab ab ab})%
+ & & 2D\markit & 2H\markit \\
+p & 3H & 4D & p \\
+? \\
+\end{bidding}
+
+\makeatletter
+ :\usebox\ODw@BidBox:
+\makeatother
+
+
+
+\begin{biddingpair}(\explainit{game forcing}
+ \explainit{natural, 6-card})%
+ 2D\markit & 2H\markit \\
+ 3H & 4D \\
+? \\
+\end{biddingpair}
+
+\makeatletter
+ :\usebox\ODw@BidBox:
+\makeatother
+\fi
+\vfill
+A special feature of \OneDown is the so called |expertquiz|. It essentially
+displays a hand with a (partial) bidding sequence. The reader has to guess
+the best next bid with respect to the hand and the bidding so far. The
+different answers are rewarded with points.
+
+Observe the token '\textbf{-}' in |\hand-| and |\begin{bidding}-| that
+suppresses the output.
+
+With the optional argument we add some extra information to the quiz.
+\vfill
+\begin{HBox}{expertquiz \hfill File: \FileName}
+\newgame\setdefaults{bidfirst=W}
+\dealer[\east]\vulner[\eastwest]
+\hand!-{Q952}{K32}{765}{AQ7}
+\begin{bidding}-(\explainit{gameforcing}
+ \explainit{natural, 6-card})%
+ & & 2D\markit & 2H\markit \\
+p & 3H & 4D & p \\
+? \\
+\end{bidding}
+\expertquiz[Team: \dealertext, \vulnertext]{%
+ 4\He= 10, 4\Sp= 7,
+ 6\Di= 4,
+ 4\NT/5\NT= 3, 5\Di=~1
+}
+\end{HBox}
+\vfill
+Here we show the same quiz, but the layout resembles the one used by the
+DBV\footnote{German Bridge League} in their monthly, called \emph{Bridge
+Magazin}. We get this special layout by using the token '\textbf{!}'. Of
+course we set it in the German language.
+\vfill
+\begin{HBox}{expert quiz a la DBV\hfill File: \FileName}
+\begin{otherlanguage}{german}
+\expertquiz![Team: \dealertext, \vulnertext]{%
+ 4\He= 10, 4\Sp= 7,
+ 6\Di= 4,
+ 4\NT/5\NT= 3, 5\Di= 1
+}
+\end{otherlanguage}
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/Hands.tex b/Master/texmf-dist/doc/latex/onedown/examples/Hands.tex
new file mode 100644
index 00000000000..f40721a3a07
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/Hands.tex
@@ -0,0 +1,41 @@
+\documentclass[onedown-examples]{subfiles}
+\newgame
+\begin{document}
+~
+\vfill
+In the first example we show how the cards of a hand are entered. The hand
+can be displayed horizontally or vertically. It can also be centered. In
+general the token |*| will center the diagram, whereas the token |!| does
+something special. With the command |\hand| the token |*| switches between
+the horizontal and vertical mode. In other situations the token |*| can
+force the output of a short notation. With non-diagram commands the token
+|*| prints the full expression rather than an abreviation. The token |!| outputs the hand
+vertically. Please note that we enter a |T| to get e.g.\ \suit{JT9}.
+Entering |10| would yield \suit{J109}, which looks really awful.
+\vfill
+\begin{HBox}{{single hand (hor/vert)+(left/centered)
+ \hfill File: \FileName}}
+
+ horizontal \par\noindent
+\hand{AQT2}{KQ3}{J98}{T98}
+
+ horizontal centered \par\noindent
+\hand*{AQT2}{KQ3}{J98}{T98}
+
+ vertical \par\noindent
+\hand!{AQT2}{KQ3}{J98}{T98}
+
+ vertical centered \par\noindent
+\hand*!{AQT2}{KQ3}{J98}{T98}
+
+\end{HBox}
+%
+\vfill
+This example shows how a mistake in entering the cards is detected.
+\vfill
+\begin{HBox}{{single hand with error\hfill File: \FileName}}
+\hand!{AQT2}{KKQ3}{J98}{T98}
+\end{HBox}
+\vfill
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/Languages.tex b/Master/texmf-dist/doc/latex/onedown/examples/Languages.tex
new file mode 100644
index 00000000000..61fd8bd45db
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/Languages.tex
@@ -0,0 +1,45 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+As a demonstration of the multilingual features of the \OneDown package we
+show a diagram with turkish annotations. \\
+Note:\\
+Due to an quirk in the babel implementation of the turkish and some
+other language, you must either call |\shorthandoff{=!}| after loading the
+language, or load it with e.g.\ \\
+|\usepackage[turkish,shorthands=]{babel}|.
+
+Refer to the \OneDown manual for details.
+\vfill
+\begin{HBox}{Languages (Turkish)\hfill File: \FileName}
+\boardnr{32}
+\northhand{AK43}{AJ98}{AQJ8}{4}
+\southhand{87}{QT5}{432}{K9865}
+\easthand{JT6}{764}{KT9}{JT32}
+\westhand{Q952}{K32}{765}{AQ7}
+\leftupper{\boardtext*}%
+ {\dealertext}{\vulnertext}
+\rightupper[1ex]{\contract: }%
+ {3\,\NT}{\by \south}
+\rightlower[1ex]{\lead: \Di 7}{}{}
+\begin{otherlanguage}{turkish}
+\showAll*
+\end{otherlanguage}
+\end{HBox}
+\vfill\noindent
+Here we switch to the Norwegian language. As we use the same settings for the
+diagram, we simply call |\showAll| to display it, after we changed the
+language. The Jack is coded with \foreignlanguage{norsk}{\jack{}}
+rather thaj \jack, so the hand is now closer to the right upper legend.
+\vfill
+%
+\begin{HBox}{Languages (Norwegian)\hfill File: \FileName}
+\begin{otherlanguage}{norsk}
+\showAll*
+\end{otherlanguage}
+\end{HBox}
+\vfill
+%
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/Legends.tex b/Master/texmf-dist/doc/latex/onedown/examples/Legends.tex
new file mode 100644
index 00000000000..d54b2dd78d0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/Legends.tex
@@ -0,0 +1,84 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+\vfill
+In this section we will investigate how we can add certain annotations to
+card diagrams. We start with |\newgame| and |\resetfonts| in order to
+`forget the past'.
+
+With |\dealer| one can denote which player is the dealer and
+with |\vulner| which side is vulnerable. This data is stored and with
+|\dealertext| (or |\vulnertext|) one can retrieve it. The macros
+|\leftupper| (and also the |right-| and the |lower-| versions) puts its 3
+arguments, each on its own line, in the diagram. If you wonder why we use
+the command |\by| instead the text |by| in |\rightupper|: |\by| gets
+automatically translated into the active language.\par\noindent
+If you look at the diagram, you will notice that the annotations can extend
+to the left of the \west hand and the right of the \east hand..
+\vfill
+\begin{HBox}{Annotations\hfill File: \FileName}
+\newgame\resetfonts
+\northhand{AK43}{AJ98}{AQJ}{54}
+\southhand{87}{QT5}{8432}{K986}
+\easthand{JT6}{764}{KT9}{JT32}
+\westhand{Q952}{K32}{765}{AQ7}
+\dealer[\east]\vulner[\eastwest]
+\leftupper{\dealertext}{}{\vulnertext}
+\rightlower{}{\lead: \Di 7}{}
+\rightupper{\contract: 3\,\NT}{\by \south}{}
+\showAll
+\end{HBox}
+\vfill
+In the next example we show all possible annotations. Here you can see that
+the |\upper-|versions align the text with the topline, whereas the
+|\lower-|versions align with the bottomline. Because the legendfont
+can differ from the gamefont and the rows in a hand get some extra space,
+the legend lines will normally not align with the rows of a hand.
+
+ We can add an offset (as shown in section showAll) to the \west hand in order to make the hand align to
+the left with the left-upper legend. But this enlarges the gap between the
+\west hand and the compass. It is perhaps better to have only very short
+legends. But it is up to you to decide that.
+\vfill
+\begin{HBox}{Legends: full overview\hfill File: \FileName}
+\leftupper{LUp:Line 1}{and line2}{last Line}
+\rightupper{RUp:Line 1}{and line2}{last Line}
+\leftlower{LLo:Line 1}{and line2}{last Line}
+\rightlower{RLo:Line 1}{and line2}{last Line}
+\headlinetext{Here you put some headtext\ldots\par on 2 lines}
+\footlinetext{\ldots here goes foottext}
+\showAll
+\end{HBox}
+\needspace{8\baselineskip}
+\vfill
+The next examples show wich legends are output/suppressed for the other
+card diagrams. Note also that the head/foot-linetext does not extend to the
+width of the diagram, and can get real narrow when only the
+\NorthSouth*!-hands are shown. It might be better to put a |\raggedright|
+in. If you do so, then don't forget to |\protect| it.
+\vfill
+\begin{HBox}{{Legends for: \northsouth: may need \emph{raggedright}\hfill File: \FileName}}
+\showNS
+
+\hrulefill
+
+\headlinetext{\protect\raggedright Here you put some headtext\ldots\par on 2 lines}
+\footlinetext{\protect\raggedright \ldots here goes foottext}
+\showNS
+\end{HBox}
+\vfill
+\begin{HBox}{{Legends: \north-\east, \north-\west, \east-\west\hfill File: \FileName}}
+
+\showNE
+
+\hrulefill
+
+\showNW
+
+\hrulefill
+
+\showEW
+\end{HBox}
+\vfill
+\end{document}
+\endinput
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/Play.tex b/Master/texmf-dist/doc/latex/onedown/examples/Play.tex
new file mode 100644
index 00000000000..7c0a157d3da
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/Play.tex
@@ -0,0 +1,80 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+Here we show the playing tricks diagram. For the user, the environment |play| is like a 4
+column table. Its mandatory argument denotes the player with the opening
+lead. With the optional argument the user can specify the trump suit. The
+default is |N| for \NT. All leads must have a suit, although this is not
+checked by \OneDown. If a suit is
+followed, you don't have to repeat the suit: a rank suffices to specify the
+card. Of course at discards or when ruffed, the suit must be entered too.
+
+The |play| diagram has a special feature: it knows which player wins the
+trick and thus 1) you do not have to specify who has the lead, except of
+course the opening lead, and 2) it calculates (and displays) the tricks won
+by each side.
+\vfill
+\begin{HBox}{{Playing tricks table. Trump is \Cl\hfill File: \FileName}}
+\newgame\resetfonts
+\begin{play}{W}[C]
+ H3 & 4 & K & 6 \\
+ C3 & 5 & Q & 2 \\
+ H5 & 2 & A & 8 \\
+ C7 & D9 & J & K \\
+ S3 & 4 & Q & 6 \\
+ SA & C4 & 2 & T \\
+\end{play}
+\end{HBox}
+\vfill
+It is posible to use either the shorthands (|C, D, H, S|) for the suits as
+well as the code (e.g.\ |\Cl| itself, as you can see here. Refer to Bidding
+examples for further details.
+
+In the environment |play| the consistency of the cards played is checked. As
+an example the error about card \He\,5 (ocurring $2\times$ in the same trick)
+is reported.
+\vfill
+\begin{HBox}{{Same, but with suit commands\hfill File: \FileName}}
+\begin{play}{W}[C]
+ \He3 & 4 & K & 6 \\
+ \Cl3 & 5 & Q & 2 \\
+ \He5 & 5 & A & 8 \\
+ \Cl7 & \Di9 & J & K \\
+ \Sp3 & 4 & Q & 6 \\
+ \Sp A & K & 2 & T \\
+\end{play}
+\end{HBox}
+\vfill
+In the next example for a \NT contract, we have changed the language. Here
+the double occurence of \Cl\,6 in two different tricks is shown.
+\vfill
+\begin{HBox}{Playing tricks table for \NT in Dutch\hfill File: \FileName}
+\begin{otherlanguage}{dutch}
+\begin{play}{W}
+ C3 & Q & K & 2 \\
+ SJ & A & 4 & 2 \\
+ C4 & 6 & T & 5 \\
+ CA & ST & 6 & 9 \\
+ C7 & HT & D5 & S5 \\
+ D2 & T & 3 & 4 \\
+\end{play}
+\end{otherlanguage}
+\end{HBox}
+\vfill
+\vfill
+\begin{HBox}{The same table in German\hfill File: \FileName}
+\begin{otherlanguage}{german}
+\begin{play}{W}
+ C3 & Q & K & 2 \\
+ SJ & A & 4 & 2 \\
+ C4 & 6 & T & 5 \\
+ CA & ST & 6 & 9 \\
+ C7 & HT & D5 & S5 \\
+ D2 & T & 3 & 4 \\
+\end{play}
+\end{otherlanguage}
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/Suits.tex b/Master/texmf-dist/doc/latex/onedown/examples/Suits.tex
new file mode 100644
index 00000000000..393b4028d6a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/Suits.tex
@@ -0,0 +1,65 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+
+Here we show a single suit, with and without a suit symbol. You can observe
+the influence of changing the |gamefont|.
+In the 1st suit, card 4 occurs $2\times$ and an error message is printed.
+In the last suit the same happens for card 5 but now the suit is known and
+is named in the error message.
+\vfill
+\begin{HBox}{suit and errors I\hfill File: \FileName}
+\suit{AKT544}\hspace{1cm}
+\suit[\He]{AKT54}
+\gamefont{\sffamily\bfseries\Large}
+\par\vspace{1\baselineskip}\noindent
+\suit{AKT54}\hspace{1cm}
+\suit[\He]{AKT54}
+\par\vspace{1\baselineskip}\noindent
+\suit[\He]{AKT554}
+\end{HBox}
+\vfill
+\noindent
+In the 3rd diagram card 8 occurs $2\times$. In the 4th diagram card 4 is
+missing and a warning is raised. Card 5, which occurs $2\times$, raises an
+error. Errors are shown by default, warnings must be activated first. These
+consistency checks make it easy to spot typos in your diagrams.
+\vfill
+\begin{HBox}{suits and errors II\hfill File: \FileName}
+\resetfonts
+\onesuitNS{AK53}{JT6}
+\qquad
+\onesuitEW{87}{Q952}
+\qquad
+\onesuitEW{87}{Q852}
+\par\vspace{0.5\baselineskip}\noindent
+\setdefaults{warn=on}
+\onesuitAll{AK53}{JT6}{87}{Q952}
+\end{HBox}
+\vfill
+The other 'onesuit' diagrams, using a small box.
+\vfill
+\begin{HBox}{onesuitXX with box\hfill File: \FileName}
+\setdefaults{warn=off}
+\onesuitNE{AK43}{87}
+\qquad
+\onesuitNE{AK43}{Q952}
+\end{HBox}
+\vfill
+Next we show how to use a compass instead of a small box.
+\vfill
+\begin{HBox}{onesuitXX with compass\hfill File: \FileName}
+\onesuitNS!{AK53}{JT6}
+\quad
+\onesuitEW!{87}{Q952}
+\quad
+\onesuitNE!{AK43}{87}
+\quad
+\onesuitNE!{AK43}{Q952}
+\quad
+\onesuitAll!{AK43}{JT6}{87}{Q952}
+\end{HBox}
+\needspace{8\baselineskip}
+\vfill
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/Wrapping.tex b/Master/texmf-dist/doc/latex/onedown/examples/Wrapping.tex
new file mode 100644
index 00000000000..753eea76853
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/Wrapping.tex
@@ -0,0 +1,98 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+\vfill
+The package \OneDown renounces to implement so called \emph{hanging hands}.
+To achieve such you will have to use external means, e.g.\ the package
+|wrapfig|. The advantage of an external package is that 1) you can wrap
+anything you like and 2) you have more control over the result. Here follow
+some examples to show how to do that.
+
+You need a new paragraph before the |wrapfig| stuff. For details, refer to
+the documentation of the package |wrapfig|.
+\vfill
+\begin{HBox}{Wrapping a hand\hfill File: \FileName}
+\blindtext
+
+\begin{wraptable}{l}{0cm}% nat. width
+\hand!{AQ852}{AKQ3}{-}{AQKJ}
+\end{wraptable}
+\blindtext
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+~
+\vfill
+\begin{HBox}{Wrapping a bidding table\hfill File: \FileName}
+\blindtext
+
+\begin{wraptable}{l}{0cm}% nat. width
+\begin{biddingpair}
+1S & 3S \\
+4S & 5S \\
+6S & p \\
+\end{biddingpair}
+\end{wraptable}
+\blindtext
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+With a small diagram there is enough space for the wrapped text.
+\vfill
+\begin{HBox}{{Wrapping a card diagram\hfill File: \FileName}}
+\newgame
+\blindtext
+
+\begin{wraptable}{l}{0cm}% nat. width
+\gamefont{\sffamily\bfseries\footnotesize}
+\northhand{AQ92}{873}{A54}{752}
+\southhand{J7543}{Q42}{63}{AKQ}
+\showNS
+\end{wraptable}
+\blindtext
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+With real big diagrams there is not enough space for the wrapped text.
+\vfill
+\begin{HBox}{{Show wrapping of hands, Large size\hfill File: \FileName}}
+Hello, here is some text without
+a meaning. This text should show
+what a printed text will look
+like at this place. If you read
+this text, you will get no
+information.
+
+\newgame
+\resetfonts
+\begin{wraptable}{l}{0cm}% nat. width
+\northhand{AQ92}{873}{A54}{752}
+\southhand{J7543}{Q42}{63}{AKQ}
+\gamefont{\sffamily\bfseries\scalefont{2.5}}
+\showNS
+\end{wraptable}
+\blindtext
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+With |\raggedright| or |RaggedRight| from package |ragged2e| it looks much
+better.
+\vfill
+\begin{HBox}{{Same, with RaggedRight\hfill File: \FileName}}
+\RaggedRight
+Hello, here is some text without
+a meaning. This text should show
+what a printed text will look
+like at this place. If you read
+this text, you will get no
+information.
+
+\begin{wraptable}{l}{0cm}% nat. width
+\showNS
+\end{wraptable}
+\blindtext
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/bidAll.tex b/Master/texmf-dist/doc/latex/onedown/examples/bidAll.tex
new file mode 100644
index 00000000000..f1c5c1821cc
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/bidAll.tex
@@ -0,0 +1,68 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+
+Here is a diagram with four hands. We get rid of the past by calling
+|\newgame|. Then we define our hands and set the first bid column to
+\south and we show only one pair of bidders. Because the bidding table
+does not fit on the same line, it appears below the compass.
+(In fact it actually would fit on the line. But to illustrate the point we
+used |\handskip| to widen the diagram a bit).
+Note that the token |-| in the |bidding| environment suppresses the output
+of it. Only when calling |\showAll+| (with a |+| token), the saved bidding
+diagram is printed with the card diagram.
+
+\vfill
+\begin{HBox}{not fitting on the line\hfill File: \FileName}
+\newgame
+\handskip{2em}
+\northhand{KJ82}{KQ9}{J32}{JT8}
+\southhand{AQ953}{A85}{Q84}{K6}
+\easthand{T6}{764}{KT9}{Q5432}
+\westhand{74}{JT32}{A765}{A97}
+\setdefaults{bidfirst=S}
+\begin{biddingpair}-
+1S & 4S \\
+p & \\
+\end{biddingpair}
+\showAll+
+\end{HBox}
+\vfill
+Here the hands and the bidding are the same, but the complete diagram
+(biddingtable inclusive) is centered and we use the short notation for the
+players in the bidding table. Being shorter now, the bidding table does fit on
+the same line.
+\vfill
+\begin{HBox}{centered and fitting\hfill File: \FileName}
+\setdefaults{bidfirst=S}
+\begin{biddingpair}!-
+1S & 4S \\
+p & \\
+\end{biddingpair}
+\showAll*+
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+The same deal, but now we show all bidders in the bidding table. Again it
+is to wide to fit on the line.
+\vfill
+\begin{HBox}{left aligned\hfill File: \FileName}
+\begin{bidding}-(\explainit{15-17\lpts})
+p & p & P & 1S \\
+p & 2C & {\Pass*!} & 2N\markit \\
+p & 3N & {\Allpass!} \\
+\end{bidding}
+\showAll+
+\end{HBox}
+\vfill
+Finally the same, but the diagram is centered. We also set the extra
+handskip to 0 again.
+\vfill
+\begin{HBox}{centered\hfill File: \FileName}
+\handskip{0em}
+\showAll*+
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/bidEW.tex b/Master/texmf-dist/doc/latex/onedown/examples/bidEW.tex
new file mode 100644
index 00000000000..f33ed9bb816
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/bidEW.tex
@@ -0,0 +1,51 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+\vfill
+In the previous example we changed the gamefont to scriptsize, which is
+still in effect here, as you can see in this example. You wonder why the
+bidding is shown for \north and \south, but the hands are those of \east and
+\west? Well, if you say |\showEW| you get the \eastwest hands. And if you
+say |\setdefaults{bidfirst=S}|, then the first column is of \south{}! (BTW:
+if you want to get \south{}! as output, you must write |\south{}!|, then
+|\south!| and even |\south !| will regard the |!| as a token to |\south|
+and will produce \south !).
+
+We reset the gamefont before we draw the 2nd diagram. Please note that we
+have to redefine the bidding. The saved version from the 1st diagram will
+not change its font!
+
+\vfill
+\begin{HBox}{bidEWpair\hfill File: \FileName}
+\northhand{KJ82}{KQ9}{J}{AQJT8}
+\southhand{AQT95}{A52}{864}{K6}
+\easthand{63}{J764}{KQT9}{953}
+\westhand{74}{T83}{A7532}{742}
+\setdefaults{bidfirst=S,bidlong=off}
+\begin{biddingpair}!-(\explainit{splinter}
+ \explainit{control})
+1S & 4D\markit \\
+4H\markit & 6S \\
+\end{biddingpair}
+\showEW+
+\gamefont{\sffamily\bfseries\normalsize}
+\par\vspace{1\baselineskip}
+\showEW+
+\begin{biddingpair}!-(\explainit{splinter}
+ \explainit{control})
+1S & 4D\markit \\
+4H\markit & 6S \\
+\end{biddingpair}
+\par\vspace{1\baselineskip}
+\showEW+
+\end{HBox}
+\vfill
+\begin{HBox}{bidEWpair centered\hfill File: \FileName}
+\showAll+
+
+\showEW*+
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/bidNE.tex b/Master/texmf-dist/doc/latex/onedown/examples/bidNE.tex
new file mode 100644
index 00000000000..099186c048d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/bidNE.tex
@@ -0,0 +1,42 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+\vfill
+Here we show some examples without comment.
+\vfill
+\begin{HBox}{showNE\hfill File: \FileName}
+\northhand{KJ82}{KQ9}{J}{AQJT8}
+\southhand{AQT95}{A52}{864}{K6}
+\easthand{63}{J764}{KQT9}{432}
+\westhand{74}{T83}{A7532}{957}
+\gamefont{\sffamily\bfseries\large}
+\begin{biddingpair}!-(\explainit{splinter}
+ \explainit{control})
+1S & 4D\markit \\
+4H\markit & 6S \\
+\end{biddingpair}
+
+\showNE+
+
+\end{HBox}
+\vfill
+\begin{HBox}{showNE centered\hfill File: \FileName}
+\showNE*+
+\end{HBox}
+\vfill
+\begin{HBox}{showNE\hfill File: \FileName}
+\begin{bidding}!-(\explainit{splinter}
+\explainit{control})
+1S & p & 4D\markit & p \\
+4H\markit & p & 6S & p \\
+\end{bidding}
+\showNE+
+\end{HBox}
+\vfill
+\begin{HBox}{showNE centered\hfill File: \FileName}
+\showNE*+
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/bidNS.tex b/Master/texmf-dist/doc/latex/onedown/examples/bidNS.tex
new file mode 100644
index 00000000000..98ef65248af
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/bidNS.tex
@@ -0,0 +1,91 @@
+\documentclass[onedown-examples]{subfiles}
+
+\makeatletter
+\def\SW{\the\ODw@Skip@Width}
+\makeatletter
+\begin{document}
+\vfill
+We show a couple of diagram without comment, with the exception of
+number 4.
+\vfill
+\begin{HBox}{1: showNS pair\hfill File: \FileName}
+\newgame
+\northhand{KJ82}{KQ9}{J}{AQJT8}
+\southhand{AQT95}{A52}{864}{K6}
+\easthand{JT6}{764}{KT9}{JT32}
+\westhand{Q952}{K32}{765}{AQ7}
+\setdefaults{bidfirst=S}
+\begin{biddingpair}-(\explainit{splinter})
+1S & 4D\markit \\
+4H & 6S \\
+\end{biddingpair}
+\showNS+
+\end{HBox}
+\vfill
+\begin{HBox}{2: showNS pair centered\hfill File: \FileName}
+\begin{biddingpair}!-(\explainit{splinter})
+1S & 4D\markit \\
+4H & 6S \\
+\end{biddingpair}
+\showNS*+
+\end{HBox}
+\vfill
+\begin{HBox}{3: showNS\hfill File: \FileName}
+\begin{bidding}!-(\explainit{splinter}
+\explainit{control})
+1S & p & 4D\markit & p \\
+4H\markit & p & 6S & p \\
+\end{bidding}
+\showNS+
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+\vfill
+Here we show the influence of command |\handskip|, that adds some extra
+space between the card diagram and the bidding diagram. In the 2nd diagram
+the negative value diminishes the distance. Because it is within braces,
+the length change is local and the normal value is automatically restored
+afterwards. In the 4th diagram we add |3em| extra space
+\vfill
+\begin{HBox}{4: showNS centered\hfill File: \FileName}
+\showNS*+
+{\handskip{-1em}\showNS*+}
+\showNS*+
+{\handskip{3em}\showNS*+}
+\end{HBox}
+\vfill
+\begin{HBox}{5: showNS pair\hfill File: \FileName}
+\gamefont{\sffamily\bfseries\scriptsize}
+\begin{biddingpair}!-
+1S & 4D \\
+4H & 6S \\
+\end{biddingpair}
+\showNS+
+\end{HBox}
+\vfill
+Because the previously saved bidding diagram is used, setting |bidfirst|
+has no influence on the output\ldots
+\vfill
+\begin{HBox}{6: showNS pair centered\hfill File: \FileName}
+\setdefaults{bidfirst=W}
+\showNS*+
+\end{HBox}
+\vfill
+\ldots But when setting the next bidding diagram, it has!
+\vfill
+\begin{HBox}{7: showNS\hfill File: \FileName}
+\begin{bidding}-(\explainit{splinter}
+\explainit{control})
+1S & p & 4D\markit & p \\
+4H\markit & p & 6S & p \\
+\end{bidding}
+\showNS+
+\end{HBox}
+\vfill
+\begin{HBox}{8: showNS centered\hfill File: \FileName}
+\showNS*+
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/bidNW.tex b/Master/texmf-dist/doc/latex/onedown/examples/bidNW.tex
new file mode 100644
index 00000000000..9ea710182e3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/bidNW.tex
@@ -0,0 +1,38 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+\vfill
+\begin{HBox}{showNW pair\hfill File: \FileName}
+\northhand{KJ82}{KQ9}{J}{AQJT8}
+\southhand{AQT95}{A52}{864}{K6}
+\easthand{63}{J764}{KQT9}{432}
+\westhand{74}{T83}{A7532}{957}
+\setdefaults{bidfirst=S}
+\gamefont{\sffamily\bfseries\Large}
+\begin{biddingpair}-(\explainit{splinter})
+1S & 4D\markit \\
+4H & 6S \\
+\end{biddingpair}
+\showNW+
+\end{HBox}
+\vfill
+\begin{HBox}{showNW pair centered\hfill File: \FileName}
+\showNW*+
+\end{HBox}
+\vfill
+\begin{HBox}{showNW\hfill File: \FileName}
+\begin{bidding}-(\explainit{splinter}
+\explainit{control})
+1S & p & 4D\markit & p \\
+4H\markit & p & 6S & p \\
+\end{bidding}
+\showNW+
+\end{HBox}
+\vfill
+\begin{HBox}{showNW centered\hfill File: \FileName}
+\showNW*+
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/onedown-examples.pdf b/Master/texmf-dist/doc/latex/onedown/examples/onedown-examples.pdf
new file mode 100644
index 00000000000..db3654eebc0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/onedown-examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/onedown-examples.tex b/Master/texmf-dist/doc/latex/onedown/examples/onedown-examples.tex
new file mode 100644
index 00000000000..8f488579273
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/onedown-examples.tex
@@ -0,0 +1,171 @@
+%%
+%% onedown-examples.tex
+%% April 16, 2018
+%% Requires the onedown bundle
+%% Part of the OneDown bundle (mirror.ctan.org/onedown)
+%% author: J. Wiersma
+%%--------NOTE-------------------------------------------
+%% USAGE: (pdf)latex onedown-examples.tex
+%%-------------------------------------------------------
+
+
+
+\documentclass[a4paper,fontsize=11pt]{scrartcl}
+\usepackage{scrlayer-scrpage}
+%
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+%
+\usepackage{subfiles}% can compile stand-alone/combined
+\usepackage[dutch,norsk,%
+ turkish,shorthands=,% avoid problems with ':', '=' and '!'
+ german,english]{babel}% introduce possible languages
+
+%\usepackage[mono=false]{libertine}% verbatim needs option mono=false
+% linertine screws verbatim, at least I don't know how to handle that
+\usepackage{onedown}% our own style to set bridge stuff
+\usepackage[most]{tcolorbox}% show examples with code
+%\usepackage{tcolorbox}% show examples with code
+\usepackage{enumitem}%
+\usepackage{wrapfig}%
+\usepackage{ragged2e}
+\usepackage{multicol}
+\usepackage{blindtext}% to show wrapping
+\usepackage{forloop}% for Compass
+\usepackage{needspace}% keep lines on one page
+\usepackage{scalefnt}% to enlarge even more
+\usepackage[a4paper, total={185mm, 257mm},left=12mm,top=20mm]{geometry}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% To get a PDF for printing on a monochrome printer
+% comment out these commands
+%
+\setdefaults{colors=4A}
+%-------------
+% set the look of the example boxes
+%
+\tcbset{%
+ colback=red!5!white,colframe=red!75!black,
+ colbacklower=white,
+ fonttitle=\bfseries,
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% To get a PDF for viewing on a screen
+% comment out these commands
+%
+%\tcbset{%
+% colback=white,colbacktitle=white,coltitle=black,
+% colbacklower=white,
+% fonttitle=\bfseries,
+%}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Due to a bug (?) in tcolorbox we cannot return to the default
+% "listing and text" after setting "listing side text" globally
+% within \tcbset. % So we define HBox and VBox to set this locally.
+% We need the VBox for showing 16 boardnrs in Compass.tex
+%
+\newtcblisting{HBox}[1]{listing side text,title=#1}
+\newtcblisting{VBox}[1]{listing and text,title=#1}
+
+\usepackage{shortvrb}
+\MakeShortVerb{\|}
+% hack to make verbatim stuff more clear
+% adapted from verbatim.sty
+\makeatletter
+\def\verbatim@font{\ttfamily\bfseries\large
+ \hyphenchar\font\m@ne
+ \@noligs}
+
+\def\Xfer#1{\ODw@Xfer{#1}}
+\makeatother
+
+
+\usepackage[pdfencoding=auto]{hyperref}
+ \hypersetup{%
+ pdftitle={onedown-examples.pdf},
+ pdfsubject={Bridge Diagrams, OneDown bundle},
+ pdfkeywords={OneDown Bridge LaTeX},
+ colorlinks,
+ linkcolor=red,
+ }
+
+\newcommand\OneDown{\textcolor{red}{\smaller\bfseries\textsc{OneDown}}\xspace}
+
+%-------------
+\pagestyle{scrheadings}
+\clearscrheadfoot
+\ihead{\texttt{onedown-examples.pdf}
+(\OneDown v\ODwstyleversion, \ODwstyledate)\hfill \pagemark}
+%-----------
+
+\def\FileName{\jobname}
+\def\SubFile#1{\def\FileName{#1}\newpage\section{#1}\subfile{#1}}
+
+\addtolength{\textheight}{1.5cm}
+
+\begin{document}
+\pdfbookmark[1]{Title}{Title}
+\title{Examples for the\\\OneDown package%
+\footnote{This file is part of the \OneDown bundle. To generate this file,
+use the following command: \newline \texttt{\$ pdflatex \jobname.tex}}
+\\[1em]
+\normalsize\url{www.ctan.org/pkg/onedown}
+}
+\author{J.\,Wiersma\footnote{email: \textsf{jack46@online.de}}}
+\date{15 April 2018 (v0.4)}
+\maketitle
+
+\section*{Introduction}
+This file (\jobname) contains (well, sort of includes) all the example
+files from the bundle. We use the 'include' mechanism of the package
+|subfiles|. This means that you can compile each example file as
+stand-alone, but they also form one document.
+The advantage is that you can copy one example file and edit it to your
+taste i.e.\ to experiment a little, and you can compile it without changing
+the preamble, provided the \OneDown bundle is in your \TeX-path.
+
+For questions not covered in these examples or any further documentation,
+read the \OneDown package manual named onedown.pdf.
+
+If you encounter difficulties in compiling adapted files, then please read
+the section about active characters in the manual.
+
+To make it easy for you to decide which file to experiment with, all
+sections bear the file name, which can also be found in the list below. The
+examples are produced using the \textsf{tcolorbox} package. This enables us
+to show the code and the output of it side by side.
+
+\par\vspace{1\baselineskip}
+\setlength\columnseprule{.8pt}% rule between cols
+\begin{multicols}{3}[{\centering \textbf{\Large List of Examples}}]
+% Use \tableofcontents to create a hyperref'ed list of examples
+% by stripping all stuff except the toclist itself,
+% Change \addvspace too, to keep things tight .
+ \makeatletter
+ \renewcommand\tableofcontents{\@starttoc{toc}}
+ \makeatother
+ \renewcommand*{\addvspace}[1]{}
+ \tableofcontents
+\end{multicols}
+\SubFile{Hands}
+\SubFile{Suits}
+\SubFile{showNS-warn-I}
+\SubFile{showNS-warn-II}
+\SubFile{showNS-align}
+\SubFile{showAll}
+\SubFile{Bidding}
+\SubFile{bidAll}
+\SubFile{bidNS}
+\SubFile{bidEW}
+\SubFile{bidNE}
+\SubFile{bidNW}
+\SubFile{Legends}
+\SubFile{Wrapping}
+\SubFile{Play}
+\SubFile{ExpertQuiz}
+\SubFile{Languages}
+\SubFile{Compass}
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.pdf b/Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.pdf
new file mode 100644
index 00000000000..a164ea31699
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex b/Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex
new file mode 100644
index 00000000000..c514817052d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex
@@ -0,0 +1,469 @@
+\documentclass[onedown-examples]{subfiles}
+\usepackage[Q=yes]{examplep}
+\makeatletter
+\def\verbatim@font{\ttfamily\bfseries
+ \hyphenchar\font\m@ne
+ \@noligs}
+\makeatother
+%
+\newcommand\bs{%
+ \texttt{%
+ \upshape% the itshape of meta screws the backslash
+ \textbackslash%
+ }%
+}% bs
+%
+\let\olditem\item
+\renewcommand\item[1][\relax]{\olditem\textbf{\bs#1}}
+%\def\Item{\olditem[\bs]}
+%
+\begin{document}
+\iffalse
+Word1 \onesuitEW{K98}{A65} word2
+%
+\onesuitNE{K}{A65} word3
+%
+\onesuitNS{K98}{A65} word4
+%
+\onesuitNW{K98}{A65} word5
+
+Word1 \onesuitEW!{K98}{A65} word2
+%
+\onesuitNE!{K98}{A65} word3
+%
+\onesuitNS!{K98}{A65} word4
+%
+\onesuitNW!{K98}{A65} word5
+
+Word1 \onesuitAll{K}{A}{QT7}{J432} word2
+%
+\onesuitAll!{K98}{A65}{QT7}{J432} word3
+\fi
+
+\larger
+\newgeometry{total={150mm, 265mm},left=25mm,top=15mm}
+\pagestyle{empty}
+%\iffalse
+\centerline{\larger\larger\textbf{\OneDown Reference Guide}}
+\par\vspace{1\baselineskip}\noindent
+Here we show all user commands of the package |onedown| in alphabetical
+order. If we only show the ouput that a command produces, then this output
+is shown directly behind the command on the same line. If a description of
+the command is given, then this description starts on a new line. Optional
+parameters of a command (including tokens) appear in brackets
+|[...]|. Output of a tokenized |\macro*!| is shown as:
+\qquad|\macro[*!]: \macro, \macro*, \macro!, \macro*!|\\
+All output is shown for the English language.
+
+\begin{description}[itemsep=-0.3em]
+\item[ace]: \ace
+\item[Ace\Q{[*!]}]: \Ace, \Ace*, \Ace!, \Ace*!
+
+\item[alert]: |2\NT\alert| typesets 2\NT\alert and |2\Cl\alert| typesets
+2\Cl\alert
+
+\item[all]: \all
+\item[All\Q{[*!]}]: \All, \All*, \All!, \All*!
+
+\item[allpass]: \allpass
+\item[Allpass\Q{[*!]}]: \Allpass, \Allpass*, \Allpass!, \Allpass*!
+
+\item[announce]: |2\He\announce| typesets 2\He\announce
+
+\item[bidderfont\Q{{font} }]\\
+Defines the font for the names in
+bidding diagrams. The mandatory parameter for all font commands is a font
+description like |\sffamily\bfseries\HUGE| or |\mdseries\slshape\smaller|
+or |\sffamily\scalefont{3}|.
+
+\item[board]: \board
+\item[Board\Q{[*!]}]: \Board, \Board*, \Board!, \Board*!
+
+\item[boardnr\Q{{Nr} }]\\
+Calculates (and stores) the dealership and vulnerability if |Nr|
+is a number. If it is just a text it is stored to be used instead of a
+board number.
+
+\item[boardtext\Q{[*]}]\\
+Typesets the value that is stored with |\boardnr|.
+The star version writes the text \textbf{\boardtext*} in front of it.
+
+\item[by]: \by
+
+\item[Cl]: \Cl
+
+\item[compassfont\Q{{font} }]\\
+Defines the font for the compass.
+
+\item[contract]: \contract
+\item[Contract\Q{[*!]}]: \Contract, \Contract*, \Contract!, \Contract*!
+
+\item[deal]: \deal
+\item[Deal\Q{[*!]}]: \Deal, \Deal*, \Deal!, \Deal*!
+
+\item[dealer\Q{[text]}]\\
+Typeset the defined dealer. With the optional
+parameter one can define the dealer.
+
+\item[dealertext\Q{[text]}]\\
+Typeset the user-defined value for the |\dealer|,
+e.g.\ \mbox{\dealertext[\east]}. With the optional parameter one can define
+the |text| to be printed \emph{as is}.
+
+\item[declarer]: \declarer
+\item[Declarer\Q{[*!]}]: \Declarer, \Declarer*, \Declarer!, \Declarer*!
+
+\item[Di]: \Di
+
+\item[double]: \double
+\item[Double\Q{[*!]}]: \Double, \Double*, \Double!, \Double*!
+
+\item[DP]: \DP
+\item[dpts\Q{[*!]}]: \dpts, \dpts*, \dpts!, \dpts*!
+
+\item[east]: \east
+\item[East\Q{[*!]}]: \East, \East*, \East!, \East*!
+
+\item[easthand\Q{[h-offset]{Sp}{He}{Di}{Cl}}]\\
+Defines the cards for the
+\East*!-player. With the optional parameter |h-offset| one can adapt the
+(\emph{horizontal}) distance between hand and compass (default
+\textbf{0pt}). The 4 mandatory parameters define the cards for the 4 suits.
+To denote the rank \suit{T}, one has to use uppercase letter |T|.
+
+\item[eastwest]: \eastwest
+\item[Eastwest\Q{[*!]}]: \EastWest, \EastWest*, \EastWest!, \EastWest*!
+
+\item[expertquiz\Q{[*!][comment]{award}}]\\
+Typesets a quiz, showing a
+predefined hand and a predefined bidding diagram. The star version centers
+the output. The token |!| forces a newline between hand and bidding
+diagram. With the optional parameter one can add some comments. The
+mandatory parameter defines the award for the different solutions.
+
+\item[explainit\Q{{expl} }]\\
+writes \emph{expl} below the bidding diagram in a footnote like way.
+
+\item[footlinetext\Q{{text} }]\\
+Typeset the text below the card diagram.
+
+\item[FSF]: \FSF
+\item[fsforce\Q{[*!]}]: \fsforce, \fsforce*, \fsforce!, \fsforce*!
+
+\item[gamefont\Q{{font} }]\\
+Defines the font for card diagrams, hands and suits.
+
+\item[GF]: \GF
+\item[gforce\Q{[*!]}]: \gforce, \gforce*, \gforce!, \gforce*!
+
+\item[hand\Q{[*!-][pos]{Sp}{He}{Di}{Cl}}]\\
+Typesets the cards of 1 single hand,
+normally horizontally, left aligned. The star version centers the output.
+The token |!| typesets the hand vertically, left aligned. With both |*!|
+the hand is typeset vertically, centered. The optional argument |pos|
+(default \textbf{c}), controls the horizontal alignment.
+The third token |-| suppresses all output, which is then only saved for
+later use (in e.g.\ |\expertquiz|). The 4
+mandatory parameters define the cards for the 4 suits. To denote the rank
+\suit{T}, one has to use uppercase letter |T|.
+
+\item[handskip\Q{{length description} }]\\
+Adds |length| to the distance (default |1em|) between the rightmost hand
+and the bidding diagram.
+
+\item[HCP]: \HCP
+
+\item[headlinetext\Q{{text} }]\\
+Typeset the text above the card diagram.
+
+\item[He]: \He
+
+\item[hpts\Q{[*!]}]: \hpts, \hpts*, \hpts!, \hpts*!
+
+\item[jack]: \jack
+\item[Jack\Q{[*!]}]: \Jack. \Jack*, \Jack!, \Jack*!
+
+\item[king]: \king
+\item[King\Q{[*!]}]: \King, \King*, \King!, \King*!
+
+\item[lead]: \lead
+\item[Lead\Q{[*!]}]: \Lead, \Lead*, \Lead!, \Lead*!
+
+\item[leftlower\Q{[h-offset]{line1}{line2}{line3}}]
+
+\item[leftupper\Q{[h-offset]{line1}{line2}{line3}}]\\
+Typesets an annotation of 3 lines in the left lower/upper corner of the
+card diagram. With the optional parameter one can add some extra horizontal
+space between hand and annotation.
+
+\item[legendfont\Q{{font} }]\\
+Defines the font for annotations in card diagrams.
+
+\item[LP]: \LP
+\item[lpts\Q{[*!]}]: \lpts, \lpts*, \lpts!, \lpts*!
+
+\item[markit]\\
+sets a footnote-like marker in a bidding diagram.
+
+\item[namefont\Q{{font} }]\\
+Defines the font for the real world names in bidding diagrams.
+
+\item[namesEW\Q{{E-name}{W-name}}]\\
+Defines the real world names for the \eastwest players, that will appear
+in the bidding diagram.
+
+\item[namesNS\Q{{N-name}{S-name}}]\\
+Defines the real world names for the \northsouth players, that will appear
+in the bidding diagram.
+
+
+\item[newgame]\\
+Resets some stored data
+
+\item[NMF]: \NMF
+\item[nmforce\Q{[*!]}]: \nmforce, \nmforce*, \nmforce!, \nmforce*!
+
+\item[none]: \none
+\item[None\Q{[*!]}]: \None, \None*, \None!, \None*!
+
+\item[north]: \north
+\item[North\Q{[*!]}]: \North, \North*, \North!, \North*!
+
+\item[northhand\Q{[v-offset]{Sp}{He}{Di}{Cl}}]\\
+Defines the cards for the
+\North*!-player. With the optional parameter |v-offset| one can adapt the
+(\emph{vertical}) distance between hand and compass (default \textbf{0pt}).
+The 4 mandatory parameters define the cards for the 4 suits. To denote the
+rank \suit{T}, one has to use uppercase letter |T|.
+
+\item[northsouth]: \northsouth
+\item[NorthSouth\Q{[*!]}]: \NorthSouth, \NorthSouth*, \NorthSouth!, \NorthSouth*!
+
+\item[nt\Q{[*!]}]: \nt, \nt*, \nt!, \nt*!
+\item[NT]: \NT
+
+\item[onesuitAll\Q{[*!]{N}{S}{E}{W}}]\\
+Typesets the cards of 1 suit for all
+players. The star version centers the output. The token |!| prints a small
+box rather than the compass. The 4 mandatory parameters denote the cards
+for the \North*!-, the \South*!-, the \East*!- and the \West*!-player.
+
+\item[onesuitEW\Q{[*!]{E}{W}}]\\
+Same as |onesuitAll|, but only for the \East*!- and the \West*!-player.
+
+\item[onesuitNE\Q{[*!]{N}{E}}]\\
+Same as |onesuitAll|, but only for the \North*!- and the \East*!-player.
+
+\item[onesuitNS\Q{[*!]{N}{S}}]\\
+Same as |onesuitAll|, but only for the \North*!- and the \South*!-player.
+
+\item[onesuitNW\Q{[*!]{N}{W}}]\\
+Same as |onesuitAll|, but only for the \North*!- and the \West*!-player.
+
+\item[otherfont\Q{{font} }]\\
+Defines the font for other items.
+
+\item[pass]: \pass
+\item[Pass\Q{[*!]}]: \Pass, \Pass*, \Pass!, \Pass*!
+
+\item[queen]: \queen
+\item[Queen\Q{[*!]}]: \Queen, \Queen*, \Queen!, \Queen*!
+
+\item[redouble]: \redouble
+\item[Redouble\Q{[*!]}]: \Redouble, \Redouble*, \Redouble!, \Redouble*!
+
+\item[resetfonts]\\
+Sets all fonts back to their default value.
+
+\item[rightlower\Q{[h-offset]{line1}{line2}{line3}}]
+\item[rightupper\Q{[h-offset]{line1}{line2}{line3}}]\\
+Typesets an annotation of 3 lines in the right lower/upper corner of the
+card diagram. With the optional parameter one can add some extra horizontal
+space between hand and annotation.
+
+\item[setdefaults\Q{[*]}\string{key1=val1,key2=val2,\ldots\string}]\\
+With the key |bidder|, |compass|, |game|, |legend|, |name| or |other| one
+can set the default font for the respective items. With the key |compline|,
+|compshow|, |compsize| or |compturn| on can set the look of the compass.
+With the key |bidders|
+|bidfirst|, |bidline| or |bidlong| one can fine-tune the bidding diagram.
+The star form also calls |\resetfonts| which effectuates any font change
+immediately.
+
+\item[SF]: \SF
+\item[sforce\Q{[*!]}]: \sforce, \sforce*, \sforce!, \sforce*!
+
+\item[showAll\Q{[*+][pos]}]\\
+Typesets a card diagram with 4 (previously
+defined, i.e.\ with |\northhand| etc.) hands. The star version centers the
+output. The token |+| adds a bidding table to the diagram, that has to be
+previously defined, i.e.\ with e.g:\\
+|\begin{bidding}-|\ldots|\end{bidding}|. The optional parameter |pos|
+(default~\textbf{c}) aligns the diagram.
+
+\item[showEW\Q{[*+][pos]}]\\
+Same as showAll, but for the \East*!- and the \West*!-hand.
+
+\item[showNE\Q{[*+][pos]}]\\
+Same as showAll, but for the \North*!- and the \East*!-hand.
+
+\item[showNS\Q{[*+][pos]}]\\
+Same as showAll, but for the \North*!- and the \South*!-hand.
+
+\item[showNW\Q{[*+][pos]}]\\
+Same as showAll, but for the \North*!- and the \West*!-hand.
+
+\item[south]: \south
+\item[South\Q{[*!]}]: \South, \South*, \South!, \South*!
+
+\item[southhand\Q{[v-offset]{Sp}{He}{Di}{Cl}}]\\
+Defines the cards for the
+\South*!-player. With the optional parameter |v-offset| one can adapt the
+(\emph{vertical}) distance between hand and compass (default \textbf{0pt}).
+The 4 mandatory parameters define the cards for the 4 suits. To denote the
+rank \suit{T}, one has to use uppercase letter |T|.
+
+\item[Sp]: \Sp
+
+\item[suit\Q{[suit symbol]{cards}}]\\
+Typesets the cards of 1 single suit.
+With the optional parameter one can add a suit symbol (e.g.\ \He) in front
+of the cards. The mandatory parameter defines the cards for the suit. To
+denote the rank \suit{T}, one has to use the letter |T|.
+
+\item[TP]: \TP
+\item[tpts\Q{[*!]}]: \tpts, \tpts*, \tpts!, \tpts*!
+
+\item[TSF]: \TSF
+\item[tsforce\Q{[*!]}]: \tsforce, \tsforce*, \tsforce!, \tsforce*!
+
+\item[vulner\Q{[text]}]\\
+Typeset the user-defined vulnerability. With the optional parameter one can
+define the vulnerability.
+
+\item[vulnertext\Q{[text]}]\\
+Typeset the defined value for the |\vulner|, e.g.\
+\mbox{\vulnertext[\NorthSouth*]}. With the optional parameter one can
+define the |text| to be printed \emph{as is}.
+
+\item[west]: \west
+\item[West\Q{[*!]}]: \West, \West*, \West!, \West*!
+
+\item[westhand\Q{[h-offset]{Sp}{He}{Di}{Cl}}]\\
+Defines the cards for the
+\West*!-player. With the optional parameter |h-offset| one can adapt the
+(\emph{horizontal}) distance between hand and compass (default
+\textbf{0pt}). The 4 mandatory parameters define the cards for the 4 suits.
+To denote the rank \suit{T}, one has to use uppercase letter |T|.
+
+\olditem[\string\begin\string{bidding\string}\Q{[*!-][pos](description)}\ldots\string\end\string{bidding\string}]~\\
+Typesets a bidding diagram. The star version centers the output. The
+token~|!| forces a short form (\North*!) rather than the long form
+(\North*) in the table header. The token~|-| suppresses all output, but the
+saved data can be used elsewhere. The optional paramater |pos| (default
+\textbf{c}) controls the alignment of the diagram. With the 2nd optional
+parameter |description| one can add annotations (see also |\markit| and
+|\explainit|) below the diagram. The bids in the bidding can both be
+shorthands like |3S| as well as |3\Sp|. The same goes for calls: both |p|
+and |\pass| are possible. For an overview of all possible shorthands, refer
+to the last page of this document.
+\par
+The command |\setdefaults| has some keys to fine tune the
+look of the bidding diagram. If the real world names of the players are
+defined (e.g.\ with |\namesNS|, then they also appear in the table header.
+
+\olditem[\string\begin\string{biddingpair\string}\Q{[*!-][pos](description)}\ldots\string\end\string{biddingpair\string}]~\\
+Same as environment |bidding| but with only 2 columns.
+
+\olditem[\string\begin\string{play\string}\Q{[*]{lead}[trump]}\ldots\string\end\string{play\string}]~\\
+Typesets a diagram with the playing tricks. The star version centers the
+output. The mandatory parameter defines the player who had the opening
+lead. The optional parameter defines the trump suit, the default is \NT.
+This environment produces a table with 8 columns: the running number; the
+player who had had the lead; the 4 cards played in this trick and finally
+the 2 columns that show how many tricks \northsouth{} and \eastwest{} have
+won so far. The user has only to enter the 4 colums that denote the 4 cards
+played in each trick. The rest is handled by \OneDown.
+%
+\end{description}
+%
+% reset \item
+%\fi
+\let\item\olditem
+%
+\newpage
+\centerline{\larger\textbf{Shorthands/Specials in bidding diagrams}}
+\par\vspace{1\baselineskip}\noindent
+%
+\begin{minipage}{5cm}
+\begin{verbatim}
+\begin{bidding}
+p & X & R & P \\
+\end{bidding}
+\end{verbatim}
+\end{minipage}
+%
+\begin{minipage}{7cm}
+\begin{bidding}
+p & X & R & P \\
+\end{bidding}
+\end{minipage}
+%
+\\[1\baselineskip]
+%
+\begin{minipage}{5cm}
+\begin{verbatim}
+\setdefaults{bidlong=off}
+\begin{bidding}
+p & X & R & P \\
+\end{bidding}
+\end{verbatim}
+\end{minipage}
+%
+\begin{minipage}{7cm}
+\setdefaults{bidlong=off}
+\begin{bidding}
+p & X & R & P \\
+{\frame{2H}} & {\frame{2\He}} & {\textit{R}} & {\textit{\redouble}} \\
+\end{bidding}
+\end{minipage}
+%
+\\[1\baselineskip]
+%
+\centerline{\larger\textbf{Macros in bidding diagrams}}
+\par\vspace{0.3\baselineskip}\noindent
+These macros, called in a bidding table\ldots
+\par\vspace{0.5\baselineskip}\noindent
+%
+\begin{verbatim}
+\begin{bidding}
+1 \Pass & \Double & \Redouble & \Allpass \\
+2 \Pass* & \Double* & \Redouble* & \Allpass* \\
+3 \Pass! & \Double! & \Redouble! & \Allpass! \\
+4 \Pass*! & \Double*! & \Redouble*! & \Allpass*! \\
+5 \pass & \double & \redouble & \allpass \\
+6 {\Pass*} & {\Double*} & {\Redouble*} & {\Allpass*} \\
+7 {\Pass!} & {\Double!} & {\Redouble!} & {\Allpass!} \\
+8 {\Pass*!} & {\Double*!} & {\Redouble*!} & {\Allpass*!} \\
+9 {\pass} & {\double} & {\redouble} & {\allpass} \\
+\end{bidding}
+\end{verbatim}
+%
+
+\ldots produce this output:
+\par\vspace{0.3\baselineskip}\noindent
+\begin{tabular}{lBBBB}
+ & {\west} & {\north} & {\east} & {\south} \\
+1 & \Pass & \Double & \Redouble & \Allpass \\
+2 & \Pass* & \Double* & \Redouble* & \Allpass* \\
+3 & \Pass! & \Double! & \Redouble! & \Allpass! \\
+4 & \Pass*! & \Double*! & \Redouble*! & \Allpass*! \\
+5 & \pass & \double & \redouble & \allpass \\
+6 & {\Pass*} & {\Double*} & {\Redouble*} & {\Allpass*} \\
+7 & {\Pass!} & {\Double!} & {\Redouble!} & {\Allpass!} \\
+8 & {\Pass*!} & {\Double*!} & {\Redouble*!} & {\Allpass*!} \\
+9 & {\pass} & {\double} & {\redouble} & {\allpass} \\
+\end{tabular}\\
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/showAll.tex b/Master/texmf-dist/doc/latex/onedown/examples/showAll.tex
new file mode 100644
index 00000000000..77e0ac1145c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/showAll.tex
@@ -0,0 +1,140 @@
+\documentclass[onedown-examples]{subfiles}
+
+\begin{document}
+\vfill
+|\showAll| displays a card diagram with the 4 hands. Here the \east hand is
+empty and is skipped completely from the diagram. If you want to show an
+empty suit explicitly (which is a good thing), just use a single hyphen.
+\OneDown will make an en-dash out of it. We added the dealer and
+vulnerability to the diagram, the value of which was calculated
+automatically from the given boardnumber(18). Please note that the
+vulnerable side is printed in red and that the dealer is underlined in the
+compass. With |\setdefaults{compmid=\boardtext}| we write the board number
+as mid text in the compass. If given this way, it will always print the
+\emph{actual} board number, as you can see in the following examples.
+\vfill
+% due to the grouping of the HBox, we must set |compmid| here.
+% Otherwise it would not be in effect in the next HBox!
+\setdefaults{compmid=\boardtext}
+\begin{HBox}{showBoardNr\hfill File: \FileName}
+\setdefaults{compmid=\boardtext}
+\northhand{AJ}{K}{-}{-}
+\southhand{32}{-}{A}{-}
+\easthand{}{}{}{}
+\westhand{KQ}{A}{-}{-}
+\boardnr{18}
+\leftupper{\dealertext}{}{\vulnertext}
+\showAll
+\end{HBox}
+\vfill
+This example shows how to add several conditions, such as declarer, lead
+etc.\ to a diagram. |\boardtext| just prints the plain board number and was
+called in |\setdefault[compmid=\boardtext]| (rather than using the
+hard-coded number) to set it in the middle of the compass. In |\leftupper|
+we use |\boardtext*| to print the boardnumber behind an additional text.
+
+You will have noticed that the right upper text does not fit well in the
+diagram: it collides with the \north hand\ldots
+\vfill
+\begin{HBox}{Board Number\hfill File: \FileName}
+\boardnr{19}
+\northhand{AK43}{AQJ83}{AJ98}{-}
+\southhand{87}{T5}{QT5}{K98654}
+\easthand{JT6}{764}{K43}{JT32}
+\westhand{Q952}{K92}{762}{AQ7}
+\leftupper{\boardtext*}%
+ {\dealertext}{\vulnertext}
+\rightupper{\contract*: 3\,\NT}{\declarer* \south}{}
+\rightlower{\lead*: \Di 7}{}{}
+\showAll*
+\end{HBox}
+%
+\vfill
+ \needspace{8\baselineskip}
+ \ldots so we add some (here 2ex) offset, to shift the text a bit to the
+right. One can shift the upper/lower and left/right texts independently. A
+positive offset shifts away from the compass, a negative offset would shift
+the text towards the compass.
+\vfill
+\begin{HBox}{Board Number\hfill File: \FileName}
+\boardnr{20}
+\northhand{AK43}{AQJ83}{AJ98}{-}
+\southhand{87}{T5}{QT5}{K98654}
+\easthand{JT6}{764}{K43}{JT32}
+\westhand{Q952}{K92}{762}{AQ7}
+\leftupper{\boardtext*}%
+ {\dealertext}{\vulnertext}
+\rightupper[2ex]{\contract*: 3\,\NT}{\declarer* \south}{}
+\rightlower{\lead*: \Di 7}{}{}
+\showAll*
+\end{HBox}
+%
+\vfill
+Please note that the board number in the middle of the compass has been
+updated each time that we called |\boardnr|. More important however, is to
+see that the very long suit of the \north hand collides massively with the
+right upper condition text. Shifting the text wouldn't help here.
+\vfill
+\begin{HBox}{Very long suits 1\hfill File: \FileName}
+\boardnr{21}
+\northhand{AKQJT98765432}{-}{-}{-}
+\southhand{-}{2}{2}{AKQJT987654}
+\easthand{-}{876543}{876543}{3}
+\westhand{-}{AKQJT9}{AKQJT9}{2}
+\showAll
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+A simple way to 'correct' this is by lowering the text: leave the first
+line of the right-upper text empty.
+\vfill
+\begin{HBox}{Correction by lowering the text\hfill File: \FileName}
+\rightupper{}{\contract*: 3\,\NT}{\declarer* \south}
+\northhand{AKQJT98765432}{-}{-}{-}
+\southhand{-}{2}{2}{AKQJT987654}
+\easthand{-}{876543}{876543}{3}
+\westhand{-}{AKQJT9}{AKQJT9}{2}
+\showAll
+\end{HBox}
+\vfill
+Another problem with (very) long suits, is that the \eastwest hands can
+seem too close to a \northsouth hand, as can be seen in next example. Of
+course the hands are not any closer to each other as before, but the long
+suit in the unfavourable position make it clearly look so.
+\vfill
+\begin{HBox}{Very long suits 2\hfill File: \FileName}
+\rightupper{\contract*: 3\,\NT}{\declarer* \south}{}
+\northhand{-}{2}{2}{AKQJT987654}
+\southhand{AKQJT98765432}{-}{-}{-}
+\easthand{-}{876543}{876543}{3}
+\westhand{-}{AKQJT9}{AKQJT9}{2}
+\rightlower{}{\lead*: \Di 7}{}
+\showAll
+\end{HBox}
+\vfill
+\needspace{8\baselineskip}
+The solution is to add some offset. In a previous example we already showed
+how to use an offset with an annotation. Here we add an offset to the
+apropriate \emph{hand}. This
+is done with the optional parameter in the \north and the \south hand. The
+\north hand shifts upwards, the \south hand downwards. As a little
+demonstration, we also shifted the \east hand a bit to the right and the
+\west hand a bit to the left. Negative offset values reverse the shift
+direction.
+\vfill
+\begin{HBox}{Very long suits 3 with extra offset\hfill File: \FileName}
+\northhand[1em]{-}{2}{2}%
+ {AKQJT987654}
+\southhand[1em]{AKQJT98765432}%
+ {-}{-}{-}
+\easthand[1em]{-}{876543}%
+ {876543}{3}
+\westhand[1em]{-}{AKQJT9}%
+ {AKQJT9}{2}
+\showAll
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/showNS-align.tex b/Master/texmf-dist/doc/latex/onedown/examples/showNS-align.tex
new file mode 100644
index 00000000000..47234eb1d04
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/showNS-align.tex
@@ -0,0 +1,39 @@
+\documentclass[onedown-examples]{subfiles}
+\begin{document}
+These examples show the alignment of diagrams.
+The alignment is given as an optional argument to the |showXX| commands. It
+bears the usual name for alignments: \textbf{t} for top, \textbf{b} for
+bottom and \textbf{c} for centered. Note that the |\smaller\smaller| from
+a previous example is still in effect: The command |\newgame| does not
+reset any font. Please note the difference between diagram 1 and 3. The
+font used for the suits is \textbf{not} the same.
+
+\vfill
+\begin{HBox}{showNS top algned\hfill File: \FileName}
+\newgame
+\northhand{KJ92}{KQ9}{J}{AQJT8}
+\southhand{AQT85}{A52}{64}{K96}
+A \showNS[t] B
+\resetfonts
+C \showNS[t] D
+\gamefont{\sffamily\bfseries\smaller\smaller}
+E \showNS[t] F
+\end{HBox}
+\vfill
+We do need to call |\resetfonts| (or |\gamefont|) explicitly to reset the
+font or size.
+\vfill
+\begin{HBox}{showNS center aligned\hfill File: \FileName}
+\resetfonts
+% \gamefont would do the job as well
+%\gamefont{\bfseries\sffamily}
+A \showNS[c] B
+\end{HBox}
+\vfill
+\begin{HBox}{showNS bottom aligned\hfill File: \FileName}
+A \showNS[b] B
+\end{HBox}
+\vfill
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/showNS-warn-I.tex b/Master/texmf-dist/doc/latex/onedown/examples/showNS-warn-I.tex
new file mode 100644
index 00000000000..a24c9a0066a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/showNS-warn-I.tex
@@ -0,0 +1,29 @@
+\documentclass[onedown-examples]{subfiles}
+\newgame
+\begin{document}
+
+If you do not define all cards of a deck, then a lot of `missing card'
+warnings will appear. Therefore most of the time it is better that warnings
+are switched off. This is the default, but you can explicitly do that with
+|\setdefaults{warn=off}|. It is also the default to produce \emph{error}
+messages, which you can also switch off with |\setdefaults{err=off}|.
+We recommend to have errors shown when you enter new diagrams. Please
+observe how the |\smaller\smaller| command shrinked the diagram. We did
+that to make all the warnings fit in the box. To avoid that all following
+diagrams are also shrinked you must call |\gamefont{\bfseries\sffamily}|
+again without the resizing. Calling |\resetfonts| has the same effect, but
+would also influence the other fonts.
+\vfill
+\begin{HBox}{showNS with warnings\hfill File: \FileName}
+\setdefaults{warn=on}
+ \gamefont{\bfseries\sffamily%
+ \smaller\smaller}
+ \northhand{KJ92}{KQ9}{J}{AQJT8}
+ \southhand{AQT85}{A52}{64}{K96}
+ \showNS
+\end{HBox}
+\vfill
+%
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/showNS-warn-II.tex b/Master/texmf-dist/doc/latex/onedown/examples/showNS-warn-II.tex
new file mode 100644
index 00000000000..9e0804bc779
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/examples/showNS-warn-II.tex
@@ -0,0 +1,57 @@
+\documentclass[onedown-examples]{subfiles}
+\begin{document}
+In the previous example we enabled warnings and set a much smaller font to
+make the example fit on the page. As we compile these examples as one big
+file, \OneDown remembers these values. If you compile this file
+(showNS-warn-II) standalone with |pdflatex showNS-warn-II| and view the
+result, then you'll see no warnings and no shrinking.
+
+\vfill
+\begin{HBox}{showNS \hfill File: \FileName}
+\northhand{KJ92}{KQ9}{J}{AQJT8}
+\southhand{AQT85}{A52}{64}{K96}
+\showNS
+\end{HBox}
+%
+\vfill
+\needspace{8\baselineskip}
+\vfill
+Now warnings are switched off explicitly and the size is reset by calling
+|\resetfonts|.
+\vfill
+\begin{HBox}{showNS \hfill File: \FileName}
+\setdefaults{warn=off}
+\resetfonts
+\showNS
+\end{HBox}
+%
+\vfill
+|\newgame| clears the hands. A hand with no cards at all is completelly
+suppressed, so we see only the compass. With |\setdefaults{compmid=text}|
+we can write 'text' in the middle of the compass. We enlarged the compass,
+so you can see that it \emph{is} on the vertical line through the mids of
+\North*! and \South*!. With |\resetfonts| we return to the default values
+of the fonts. With |\setdefaults| one can influence the look of diagrams.
+In section |Compass| we'll go more into detail. Please note that |\setdefaults| has
+only 1 argument, It is \emph{optional} and must be enclosed in
+brackets (|[...]|).
+\vfill
+\begin{HBox}{showNS \hfill File: \FileName}
+\newgame
+\raggedright
+\setdefaults{compmid=15}
+\showNS
+\showNS
+\gamefont{\sffamily\bfseries\Huge}
+\showNS
+\resetfonts
+\setdefaults{compmid=}
+\showNS
+\gamefont{\smaller\smaller}
+\showNS
+\end{HBox}
+\vfill
+%
+\end{document}
+\endinput
+
diff --git a/Master/texmf-dist/doc/latex/onedown/onedown.pdf b/Master/texmf-dist/doc/latex/onedown/onedown.pdf
new file mode 100644
index 00000000000..0b26677c6e5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/onedown/onedown.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/onedown/onedown.dtx b/Master/texmf-dist/source/latex/onedown/onedown.dtx
new file mode 100644
index 00000000000..722556cde57
--- /dev/null
+++ b/Master/texmf-dist/source/latex/onedown/onedown.dtx
@@ -0,0 +1,5772 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018 by Jacob Wiersma <jack46@online.de>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% 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.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Jacob Wiersma.
+%
+% This work consists of the files onedown.dtx and onedown.ins
+% and the derived filebase onedown.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{onedown.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[2014/05/01]
+%<package>\def\ODwstyleversion{1.0}\def\ODwstyledate{2018/05/23}
+%<package>\ProvidesPackage{onedown}
+%<package> [\ODwstyledate\space v\ODwstyleversion\space
+%<package> Typeset Bridge Diagrams - Jacob Wiersma (C) 2016-2018]
+%
+%<*driver>
+%\documentclass[a4paper,12pt,draft]{ltxdoc}% with draft no hyperrefs
+\documentclass[a4paper,12pt]{ltxdoc}
+% the package |shortvrb| is auto-loaded, providing |...| as shorthand
+\usepackage[utf8]{inputenc}
+%
+\usepackage[T1]{fontenc}
+\usepackage[german,dutch,french,swedish,english,shorthands=]{babel}
+\usepackage{onedown}[2018/04/17]
+\usepackage[normalem]{ulem}% for strikeout todos that are done
+\usepackage{needspace}% keep contiguous lines on one page
+\usepackage[inline]{enumitem}% Control various parameters of lists
+\usepackage{titlesec}
+\usepackage{verbatimbox}% For env. verbnobox (set font)
+%\usepackage[hyphens]{url}% for typesetting URLs
+\setcounter{secnumdepth}{4}
+\titleformat{\paragraph}{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
+\titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
+\usepackage[numbered]{hypdoc}
+%
+% add '-' and '/' to the list of URL break characters
+% '/' won't work!
+%
+\expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks\do\-\do/\do\/}
+%
+% Set a nice color for \MacroDef and \EnvDef.
+% But not if we want a printout on a monochrome printer
+%
+
+\newboolean{NoColor}% to suppress all colors
+
+\AtBeginDocument{%
+\ifNoColor
+ \setdefaults{colors=1}
+ \hypersetup{linkcolor=black,urlcolor=black}
+ \def\ODwcolor{black}
+ \definecolor{defbackgr}{rgb}{1,1,1}
+\else
+ \def\ODwcolor{red}
+ \definecolor{defbackgr}{rgb}{1,1,0.75}
+\fi
+}%
+%
+\newlength\defwidth
+%
+% We need to typeset optional args without \meta too!
+\newcommand\Oarg[1]{{\ttfamily[}#1{\ttfamily]}}
+%
+\NewDocumentCommand\MacroDef{st+mO{}}{%
+% \MacroDef* + {macroname}[args]
+% 1 2 3 4
+% #1 flags if macroname is multi-lingual
+% #2 flags if macroname is put in the list of user commands
+% #3 is the macroname that we describe
+% #4 are the possible args of macroname
+%
+ \bgroup
+ \IfBooleanTF#2{\usercom{#3}}{}%
+ \setlength{\fboxsep}{4pt}\setlength{\fboxrule}{1.25pt}%
+ \setlength\defwidth\linewidth%
+ \addtolength\defwidth{-2\fboxrule}%
+ \addtolength\defwidth{-2\fboxsep}%
+ \fcolorbox{black}{defbackgr}{%
+ \makebox[\defwidth][l]{%
+ \IfBooleanTF#1{\ML}{}%
+ \texttt{\footnotesize\bs#3#4}%
+ }%
+ }%
+ \par\vspace{0.5\baselineskip}\noindent%
+ \egroup
+}% MacroDef
+%
+\NewDocumentCommand\EnvDef{st+mO{}}{%
+% \EnvDef* + {env-name}[args]
+% #1 #2 #3 #4
+% #1 flags if env-name is multi-lingual
+% #2 flags if env-name is put in the list of user commands
+% #3 is the env-name that we describe
+% #4 are the possible args of env-name
+%
+ \bgroup
+ \IfBooleanTF#2{\usercom[]{#3 (env)}}{}%
+ \setlength{\fboxsep}{4pt}\setlength{\fboxrule}{1.25pt}%
+ \setlength\defwidth\linewidth%
+ \addtolength\defwidth{-2\fboxrule}%
+ \addtolength\defwidth{-2\fboxsep}%
+ \fcolorbox{black}{defbackgr}{%
+ \makebox[\defwidth][l]{%
+ \IfBooleanTF#1{\ML}{}%
+ \texttt{\footnotesize\bs begin\string{#3\string}#4\ldots\bs end\string{#3\string}}
+ }%
+ }%
+ \par\vspace{0.5\baselineskip}\noindent%
+ \egroup
+}% EnvDEf
+%
+%
+% Special processing of user commands
+%
+% We supply command NAMES, so we must add the \ afterwards, to make it look
+% like a real command in the index
+%
+\newcommand\bs{%
+ \texttt{%
+ \upshape% the itshape of meta screws the backslash
+ \textbackslash%
+ }%
+}% bs
+%
+% \usercom gets the NAME of a command (without \), labels the actual
+% position and inserts the appropriate hyperref index entry in the UCFile,
+% whilst adding the \ before the command name.
+%
+\newcommand\usercom[2][\noexpand\bs]{%
+ \ifnumequal{\pdfshellescape}{1}{%
+ % restricted shell enabled
+ \label{#2}%
+ \immediate\write\UCFile{%
+ \noexpand\hyperref[#2]{%
+ #1#2, \thepage\noexpand\newline%
+ }%
+ }%
+ }{}%
+}% usercom
+%
+% We write the user commands (on the fly sorted) in file onedown.odw.
+% We must disable | first and enable it again afterwards
+%
+\ifnumequal{\pdfshellescape}{1}{%
+ \newwrite\UCFile
+ \DeleteShortVerb{\|}
+ \immediate\openout\UCFile="| sort -d > \jobname.odw
+ \MakeShortVerb{\|}
+}{}
+%
+% Used to mark MultiLingual macros
+%
+\newcommand\ML{\textcolor{\ODwcolor}{\textsc{\tiny ML}}\xspace}
+%
+% Typeset package names
+%
+\newcommand\packname[1]{\texttt{#1}\xspace}
+%
+% Write our own package name a bit special
+%
+\newcommand\OneDown{\textcolor{\ODwcolor}{\smaller\bfseries\textsc{OneDown}}\xspace}
+%
+% We translate our multilingual examples
+%
+\NewDocumentCommand\Translate{smO{german}}{%
+ \let\xspaceODwold=\xspace%
+ \def\xspace{}%
+ \foreignlanguage{#3}{%
+ \IfBooleanTF#1{\GetTranslation{#2-(ODw)}}{#2}%
+ }%
+ \let\xspace=\xspaceODwold%
+}% Translate
+%
+% Put a frame surrounding examples
+%
+\newcommand\example[1]{\fbox{#1}}
+%
+% End of user-command
+%
+\setdefaults*{game=\sffamily\bfseries\footnotesize,%
+ other=\sffamily\bfseries\footnotesize}
+
+\AtBeginDocument{\CodelineIndex
+ \EnableCrossrefs}
+\AtBeginDocument{\RecordChanges}
+\extrafloats{100}
+\begin{document}
+ \DocInput{onedown.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% ^^A \CheckSum{3705}
+% \CheckSum{0}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% ^^A Commands to be used for the documentations only
+%
+% \makeatletter
+% \def\CP{\ODw@Compass}
+% \def\Xfer#1{\ODw@Xfer{#1}}
+% \makeatother
+
+%
+% ^^A We are onedown now with new versioning!
+%
+% \changes{v0.1}{2018/01/28}{Reorganized the bzr versioning. bzr will
+% contain only onedown, the former bidnplay stuff is archived. The ToDo and
+% Known-Bugs lists are cleaned. We are version 0.1 now, trying to keep the
+% bzr version number equal to the changes minor number.}
+% \changes{v0.2}{2018/02/12}{We finally have a List of User Commands. In
+% the compass we can print vulner in red and mark the dealer. We have a
+% hook \cmd{\CompassMid} to write something in the middle of the compass.
+% Added several macros to auto-translate common stuff like 'lead'. Added
+% the danish language. Corrected a bug in \cmd{\dealer} and \cmd{\vulner}.
+% Removed pgf-key 'lang': we now load the needed languages on the fly.
+% Finally we revised the documentation.}
+% \changes{v0.4}{2018/03/09}{Major change in playtricks: the winner is now
+% determined by the cards played, and code is added to check consistency.
+% Dirty coded macros like \cmd{\ODw@symbol} and \cmd{\ODw@(@)Card(s)} are
+% displaced by neat expl3 code. We load necesary dictionaries automatically
+% on the fly and enhanced the colors options. Corrected some minor bugs and
+% reorganized the documentation. One can now generate the documentation
+% without the list of user commands}
+% \changes{v0.5}{2018/03/14}{Associated the names and bidders in a fixed
+% way. Added checks to onesuitNS/EW. Made ODw@OtherFont local where
+% necessary. Redefine columntypes. Made 'T' a code for '10'. Adapted the
+% translate macro to enable both 1H and 1\cmd{\He} etc. Enhanced the
+% documentation.}
+% \changes{v0.6}{2018/03/14}{Made all internal names hidden by adding
+% 'ODw@' to it. Changed \cmd{\ODw@AccTricksN} in \cmd{\ODw@AccTricks}. Some
+% minor adaptions of the documentation}
+% \changes{v0.7}{2018/03/20}{Final edits of the documentation: Consequent
+% use of 'card diagram', |bidding| diagram' and '|play| diagram'. Corrected
+% some minor bugs. Changed the name of the 'playtricks' environment into
+% 'play'. Can disable all colors in the manual for monochrome printing.
+% Changed signature of \cmd{\expertquiz} and \cmd{\boardtext}.}
+% \changes{v0.7a}{2018/03/24}{Major change: Removed all \cmd{\bidXX} an
+% \cmd{\bidXXpair} commands. The biddings can now be shown with the
+% \cmd{\showXX+} (with token '+'). The macros \cmd{\hand-} and the bidding
+% environments suppress their output with token '-'}
+% \changes{v0.8}{2018/04/11}{Added package \packname{verbatimbox} to adjust
+% verbatim font easily. Added \cmd{\setdefaults} with keys for fonts,
+% compass and |bidding| diagram. Made \cmd{\FirstBidCol} internally hidden.
+% Removed \cmd{longcalls}, \cmd{\CompassMid}, added \cmd{compassfont}.
+% Changed the order of the hands in \cmd{\onesuitAll}. Renewed the
+% implementation of the compass and add extra features.}
+% \changes{v0.9}{2018/04/15}{Adapted \cmd{\ODwset} and \cmd{\setdefaults}.
+% Separated key \emph{messages} into keys \emph{warn} and \emph{err}.
+% Adapted \cmd{\ODw@Compass}. Removed legends from \cmd{\showNS}. Added
+% \cmd{\sbox1} to all \cmd{\showXX} macros with a N-hand. Changed
+% ODw@[No]Warnings and ODw@[No]Errors. Corrected some minor bugs and
+% adapted the documentation accordingly.}
+% \changes{v1.0}{2018/05/23}{Adapted the urls, the directories and some
+% filenames to conform to the CTAN-standard and made the bundle ready for
+% upload. Corrected a small bug in \cmd{\ODw@Compass} that was introduced
+% in v0.9. Made all relevant text writing macros in 4 versions with/without
+% tokens * and ^^21. Corrected a sizing/font bug. Added 4 variants of many
+% text macros, onesuit-NE/NW/. Adapted \cmd{\handskip}. Added code to work
+% around a \packname{babel}-\packname{translations} inconsistency w.r.t.
+% norsk/norwegian.}
+% ^^A Note: ^^21 denotes the exclamation mark (!)
+%
+% \DoNotIndex{\newcommand,\newenvironment,\BODY,\boolean,\IfEqCase,\IfInteger,
+% \DeclareFontSubstitution,\dimexpr,\ifcat,\ifmmode,\IfValueT,
+% \fontencoding,\fontfamily,\fontseries,\fontshape,\makebox,\StrChar,\StrLen,
+% \mathord,\mdseries,\NewEnviron,\newif,\mskip,\edef,\rotatebox,\width,
+% \newsavebox,\noexpand,\rmfamily,\rule,\sbox,\scshape,\put,\real,
+% \selectfont,\SetSymbolFont,\slshape,\tabcolsep,\color,\cs,\do,\docsvlist,
+% \thinspace,\usebox,\AtBeginDocument,\begingroup,\endgroup,\unitlength,
+% \bgroup,\egroup,\IfValueTF,\newcolumntype,\renewrobustcmd}
+% \DoNotIndex{\@ifstar,\\,\,}
+% \DoNotIndex{\addtolength,\advance,\alph,\baselineskip,\begin,\bfseries,\macro,
+% \group,\center,\centering,\clubsuit,\collectcell,\count,\def,\ ,\let,
+% \diamondsuit,\dimen,\divide,\dpts,\egroup,\else,\empty,\end,\expandafter,
+% \endcenter,\endcollectcell,\endinput,\ensuremath,\equal,\everypar,
+% \extracolsep,\fbox,\fboxrule,\fboxsep,\fi,\gdef,\global,\ExplSyntaxOff,
+% \hangafter,\hangindent,\hbadness,\hbox,\heartsuit,\hfill,\ExplSyntaxOn,
+% \hline,\hsize,\hskip,\hspace,\hss,\ht,\HUGE,\if,\IfBooleanTF,\moveto,
+% \ifthenelse,\ifx,\itemsep,\kern,\labelsep,\labelwidth,\large,
+% \leftmargin,\leftskip,\lengthtest,\LoadDictionaryFor,\lower,
+% \mathbf,\medskip,\multicolumn,\NeedsTeXFormat,\newboolean,\numexpr,
+% \newcounter,\newdimen,\NewDocumentCommand,\strokepath,\closepath,
+% \NewDocumentEnvironment,\newlength,\noindent,\p@,\par,\whiledo,
+% \parbox,\parfillskip,\parindent,\parsep,\parskip,\partopsep,\lineto,
+% \phantom,\ProvidesPackage,\quad,\raggedright,\raisebox,\linethickness,
+% \relax,\renewcommand,\RequirePackage,\rightmargin,\PackageWarning,
+% \rightskip,\rlap,\setboolean,\setbox,\setcounter,\setlength,
+% \settowidth,\sffamily,\smaller,\larger,\space,\spadesuit,\skip@,
+% \ssmall,\stackbox,\stepcounter,\styledate,\styleversion,\textbf,
+% \textrm,\textsc,\textsf,\textsl,\textwidth,\thefootnote,\ifnumequal,
+% \thinspace,\topsep,\typeout,\vspace,\vtop,\wd,\widthof,\IfFileExists,
+% \xspace,\xspaceaddexceptions,\z@,\PackageWarning,\ForEachTrackedLanguage,
+% \newtoks,\PackageInfo,\provideenvironment,\str,\textit,\Hoffset,\Voffset,
+% \the,\thinmuskip,\thislang,\tl,\tmp,\xdef,\PicSize,\MidSize,
+% }
+% \DoNotIndex{%
+% \\,\arrayrulewidth,\addtocounter,\cci,\DeclareMathSymbol,\skip@,
+% \DeclareSymbolFont,\footnotemark,\footnotesize,\footnotetext,\isodd,
+% \mathalpha,\pgfkeys,\pgfqkeys,\ProcessPgfOptions,\scriptsize,
+% \shortstack,\superscript,\textcolor,\thinspace,\tiny,\underline,\value}
+% \DoNotIndex{\GetTranslation,\ifpdf,\iflanguage,\iffalse,\AfterPackage,
+% \ifbool,\setbool,\newbool,\StrSubstitute,\StrCount,\StrDel,\ifcase,
+% \ifboolexpr,\ifnumcomp,\or,\overline,\mbox,\@ODw}
+% \setcounter{IndexColumns}{2}
+% ^^A \providecommand*{\url}{\texttt}
+% ^^A\newcommand{\tasc}{\textbf{\raisebox{-0.7ex}[1ex][0pt]{*}}}
+% \newcommand{\tasc}{\textbf{\textasteriskcentered}}
+% ^^A \newcommand{\plus}{\texttt{\larger{\raisebox{-0.25ex}[1ex][0pt]{+}}}}
+% \newcommand{\plus}{\texttt{\larger{\raisebox{-0.25ex}[1ex][0pt]{+}}}}
+%^^A set the font for the macros in the margin
+% \renewcommand{\MacroFont}{\ttfamily\scriptsize}
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% ^^A We must redefine \verb (from doc.sty),
+% ^^A because there is no font-changing hook to add \footnotesize
+% ^^A This is only for the document, not the style file
+%
+% \makeatletter
+% \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
+% \bgroup \let\do\do@noligs \verbatim@nolig@list
+% \ttfamily\footnotesize \verb@eol@error \let\do\@makeother \dospecials
+% \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}}
+%
+% \newcommand\ODwBox{\ODw@Box\xspace}
+%
+% \makeatother
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \GetFileInfo{onedown.sty}
+% \title{The \OneDown package\\[0.5em]
+% \normalsize\url{www.ctan.org/pkg/onedown}
+% ^^A The frustrating ltxdoc also obfuscates this simple thing!
+% \thispagestyle{empty}
+% }
+% \author{Jacob Wiersma \\ \url{jack46@online.de}}
+% \date{v\ODwstyleversion~from \ODwstyledate}
+%
+% \maketitle
+% {
+% \gamefont{\sffamily\bfseries\large}
+% \otherfont{\rmfamily\bfseries\normalsize}
+% \setdefaults{bidfirst=S,bidlong=on,err=on,warn=on}
+% \hfill
+% \frame{
+% \setdefaults{bidlong=off}
+% \parbox{22em}{
+% \northhand{A32}{QJT}{KQJT9}{QJ}
+% \southhand{KQJT}{9876}{A8}{AK2}
+% \westhand{8765}{AK}{732}{T987}
+% \easthand{94}{5432}{654}{6543}
+% \dealer[\South*!]\vulner[\NorthSouth*!]
+% \leftupper{\dealertext}{\vulnertext}{}
+% \showAll*
+%
+% \begin{bidding}*(\explainit{15--17}\\\explainit{quantitative})
+% 1N\markit & p & 4N\markit & p \\
+% 6N & X & {\Allpass*} \\
+% \end{bidding}
+%
+% \setdefaults{warn=off}
+%
+% \begin{play}*{W}
+% HK & T & 2 & 6 \\
+% HA & J & 3 & 7 \\
+% \end{play}
+% }
+% }
+% \hfill
+% }
+% \setdefaults*{}
+% \newpage
+% \begin{abstract}\noindent
+% This package implements commands and environments to typeset various bridge
+% diagrams, with or without a |bidding| sequence. It offers following
+% features:
+% \begin{itemize}
+% \item It is possible to use an own font and/or a font-size with which the
+% diagrams will be typeset independently from the main font used in the
+% document. This also allows an easy production of overhead slides and for
+% digital projection. Different fonts can be used for e.g.\ the bidding
+% diagram, its header, the compass, the hands etc. Most diagrams can be
+% centered both horizontally and vertically.
+%
+% \item A special feature is the automated check on consistency of suits
+% and hands. If a hand holds more than 13 cards an error is printed, if there
+% are less then 13 cards a warning. If a suit over the 4 hands has more
+% than 13 cards or if a card appears more than once an error like
+% \example{\textcolor{\ODwcolor}{Error: Card \Sp\,8 occurs 2 times}} is printed.
+% These warnings and error messages are controlled by the |err| and |warn|
+% options, e.g.\ when loading the package.
+%
+% \item The output of the implemented bridge terms like \example{\double}
+% (which you get by calling the command |\double|) are multilingual
+% and get translated automatically. When the language |german| is
+% active the command |\double| would produce
+% \example{\Translate{\double}}. Also the basic symbols like A(ce),
+% K(ing), Q(ueen) and J(ack) are multilingual. So
+% \example{\suit[\Di]{AKQJ}} would automatically become
+% \example{\Translate{\suit[\Di\,]{AKQJ}}} in a German text.
+%
+% \item It is possible to add annotations to a card diagram, like the
+% board number, the dealer or the vulnerability etc.\ on several positions
+% in the diagram (if a board number is given, the dealer and vulnerability
+% are computed automatically). One can also add explanations to the
+% |bidding| diagram, as well as the real world names of the bidders.
+%
+% \item There are two specials: a command to typeset a quiz with answers,
+% and an environment to typeset the sequence of playing tricks, where also
+% the total number of tricks won by each side is calculated and displayed.
+% \end{itemize}
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Preface}
+%
+% I am neither a good bridge player nor a good package writer. But I like
+% to read about bridge and when I write about bridge (sometimes a funny
+% short story, sometimes some training exercises for beginners) I do feel
+% the need for an appropriate tool to support that. Surprisingly enough,
+% there exists no comprehensive package on |CTAN| for typesetting bridge
+% diagrams. For all those people who feel more or less the same as I do,
+% there is this package called \OneDown. As some say: \emph{one down is
+% good bridge}\footnote{please, don't discuss the truth-value of this
+% statement with me}, I hope that \OneDown is a good bridge package.
+%
+% You can generate this documentation by running
+%
+% \iffalse
+%<*verb>
+% \fi
+\begin{verbnobox}[\small]
+pdflatex --shell-escape onedown.dtx
+makeindex -s gind.ist onedown.idx
+makeindex -s gglo.ist -o onedown.gls onedown.glo
+pdflatex --shell-escape onedown.dtx
+pdflatex --shell-escape onedown.dtx
+\end{verbnobox}
+% \iffalse
+%</verb>
+% \fi
+% Use:\\
+% |pdflatex --shell-escape '\AtBeginDocument{\NoColortrue}\input{onedown.dtx}'|
+% as last run to get a pdf for printing on a monochrome printer.
+% The |--shell-escape| flag is necesary to generate the list of user
+% commands. If you think this is too dangerous, then run pdflatex without
+% this flag and you will get the docmentation without the list of user
+% command (of about 1 page). In any case you'll find a multi-page reference
+% overview of all commands in |onedown-ref.pdf|.
+%
+% \section{Introduction}
+%
+% There must be a lot of bridge players who also use \LaTeX{} to typeset
+% their documents. And it is almost incredible that on |CTAN| there exist
+% no modern package with a decent documentation that supports
+% this.
+
+% In 1990 Kees van der Laan \cite{Laan} published an article in
+% TUGBoat\footnote{\url{http://tug.org/TUGboat/Articles/tb11-2/tb28laan.pdf}}
+% in which he describes how well the \TeX-machinery is able to produce
+% beautiful bridge diagrams. Based on this article and examples,
+% Johannes
+% Braams put these commands together in a style file\footnote{%
+% \packname{bridge.sty}, last version v1.7c, 1994/12/20} and added more.
+% Some time later René Steiner and Thomas Hof produced the
+% \packname{bridge-i} and the \packname{kibitzer}\footnote{both v1.0,
+% 1995/04/06} style files, in which they made a lot of
+% enhancements.
+% Also others made some efforts in this direction.\footnote{Antony Lee
+% released his package \packname{bridge} in 2012 and Gordon Bower his
+% package \packname{grbbridge} in 2013. Both are very interesting but offer
+% only limited features and are not on CTAN at the time of writing. See
+% \url{http://www.bridgebase.com/forums/topic/51967-latex-package-for-typesetting-bridge-related-stuff/}}
+
+% Around 2005 I used these style files for
+% some tiny projects. The quality of the output was splendid. Putting the
+% text and diagrams together was not always easy and the documentation was
+% poor. In 2015, after a long pause, I had to produce bridge texts again. I
+% enhanced some of the existing stuff and made ad hoc changes in the code,
+% which led to smaller and greater catastrophes. Summer 2016 I decided to
+% write a new package, based on the work of the previously mentioned
+% persons. I called it \OneDown. The central goal was to offer a user
+% friendly package with detailed documentation. For example you don't need
+% to say |\setlength{\handskip}{5mm}| or |\def\handskip{5mm}| but rather
+% call the command |\handskip{1em}|. Not only the call is somewhat
+% friendlier, more important, setting the width in terms of the
+% font used, it will automatically adapt its size accordingly to font and
+% font-size changes. \OneDown features:
+% \begin{itemize}
+% \item Sizing of diagrams relative to font and font-size.
+% \item The font-sizes of the diagrams and text are independent.
+% \item Automated translation of all important bridge terms.
+% \item Diagrams can optionally contain information about the dealer, who
+% is vulnerable etc.
+% \end{itemize}
+%
+% The \OneDown package is designed to be used for typesetting texts that have to
+% do with the game of bridge. It provides not only simple commands like
+% |\Sp| which produces the spade symbol \example{\Sp}. Also complete
+% card diagrams with the hands of the \north, \east, etc.\ player can
+% be defined in several ways. One can select which hands are to be shown.
+% Bidding diagrams can be shown stand-alone or in connection with one or
+% more hands. In |bidding| diagrams annotations are possible.
+%
+% \section{Usage}
+%
+% \subsection{Initialization}
+%
+% \subsubsection{Requirements}
+%
+% The package \OneDown depends on several other packages, such as
+% \packname{ifthen}, \packname{translations} or \packname{xspace}. All
+% these packages get loaded automatically if not already used in your
+% document. For a complete overview of all required packages, refer to page
+% \pageref{RequirePackage}. All the packages are loaded without any option,
+% so the risk of an option clash should be low: Just load your package with
+% options \emph{before} \OneDown.
+%
+% Furthermore, for the several languages that \OneDown supports, there are
+% the dictionary files with translations of the specific bridge terms.
+% These dictionaries follow the naming convention:
+% \texttt{ODw-\meta{language}.trsl} and are included in the bundle. The
+% name of the \meta{language} is generally the same as the name that you
+% use as option for \packname{babel}. There is one exception: the
+% Norwegian language uses |norsk| for \packname{babel} and |norwegian| for
+% \packname{translations}. But all the same, the |norwegian| dictionary is
+% automatically loaded when |norsk| is used.
+%
+% Should you make a dictionary for a language that is not provided yet, or
+% have corrections for an existing one, please send it to the maintainer,
+% so it can be added to the bundle.
+%
+% \subsubsection{Loading the package}
+%
+% Simply say |\usepackage{onedown}| in the preamble of
+% your document if you want to load \OneDown with its default settings.
+%
+% \textbf{Warning:} \OneDown loads all necessary |ODw|-dictionaries
+% automatically at the begin of the document. In order to know which
+% languages must be loaded, these must be specified \emph{before} package
+% \packname{onedown} is loaded. In general this means that if you use
+% \packname{babel} (or \packname{polyglossia}) you must
+% load it before package \OneDown. If for some reason you cannot
+% or do not want to do that, you can load any |ODw|-dictionary if you put
+% the command: |\LoadDictionaryFor{|\marg{language}|}{ODw}| in your
+% preamble, provided that the dictionary is in the \TeX-path. For a
+% discussion about the caveats of using e.g.\ babel, refer to section%
+% \ref{Languages}.
+%
+% \subsubsection{Options}\label{Options}
+%
+% To change the behaviour of \OneDown one can load the package with certain
+% options: |\usepackage[|\meta{options}|]{onedown}|. Of course this 'option
+% loading' takes place in the preamble. But it is also possible to set (or
+% change) options within the document by calling the macro |\setdefaults|.
+% This macro uses the same \meta{key}=\meta{val} syntax as is used for the
+% options and offers some more keys that cannot be used when loading the
+% package. Refer to page~\pageref{Defaults} for details.
+%
+% As said before, the package loads its options using the
+% \meta{key}=\meta{val} syntax. These options deal with:
+% \begin{itemize}
+% \item[colors] \verb:colors=0|1|2|4A|4B:\\
+% The color in which the card symbols will
+% be printed. The color options are \textbf{0} (black only), \textbf{1}
+% (black and white) \textbf{2} (black and red), \textbf{4A} (green, orange,
+% red and blue), \textbf{4B} (black, orange, red and green). We also
+% defined some synonyms, as shown in the table below.
+% \par
+% Thus loading the package with |\usepackage[colors=X]{onedown}| will print
+% \begin{itemize}
+% \item[x=0:] {\setdefaults{colors=0} \Cl, \Di, \He and \Sp}
+% (synonyms: |mono|, |black|)
+% \item[x=1:] {\setdefaults{colors=1} \Cl, \Di, \He and \Sp}
+% (synonyms: |b+w|)
+% \item[x=2:] {\setdefaults{colors=2} \Cl, \Di, \He and \Sp}
+% (synonyms: |b+r|)
+% \item[x=4A:] {\setdefaults{colors=4A} \Cl, \Di, \He and \Sp}
+% (synonyms: |4a|, |fourA|)
+% \item[x=4B:] {\setdefaults{colors=4B} \Cl, \Di, \He and \Sp}
+% (synonyms: |4b|, |fourB|)
+% \end{itemize}
+% The default is |colors=2| for printing in black and red.
+% \item[err, warn] \verb:err=on|off:\qquad\verb:warn=|on|off:\\
+% These options regulate which messages are to be output. These
+% messages have to do with the consistency of cards in
+% a suit, in a hand or combined hands. It is an error when a hand has more
+% that 13 cards, or when the same card occurs twice or more in a hand or a
+% deal. With the option |err=on| (which is the default) these error
+% messages appear as output. With |err=off| you can suppress that.
+% On the other hand when a suit has less than 13 cards, this must not
+% necessarily be wrong. Maybe only some cards are to be shown, e.g.\ in an
+% example concerning a finesse. Or when only e.g.\ |E-W| hands are
+% concerned, not all cards of the deck will be specified. These situations
+% will be caught by setting |warn=on|. To suppress these spurious warnings
+% use |warn=off|, which is the default.
+% Synonyms for |on| are |1| and |true|. Synonyms for |off| are |0| and
+% |false|. This also applies for other keys that do not control a package
+% option.
+% \end{itemize}
+%
+% \subsubsection{Active Characters: a Warning}\label{Languages}
+%
+% \OneDown uses the \packname{tranlation} package to automatically
+% translate oft appearing brigde terms like e.g.\ \emph{declarer}. It does
+% so by looking up these terms in the special |ODw|-dictionary for the
+% active language. The current \OneDown version supports English, German,
+% Dutch, French, most Scadinavian languages and Turkish. Some dictionaries
+% may not be complete or may contain errors, please send
+% corrections/additions to the maintainer.
+%
+% \needspace{5\baselineskip}
+%
+% \paragraph*{\textcolor{red}{\centering Warning for people using active
+% characters.}}
+%
+% Some language packages fiddle around making characters active.
+% This can have unexpected influence on \OneDown.
+% The |=|~sign is used when loading the package \packname{onedown} to
+% specify options.
+% It appears also in calls like |\setdefaults{warn=on}|.
+% We also use the following characters as tokens for optional arguments
+% with the meaning as shown in this list:
+% \begin{itemize}[itemsep=-1mm,topsep=-0em]
+% \item[|*|] to center diagrams or print a long or capitalized text
+% \item[|!|] special action like short names of vertical layout
+% \item[|-|] to hide what would normally been shown
+% \item[|+|] to show what would normally be hidden
+% \end{itemize}
+% \par\noindent
+% To give you an idea what e.g.\ babel can cause we cite from
+% \emph{The Turkish style for babel}:\par
+% \begin{quote}
+% Turkish typographic rules specify that a little 'white space' should be
+% added before the characters ':', '!' and '='. In order to insert this
+% white space automatically these characters are made |\active|, so they
+% have to be treated in a special way.
+% \end{quote}
+% So babel-Turkish makes the equal sign and exlamation mark active. This
+% leads to errors when you call e.g.\ |\setdefaults{warn=on}| or |\hand!|.
+% If you do not need any character to be active, then load this language
+% with |\usepackage[turkish,shorthands=]{babel}|. If you do need the
+% shorthand then you must disable it every time you have to use e.g.\ the
+% |=|~character as a normal character by:
+%
+% \iffalse
+%<*verb>
+% \fi
+\begin{verbnobox}[\small]
+\shorthandoff{=}% Make '=' not active any more
+ \setdefaults{warn=on}
+\shorthandon{=}% Restore '=' to active again
+\end{verbnobox}
+% \iffalse
+%</verb>
+% \fi
+%
+% \section{User Commands}
+%
+% \subsection{Overview}
+%
+% In the next sections we give a short description of all the user commands
+% and environments that are defined in \OneDown. The commands marked with
+% \ML are multilingual. I.e.\ the text they typeset gets
+% translated automatically into the active language.
+%
+% In order to make sure that the example diagrams do not disturb the
+% page layout of this document too much, we scaled them down to
+% |footnotesize|.
+% \gamefont{\bfseries\sffamily\footnotesize}
+% Sometimes the output of a command is shown as an example. This output is
+% framed in this document like \example{this}, just to recognize it easily
+% as an output example. In an accompanying
+% file\footnote{onedown-examples.pdf} with examples one can find in more
+% detail how these commands are used and what they produce.
+%
+% We have loaded the package \OneDown with the default option for colors,
+% giving us \textcolor{black}{black} and \textcolor{red}{red}. Furthermore,
+% when we descibe macros, we use a colored frame that also shows the output
+% of the commend. Some commands have optional tokens that produce an output
+% that differs from the naked version. The output of tokenized calls in the
+% command overview is shown in parenthesis.
+%
+% \subsubsection{The Compass}
+%
+% The compass \CP is not available as a user command itself, but it is used
+% in all user commands that draw a card diagram. It has some special
+% features.
+% \begin{itemize}[itemsep=0em]
+% \item It can mark the dealer (\north) \dealer[\north] \CP
+% \item It can write the vulnerable side (\northsouth) in red \vulner[\northsouth] \CP
+% \item it can put something (a board number) in the middle
+% \boardnr{3} \setdefaults{compmid=3} \CP
+% \end{itemize}
+% The machinery is intelligent enough to calculate the dealer and
+% vulnerability from the board number. When only |black| or
+% |b+w| is selected as option for colors, then the
+% vulnerable side is written in italics rather colorized. Because
+% underlining the \South*-hand would interfere with the compass frame, we
+% overline it. With the command |\setdefaults| one can customize the look
+% of the compass. In particular, if you want to print the actual board
+% number, specified by calling |\boardnr{Nr}|, you can achieve that by
+% calling |\setdefaults{compmid=\boardtext}|. In the accompanying file with
+% examples you'll find more examples about |\setdefaults|.
+%
+% \subsubsection{Hooks}
+%
+% We use kind of hooks to
+% \begin{enumerate}
+% \item change the font or the font-size. These are discussed in chapter
+% \emph{Sizing and Fonts} on page \pageref{Fonts}.
+% \item add commentary information to card diagrams. These are discussed in
+% chapter \emph{Conditions in Diagrams} on page \pageref{Conditions}
+% \item There is one other hook to enable the user to add something to the
+% compass. This is done by calling |\setdefaults{compmid=<Text>}|.
+% \end{enumerate}
+%
+% \subsection{Basic Symbols}\label{BasicSym}
+%
+% In this section we show the predefined commands that produce terms that
+% occur often in bridge text. On page \pageref{ReDefine} an easy way is
+% shown to redefine them as to use a different variant of the term in
+% question.
+% \par\vspace{0.3\baselineskip}\noindent
+% The next 5 macros are shorthands for the suit symbols and \NT:
+% \par\vspace{0.5\baselineskip}\noindent
+% \needspace{5\baselineskip}\noindent
+% \DescribeMacro{\Cl}\MacroDef+{Cl}[\hfill \Cl]
+% \par\noindent
+% \DescribeMacro{\Di}\MacroDef+{Di}[\hfill \Di]
+% \par\noindent
+% \DescribeMacro{\He}\MacroDef+{He}[\hfill \He]
+% \par\noindent
+% \DescribeMacro{\Sp}\MacroDef+{Sp}[\hfill \Sp]
+% \par\noindent
+% \DescribeMacro{\NT}\MacroDef*+{NT}[\hfill \NT]
+% \par\vspace{0.3\baselineskip}\noindent
+% The next 4 macros typeset the non-bid calls
+% \par\vspace{0.5\baselineskip}\noindent
+% \needspace{4\baselineskip}\noindent
+% \DescribeMacro{\pass}\MacroDef*+{pass}[\hfill \pass]
+% \par\noindent
+% \DescribeMacro{\allpass}\MacroDef*+{allpass}[\hfill \allpass]
+% \par\noindent
+% \DescribeMacro{\double}\MacroDef*+{double}[\hfill \double]
+% \par\noindent
+% \DescribeMacro{\redouble}\MacroDef*+{redouble}[\hfill \redouble]
+% The next 6 macros typeset the directions that identify dealer (or player)
+% and the axis that is vulnerable.
+% \par\vspace{0.5\baselineskip}\noindent
+% \needspace{4\baselineskip}\noindent
+% \DescribeMacro{\north}\MacroDef*+{north}[\hfill \north]
+% \par\noindent
+% \DescribeMacro{\east}\MacroDef*+{east}[\hfill \east]
+% \par\noindent
+% \DescribeMacro{\south}\MacroDef*+{south}[\hfill \south]
+% \par\noindent
+% \DescribeMacro{\west}\MacroDef*+{west}[\hfill \west]
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\northsouth}\MacroDef*+{northsouth}[\hfill \northsouth]
+% \par\noindent
+% \DescribeMacro{\eastwest}\MacroDef*+{eastwest}[\hfill \eastwest]
+% The next 4 macros typeset the \emph{unit} of the points when valuing a
+% bridge hand. If one or more of these items do not appear in your bridge
+% world, don't argue them, Just don't use them!
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\HCP}\MacroDef*+{HCP}[\hfill \HCP]
+% \par\noindent
+% \DescribeMacro{\LP}\MacroDef*+{LP}[\hfill \LP]
+% \par\noindent
+% \DescribeMacro{\DP}\MacroDef*+{DP}[\hfill \DP]
+% \par\noindent
+% \DescribeMacro{\TP}\MacroDef*+{TP}[\hfill \TP]
+% \par\noindent
+% The next 5 commands produce the abbreviations for several forcing
+% expressions.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\GF}\MacroDef*+{GF}[\hfill \GF]
+% \par\noindent
+% \DescribeMacro{\SF}\MacroDef*+{SF}[\hfill \SF]
+% \par\noindent
+% \DescribeMacro{\NMF}\MacroDef*+{NMF}[\hfill \NMF]
+% \par\noindent
+% \DescribeMacro{\TSF}\MacroDef*+{TSF}[\hfill \TSF]
+% \par\noindent
+% \DescribeMacro{\FSF}\MacroDef*+{FSF}[\hfill \FSF]
+%
+% \subsubsection{Header of the Bidding Table}
+%
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\namesNS}\MacroDef+{namesNS}[\marg{N-name}\marg{S-name}]
+% Defines the real world names for the \north and the \south player. If
+% they are defined, they appear in the \North*!- and the \South*!-column
+% of the |bidding| diagram.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\namesEW}\MacroDef+{namesEW}[\marg{E-name}\marg{W-name}]
+% Same as |\namesNS| but now for the \east and the \west player.
+%
+% \subsection{The Card Diagrams}
+%
+% \subsubsection{The hands of the players}
+% Before a card diagram can be shown, one must specify the cards that
+% each player holds. With the various \meta{player}|hand|-commands one can
+% do this. The suits they define are only shown when a |show|-command is
+% issued after they have been defined. The |show|-commands are discussed on
+% page \pageref{ShowCommands}.
+% \par\vspace{0.5\baselineskip}\noindent
+% \needspace{4\baselineskip}\noindent
+% \DescribeMacro{\northhand}\MacroDef+{northhand}[\oarg{v-offset}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% \par\noindent
+% \DescribeMacro{\easthand}\MacroDef+{easthand}[\oarg{h-offset}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% \par\noindent
+% \DescribeMacro{\southhand}\MacroDef+{southhand}[\oarg{v-offset}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% \par\noindent
+% \DescribeMacro{\westhand}\MacroDef+{westhand}[\oarg{h-offset}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% The command |\northhand| defines the cards (all 4 suits) for the
+% \North*!-player. |\easthand|, |\southhand| and |\westhand| do that for
+% the \East*!-, \South*!- or \West*!-player. These commands have 4
+% mandatory arguments in
+% which the cards of the 4 suits are specified. In all suit commands where
+% card ranks are issued, one must use \textbf{T} to denote the value
+% \textbf{10}. On output, some kerning takes care that the output looks
+% like \suit{T} and not like a \textbf{1} followed by a \textbf{0}. So
+% |\suit{AKJT8}| produces \example{\suit{AKJT8}}.
+% These commands also have an optional argument, an offset which by default
+% is 0pt. This offset is meant to finetune the layout of the hands in the
+% card diagrams. They change the distance between a hand and the compass.
+% |\northhand| and |\southhand| have a \emph{vertical} offset, whereas
+% |\easthand| and |\westhand| have a \emph{horizontal} one. A positive
+% value moves away from the compass.
+%
+% \subsubsection{The single hand}
+%
+% \noindent
+% \DescribeMacro{\hand}\MacroDef+{hand}[\Oarg{*!-}\oarg{pos}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% This macro typesets the cards of one single hand, either vertically or
+% horizontally. There are 4 mandatory arguments defining the 4 suits. With
+% 2 optional tokens '|*|' resp.\ '|!|' one can typeset the hand with
+% some special features:
+% \begin{itemize}[itemsep=0em]
+% \item |\hand*| typesets a hand horizontally, centered
+% \item |\hand!| typesets a hand vertically, left aligned
+% \item |\hand*!| typesets a hand vertically, centered
+%\end{itemize}
+% For vertical hands the optional argument |pos| (default= \textbf{c})
+% controls the horizontal alignment. Without a token, the hand is typeset
+% horizontally, left aligned: The call |\hand{AK2}{T85}{AQT6}{A42}|
+% typesets the hand horizontally like:
+% \par\vspace{0.3\baselineskip}\noindent
+% \example{\hand{AK2}{T85}{AQT6}{A42}},
+% \par\vspace{0.3\baselineskip}\noindent
+% whereas the |\hand!| version produces
+% \shorthandoff{!}
+% \example{\hand!{AK2}{T85}{AQT6}{A42}}.
+% \shorthandon{!}
+% \par\vspace{0.3\baselineskip}\noindent
+% The third optional token, a '|-|' suppresses all output and saves the
+% stuff for later use. This is used e.g.\ in |\expertquiz|.
+%
+% \subsubsection{Only one suit}
+%
+% \noindent
+% \DescribeMacro{\onesuitAll}\MacroDef+{onesuitAll}[\Oarg{*!}\marg{N}\marg{S}\marg{E}\marg{W}]
+% Typesets the cards of 1 suit for all players. This command has 4
+% mandatory arguments defining the cards of the 4 players. There are 2
+% optional tokens. With |\onesuitAll*| the output is centered, with
+% |onesuitAll!| the cards are placed around a |NESW| compass.
+% Without the '|!|'-token a small box (\ODwBox) is used instead. Thus
+% the macro call |\onesuitAll{AQ6}{J3}{T54}{K2}| produces
+% \example{\onesuitAll{AQ6}{J3}{T54}{K2}}.
+% \par\noindent
+% Please note the order of the
+% players in the arguments: the first 2 denote the \north and \south hand.
+% The last 2 denote the \east and \west hand. We choose it this way so you
+% can easily cut and paste one pair from the |\onesuitAll|, or extend
+% |\onesuitNS| to showing all hands.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\onesuitNS}\MacroDef+{onesuitNS}[\Oarg{*!}\marg{N}\marg{S}]
+% \par\noindent
+% \DescribeMacro{\onesuitEW}\MacroDef+{onesuitEW}[\Oarg{*!}\marg{E}\marg{W}]
+% \par\noindent
+% \DescribeMacro{\onesuitNE}\MacroDef+{onesuitNE}[\Oarg{*!}\marg{N}\marg{E}]
+% \par\noindent
+% \DescribeMacro{\onesuitNW}\MacroDef+{onesuitNW}[\Oarg{*!}\marg{N}\marg{W}]
+% These commands are similar to |\onesuitAll| but have only 2 mandatory
+% arguments. The command |\onesuitNS{AQ3}{JT9}| typesets
+% \example{\onesuitNS{AQ3}{JT9}} and |\onesuitEW{8764}{K2}| will
+% produce \example{\onesuitEW{8764}{K2}}. Please note that at the latter the
+% cards for the \east hand appear in the first argument. Finally
+% |\onesuitNE{AQ3}{8764}| produces \example{\onesuitNE{AQ3}{8764}} and
+% |\onesuitNW{AQ3}{K2}| \example{\onesuitNW{AQ3}{K2}}.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\suit}\MacroDef+{suit}[\oarg{suit symbol}\marg{cards}]
+% This command has 1 optional argument denoting a suit symbol and 1
+% mandatory argument, defining the cards of the suit.
+% |\suit{AQJ7}| by default produces \example{\suit{AQJ7}}. When the German
+% language is active it would produce \example{\Translate{\suit{AQJ7}}}.
+% Using the optional argument like in |\suit[\Di]{AQJ7}| will produce:
+% \example{\suit[\Di]{AQJ7}}.
+%
+% \subsubsection{Showing Card Diagrams}\label{ShowCommands}
+%
+% \noindent
+% \DescribeMacro{\showAll}\MacroDef+{showAll}[\Oarg{*+}\oarg{pos}]
+% \par\noindent
+% \DescribeMacro{\showNS}\MacroDef+{showNS}[\Oarg{*+}\oarg{pos}]
+% \par\noindent
+% \DescribeMacro{\showEW}\MacroDef+{showEW}[\Oarg{*+}\oarg{pos}]
+% \par\noindent
+% \DescribeMacro{\showNE}\MacroDef+{showNE}[\Oarg{*+}\oarg{pos}]
+% \par\noindent
+% \DescribeMacro{\showNW}\MacroDef+{showNW}[\Oarg{*+}\oarg{pos}]
+% All |show|-commands have two optional tokens, a '|*|' which centers the
+% output and a '|+|' which also displays a |bidding| diagram next to the
+% card diagram. This |bidding| diagram must have been defined before, see
+% page~\pageref{Bidding}.
+% They also have one optional argument that defines the aligning. Its
+% default is~\textbf{c}.
+% |\showAll| typesets a card diagram with the |NESW| compass with \North*! in
+% top and the hands of the 4 players surrounding it. These hands must have
+% been defined before by calling |\northhand| etc. Hands that are not
+% defined are left empty. Optionally some conditions (like the dealer or
+% who is vulnerable etc.) can be added to the diagram by using the commands
+% described in section \emph{Diagram Conditions}. Please note that when the
+% \north or \south hand contains a long suit that extends beyond the
+% |NESW| compass, this might collide with these extra texts. You can
+% correct that with the optional offset parameter of the condition commands
+% (see page \pageref{Legend}).
+%
+% The other commands are similar to |\showAll| but typeset only the hands
+% of the players that are represented in the name of the command:
+% \NorthSouth*!, \EastWest*!, \North*!--\East*! and \North*!--\West*!.
+% \needspace{6\baselineskip}\noindent
+%
+% \subsubsection{Showing Card Diagrams with Bidding}\label{PlayCommands}
+%
+% \subsubsection{Diagram Conditions}
+%
+% \noindent
+% \DescribeMacro{\headlinetext}\MacroDef+{headlinetext}[\marg{text}]
+% \par\noindent
+% \DescribeMacro{\footlinetext}\MacroDef+{footlinetext}[\marg{text}]
+% These commands have 1 mandatory argument: the text that defines the
+% annotation that is to be added to a card diagram. The text can be on more
+% than one line, just separate them with a |\par| or
+% |\newline|\footnote{Using '\bs\bs' instead produces a misleading error:
+% \textbf{! Missing \} inserted\ldots}}.
+% |\headlinetext| places the annotation above the diagram, |\footlinetext|
+% below it.
+% \par\vspace{0.5\baselineskip}
+% \needspace{4\baselineskip}\noindent
+% \DescribeMacro{\leftupper}\MacroDef+{leftupper}[\oarg{h-offset}\marg{line1}\marg{line2}\marg{line3}]\label{Legend}
+% \par\noindent
+% \DescribeMacro{\leftlower}\MacroDef+{leftlower}[\oarg{h-offset}\marg{line1}\marg{line2}\marg{line3}]
+% \par\noindent
+% \DescribeMacro{\rightupper}\MacroDef+{rightupper}[\oarg{h-offset}\marg{line1}\marg{line2}\marg{line3}]
+% \par\noindent
+% \DescribeMacro{\rightlower}\MacroDef+{rightlower}[\oarg{h-offset}\marg{line1}\marg{line2}\marg{line3}]
+% These commands have 1 optional argument (default 0pt) with which you can
+% add some extra horizontal space if hand and legend collide, and 3
+% mandatory arguments: the lines of text that are added as conditions
+% to the card diagram. Both |\leftupper| (|\rightupper|) place their
+% text in the left- (right-) upper corner of the diagram. The top line
+% will be aligned with the (inner) top of the diagram. |\leftlower|
+% (|\rightlower|) are similar, but place their text at the lower corner of
+% the diagram. The last line is aligned with the (inner) bottom of the
+% diagram. For an empty line you must issue an empty argument.
+% With a positive offset, |\leftupper| and |\leftlower| shift to the left
+% whereas |\rightupper| and |\rightlower| shift to the right. I.e.\ they
+% shift away from their neighbouring hand.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\dealer}\MacroDef+{dealer}[\oarg{text}]\label{dealerX}
+% \par\noindent
+% \DescribeMacro{\vulner}\MacroDef+{vulner}[\oarg{text}]
+% Both commands have 1 optional argument. If present it sets (and prints)
+% the internal corresponding variable to this value, otherwise it only
+% outputs the value of this internal variable.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\dealertext}\MacroDef+{dealertext}[\oarg{text}]
+% \par\noindent
+% \DescribeMacro{\vulnertext}\MacroDef+{vulnertext}[\oarg{text}]
+% These commands have also 1 optional argument. If present e.g.\
+% |\dealertext[\North*]| this text is output in the form
+% \example{\dealertext[\North*]}. If the German language is active then the
+% call |\dealertext[\South*]| produces the text
+% \foreignlanguage{german}{\example{\dealertext[\South*]}}. Calling
+% |\dealertext| without an argument outputs the predefined text, which can
+% be set with |\dealer|.\\
+% Example:
+% |\dealer[Jacob]\dealertext| produces \example{\dealer[Jacob]\dealertext}.
+%
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\boardnr}\MacroDef+{boardnr}[\marg{Nr}]
+% The macro |\boardnr| has 1 mandatory argument. If it is a number, it is
+% considered to be the board number. The dealer and which side is
+% vulnerable is then calculated from it and stored in the appropriate
+% variables. If it is not a positive integer, it is considered user-defined
+% text and will be stored and used \emph{as is}.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\boardtext}\MacroDef*+{boardtext}[\Oarg{*}]
+% The macro |\boardtext| has 1 token and no arguments. |\boardtext|
+% retrieves only the board number (stored by calling |\boardnr|).
+% |\boardtext*| outputs the board number with some additional (multilingual)
+% text. |\boardnr{23}\boardtext| produces \example{\boardnr{23}\boardtext}
+% whereas |\boardtext*| would produce \example{\boardtext*}.
+% Note that |\boardnr| can have a non-integer argument.
+% |\boardnr{Fun}\boardtext| produces \example{\boardnr{Fun}\boardtext} and
+% with |\boardtext*| it would produce \example{\boardtext*}.
+%
+% \subsubsection{Sizing and Fonts}\label{Fonts}
+%
+% \noindent
+% \DescribeMacro{\handskip}\MacroDef+{handskip}[\marg{length description}]
+% This command has 1 mandatory argument: a \textbf{text} describing a
+% length. |\handskip| enlarges the distance (default |1em|) between the
+% rightmost hand and the |bidding| diagram. A negative value diminishes the
+% distance.
+% \par\vspace{0.5\baselineskip}
+% \needspace{4\baselineskip}\noindent
+% \DescribeMacro{\bidderfont}\MacroDef+{bidderfont}[\marg{font description}]
+% \par\noindent
+% \DescribeMacro{\compassfont}\MacroDef+{compassfont}[\marg{font description}]
+% \par\noindent
+% \DescribeMacro{\gamefont}\MacroDef+{gamefont}[\marg{font description}]
+% \par\noindent
+% \DescribeMacro{\legendfont}\MacroDef+{legendfont}[\marg{font description}]
+% \par\noindent
+% \DescribeMacro{\namefont}\MacroDef+{namefont}[\marg{font description}]
+% \par\noindent
+% \DescribeMacro{\otherfont}\MacroDef+{otherfont}[\marg{font description}]
+% These commands all have 1 mandatory argument: a \textbf{description} of
+% the font to be used. In the list below the command names are typeset in
+% their default font.
+% \begin{itemize}[itemsep=-2mm]
+% \item {\mdseries\sffamily bidderfont}: Used for the player-names in the
+% |bidding| diagram.\\ The default is |\mdseries\sffamily|.
+% \item {\mdseries\sffamily compassfont}: Used for the directions and the
+% ''midvalue'' in the compass. The default is |\mdseries\sffamily|.
+% \item {\bfseries\sffamily gamefont}: Used for card diagrams, hands and
+% suits.\\ The default is |\bfseries\sffamily|.
+% \item {\mdseries\rmfamily legendfont}: Used for the conditions in
+% card diagrams.\\ The default is |\mdseries\rmfamily|.
+% \item {\mdseries\slshape namefont}: Used for the real world names in
+% |bidding| diagrams.\\ The default is |\mdseries\slshape|.
+% \item {\bfseries\sffamily otherfont}: Used for the other bridge
+% expressions, also outside diagrams. The default is |\bfseries\sffamily|.
+% \end{itemize}
+% If a new font is
+% defined, all relevant dimensions of the card diagrams (including the
+% |NESW| compass, the |bidding| diagram etc.) will be recalculated.
+% Some examples for setting the gamefont to a new value are:
+% \begin{itemize}[itemsep=-2mm]
+% \item |\gamefont{\sffamily\bfseries\HUGE}| to get \emph{HUGE} diagrams.
+% Refer to the documentation of package \packname{moresize} for details.
+% \item |\legendfont{\smaller}| to diminish the text in the card diagram
+% conditions a little. Refer to the
+% documentation of package \packname{relsize} for details.
+% \item |\gamefont{\sffamily\scalefont{3}}|\footnote{needs package
+% scalefnt} to typeset real big diagrams for overhead sheets
+% \end{itemize}
+% \needspace{4\baselineskip}\noindent
+%
+% \subsection{Misc}
+%
+% Many of the text producing macros have in common that they can produce 4
+% different versions of the text they represent. Normally, without any
+% token, they produce the
+% lowercase text. With the token~|*| they produce the capitalised text.
+% With the token |!| they produce some abbreviation of the text (if
+% available). Finally with both tokens~|*!| the produce the capitalised
+% abbreviation of the text. What exactly is produced, is shown in the
+% macro descriptions. In some cases it seems rather strange to have the
+% code for an abbreviated form, i.e.\ |\Lead[*!]|, because it produces only
+% the variants \Lead and \Lead*. But remember that we also support automatic
+% translations into other languages and that in another language an
+% abreviationt might be feasible: With the german language active |\Lead*|
+% and |\Lead*!| produce \foreignlanguage{german}{\example{\Lead*}} and
+% \foreignlanguage{german}{\example{\Lead*!}} respectively.
+
+% At the other
+% hand it seems peculiar to let |\Ace!| produce \example{\Ace!} for an
+% Ace. But we do not foresee which modern novelist might want to produce
+% this. That's why they are defined, but 'normal' writers probably will
+% never used it.
+%
+% The short versions are primarily meant to be used within diagrams,
+% allthough it is possible to get the long forms there too. Refer to page
+% \pageref{Defaults} for details. We show the output of such a macro
+% |\Macro| (note the capital~|M|!) in the form:
+% \par\vspace{0.3\baselineskip}\noindent
+% \MacroDef{Macro}[\Oarg{*!}\hfill \cmd{\Macro} (\cmd{\Macro*}, \cmd{\Macro!}, \cmd{\Macro*!})]
+% In addition to each macro |\Macro| with its 4 variants, we also create a
+% macro |\macro| which is defined to output the most used variant of
+% |\Macro|:
+% \par\vspace{0.3\baselineskip}\noindent
+% \MacroDef{macro}[\hfill most used variant of \cmd{\Macro}]
+% \par\vspace{0.3\baselineskip}\noindent
+% It is very easy to redefine |\macro|.\label{ReDefine}
+% As an example we take the macro |\ace|. Its definition is:
+% \par
+% |\def\ace{\Ace*!}|\\
+% so calling |\ace| will produce \example{\ace}. If somewhere in your
+% document you redefine |\ace| to be
+% \par
+% |\def\ace{\Ace*}|\\
+% {\def\ace{\Ace*} then |\ace| will produce \example{\ace}} rather than \example{\ace}.
+%
+% \subsubsection{Honor Cards}
+%
+% \noindent
+% \DescribeMacro{\Ace}\MacroDef*+{Ace}[\Oarg{*!}\hfill \Ace (\Ace*, \Ace!, \Ace*!)]
+% \par\noindent
+% \DescribeMacro{\ace}\MacroDef*+{ace}[\hfill \ace]
+% \par\noindent
+% \DescribeMacro{\King}\MacroDef*+{King}[\Oarg{*!}\hfill \King (\King*, \King!, \King*!)]
+% \par\noindent
+% \DescribeMacro{\king}\MacroDef*+{king}[\hfill \king]
+% \par\noindent
+% \DescribeMacro{\Queen}\MacroDef*+{Queen}[\Oarg{*!}\hfill \Queen (\Queen*, \Queen!, \Queen*!)]
+% \par\noindent
+% \DescribeMacro{\queen}\MacroDef*+{queen}[\hfill \queen]
+% \par\noindent
+% \DescribeMacro{\Jack}\MacroDef*+{Jack}[\Oarg{*!}\hfill \Jack (\Jack*, \Jack!, \Jack*!)]
+% \par\noindent
+% \DescribeMacro{\jack}\MacroDef*+{jack}[\hfill \jack]
+% These commands produce the language dependent names for the honor
+% cards. To be used primarily when adding a lead to a card diagram.
+%
+% \subsubsection{Variants of Basic Symbols}
+%
+% In section \ref{BasicSym} we already described the macros for the main
+% variant. Here we introduce the macros that handle 4 variants with a
+% combination of the tokens |*| and |!|.
+% \par\noindent
+% We start with the variants for |\NT|
+% \par\vspace{0.3\baselineskip}\noindent
+% \DescribeMacro{\nt}\MacroDef*+{nt}[\Oarg{*!}\hfill \nt (\nt*, \nt!, \nt*!)]
+% \par\noindent
+% Next we show the 4 macros for the non-bid calls:
+% \par\vspace{0.3\baselineskip}\noindent
+% \DescribeMacro{\Pass}\MacroDef*+{Pass}[\Oarg{*!}\hfill \Pass (\Pass*, \Pass!, \Pass*!)]
+% \par\noindent
+% \DescribeMacro{\Allpass}\MacroDef*+{Allpass}[\Oarg{*!}\hfill \Allpass
+% (\Allpass*, \Allpass!, \Allpass*!)]
+% \par\noindent
+% \DescribeMacro{\Double}\MacroDef*+{Double}[\Oarg{*!}\hfill \Double (\Double*,
+% \Double!, \Double*!)]
+% \par\noindent
+% \DescribeMacro{\Redouble}\MacroDef*+{Redouble}[\Oarg{*!}\hfill \Redouble
+% (\Redouble*, \Redouble!, \Redouble*!)]
+% \par\noindent
+% Next come the 6 macros for the symbolic names of players and axes.
+% \par\vspace{0.5\baselineskip}\noindent
+% \needspace{4\baselineskip}\noindent
+% \DescribeMacro{\North}\MacroDef*+{North}[\Oarg{*!}\hfill \North (\North*, \North!, \North*!)]
+% \par\noindent
+% \DescribeMacro{\East}\MacroDef*+{East}[\Oarg{*!}\hfill \East (\East*, \East!, \East*!)]
+% \par\noindent
+% \DescribeMacro{\South}\MacroDef*+{South}[\Oarg{*!}\hfill \South (\South*, \South!, \South*!)]
+% \par\noindent
+% \DescribeMacro{\West}\MacroDef*+{West}[\Oarg{*!}\hfill \West (\West*, \West!, \West*!)]
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\NorthSouth}\MacroDef*+{NorthSouth}[\Oarg{*!}\hfill \NorthSouth (\NorthSouth*, \NorthSouth!, \NorthSouth*!)]
+% \par\noindent
+% \DescribeMacro{\EastWest}\MacroDef*+{EastWest}[\Oarg{*!}\hfill \EastWest (\EastWest*, \EastWest!, \EastWest*!)]
+% \par\noindent
+% The 4 commands that typeset the \emph{point-unit}
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\hpts}\MacroDef*+{hpts}[\Oarg{*!}\hfill \hpts (\hpts*, \hpts!, \hpts*!)]
+% \par\noindent
+% \DescribeMacro{\tpts}\MacroDef*+{tpts}[\Oarg{*!}\hfill \tpts (\tpts*, \tpts!, \tpts*!)]
+% \par\noindent
+% \DescribeMacro{\lpts}\MacroDef*+{lpts}[\Oarg{*!}\hfill \lpts (\lpts*, \lpts!, \lpts*!)]
+% \par\noindent
+% \DescribeMacro{\dpts}\MacroDef*+{dpts}[\Oarg{*!}\hfill \dpts (\dpts*, \dpts!, \dpts*!)]
+% \par\noindent
+% The forcing terms
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\gforce}\MacroDef*+{gforce}[\Oarg{*!}\hfill \gforce (\gforce*, \gforce!, \gforce*!)]
+% \par\noindent
+% \DescribeMacro{\sforce}\MacroDef*+{sforce}[\Oarg{*!}\hfill \sforce (\sforce*, \sforce!, \sforce*!)]
+% \par\noindent
+% \DescribeMacro{\nmforce}\MacroDef*+{nmforce}[\Oarg{*!}\hfill \nmforce (\nmforce*, \nmforce!, \nmforce*!)]
+% \par\noindent
+% \DescribeMacro{\tsforce}\MacroDef*+{tsforce}[\Oarg{*!}\hfill \tsforce (\tsforce*, \tsforce!, \tsforce*!)]
+% \par\noindent
+% \DescribeMacro{\fsforce}\MacroDef*+{fsforce}[\Oarg{*!}\hfill \fsforce (\fsforce*, \fsforce!, \fsforce*!)]
+%
+% \subsubsection{Conditions in Diagrams}\label{Conditions}
+%
+% These commands produce the langugage dependent expressions for
+% \emph{\all, \none, \by, \board} etc. To be used primarily in card
+% diagrams.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\All}\MacroDef*+{All}[\Oarg{*!}\hfill \All (\All*, \All!, \All*!)]
+% \par\noindent
+% \DescribeMacro{\all}\MacroDef*+{all}[\hfill \all]
+% \par\noindent
+% \DescribeMacro{\None}\MacroDef*+{None}[\Oarg{*!}\hfill \None (\None*, \None!, \None*!)]
+% \par\noindent
+% \DescribeMacro{\none}\MacroDef*+{none}[\hfill \none]
+% \par\noindent
+% \DescribeMacro{\by}\MacroDef*+{by}[\hfill \by]
+% \par\noindent
+% \DescribeMacro{\Board}\MacroDef*+{Board}[\Oarg{*!}\hfill \Board (\Board*, \Board!, \Board*!)]
+% \par\noindent
+% \DescribeMacro{\board}\MacroDef*+{board}[\hfill \board]
+% \par\noindent
+% \DescribeMacro{\Contract}\MacroDef*+{Contract}[\Oarg{*!}\hfill \Contract (\Contract*, \Contract!, \Contract*!)]
+% \par\noindent
+% \DescribeMacro{\contract}\MacroDef*+{contract}[\hfill \contract]
+% \par\noindent
+% \DescribeMacro{\Declarer}\MacroDef*+{Declarer}[\Oarg{*!}\hfill \Declarer (\Declarer*, \Declarer!, \Declarer*!)]
+% \par\noindent
+% \DescribeMacro{\declarer}\MacroDef*+{declarer}[\hfill \declarer]
+% \par\noindent
+% \DescribeMacro{\Deal}\MacroDef*+{Deal}[\Oarg{*!}\hfill \Deal (\Deal*, \Deal!, \Deal*!)]
+% \par\noindent
+% \DescribeMacro{\deal}\MacroDef*+{deal}[\hfill \deal]
+% \par\noindent
+% \DescribeMacro{\Lead}\MacroDef*+{Lead}[\Oarg{*!}\hfill \Lead (\Lead*, \Lead!, \Lead*!)]
+% \par\noindent
+% \DescribeMacro{\lead}\MacroDef*+{lead}[\hfill \lead]
+%
+% \subsubsection{Annotations in Bidding Diagrams}
+%
+% \noindent
+% \DescribeMacro{\alert}\MacroDef+{alert}[\hfill \alert]
+% \par\noindent
+% \DescribeMacro{\announce}\MacroDef+{announce}[\hfill \announce]
+% \par\noindent
+% These macros have no argument. With |\alert| one can mark a call that
+% must be alerted with an asterisk (\alert) e.g.\ a weak 2\NT{} opening
+% with |2\NT\alert|. It produces \example{2\NT\alert}. With |\announce| one
+% can mark a bid with an 'A' (\announce) where an announcement is
+% obligatory, e.g |2\He\announce| produces \example{2\He\announce}.
+% \par\vspace{0.5\baselineskip}
+% \needspace{4\baselineskip}\noindent
+% \DescribeMacro{\markit}\MacroDef+{markit}
+% \par\noindent
+% \DescribeMacro{\explainit}\MacroDef+{explainit}[\marg{explanation}]
+% These commands are to be used to mark a call in the |bidding| diagram and
+% explain it with a kind of footnote-like mechanism, directly below the
+% |bidding| diagram. Both |\markit| and |\explainit| step a counter for
+% associating the explanation with the mark. |\markit| has no arguments;
+% |\explainit| has one mandatory argument: the text to be displayed as
+% explanation. |\explainit| should be called in the description part of
+% |bidding| diagrams (or expertquiz). The text of the explanation is then
+% typeset under the |bidding| diagram and has the same width.
+% You can use newline (|\\|, or |\newline|) in your text to force an new
+% line in the explanation\footnote{Using \bs par produces the error:
+% \textbf{Runaway argument?\ldots}}.
+% \needspace{6\baselineskip}%
+
+% \subsubsection{Specials}
+%
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\expertquiz}\MacroDef+{expertquiz}[\Oarg{*!}\oarg{comment}\marg{award}]
+% This command displays a hand, a |bidding| sequence and some additional
+% stuff. It is designed after the \emph{Expert Quiz} column in the
+% \emph{Bridge Magazin} of the \textsf{DBV}\footnote{Deutsche Bridge
+% Verband}, the German Bridge Union.
+% \\
+% It has 2 optional tokens: a '|*|' for centering and a
+% '|!|' which 1) forces the |bidding| diagram to appear on a new line, and
+% 2) shifts the hand a bit to the right.
+% Next there is one optional argument with wich some commentary information
+% can be added. And finally there is 1 mandatory argument that describes the
+% awards for certain solutions. Both the hand and the bidding must be
+% defined before calling |\expertquiz|. One can do that by calling e.g.
+% |\hand-| which suppresses the output of the hand.
+%
+% \subsubsection{Re-Initialization}
+%
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\newgame}\MacroDef+{newgame}
+% This command resets most bridge diagram data and can be used to start a
+% new series of bridge diagrams. It is however not necessary to use
+% |\newgame| if one enters new cards for the \north etc.\ hands. The list
+% below shows which items are reset by calling |\newgame|
+% \begin{itemize}
+% \item resets |\boardnr{0}|.
+% \item resets |headlinetext| and |footlinetext|.
+% \item resets |LeftUpperText|, |LeftLowerText|, |RightUpperText| and
+% |RightLowerText|.
+% \item resets |northhand|, |easthand|, |southhand| and |westhand|.
+% \item resets |namesNS| and |namesEW|.
+% \item resets the checks for Spades, Hearts, Diamonds and Clubs.
+% \end{itemize}
+% \needspace{15\baselineskip}
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\setdefaults}\MacroDef+{setdefaults}[\Oarg{*}\string{\meta{key1=val1},\meta{key2=val2},\ldots\string}]\label{Defaults}
+% \par\noindent
+% \DeleteShortVerb{\|}
+% \begin{tabular}{>{\ttfamily}l>{\ttfamily}l}
+% key & font \\\hline
+% bidder & bidderfont \\
+% compass & compassfont \\
+% game & gamefont \\
+% legend & legendfont \\
+% name & namefont \\
+% other & otherfont \\\hline
+% \\
+% key & value \\\hline
+% colors & 0|1|\underline{2}|4A|4B \\
+% warn & \underline{off}|on \\
+% err & off|\underline{on} \\
+% \hline
+% \end{tabular}
+% \qquad
+% \begin{tabular}{>{\ttfamily}l>{\ttfamily}l}
+% key & value \\\hline
+% compline & \meta{factor} \\
+% compshow & off|\underline{on} \\
+% compsize & \meta{factor} \\
+% compturn & \underline{off}|on \\\hline
+% \\
+% key & value \\\hline
+% bidders & off|\underline{on} \\
+% bidfirst & N|E|S|\underline{W} \\
+% bidline & \underline{off}|on \\
+% bidlong & off|\underline{on} \\
+% \hline
+% \end{tabular}
+% \MakeShortVerb{\|}
+% \par\vspace{\baselineskip}
+% The macro |\setdefaults| uses a \meta{key}=\meta{val} mechanism. The
+% tables above show which keys are available. The underlined key values are
+% defaults. The available keys with respect to fonts are: |bidder|,
+% |compass|, |game|, |legend|, |name| and |other|. In upper the table to
+% the left the association between key and font is shown. A call e.g.\
+% |\setdefaults{name=\bfseries\scriptsize}| will set the default for the
+% namefont to the value specified. The starred form |\setdefaults*| will
+% also call |\resetfonts|, which effectuates any change in a new default
+% font immediately.
+%
+% In the lower table to the left you'll find the three keys that are also
+% possible as package options. They have been described already in section
+% \ref{Options}.
+%
+% The keys with respect to the compass are: |compline|, |compshow|,
+% |compsize| and |compturn|. They are shown in the upper table to the
+% right. With the first key one can set the linethickness of the compass
+% frame, the default is |0.1em|. The second key controls whether the
+% compass is shown or not. The third key controls the size of the compass,
+% which per default is |2.5em|. With the fourth key one can rotate the
+% letters for the \EastWest*! direction over 90°. The
+% multiplication-\meta{factor}, which defaults to the value |1|, can have
+% any non-negative real value.
+%
+% The keys with respect to the |bidding| diagram are: |bidders|, |bidfirst|,
+% |bidline| and |bidlong|. They are shown in the lower table to the right.
+% With the first key one can suppress the bidders in the bidding header.
+% With the second key one can set which bidder appears in the first column
+% of the diagram. The default is |W|. The third key controls whether an
+% |\hline| is printed below the header. The fourth key switches between
+% the long or short form of the non-bid calls, like \example{\pass} or
+% \example{\Pass!}.
+%
+% For the key-value |on| we have the synonyms |true| and |1|, for the
+% key-value |off| we have the synonyms |false| and |0|.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\resetfonts}\MacroDef+{resetfonts}
+% When calling this macro, all fonts are set back to their default value.
+% This is the value that was explicitly set by a previous call of
+% |\setdefaults|, or to the intrinsic default value if |\setdefaults| has
+% not been called before.
+%
+% \subsection{Environments}
+%
+% In the first place we must warn the user for a peculiarity of the package
+% \packname{collcell}, which is used to do some special processing in these
+% 3 environments: \emph{The last row must either end with a newline} (|\\|)
+% \emph{or with an \emph{empty} cell.}\par\noindent
+% The advantage of the |collcell| processing is that within the |bidding|
+% and |play| diagrams we can use shorthands for the suit symbols: rather
+% than writing |3\Sp| in a |bidding| diagram we can also write |3S| to obtain
+% 3\,\Sp. In the |play| diagram we could write |HA| instead of |\He\,\Ace|
+% and get \He\,A as output. In |bidding| diagrams some non-bid calls may
+% appear in short or in long form, controlled by calling
+% |\setdfefaults{bidlong=on}|, which switches to the lang form, or
+% |\setdfefaults{bidlong=off}| which switches to the short form.
+% These non-bid calls are coded as follows: A small |p| yields short form
+% \example{\Pass!} or long form \example{\pass}. A capital |P| yields short
+% form \example{\Allpass*!} or long form \example{\allpass}. A capital |X|
+% yields short form \example{\Double!} and long form \example{\double}. A
+% capital |R| yields short form \example{\Redouble!} and long form
+% \example{\redouble}.\footnote{due to the fact that |x| denotes a
+% spotcard, we had to implement it this way}
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeEnv{bidding}\EnvDef*+{bidding}[\Oarg{*!-}\oarg{pos}\parg{description}]\label{Bidding}
+% This environment has 3 tokens. The '|*|' centers the |bidding| diagram.
+% The '|!|' outputs the short form: e.g.\ \North*! rather than the long form
+% \North* in the table heading. The '|-|' completely suppresses the output.
+% The data is stored in a savebox and can be used in other macros, e.g.\ in
+% all |\showXX| macros. Next come 2 optional parameters. The first
+% one controls the alignment (default \textbf{c}) and the second one adds
+% the list of annotations below the |bidding| diagram. With |\setdefaults|
+% one can fine tune the look of the |bidding| diagram. Refer to page
+% \pageref{Defaults} for details. For example
+% \iffalse
+%<*verb>
+% \fi
+\begin{verbnobox}[\small]
+ \begin{bidding}(\explainit{WeakTwo}\explainit{preemptive})
+ 2H\markit & p & 3H\markit & p \\
+ \end{bidding}
+\quad
+ \setdefaults{bidlong=off}
+ \begin{bidding}!
+ 2H & p & 3H & p\\
+ \end{bidding}\\
+\end{verbnobox}
+% \iffalse
+%</verb>
+% \fi
+% produces\\
+% \example{
+% \begin{bidding}(\explainit{WeakTwo}\\\explainit{preemptive})
+% 2H\markit & p & 3H\markit & p \\
+% \end{bidding}
+% \quad
+% \setdefaults{bidlong=off}
+% ^^A avoid clash with babel languages
+% \shorthandoff{!}
+% \begin{bidding}!
+% 2H & p & 3H & p \\
+% \end{bidding}
+% }
+%
+% \shorthandon{!}\setdefaults{bidlong=on}
+%
+% \par\vspace{0.3\baselineskip}\noindent
+% In addition to the shorthands we mentioned before, one can also use macros
+% in the bidding and play diagrams. As long as these macros appear as 1
+% single token in the diagram, no special care has to be taken. But if a
+% macro appears as multiple tokens, e.g.\ like the call |\Pass*!|, which
+% consists of the 3 tokens |\Pass|, |*| and |!|, then it \textbf{must} be
+% enclosed in braces |{...}| to make it act as 1 token. Without the
+% braces |\Pass*!| will produce \example{\Xfer{\Pass*!}}, with them
+% |{\Pass*!}| will produce \example{\Xfer{{\Pass*!}}}.
+% Note that although |\pass| expands to |\Pass*|, it wil produce the correct
+% \example{\Xfer{\pass}}.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeEnv{biddingpair}\EnvDef*+{biddingpair}[\Oarg{*!-}\oarg{pos}\parg{descr}]
+% This environment is essentially the same as the |bidding| environment, but
+% here the |bidding| diagram has only two columns rather than four.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeEnv{play}\EnvDef*+{play}[\Oarg{*}\marg{Lead}\oarg{Trump}]
+% This environment has 1 token, a '|*|', which controls the centering of
+% the table; 1 mandatory argument, denoting the opening lead and 1
+% optional argument which specifies the trump suit, with default: \NT. It
+% typesets a diagram with the sequence of playing tricks, by producing a
+% table with 8 columns: the running number; the player who had
+% had the lead; the 4 cards played in this trick and finally
+% the 2 columns that show how many tricks \NorthSouth*!{} and \EastWest*!{}
+% have won so far. The user has to specify only the columns 3-6, i.e.\ the
+% cards that were played. Columns 1--2 and 7--8 are constructed by
+% \OneDown. Just as in |bidding| diagrams, also here
+% one can denote the suit with |S|, |H|, |D|, or |C|. The winning card is
+% automatically detected, taking into account if a suit contract or \NT
+% is played. The winning tricks counters are then updated automatically.
+% Concerning consistency it is just as with hands and deals: If a card
+% occurs more than one time, an error is raised and for missing cards a
+% warning is issued.
+% \\[0.3\baselineskip]
+% \needspace{4\baselineskip}\noindent
+% \otherfont{\sffamily\bfseries\footnotesize}
+% \begin{minipage}{\linewidth}
+% \begin{minipage}[b]{0.36\linewidth}
+%
+% \iffalse
+%<*verb>
+% \fi
+\begin{verbnobox}[\small]
+\begin{play}{W} \\
+ D3 & 2 & Q & K \\
+ HA & 5 & 4 & J \\
+ C3 & 5 & K & A \\
+\end{play}
+\end{verbnobox}
+% \iffalse
+%</verb>
+% \fi
+%
+% \end{minipage}
+% \quad
+% \example{
+% \begin{play}{W}
+% D3 & 2 & Q & K \\
+% HA & 5 & 4 & J \\
+% C3 & 5 & K & A \\
+% \end{play}
+% }
+% \end{minipage}
+%
+% \needspace{8\baselineskip}\noindent
+%
+% \iffalse
+%<*verb>
+% \fi
+\begin{verbnobox}[\small]
+\begin{play}*{W} \\
+ D3 & 2 & Q & K \\
+ HA & 5 & 4 & J \\
+ C3 & 5 & K & A \\
+\end{play}
+\end{verbnobox}
+% \iffalse
+%</verb>
+% \fi
+%
+% produces the same diagram, but this time horizontally
+% centered.\\[0.5\baselineskip]
+% \example{
+% \begin{minipage}{0.95\linewidth}
+% \begin{play}*{W}
+% D3 & 2 & Q & K \\
+% HA & 5 & 4 & J \\
+% C3 & 5 & K & A \\
+% \end{play}
+% \end{minipage}
+% }
+% \otherfont{\sffamily\bfseries\footnotesize}
+%
+% \section{Final Remarks}
+%
+% \subsection{Known Bugs}
+%
+% \begin{itemize}
+% \item Some dictionaries have questionable translations.
+% \item The boxes in |\northhand| and |\southhand| lead to problems with
+% shifting the \west hand. See file Legends in the example bundle.
+% \end{itemize}
+% \newpage
+%
+% \subsection{ToDo}
+%
+% \begin{itemize}[itemsep=-2mm]
+% \item Check if |\def\xspace{}| is also needed in bidding...?
+% \item Make a template for showing 16 hands on 1 DIN A4 (3x5+1 or 4x4
+% landscape) e.g as handout for the hands on slides.
+% \item Read source files in PBN format. Example:
+% \url{http://new.bridgekosice.sk/bridzove-diagramy-vykrelene-pomocou-tex/}
+% \end{itemize}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \subsection{Acknowledgements}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+% This package is based on (ideas from) the style files:
+% \begin{itemize}[itemsep=-2mm]
+% \item |bridge-i v1.0 (1995/04/16)| by René Steiner and Thomas Hof.
+% \item |kibitzer v1.0 (1995/04/16)| by René Steiner and Thomas Hof.
+% \item |bridge v0.1 (2012/03/18)| by Antony Lee.
+% \item |grbbridge v2.2 (2013/12/24)| by Gordon Bower.
+% \end{itemize}
+% 
+% The style file |bridge-i| is based on the style file |bridge| v1.7c
+% (1994/12/20) by J.L. Braams, which on itself was based on an article
+% by Kees van der Laan in TUGboat (Vol 11 (1990), No 2: p265ff.
+% \par
+% Last but not least I want to thank all those wonderful people down
+% there in the Internet who spent their time in answering silly questions
+% and solving difficult problems. If I had imagined the difficulties I
+% would encounter, then I would not have started this work. And without the
+% help %of all these, to me unknown, people, this package would not exist.
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+% \subsection{Prelimaries}
+%
+% \subsubsection{Packages we depend upon}
+%
+% \label{RequirePackage}
+% \begin{macrocode}
+\RequirePackage{%
+ xcolor,% colorizing symbols \Sp etc.
+ textcomp,% for the numbersign in environment play.
+ moresize,% add \HUGE and \ssmall to font-sizes
+ relsize,% relative font-sizes. (e.g. \smaller)
+ makecmds,% needed for provideenvironment
+ expl3,% needed for LaTeX3 packages (xparse)
+ xparse,% optional params and starred commands
+ xspace,% handling of spacing behind a command
+ calc,% makes calculations and lengths easier
+ ifthen,% easy booleans, tests and loops
+ adjustbox,% stacked boxes in L-/R-Lower captions
+ translations,% auto-translate terms (e.g. East->Ost)
+ array,% actions for tabular column cells
+ collcell,% macro calls for tabular column cells
+ pgfopts,% for keyval opts, loads also pgfkeys
+ environ,% for handling bidding environments
+ xstring,% for easy string processing.
+ tracklang,% for iterating over loaded languages
+ pict2e,% for drawing the compass
+}
+% \end{macrocode}
+%\noindent
+% Add exceptions for xspace
+% \begin{macrocode}
+\xspaceaddexceptions{%
+ = \markit \, \suit \GetTranslation
+ 2 3 4 5 6 7 8 9 T J Q K A
+}
+% \end{macrocode}
+% Load the fallback dictionary. This is the default one and equals the
+% English dictionary. All other dictionaries are loaded on the fly, when
+% needed, provided they are in the \TeX-path.
+%
+% \begin{macrocode}
+\LoadDictionaryFor{fallback}{ODw}
+% \end{macrocode}
+%
+% \subsubsection{Options}
+%
+% We use the \packname{pgf} \meta{key}=\meta{val} system for our
+% options: |colors|, |warn| and |err|.
+% \begin{macrocode}
+\pgfkeys{/ODw/.is family}
+\def\ODw@set#1{\pgfkeys{/ODw,#1}}
+\ODw@set{colors/.is choice,}
+\ODw@set{warn/.is choice,}
+\ODw@set{err/.is choice,}
+% \end{macrocode}
+% The details for option |colors| are on page \pageref{Colors}ff and those for
+% option |warn| and |err| on page \pageref{Messages}.
+%
+% \subsubsection{Misc}
+%
+% \begin{macro}{\,}\MacroDef{,}
+% \begin{macro}{\thinspace}\MacroDef{thinspace}
+% We redefine |\thinspace| (originally $\frac{1}{6}$em) to a smaller amount.
+% That makes denominations like |3\Sp| (3\Sp) look better. The code is
+% from:\\
+% \url{https://tex.stackexchange.com/questions/181003/multiply-fine-tuning-with-a-thinspace}\\
+% This code however doesn't work when coded within an own package, unless we
+% use |\AtBeginDocument|.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \renewcommand{\,}[1][1]{%
+ \ifmmode\mskip#1\thinmuskip%
+ \else\thinspace[#1]\fi%
+ }%
+ \renewcommand{\thinspace}[1][1]{%
+ \kern#1\dimexpr0.16667em\relax%
+ }%
+}% AtBeginDocument
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ODw@gsetlength}\MacroDef{ODw@gsetlength}[\marg{\bs len-name}\marg{len-value}]
+% \noindent
+%
+% We need to store the length of certain objects that are within a
+% group (the group is needed to keep the font-size changes local).
+% Therefore we define macro |\ODw@gsetlength|
+% that works globally. The code is based upon a solution on LaTeX
+% StackExchange:\\
+% (\url{https://tex.stackexchange.com/questions/406015/defining-macro-gsetlength-as-global-setlength-reliable})
+% \begin{macrocode}
+\gdef\ODw@gsetlength#1#2{%
+ \begingroup
+ \setlength\skip@{#2}% local assign to scratch reg.
+ \global#1=\skip@% global assignment to #1;
+ \endgroup% restore \skip@ by endgroup.
+}% ODw@gsetlength
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@append}\MacroDef{ODw@append}[\marg{tokens}]
+% In the environment |play| we need to calculate the winning tricks for
+% \NorthSouth*! and \EastWest*!\footnote{For details see page \pageref{Play}}.
+% We store this information as a string in |\ODw@Scratch| and use
+% |\ODw@append| to accumulate them.
+% \begin{macrocode}
+\gdef\ODw@append#1{%
+ \bgroup%
+ \edef\tmp{\the\ODw@Scratch #1}%
+ \global\ODw@Scratch=\expandafter{\tmp}%
+ \egroup%
+}% ODw@append
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Variables}
+%
+% In this package we do use font relative sizing. That means that widths
+% and skips are defined in terms of |em|, |ex| and |baselineskip|. On the
+% other hand there are e.g.\ the real world names of the bidders, that must
+% be recorded. Some of these the user should be able to control. Rather
+% than forcing the user to do that directly with |\def| or |\renewcommand|
+% we store all this information in internal variables, by defining a
+% constant command. These variables can be set by calling a user command,
+% that is associated with the variable. E.g.\ the variable |\ODw@Skipwidth|
+% gets set by the command |\handskip|. The variables we use are:
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\ODw@BidderFont}
+% Controlled by |\bidderfont|: the font used for the players (|bidding|).
+% \par\noindent
+% \DescribeMacro{\ODw@CompassFont}
+% Controlled by |\compassfont|: the font used for the compass.
+% \par\noindent
+% \DescribeMacro{\ODw@GameFont}
+% Controlled by |\gamefont|: the font used for all card diagrams
+% \par\noindent
+% \DescribeMacro{\ODw@LegendFont}
+% Controlled by |\legendfont|: the font used for the annotations.
+% \par\noindent
+% \DescribeMacro{\ODw@NameFont}
+% Controlled by |\namefont|: the font used for the real world names.
+% \par\noindent
+% \DescribeMacro{\ODw@OtherFont}
+% Controlled by |\otherfont|: the font used for other bridge
+% expressions, also outside diagrams.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\ODw@BidderDefault}
+% \DescribeMacro{\ODw@CompassDefault}
+% \DescribeMacro{\ODw@GameDefault}
+% \DescribeMacro{\ODw@LegendDefault}
+% \DescribeMacro{\ODw@NameDefault}
+% \DescribeMacro{\ODw@OtherDefault}
+% These contain the default values for the fonts
+% \par\vspace{5.5\baselineskip}\noindent
+% \DescribeMacro{\ODw@North@Name}
+% \DescribeMacro{\ODw@South@Name}
+% Controlled by |\namesNS|: hold the real world names of the \north
+% and the \south player.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{\ODw@East@Name}
+% \DescribeMacro{\ODw@West@Name}
+% Controlled by |\namesEW|: hold the real world names of the \east
+% and the \west player. These names are typeset using the font specified with
+% |\namefont|.
+% \par\vspace{0.5\baselineskip}\noindent
+% \DescribeMacro{ODw@BoardText}
+% Controlled by |\boardtext|: holds the board number and extra text.\\
+% \DescribeMacro{ODw@HeaderText}
+% Controlled by |\headlinetext|: holds header information for card
+% diagrams.\\
+% \DescribeMacro{ODw@FooterText}
+% Controlled by |\footlinetext|: holds footer information for card
+% diagrams.\\
+% \DescribeMacro{ODw@Last}
+% Used in command |\ODw@Tricks|: to store the player that had the
+% lead\footnote{see page \pageref{Last}}.\\
+% \DescribeMacro{\ODw@Skipwidth}
+% Controlled by |\handskip|: holds the distance between hand and bidding
+% diagram.
+% \begin{macrocode}
+\def\ODw@CompSize{1}% factor to enlarge the compass
+\def\ODw@CompLine{}% thickness of compass frame
+\def\ODw@Skipwidth{1em}%
+% \end{macrocode}
+%
+% \subsubsection{Booleans, Saveboxes, Lengths, Counters and Registers}
+%
+% \paragraph{Booleans}
+%
+% \DescribeMacro{\ifODw@description}
+% |\ifODw@description| is used in the |bidding| environments and the
+% command |\expertquiz| to test if there is an annotation that should
+% be written.
+% \par\noindent
+% \DescribeMacro{\ifODw@short}
+% |\ifODw@short| is used in the |bidding| environments and the command
+% |\expertquiz| to denote if a short form of the diagram header is to be
+% used.
+% \par\noindent
+% \DescribeMacro{\ifODw@monochrome}
+% |\ifODw@monochrome| flags the case
+% that the user specified |colors=0| or |colors=1|, i.e.\ just black and
+% white. In this situation we will not print the vulnerable side in red,
+% but use italics instead.
+% \par\noindent
+% \DescribeMacro{\ifOdW@CardSkip}
+% |\ifOdW@CardSkip| determines whether we need some extra space between
+% card ranks (i.e.\ in suit descriptions) or not (i.e.\ in |bidding|
+% or |play| diagrams).
+% \par\noindent
+% \DescribeMacro{\ifOdW@Bidders}
+% |\ifODw@Bidders| suppresses the bidders in the bidding header.
+% \par\noindent
+% \DescribeMacro{\ifOdW@BidLine}
+% |\ifODw@BidLine| draw a |\hline| below the bidding header.
+% \par\noindent
+% \DescribeMacro{\ifOdW@LongCalls}
+% |\ifODw@LongCalls| determines whether to use the short (like \North*!) or
+% the long form (like \North*) for calls in the |bidding| diagram.
+% \par\noindent
+% \DescribeMacro{\ifOdW@CompShow}
+% With |\ifODw@CompShow| one can suppress drawing a compass within card
+% diagramns completely.
+% \par\noindent
+% \DescribeMacro{\ifOdW@CompTurn}
+% With |\ifODw@CompTurn| one rotates letters |E| and |W| in the
+% compass 90°.
+% \begin{macrocode}
+\newif\ifODw@description% must typeset an annotation
+\newif\ifODw@short% short form in bidding header
+\newif\ifODw@monochrome% no colors wanted
+\newif\ifOdW@CardSkip% skip between ranks needed
+% \end{macrocode}
+% The next booleans are directly controlled by |\setdefaults|.
+% \begin{macrocode}
+\newif\ifODw@Bidders% suppress bidders in bidding header
+\newif\ifODw@BidLine% draw \hline below bidding header
+\newif\ifODw@LongCalls% switch between long/short calls
+\newif\ifODw@CompShow% show compass or not
+\newif\ifODw@CompTurn% turn E-W letters 90°
+% \end{macrocode}
+% \begin{macro}{\ODw@EmptyHeader}
+% \begin{macro}{\ODw@EmptyFooter}
+% Since there seems to be a problem in using\label{Empty}
+% |\ifthenelse|\footnote{\textbf{ifthenelse} bites \textbf{multicolumn}!}
+% in particular places, these booleans are set by calling |ODw@TestIfEmpty|
+% (which uses an ordinary |\ifthenelse|) \emph{outside} the dangerous
+% places, and then use e.g.\ |\ifODw@EmptyHeader| as a test whether the
+% header is empty or not.
+% \begin{macrocode}
+\newboolean{ODw@EmptyHeader}% = 'header is empty'
+\newboolean{ODw@EmptyFooter}% = 'footer is empty'
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \paragraph{Saveboxes}
+% \DescribeMacro{\ODw@Diagram@Box}
+% |\ODw@Diagram@Box| is to store the actual card diagram (the compass
+% with the hands) in order to calculate its width.
+% \par\noindent
+% \DescribeMacro{\ODw@BidBox}
+% |\ODw@BidBox| stores a |bidding| diagram.
+% \par\noindent
+% \DescribeMacro{\ODw@Hand@Box}
+% |\ODw@Hand@Box| stores a hand with the 4 suits.
+% \par\noindent
+% \begin{macrocode}
+\newsavebox\ODw@Diagram@Box
+\newsavebox\ODw@Hand@Box
+\newsavebox\ODw@BidBox
+% \end{macrocode}
+% \paragraph{Lengths}
+% \DescribeMacro{\ODw@Bid@Width}
+% Is used to store the actual width of the |bidding| diagram.
+% \par\noindent
+% \DescribeMacro{\ODw@Card@Skip} Defines space between
+% adjacent cards in suits.
+% \par\noindent
+% \DescribeMacro{\ODw@Diagram@Width} Defines the width of compass plus
+% (\EastWest*!) hands.
+% \par\noindent
+% \DescribeMacro{\ODw@Skip@Width} Defines the distance between the card
+% diagram and the |bidding| diagram.
+% \par\noindent
+% \DescribeMacro{\ODw@Tmp@Len}
+% \par\noindent
+% \DescribeMacro{\ODw@Tmp@Width} Auxiliary lengths, used in several
+% calculations.
+% \par\noindent
+% \begin{macrocode}
+\newlength\ODw@Compasssize% the size of the compass.
+\newlength\ODw@Diagram@Width
+\newlength\ODw@Card@Skip
+\setlength\ODw@Card@Skip{.15em}% space between cards
+\newlength\ODw@Bid@Width
+\newlength\ODw@Skip@Width
+ \setlength\ODw@Skip@Width{\ODw@Skipwidth}
+\newlength\ODw@Tmp@Len% temp var for computations
+\newlength\ODw@Tmp@Width% temp var for computations
+% \end{macrocode}
+% \paragraph{Counters}
+% \DescribeMacro{ODw@Nr} Counts lines (in |play| diagrams) and explanations
+% (in |bidding| diagrams).
+% \begin{macrocode}
+\newcounter{ODw@Nr}
+% \end{macrocode}
+% \par\noindent
+% \DescribeMacro{ODw@Cnt} Auxiliary counter, used in several calculations.
+% \begin{macrocode}
+\newcounter{ODw@Cnt}
+% \end{macrocode}
+% \par\noindent
+% \DescribeMacro{ODw@PlayerNr} Set to the player that won the trick in
+% environment |play|.
+% \begin{macrocode}
+\newcounter{ODw@PlayerNr}
+% \end{macrocode}
+% \par\noindent
+% \DescribeMacro{ODw@NSCnt} Holds the number of N-S tricks in environment
+% |play|.
+% \begin{macrocode}
+\newcounter{ODw@NSCnt}
+% \end{macrocode}
+% \par\noindent
+% \DescribeMacro{ODw@EWCnt} Holds the number of E-W tricks in environment
+% |play|.
+% \begin{macrocode}
+\newcounter{ODw@EWCnt}
+% \end{macrocode}
+% \paragraph{Registers}
+% \DescribeMacro{ODw@Scratch} Tempory store for winning tricks in
+% environment |play|.
+% \begin{macrocode}
+\newtoks{\ODw@Scratch}
+% \end{macrocode}
+%
+% \subsubsection{Fonts}
+%
+% \paragraph{Text Fonts}
+%
+% Here we merely define the commands to set the default fonts. At the end
+% of this .sty file they are set to their value. Refer to
+% section~\ref{Init} for details.
+% \begin{macro}{\bidderfont}
+% \begin{macro}{\ODw@BidderFont}
+% The font used to indicate the symbolic player (N, E, S, W) in bidding
+% diagrams. The default is |\mdseries\sffamily|.
+% \begin{macrocode}
+\newcommand\bidderfont[1]{\gdef\ODw@BidderFont{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\compassfont}
+% \begin{macro}{\ODw@CompassFont}
+% The font used to indicate the directions (N, E, S, W) in the compass. The
+% default is |\mdseries\sffamily|.
+% \begin{macrocode}
+\newcommand\compassfont[1]{\gdef\ODw@CompassFont{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\namefont}
+% \begin{macro}{\ODw@NameFont}
+% The font used for the real world names of the players in bidding
+% diagrams. The default id |\mdseries\slshape|.
+% \begin{macrocode}
+\newcommand\namefont[1]{\gdef\ODw@NameFont{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\legendfont}
+% \begin{macro}{\ODw@LegendFont}
+% The font used for the conditions in card diagrams. The default is
+% |\mdseries\rmfamily|.
+% \begin{macrocode}
+\newcommand\legendfont[1]{\gdef\ODw@LegendFont{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\otherfont}
+% \begin{macro}{\ODw@OtherFont}
+% The font used for the other bridge expressions like |\north|, |\pass| or
+% |\double|. The default is |\bfseries\sffamily|.
+% \begin{macrocode}
+\newcommand\otherfont[1]{\gdef\ODw@OtherFont{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\gamefont}
+% The font for the hands and calls. It sets the general font-size/widths for
+% the game. The default is |\bfseries\sffamily|.
+% \par\noindent
+% \begin{macro}{\ODw@GameFont}
+% We use widths that are dynamically adjusted at font changes and store the
+% 'value' as text in |\ODw@GameFont|.
+% \par\noindent
+% \begin{macro}{\ODw@GameSize}
+% |\ODw@GameSize| recalculates these
+% sizes and is called in all show- and bid-diagrams.
+% \begin{macrocode}
+\newcommand\gamefont[1]{%
+ \gdef\ODw@GameFont{#1}%
+ \gdef\ODw@GameSize{% recalculate dimens for the new font
+ \ODw@GameFont%
+ \setlength\ODw@Skip@Width{\ODw@Skipwidth}%
+ }%
+}% gamefont
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \paragraph{Symbol Font}
+% We need special symbols to get solid colored \He{} and \Di, rather than
+% \textcolor{red}{\ensuremath{\heartsuit}}{} and
+% \textcolor{red}{\ensuremath{\diamondsuit}}. We use those from |stix|.
+% As the shape of the 'normal' black suits differ from the red ones we also
+% take the black suits from the font |stix|. First we define the symbols
+% and font. As we do not want to load the complete package, we only use
+% the relevant piece of code found in |txfont.sty|:
+% \begin{macrocode}
+\fontencoding{T1}\fontfamily{stix}
+\fontseries{m}\fontshape{n}\selectfont
+%
+% Code stolen from txfonts.sty.
+% It works smoothly: thank you guys!
+%
+\DeclareSymbolFont{symbols}{OMS}{txsy}{m}{n}
+\SetSymbolFont{symbols}{bold}{OMS}{txsy}{bx}{n}
+\DeclareFontSubstitution{OMS}{txsy}{m}{n}
+\DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n}
+\SetSymbolFont{symbolsC}{bold}{U}{txsyc}{bx}{n}
+\DeclareFontSubstitution{U}{txsyc}{m}{n}
+% \end{macrocode}
+% \begin{macro}{\ODw@spadesuit}
+% \begin{macrocode}
+\DeclareMathSymbol{\ODw@spadesuit}{\mathord}{symbols}{127}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ODw@varheart}
+% \begin{macrocode}
+\DeclareMathSymbol{\ODw@varheart}{\mathord}{symbolsC}{114}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ODw@vardiamond}
+% \begin{macrocode}
+\DeclareMathSymbol{\ODw@vardiamond}{\mathord}{symbolsC}{113}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ODw@clubsuit}
+% \begin{macrocode}
+\DeclareMathSymbol{\ODw@clubsuit}{\mathord}{symbols}{124}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Bridge Basic Terms}
+%
+% \subsubsection{Suit Symbols}
+%
+% First we supply shorthands for the `five' suits (\Cl, \Di, \He, \Sp and
+% \NT) that are used in the game of bridge.
+% We define the international version with the English shortcuts. We use
+% the |xcolor| package to colorize the suit symbols. The color can be set
+% as an \meta{key}=\meta{val} option when loading the package. The option
+% |colors=0| means mono-color (black only), synonyms of key 0 are |mono|
+% and |black|. |colors=1| means black and white, a synonym is |b+w|.
+% |colors=2| means bi-color (black and red), with synonym |b+r|.
+% |colors=4A| gives qua-color (green, orange, red and blue); synonyms are
+% |fourA| and |4a|. Finally |colors=4B| defines the second qua-color (black,
+% orange, red and green) with synonyms |fourB| and |4b|.
+%
+% We precede all the suit symbols with a `very-thin-space' (|\,[0.3]|)
+% which is 0.3 the size of a normal |\thinspace|.\label{Colors}
+%
+% In order to test which suit (|\Cl|,\ldots) was encountered in
+% |\ODw@translate|\footnote{see page \pageref{Translate}} we \emph{must}
+% define the suits with a |renewrobustcommand|. So we must |\def| them
+% first.
+%
+% \changes{v0.6a}{2018/03/15}{In order to test which suit (\cmd{\Cl},\ldots)
+% was encountered in \cmd{\ODw@translate} (see page \pageref{Translate}) we
+% \emph{must} define the suits as a \emph{renewrobustcommand}. So we
+% \cmd{\def}ine them first! The idea was given on LaTeX StackExchange by
+% egreg, see
+% \url{https://tex.stackexchange.com/questions/420257/test-which-macro-is-called-in-tabular/420258#420258}
+% }
+%
+% \begin{macrocode}
+% \def them first and then use renewrobustcmd!
+\def\Cl{}\def\Di{}\def\He{}\def\Sp{}%
+\ODw@set{%
+ colors/0/.code={%
+ \ODw@monochrometrue%
+ \renewrobustcmd\Cl{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}%
+ \renewrobustcmd\He{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@varheart}}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/mono/.code={\pgfkeys{/ODw/colors=0}}}
+\ODw@set{colors/black/.code={\pgfkeys{/ODw/colors=0}}}
+%
+\ODw@set{%
+ colors/1/.code={%
+ \ODw@monochrometrue%
+ \renewrobustcmd\Cl{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\,[0.3]\ensuremath{\diamondsuit}\xspace}%
+ \renewrobustcmd\He{\,[0.3]\ensuremath{\heartsuit}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/b+w/.code={\pgfkeys{/ODw/colors=1}}}
+%
+\ODw@set{%
+ colors/2/.code={%
+ \renewrobustcmd\Cl{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\textcolor{red}%
+ {\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}%
+ \renewrobustcmd\He{\textcolor{red}%
+ {\,[0.3]\ensuremath{\ODw@varheart}}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/b+r/.code={\pgfkeys{/ODw/colors=2}}}
+%
+\ODw@set{%
+ colors/4A/.code={%
+ \renewrobustcmd\Cl{\textcolor{green}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\textcolor{orange}%
+ {\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}%
+ \renewrobustcmd\He{\textcolor{red}%
+ {\,[0.3]\ensuremath{\ODw@varheart}}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{blue}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/fourA/.code={\pgfkeys{/ODw/colors=4A}}}
+\ODw@set{colors/4a/.code={\pgfkeys{/ODw/colors=4A}}}
+%
+\ODw@set{%
+ colors/4B/.code={%
+ \renewrobustcmd\Cl{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\textcolor{orange}%
+ {\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}%
+ \renewrobustcmd\He{\textcolor{red}%
+ {\,[0.3]\ensuremath{\ODw@varheart}}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{green}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/fourB/.code={\pgfkeys{/ODw/colors=4B}}}
+\ODw@set{colors/4b/.code={\pgfkeys{/ODw/colors=4B}}}
+% \end{macrocode}
+%
+% Set default coloring to black and red
+% \begin{macrocode}
+\ODw@set{colors=2}
+% \end{macrocode}
+%
+% \begin{macro}{\nt}
+% \begin{macro}{\NT}
+% Because some languages use a different symbol for \NT{} (\nt*) we must
+% look it up in the dictionary to find e.g.\ \Translate{\NT}
+% (\Translate{\nt*}) for German.
+% \begin{macrocode}
+\NewDocumentCommand\nt{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF#2
+ {\,[0.3]\GetTranslation{NT-(ODw)}}%
+ {\GetTranslation{No Trump-(ODw)}}%
+ }{%
+ \IfBooleanTF#2
+ {\,[0.3]\GetTranslation{nt-(ODw)}}%
+ {\GetTranslation{no trump-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% nt
+% \end{macrocode}
+% Define a practical shorthand to produce \NT{} without the need to add a
+% token.
+% \begin{macrocode}
+\def\NT{\nt*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \par\vspace{0.3\baselineskip}\noindent
+% \begin{macro}{\ODw@SetRank}\MacroDef{ODw@SetRank}[\marg{card rank}]
+% |\ODw@SetRank| stores the rank of the card played in |\ODw@Rank|. This is
+% essentially the intrinsic rank of the card (\emph{2} for a 2, \emph{14}
+% for an Ace), but there are special cases:
+% \begin{itemize}[itemsep=-2mm,topsep=-1em]
+% \item Spot cards (denoted with \emph{x}) always get rank 0
+% \item Discards always get rank 0
+% \item Trump cards get 15 (\emph{15} to ensure that a spot trump card
+% defeats an Ace) added to the intrinsic rank, to make sure
+% that:
+% \begin{itemize}[itemsep=-1mm,topsep=-0.3em]
+% \item A trump card will defeat all other cards
+% \item The highest trump card will win the trick
+% \end{itemize}
+% \end{itemize}
+% \par\vspace{0.5\baselineskip}
+% We first define three variables, one to store the suit of the actual card,
+% the second one to store which suit was led and the last variable
+% to store which suit is the trump suit, all initialized with the '\NT-suit'.
+% \begin{macrocode}
+\gdef\ODw@SuitPlayed{N}
+\gdef\ODw@SuitLead{N}
+\gdef\ODw@TrumpSuit{N}
+\newcounter{ODw@Rank}
+% \end{macrocode}
+% \begin{macrocode}
+\def\ODw@SetRank#1{%
+ \ifthenelse{\equal{\ODw@SuitPlayed}{\ODw@SuitLead}}%
+ % if a suit is followed, store the intrinsic rank
+ {\setcounter{ODw@Rank}{#1}}%
+ {% else, if a suit is not followed then ...
+ % (at NoTrump, the trumpsuit is coded 'N' and will
+ % never match a real suit (coded C, D, H and S))
+ % thus avoiding that trump cards are detected
+ \ifthenelse{\equal{\ODw@SuitPlayed}{\ODw@TrumpSuit}}%
+ % if it is a trump card, increase the rank
+ {\setcounter{ODw@Rank}{#1}%
+ \addtocounter{ODw@Rank}{15}}%
+ % if it is a discard, set the rank to 0 to make
+ % sure it will never win
+ {\setcounter{ODw@Rank}{0}}%
+ }% ifthen
+ % If the card was of another suit,
+ % then ODw@SuitPlayed was changed.
+ % If we encounter 'unsuited' cards,
+ % then we must reestablish the
+ % original ODw@SuitPlayed.
+ \global\edef\ODw@SuitPlayed{\ODw@SuitLead}% org. suit
+}% ODw@SetRank
+% \end{macrocode}
+% \end{macro}
+% \par\vspace{0.3\baselineskip}\noindent
+% \begin{macro}{\ODw@Xfer}\MacroDef{ODw@Xfer}[\marg{tokens}]
+% This macro gets called by |ODw@Tfer| which is automatically called in the
+% environments |play|, |bidding| and |biddingpair| by means of
+% |columntype P| and |columntype B| to convert at one hand the shorthand
+% suit code in suit symbols and at the other hand to translate card honors
+% into the active language. It also converts the card value |T| into
+% \Xfer{T} and a hyphen into an en-dash. It calls |\ODw@translate| to do
+% the work.
+%
+% The following code was contributed on StackExchange by egreg, see
+% \url{https://tex.stackexchange.com/questions/417731/problem-with-xstring-ifeqcase-case-falls-thru/417788?noredirect=1#comment1045001_417788}
+% \begin{macrocode}
+\ExplSyntaxOn
+ % NB: now all spaces are ignored, use '~' if needed.
+\NewDocumentCommand{\ODw@Xfer}{m}{
+ \bgroup
+ % we do not want spaces here
+ \def\xspace{}
+ \tl_map_function:nN {#1} \ODw@translate:n
+ \egroup
+}% ODw@Xfer
+% \end{macrocode}
+% \end{macro}
+% \par\vspace{0.3\baselineskip}\noindent
+% \begin{macro}{\ODw@translate}\MacroDef{ODw@translate}[\marg{tokens}]
+% |\ODw@translate| processes a (relatively short) string of tokens that
+% determine an entry in |bidding| or |play| diagrams, and also
+% in all situations where suits are defined. It gets called by |\ODw@Xfer|.
+%
+% It expects bridge stuff describing strings like |AKT54| to produce the
+% suit \suit{AKT52}, |2H\alert| to produce the call
+% \Xfer{2H\alert} in the |bidding| diagram, or |DA| to produce \Xfer{DA} as
+% entry in the |play| diagram to show that the ace of diamonds was played.
+% Please note that constructs like |\textit{DA}| or |\frame{2H}| are not
+% allowed and will produce rather misleading errors like:\\
+% \example{|! Argument of \bs ODw@translate:n has an extra \}.|} or \\
+% \example{|! Missing number,treated as zero.|}\\[0.2\baselineskip]
+% Even clever people who use |{\frame{2H}}| will get disoppointed, because
+% they'll get \frame{2H} rather than the wanted \frame{2\He}. But the very
+% clever people can reach their goal by using |{\frame{2\He}}| or
+% |{\textit{\Di A}}|.
+% \par\vspace{0.5\baselineskip}
+% \begin{macrocode}
+\cs_new_protected:Nn \ODw@translate:n
+ {
+ \setcounter{ODw@Rank}{0}
+ \str_case:nnTF {#1}
+ { % Store the suit of the card played
+ % needed to determine the winner
+ % and for checking for multiple cards
+ {C}{\Cl\gdef\ODw@SuitPlayed{C}}
+ {D}{\Di\gdef\ODw@SuitPlayed{D}}
+ {H}{\He\gdef\ODw@SuitPlayed{H}}
+ {S}{\Sp\gdef\ODw@SuitPlayed{S}}
+ {N}{\NT\gdef\ODw@SuitPlayed{N}}
+ % Translate a hyphen into an en-dash
+ {-}{--}
+ %
+ % 1: translate the honour cards,
+ % 2: store the played cards for checking
+ % 3: and set their rank. This must be done last, because
+ % \ODw@SetRank resets \ODw@SuitPlayed to \ODw@SuitLead
+ % Honour Cards
+ % 1 2
+ {A}{\Ace*!\ODw@AppendCard{\ODw@SuitPlayed}{A}
+ \ODw@SetRank{14}}% 3
+ {K}{\King*!\ODw@AppendCard{\ODw@SuitPlayed}{K}
+ \ODw@SetRank{13}}
+ {Q}{\Queen*!\ODw@AppendCard{\ODw@SuitPlayed}{Q}
+ \ODw@SetRank{12}}
+ {J}{\Jack*!\ODw@AppendCard{\ODw@SuitPlayed}{J}
+ \ODw@SetRank{11}}
+ {T}{\kern-0.1em1\kern-0.1em0% massage 1 and 0 a bit
+ \ODw@AppendCard{\ODw@SuitPlayed}{T}\ODw@SetRank{10}}
+ % Numeral Cards
+ {9}{9\ODw@AppendCard{\ODw@SuitPlayed}{9}\ODw@SetRank{9}}
+ {8}{8\ODw@AppendCard{\ODw@SuitPlayed}{8}\ODw@SetRank{8}}
+ {7}{7\ODw@AppendCard{\ODw@SuitPlayed}{7}\ODw@SetRank{7}}
+ {6}{6\ODw@AppendCard{\ODw@SuitPlayed}{6}\ODw@SetRank{6}}
+ {5}{5\ODw@AppendCard{\ODw@SuitPlayed}{5}\ODw@SetRank{5}}
+ {4}{4\ODw@AppendCard{\ODw@SuitPlayed}{4}\ODw@SetRank{4}}
+ {3}{3\ODw@AppendCard{\ODw@SuitPlayed}{3}\ODw@SetRank{3}}
+ {2}{2\ODw@AppendCard{\ODw@SuitPlayed}{2}\ODw@SetRank{2}}
+ % A spot card has rank 0
+ {x}{x\ODw@SetRank{0}}
+ %
+ % Non cards (bidding only)
+ {1}{1}% this enables e.g. 1\He in biddings
+ {p}{\ifODw@LongCalls\Pass*\else\Pass!\fi}
+ {P}{\ifODw@LongCalls\Allpass*\else\Allpass*!\fi}
+ {X}{\ifODw@LongCalls\Double*\else\Double!\fi}
+ {R}{\ifODw@LongCalls\Redouble*\else\Redouble!\fi}
+ }% case
+ {% if matched (case T(rue))
+ \ifOdW@CardSkip\hspace{\ODw@Card@Skip}\fi
+ % suit of 1st card (ODw@SuitLead) is ODw@SuitPlayed
+ \if\theODw@PlayerNr1
+ \global\edef\ODw@SuitLead{\ODw@SuitPlayed}
+ \fi
+ }
+% \end{macrocode}
+% We offer the possibility that one can use also |\He| in |bidding| and
+% |play| diagrams rather than just the abbreviation |H|. Therefore we must
+% test which suit was given and set |\ODw@SuitPlayed| accordingly. To make
+% this test work, we had to redefine the suit macros with an
+% |\renewrobustcmd|.\label{Translate} Here we also issue |\expandafter{#1}|
+% rather than just |#1|. Otherwise, among others, the coloring of the suit
+% symbol would extend behind it. Curiously enough the phenomena does not
+% occur anymore. I leave the expandafter in, until this is cleared.
+% \begin{macrocode}
+ {% if not matched (case F(alse))
+ \ifx#1\Cl\gdef\ODw@SuitPlayed{C}\fi
+ \ifx#1\Di\gdef\ODw@SuitPlayed{D}\fi
+ \ifx#1\He\gdef\ODw@SuitPlayed{H}\fi
+ \ifx#1\Sp\gdef\ODw@SuitPlayed{S}\fi
+ \expandafter{#1}% enables e.g. 1\He
+ % suit of 1st card (ODw@SuitLead) is ODw@SuitPlayed
+ \if\theODw@PlayerNr1
+ \global\edef\ODw@SuitLead{\ODw@SuitPlayed}
+ \fi
+ }
+}% ODw@translate
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{macro}
+% \par\vspace{0.3\baselineskip}\noindent
+% \begin{macro}{\ODw@AppendCard}\MacroDef{ODw@AppendCard}[\marg{suit}\marg{card}]
+% In order to do a simple consistency check in |play| diagrams, we
+% need to store the cards that were played. We do that for each suit in the
+% variable |\ODw@<suit>|. This macro is called in |\ODw@translate|, i.e.\
+% for all situations where cards are to be manipulated. But the result of
+% |\ODw@AppendCard| is used only within |play| diagrams. The macro
+% |\ODw@appendcard| appends 1 character to a string.
+%
+% \begin{macrocode}
+%
+\newcommand{\ODw@appendcard}[2]{\xdef#1{#1#2}}
+
+\newcommand\ODw@AppendCard[2]{%
+ \IfEqCase{#1}{%
+ {C}{\ODw@appendcard{\ODw@Clubs}{#2}}%
+ {D}{\ODw@appendcard{\ODw@Diamonds}{#2}}%
+ {H}{\ODw@appendcard{\ODw@Hearts}{#2}}%
+ {S}{\ODw@appendcard{\ODw@Spades}{#2}}%
+ }%
+}% ODw@AppendCard
+% \end{macrocode}
+% \end{macro}
+% \par\vspace{0.3\baselineskip}\noindent
+% \begin{macro}{\ODw@PTfer}\MacroDef{ODw@PTfer}[\marg{tokens}]
+% This macro is called within |play| diagrams where we can write |HA| and
+% get \Xfer{HA}. Also all relevant symbols get translated into the active
+% language. We use the counter |ODw@PlayerNr| to determine the column in
+% the |play| diagrams with the winning card, and from this we can compute
+% which player won the trick.
+% |\ODw@PTfer| is essentially called for each entry in all columns of the
+% |play| diagram through the column definition:\\
+% |\newcolumntype{P}{>{\collectcell\ODw@PTfer}c<{\endcollectcell}}|
+%
+% We first define two counters, both initially set to zero.
+% \begin{macrocode}
+\newcounter{ODw@Highest}% the highest rank until now
+\setcounter{ODw@Highest}{0}
+\newcounter{ODw@WinningNr}% player with the highest rank
+\setcounter{ODw@WinningNr}{0}
+
+\def\ODw@PTfer#1{%
+ \stepcounter{ODw@PlayerNr}%
+ \ODw@Xfer{#1}% ODw@Rank = the rank for this card
+ \ifthenelse{\value{ODw@Rank} > \value{ODw@Highest}}%
+ {% This rank is higher than previous highest one
+ \setcounter{ODw@WinningNr}{\theODw@PlayerNr}%
+ \setcounter{ODw@Highest}{\theODw@Rank}%
+ }%
+ {}%
+ \ifthenelse{\value{ODw@PlayerNr} = 4}%
+ {% last player: Process the winning trick:
+ \stepcounter{ODw@Nr}% Start new row with new player
+ \ODw@AccTricks% Accumulate tricks for N-S/E-W
+ }%
+ {}%
+}
+% \end{macrocode}
+% \end{macro}
+% \par\vspace{0.3\baselineskip}\noindent
+% \begin{macro}{\ODw@FTfer}\MacroDef{ODw@FTfer}[\marg{tokens}]
+% |\ODw@FTfer| is called for the first column of the |play| diagram
+% TableII. In |\ODw@Tricks| it just resets |ODw@PlayerNr| and |\ODw@Last|
+% and writes the player who leads. Finally it processes the entry of the
+% first column by calling |\ODw@PTfer|.
+% |\ODw@FTfer| is essentially called for the entries in the first column of
+% TableII in the |play| diagram through the column definition:\\
+% |\newcolumntype{F}{>{\collectcell\ODw@FTfer}c<{\endcollectcell}}|
+% \begin{macrocode}
+\def\ODw@FTfer#1{%
+ \ODw@Tricks%
+ \ODw@PTfer{#1}%
+}% ODw@FTfer
+% \end{macrocode}
+% \end{macro}
+% \par\vspace{0.3\baselineskip}\noindent
+% \begin{macro}{\ODw@BTfer}\MacroDef{ODw@BTfer}[\marg{tokens}]
+% This macro is called within |bidding| diagrams and enables us to type
+% |1C\announce| and get \Xfer{1C\announce}. The symbols get translated into
+% the active language. |\ODw@BTfer| is essentially called for each entry in
+% the |bidding| diagrams through:\\
+% |\newcolumntype{B}{>{\collectcell\ODw@BTfer}c<{\endcollectcell}}|
+%
+% As there is no special processing for the biding entries, we call |\ODw@Xfer|
+% right away to do the job.
+%
+% \begin{macrocode}
+\def\ODw@BTfer#1{%
+ \ODw@Xfer{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Names of Directions and Axes}
+%
+% \begin{macro}{\North}\MacroDef{North}[\Oarg{*!}]
+% \begin{macro}{\north}\MacroDef{north}
+% \begin{macrocode}
+\NewDocumentCommand\North{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\ODw@N*}{\ODw@North*}%
+ }{%
+ \IfBooleanTF{#2}{\ODw@N}{\ODw@North}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% North
+%
+\def\north{\North*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\East}\MacroDef{East}[\Oarg{*!}]
+% \begin{macro}{\east}\MacroDef{east}
+% \begin{macrocode}
+\NewDocumentCommand\East{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\ODw@E*}{\ODw@East*}%
+ }{%
+ \IfBooleanTF{#2}{\ODw@E}{\ODw@East}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% East
+%
+\def\east{\East*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\South}\MacroDef{South}[\Oarg{*!}]
+% \begin{macro}{\south}\MacroDef{south}
+% \begin{macrocode}
+\NewDocumentCommand\South{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\ODw@S*}{\ODw@South*}%
+ }{%
+ \IfBooleanTF{#2}{\ODw@S}{\ODw@South}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% South
+%
+\def\south{\South*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\West}\MacroDef{West}[\Oarg{*!}]
+% \begin{macro}{\west}\MacroDef{west}
+% \begin{macrocode}
+\NewDocumentCommand\West{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\ODw@W*}{\ODw@West*}%
+ }{%
+ \IfBooleanTF{#2}{\ODw@W}{\ODw@West}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% West
+%
+\def\west{\West*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NorthSouth}\MacroDef{NorthSouth}[\Oarg{*!}]
+% \begin{macro}{\northsouth}\MacroDef{northsouth}
+% \begin{macrocode}
+\NewDocumentCommand\NorthSouth{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\North*!--\South*!}{\North*--\South*}%
+ }{%
+ \IfBooleanTF{#2}{\North!--\South!}{\North--\South}%
+ }%
+ \egroup%
+ \xspace%
+}% NorthSouth
+%
+\def\northsouth{\NorthSouth*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\EastWest}\MacroDef{EastWest}[\Oarg{*!}]
+% \begin{macro}{\eastwest}\MacroDef{eastwest}
+% \begin{macrocode}
+\NewDocumentCommand\EastWest{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\East*!--\West*!}{\East*--\West*}%
+ }{%
+ \IfBooleanTF{#2}{\East!--\West!}{\East--\West}%
+ }%
+ \egroup%
+ \xspace%
+}% EastWest
+%
+\def\eastwest{\EastWest*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% Next we define macros that translate the short form of the directions
+% into the active language.
+% \par\noindent
+% \begin{macro}{\ODw@N}
+% \begin{macro}{\ODw@E}
+% \begin{macro}{\ODw@S}
+% \begin{macro}{\ODw@W}
+% \begin{macrocode}
+\def\ODw@N{%
+ \@ifstar{\GetTranslation{N-(ODw)}}%
+ {\GetTranslation{n-(ODw)}}%
+}
+\def\ODw@E{%
+ \@ifstar{\GetTranslation{E-(ODw)}}%
+ {\GetTranslation{e-(ODw)}}%
+}
+\def\ODw@S{%
+ \@ifstar{\GetTranslation{S-(ODw)}}%
+ {\GetTranslation{s-(ODw)}}%
+}
+\def\ODw@W{%
+ \@ifstar{\GetTranslation{W-(ODw)}}%
+ {\GetTranslation{w-(ODw)}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\ODw@NS}
+% \begin{macro}{\ODw@EW}
+% \begin{macrocode}
+\def\ODw@NS{\ODw@N--\ODw@S}
+\def\ODw@EW{\ODw@E--\ODw@W}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\ODw@North}
+% \begin{macro}{\ODw@East}
+% \begin{macro}{\ODw@South}
+% \begin{macro}{\ODw@West}
+% \begin{macrocode}
+\def\ODw@North{%
+ \@ifstar{\GetTranslation{North-(ODw)}}%
+ {\GetTranslation{north-(ODw)}}%
+}
+\def\ODw@East{%
+ \@ifstar{\GetTranslation{East-(ODw)}}%
+ {\GetTranslation{east-(ODw)}}%
+}
+\def\ODw@South{%
+ \@ifstar{\GetTranslation{South-(ODw)}}%
+ {\GetTranslation{south-(ODw)}}%
+}
+\def\ODw@West{%
+ \@ifstar{\GetTranslation{West-(ODw)}}%
+ {\GetTranslation{west-(ODw)}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsubsection{Non-Bid Calls}
+%
+% \begin{macro}{\Pass}\MacroDef{Pass}[\Oarg{*!}]
+% \begin{macro}{\pass}\MacroDef{pass}
+% \begin{macrocode}
+\NewDocumentCommand\Pass{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Pass!-(ODw)}}%
+ {\GetTranslation{Pass-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{pass!-(ODw)}}%
+ {\GetTranslation{pass-(ODw)}}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% Pass
+%
+\def\pass{\Pass*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\Allpass}\MacroDef{Allpass}[\Oarg{*!}]
+% \begin{macro}{\allpass}\MacroDef{allpass}
+% \begin{macrocode}
+\NewDocumentCommand\Allpass{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{AP-(ODw)}}%
+ {\GetTranslation{All pass-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{ap-(ODw)}}%
+ {\GetTranslation{all pass-(ODw)}}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% Allpass
+%
+\def\allpass{\Allpass*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\Double}\MacroDef{Double}[\Oarg{*!}]
+% \begin{macro}{\double}\MacroDef{double}
+% \begin{macrocode}
+\NewDocumentCommand\Double{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Dbl-(ODw)}}%
+ {\GetTranslation{Double-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {X}%
+ {\GetTranslation{double-(ODw)}}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% Double
+%
+\def\double{\Double*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\Redouble}\MacroDef{Redouble}[\Oarg{*!}]
+% \begin{macro}{\redouble}\MacroDef{redouble}
+% \begin{macrocode}
+\NewDocumentCommand\Redouble{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{ReDbl-(ODw)}}%
+ {\GetTranslation{ReDouble-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\mbox{X\kern-0.1em X}}%
+ {\GetTranslation{redouble-(ODw)}}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% Redouble
+%
+\def\redouble{\Redouble*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsubsection{Bidding Diagrams}
+%
+% \DeleteShortVerb{\|}
+% \begin{macro}{\ODw@FirstBidCol}\MacroDef{ODw@FirstBidCol}[\marg{{\upshape N|S|E|W}}]
+% \MakeShortVerb{\|}
+%
+% |\ODw@FirstBidCol| determines which player starts in the first bidding column.
+% We also take care that the real world name of the players are kept
+% associated with the columns. For |\ODw@BidderX| (X=I,II,III,IV) we
+% define two macros: |\ODw@BidderX| and |\ODw@BidderX*| in one. When these
+% macros are called in the |bidding| diagram, the starred version writes the
+% short notation whereas the unstarred one writes the long version.
+% \begin{macrocode}
+\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}%
+ }%
+ {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}%
+ }%
+ {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}%
+ }%
+ {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}%
+ }%
+ }% IfEqCase
+}% ODw@FirstBidCol
+% \end{macrocode}
+% \end{macro}
+%
+% Next we define the real world names for the \NorthSouth*! and the \EastWest*!
+% bidders. We use |\ODw@All@Names| as variable to test if we have names for
+% bidders at all: If it is empty, then no names were defined.
+% \begin{macro}{\namesNS}\MacroDef{namesNS}[\marg{N-name}\marg{S-name}]
+% \begin{macrocode}
+\newcommand\namesNS[2]{%
+ \gdef\ODw@North@Name{#1}%
+ \gdef\ODw@South@Name{#2}%
+ \gdef\ODw@All@Names{#1#2\ODw@East@Name\ODw@West@Name}%
+}% namesNS
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\namesEW}\MacroDef{namesEW}[\marg{E-name}\marg{W-name}]
+% \begin{macrocode}
+\newcommand\namesEW[2]{%
+ \gdef\ODw@East@Name{#1}%
+ \gdef\ODw@West@Name{#2}%
+ \gdef\ODw@All@Names{#1#2\ODw@North@Name\ODw@South@Name}%
+}% namesEW
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Diagram Hands}
+%
+% Here we implement commands that store the cards that each player holds.
+% E.g.\ |\northhand| defines the complete hand, i.e.\ all 4 suits for the
+% \North*-player. They have an optional parameter (an offset, default |0pt|)
+% to finetune the distance to the compass. In |\ODw@Nhand| and
+% |\ODw@Shand| we use a makebox to prevent that its width goes beyond the
+% |NESW| compass (but this can interfere with the Right-U/L-Legend). Within
+% these macros, we check the consistency of the cards in the hand and also
+% store card-information to check a complete deal later.
+% \begin{macro}{\northhand}\MacroDef{northhand}[\oarg{v-offset}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% |\northhand[v-offset]{Sp}{He}{Di}{Cl}|\\
+% | 1 2 3 4 5|
+% \begin{macrocode}
+\newcommand\northhand[5][0pt]{%
+% check that north has 13 cards
+ \ODw@ChkNrOfCards{#2#3#4#5}{\north}%
+ \gdef\ODw@NSpades{#2}% Save norths cards
+ \gdef\ODw@NHearts{#3}% of all suits
+ \gdef\ODw@NDiamonds{#4}% for later
+ \gdef\ODw@NClubs{#5}% checking
+% \end{macrocode}
+% \begin{macro}{\ODw@Nhand}
+% We fit the \north hand in a box to avoid that a
+% very long suit shifts the \east hand to the right
+% \begin{macrocode}
+ \gdef\ODw@Nhand{%
+ \makebox[\ODw@Compasssize + 2ex][l]{%
+ \ODw@hand{t}{#2}{#3}{#4}{#5}%
+ }%
+ \vspace{#1}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}% northhand
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\easthand}\MacroDef{easthand}[\oarg{h-offset}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% |\easthand[h-offset]{Sp}{He}{Di}{Cl}|\\
+% | 1 2 3 4 5|
+% \begin{macrocode}
+\newcommand\easthand[5][0pt]{%
+% check that east has 13 cards
+ \ODw@ChkNrOfCards{#2#3#4#5}{\east}%
+ \gdef\ODw@ESpades{#2}% Save easts cards
+ \gdef\ODw@EHearts{#3}% of all suits
+ \gdef\ODw@EDiamonds{#4}% for later
+ \gdef\ODw@EClubs{#5}% checking
+% \end{macrocode}
+% \begin{macro}{\ODw@Ehand}
+% \begin{macrocode}
+ \gdef\ODw@Ehand{%
+ \hspace{#1}%
+ \ODw@hand{c}{#2}{#3}{#4}{#5}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}% easthand
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\southhand}\MacroDef{southhand}[\oarg{v-offset}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% |\southhand[v-offset]{Sp}{He}{Di}{Cl}|\\
+% | 1 2 3 4 5|
+% \begin{macrocode}
+\newcommand\southhand[5][0pt]{%
+% check that south has 13 cards
+ \ODw@ChkNrOfCards{#2#3#4#5}{\south}%
+ \gdef\ODw@SSpades{#2}% Save souths cards
+ \gdef\ODw@SHearts{#3}% of all suits
+ \gdef\ODw@SDiamonds{#4}% for later
+ \gdef\ODw@SClubs{#5}% checking
+% \end{macrocode}
+% \begin{macro}{\ODw@Shand}
+% We fit the \south hand in a box to avoid that a
+% very long suit shifts the \east hand to the right
+% \begin{macrocode}
+ \gdef\ODw@Shand{%
+ \parbox[b]{\ODw@Compasssize + 2ex}{%
+ \vspace*{#1}\par%
+ \makebox[0pt][l]{%
+ \ODw@hand{b}{#2}{#3}{#4}{#5}%
+ }%
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}% southhand
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\westhand}\MacroDef{westhand}[\oarg{h-offset}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% |\westhand[h-offset]{Sp}{He}{Di}{Cl}|\\
+% | 1 2 3 4 5|
+% \begin{macrocode}
+\newcommand\westhand[5][0pt]{%
+% check that west has 13 cards
+ \ODw@ChkNrOfCards{#2#3#4#5}{\west}%
+ \gdef\ODw@WSpades{#2}% Save wests cards
+ \gdef\ODw@WHearts{#3}% of all suits
+ \gdef\ODw@WDiamonds{#4}% for later
+ \gdef\ODw@WClubs{#5}% checking
+% \end{macrocode}
+% \begin{macro}{\ODw@Whand}
+% \begin{macrocode}
+ \gdef\ODw@Whand{%
+ \ODw@hand{c}{#2}{#3}{#4}{#5}%
+ \hspace*{#1}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}% westhand
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{A Single Hand}
+%
+% Sometimes we want to show only (the cards of) one single hand.
+%
+% \noindent
+% \begin{macro}{\hand}\MacroDef{hand}[\Oarg{*!-}\oarg{pos}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% \begin{macrocode}
+\NewDocumentCommand\hand{s t! t- O{c}mmmm}{%
+% \end{macrocode}
+% |\hand* ! -[pos]{Sp}{He}{Di}{Cl}|\\
+% | 1 2 3 4 5 6 7 8|\\
+% This macro has 3 optional tokens that act as follows:\\
+% Naked mode: Displays the hand horizontally, left aligned.\\
+% |*| mode: Displays the hand horizontally, centered.\\
+% |!| mode: Displays the hand vertically, left aligned.\\
+% |*!| mode: Displays the hand vertically, centered.\\
+% |-| mode: Output is suppressed, it is stored in a savebox for later use.
+% \par\vspace{0.3\baselineskip}\noindent
+% The 4th argument is the aligning (used only in case of a vertical hand):
+% default \textbf{c}. The rest of the arguments denote the cards of the
+% suits.
+%
+% We first check that this hand has 13 cards. Then we check for each
+% suit that there are no multiples. Finally we store the hand in
+% |\ODw@Hand@Box|. If output is not suppressed, we write the hand with
+% |\usebox\ODw@Hand@Box|.
+% \begin{macrocode}
+ \ODw@ChkNrOfCards{#5#6#7#8}{Hand}%
+ \ODw@ChkSameCards{#5}{\Sp}%
+ \ODw@ChkSameCards{#6}{\He}%
+ \ODw@ChkSameCards{#7}{\Di}%
+ \ODw@ChkSameCards{#8}{\Cl}%
+ \global\sbox{\ODw@Hand@Box}{%
+ \bgroup%
+ \ODw@GameSize%
+ \IfBooleanTF{#2}%
+ {\ODw@vhand[#4]{#5}{#6}{#7}{#8}}%
+ {\ODw@hhand{#5}{#6}{#7}{#8}}%
+ \egroup%
+ }% sbox
+ \IfBooleanTF{#3}{}{%
+ \IfBooleanTF{#1}%
+ {{\centering \usebox{\ODw@Hand@Box}\par}}%
+ {\usebox{\ODw@Hand@Box}}%
+ }%
+}% hand
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@hhand}\MacroDef{ODw@hhand}[\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% Displays a hand horizontally (e.g.\ \hand{xxxx}{xxx}{xxx}{xxx}). We use a
+% |tabular| with 4 columns in 1 row to print the 4 suits.
+% \begin{macrocode}
+\newcommand\ODw@hhand[4]{%
+ \bgroup%
+ \def\xspace{}% undo xspace locally
+ % it screws the distance between suit and cards
+ \setlength\tabcolsep{1\ODw@Card@Skip}%
+ \begin{tabular}{llll}
+ % we can't use \suit here: it would cause double checks!
+ \Sp\hspace{0.3em}\ODw@Cards{#1} &%
+ \He\hspace{0.3em}\ODw@Cards{#2} &%
+ \Di\hspace{0.3em}\ODw@Cards{#3} &%
+ \Cl\hspace{0.3em}\ODw@Cards{#4} \\
+ \end{tabular}%
+ \egroup%
+}% ODw@hhand
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ODw@vhand}\MacroDef{ODw@vhand}[\oarg{pos}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% \shorthandoff{!}
+% Display a hand vertically (e.g.\ \hand!{xxxx}{xxx}{xxx}{xxx}). We call
+% \shorthandon{!}
+% |\ODw@hand| to do the job.
+% \begin{macrocode}
+\newcommand\ODw@vhand[5][c]{%
+ \ODw@hand{#1}{#2}{#3}{#4}{#5}%
+}% ODw@vhand
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@hand}\MacroDef{ODw@hand}[\oarg{pos}\marg{Sp}\marg{He}\marg{Di}\marg{Cl}]
+% We put a hand and some spacing in a |tabular| by reading the cards for
+% each suit, making the lines more tense with the |\\[-0.5ex]|.
+% Empty hands are discarded completely.
+%
+% \begin{macrocode}
+\newcommand\ODw@hand[5]{%
+% \end{macrocode}
+% |ODw@hand{pos}{spades}{hearts}{diamonds}{clubs}|\\
+% | 1 2 3 4 5|
+% \par\noindent
+% First we test if the hand is completely empty; only if not, we output
+% something.
+% \begin{macrocode}
+ \ifthenelse{\equal{#2#3#4#5}{}}{}{%
+ \setlength\tabcolsep{\ODw@Card@Skip}%
+%JW \ODw@GameSize% XYX JW 30.04.2018
+ \begin{tabular}[#1]{ll}%
+ % we can't use \suit here: it would cause double checks!
+ \Sp & \ODw@Cards{#2}\\[-0.5ex]
+ \He & \ODw@Cards{#3}\\[-0.5ex]
+ \Di & \ODw@Cards{#4}\\[-0.5ex]
+ \Cl & \ODw@Cards{#5}\\
+ \end{tabular}%
+ }% ifthenelse
+}% ODw@hand
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Suits}
+%
+% In some cases, we need only a collection of cards, without a suit symbol.
+% \begin{macro}{\onesuitAll}\MacroDef{onesuitAll}[\Oarg{*!}\marg{N}\marg{S}\marg{E}\marg{W}]
+% Display the cards of one suit in a \North*!{}\South*!--\East*!{}\West*! diagram, with
+% the \North*!-, \East*!-, \South*!- and \West*!-hand.
+% \begin{macrocode}
+\NewDocumentCommand\onesuitAll{s t! mmmm}{%
+% \end{macrocode}
+% |onesuitAll* !{N-hand}{S-hand}{E-hand}{W-hand}|\\
+% | 1 2 3 4 5 6|\\
+% |Naked version: Use a |\ODwBox\\
+% |* version: Display the diagram centered|\\
+% |! version: use the NESW compass|
+% \par\noindent
+% First we test that we have no multiple cards in the suit. Then we use a
+% |tabular| to place the cards around a compass or around a box.
+% \begin{macrocode}
+ \ODw@ChkSameCards{#3#4#5#6}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \setlength\tabcolsep{0em}%
+\begin{tabular}{@{}r@{ }c@{ }l@{}}%
+%\begin{tabular}{@{}rcl@{}}%
+ & \ODw@Cards{#3} \IfBooleanTF#2{\\[-0.2em]}{\\}%
+ \ODw@Cards{#6} & \IfBooleanTF#2{\ODw@Compass}{\ODw@Box}%
+ & \ODw@Cards{#5} \IfBooleanTF#2{\\[-0.2em]}{\\}%
+ & \ODw@Cards{#4}\\
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitAll
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\onesuitNS}\MacroDef{onesuitNS}[\Oarg{*!}\marg{N}\marg{S}]
+% Display a suit as |NS|-diagram. Similar to |\onesuitAll| but with only
+% |N|- and |S|-hand.
+% \begin{macrocode}
+\NewDocumentCommand\onesuitNS{s t! mm}{%
+% \end{macrocode}
+% |onesuitNS* !{N-hand}{S-hand}|\\
+% | 1 2 3 4|\\
+% |Naked version: Use a |\ODwBox\\
+% |* version: Display the diagram centered|\\
+% |! version: use the NESW compass|
+%
+% \begin{macrocode}
+ \ODw@ChkSameCards{#3#4}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \begin{tabular}{@{}c@{}}%
+ \ODw@Cards{#3}\IfBooleanTF#2{\\[-0.2em]}{\\}%
+ \IfBooleanTF#2{\ODw@Compass\\[-0.2em]}{\ODw@Box\\}%
+ \ODw@Cards{#4}%
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitNS
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\onesuitEW}\MacroDef{onesuitEW}[\Oarg{*!}\marg{E}\marg{W}]
+% Display a suit as |EW| diagram. Similar to |\onesuitAll| but with only
+% |E|- and |W|-hand.
+% \begin{macrocode}
+\NewDocumentCommand\onesuitEW{s t! mm}{%
+% \end{macrocode}
+% |onesuitEW* !{E-hand}{W-hand}|\\
+% | 1 2 3 4|\\
+% |Naked version: Use a |\ODwBox\\
+% |* version: Display the diagram centered|\\
+% |! version: use the NESW compass|
+%
+% \begin{macrocode}
+ \ODw@ChkSameCards{#3#4}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \begin{tabular}{@{}r@{ }c@{ }l@{}}%
+ \ODw@Cards{#4} &%
+ \IfBooleanTF#2{\ODw@Compass}{\ODw@Box} &%
+ \ODw@Cards{#3} \\%
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitEW
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\onesuitNE}\MacroDef{onesuitNE}[\Oarg{*!}\marg{N}\marg{E}]
+% Display a suit as |NE| diagram. Similar to |\onesuitAll| but with only
+% |N|- and |E|-hand.
+% \begin{macrocode}
+\NewDocumentCommand\onesuitNE{s t! mm}{%
+% \end{macrocode}
+% |onesuitNE* !{N-hand}{E-hand}|\\
+% | 1 2 3 4|\\
+% |Naked version: Use a |\ODwBox\\
+% |* version: Display the diagram centered|\\
+% |! version: use the NESW compass|
+%
+% \begin{macrocode}
+ \ODw@ChkSameCards{#3#4}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \begin{tabular}[b]{c@{ }l@{}}%
+ \ODw@Cards{#3} \\%
+ \IfBooleanTF#2{\ODw@Compass}{\ODw@Box} &%
+ \ODw@Cards{#4} \\%
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitEW
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\onesuitNW}\MacroDef{onesuitNW}[\Oarg{*!}\marg{N}\marg{W}]
+% Display a suit as |NW| diagram. Similar to |\onesuitAll| but with only
+% |N|- and |W|-hand.
+% \begin{macrocode}
+\NewDocumentCommand\onesuitNW{s t! mm}{%
+% \end{macrocode}
+% |onesuitNW* !{N-hand}{W-hand}|\\
+% | 1 2 3 4|\\
+% |Naked version: Use a |\ODwBox\\
+% |* version: Display the diagram centered|\\
+% |! version: use the NESW compass|
+%
+% \begin{macrocode}
+ \ODw@ChkSameCards{#3#4}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \begin{tabular}[b]{r@{ }c}%
+ & \ODw@Cards{#3} \\%
+ \ODw@Cards{#4} & \IfBooleanTF#2{\ODw@Compass}{\ODw@Box} \\%
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitEW
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\suit}\MacroDef{suit}[\oarg{suit symbol}\marg{cards}]
+% Command for displaying the cards of a suit. With the optional argument
+% one can add a suit symbol to the suit.
+%
+% \begin{macrocode}
+\newcommand\suit[2][]{%
+% \end{macrocode}
+% |\suit[suit]{cards}|\\
+% | 1 2 |
+% \begin{macrocode}
+ \ODw@ChkNrOfCards{#2}{suit}%
+ \ODw@ChkSameCards{#2}{#1}%
+ \bgroup% keep font change local
+%JW \ODw@GameSize%
+ #1\ODw@Cards{#2}%
+ \egroup%
+ \xspace%
+}% suit
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@Cards}\MacroDef{ODw@Cards}[\marg{cards}]
+% This macro gets called by |\suit| and all commands that process hands. It
+% processes the ranks of the cards. Between ranks some space is typeset.
+% Care is taken that |T| becomes \suit{T} and honor cards are
+% translated into the active language.
+% \begin{macrocode}
+\newcommand{\ODw@Cards}[1]{%
+% \end{macrocode}
+% \par\vspace{0.3\baselineskip}\noindent
+% We enable the cardskip and call |\ODw@Xfer| to do the job
+% \begin{macrocode}
+ \OdW@CardSkiptrue%
+ \ODw@Xfer{#1}%
+}% ODw@Cards
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Card Diagrams}
+%
+% Next we define several diagrams with hands around the compass.
+% |\ODw@GameSize| sets the size of the compass, the directions and the
+% hands, according to the actual font or font-size.
+% |\ODw@LeftUpperText| etc.\ displays extra text, that appear in the left
+% upper, etc.\ corner of the diagram. If |\headlinetext| (|\footlinetext|)
+% is the empty string, we set boolean |ODw@EmptyHeader| (|ODw@EmptyFooter|)
+% to true\footnote{see page \pageref{Empty}, last paragraph why this is
+% necessary}. This value is used in
+% |\ODw@ProcessHeader| to conditionally span the 3 columns with the
+% headline- (footline)text. We first store the diagram in a box, so we can
+% calculate its width and use that as a size to limit the header/footer
+% texts.
+%
+% \begin{macro}{\showAll}\MacroDef{showAll}[\Oarg{*+}\oarg{pos}]
+% Define the diagram, showing the cards for \textbf{All} hands.
+%
+% \begin{macrocode}
+\NewDocumentCommand\showAll{s t+ O{c}}{%
+% \end{macrocode}
+% |showAll* + [pos]|\\
+% | 1 2 3|\\
+% |Display the NS--EW diagram, defined by \northhand, etc|\\
+% |* Version: Display the diagram centered|\\
+% |+ Version: Also display a bidding diagram|\\
+% |pos: aligning, default= c|
+% \par\noindent
+% First, for all suits we store all cards of all sides together. Next we
+% check the consistency of all complete suits. The individual suits of each
+% player have already been checked as we defined the hands. Finally we
+% print the hands around the compass using a |tabular|, taking care of the
+% additions above, below and in the corners of the diagram. Before we write
+% the diagram, we store it in an sbox to calulate its width, so we can use
+% that in other places.
+%
+% \begin{macrocode}
+ \gdef\ODw@Spades{% store all Spades together
+ \ODw@NSpades\ODw@ESpades\ODw@SSpades\ODw@WSpades%
+ }%
+ \gdef\ODw@Hearts{% store all Hearts together
+ \ODw@NHearts\ODw@EHearts\ODw@SHearts\ODw@WHearts%
+ }%
+ \gdef\ODw@Diamonds{% store all Diamonds together
+ \ODw@NDiamonds\ODw@EDiamonds\ODw@SDiamonds\ODw@WDiamonds%
+ }%
+ \gdef\ODw@Clubs{% store all Clubs together
+ \ODw@NClubs\ODw@EClubs\ODw@SClubs\ODw@WClubs%
+ }%
+ % check for multiple and nr. of cards
+ \ODw@ChkNrOfCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkNrOfCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkNrOfCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkNrOfCards{\ODw@Clubs}{\Cl}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+ % sbox1 necessary to calc. |Compasssize| for |Nhand|
+ \sbox1{\ODw@Compass}%
+ \sbox0{%
+\begin{tabular}[#3]{@{}r@{}c@{}l@{}}%
+ \ODw@LeftUpperText & \ODw@Nhand & \ODw@RightUpperText\\
+ \ODw@Whand & \usebox{1} & \ODw@Ehand\\
+ \ODw@LeftLowerText & \ODw@Shand & \ODw@RightLowerText\\
+\end{tabular}%
+ }% sbox
+ \ODw@gsetlength{\ODw@Diagram@Width}{\wd0}%
+ \begin{tabular}[#3]{@{}r@{}c@{}l@{}}%
+ \ODw@ProcessHeader{3}% span 3 columns
+ \ODw@LeftUpperText & \ODw@Nhand & \ODw@RightUpperText\\
+ \ODw@Whand & \usebox{1} & \ODw@Ehand\\
+ \ODw@LeftLowerText & \ODw@Shand & \ODw@RightLowerText\\
+ \ODw@ProcessFooter{3}% span 3 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % needed for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showAll
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\showNS}\MacroDef{showNS}[\Oarg{*+}\oarg{pos}]
+% Define the diagram, showing the cards for the \NorthSouth*! hands.
+%
+% \begin{macrocode}
+\NewDocumentCommand\showNS{s t+ O{c}}{%
+% \end{macrocode}
+% |showNS* +[pos]|\\
+% | 1 2 3|\\
+% |Display the NS diagram, defined by \northhand, etc|\\
+% |* Version: Display the diagram centered|\\
+% |+ Version: Also display a bidding diagram|\\
+% |pos: aligning, default c|\\
+% \par\noindent
+% Description: similar to |\showAll|
+% \begin{macrocode}
+% For all suits store all cards of north and south together
+ \gdef\ODw@Spades{\ODw@NSpades\ODw@SSpades}%
+ \gdef\ODw@Hearts{\ODw@NHearts\ODw@SHearts}%
+ \gdef\ODw@Diamonds{\ODw@NDiamonds\ODw@SDiamonds}%
+ \gdef\ODw@Clubs{\ODw@NClubs\ODw@SClubs}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+% \end{macrocode}
+% Here we store the width of the diagram \textbf{without} the header and
+% footer. So we can limit their width to the diagramwidth.
+% \begin{macrocode}
+ % sbox1 necessary to calc. |Compasssize| for |Nhand|
+ \sbox1{\ODw@Compass}%
+ \sbox0{%
+ \begin{tabular}[#3]{@{}r@{}c@{}l@{}}%
+ & \ODw@Nhand & \\
+ & \usebox{1} & \\
+ & \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 & \\
+ & \usebox{1} & \\
+ & \ODw@Shand & \\
+ \ODw@ProcessFooter{3}% span 3 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % necessary for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showNS
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\showEW}\MacroDef{showEW}[\Oarg{*+}\oarg{pos}]
+% Define the diagram, showing the cards for the \EastWest*! hands.
+% \begin{macrocode}
+\NewDocumentCommand\showEW{s t+ O{c}}{%
+% \end{macrocode}
+% |showEW* + [pos]|\\
+% | 1 2 3|\\
+% |Display the EW diagram, defined by \easthand, etc|\\
+% |* Version: Display the diagram centered|\\
+% |+ Version: Also display a bidding diagram|\\
+% |pos: aligning, default c|\\
+% \par\noindent
+% Description: similar to |\showAll|
+% \begin{macrocode}
+% For all suits put all cards of east and west together
+ \gdef\ODw@Spades{\ODw@ESpades\ODw@WSpades}%
+ \gdef\ODw@Hearts{\ODw@EHearts\ODw@WHearts}%
+ \gdef\ODw@Diamonds{\ODw@EDiamonds\ODw@WDiamonds}%
+ \gdef\ODw@Clubs{\ODw@EClubs\ODw@WClubs}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+ \sbox0{%
+ \begin{tabular}[#3]{@{}r@{}c@{}l@{}}%
+ \ODw@Whand & \ODw@Compass & \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 \\
+ \ODw@ProcessFooter{3}% span 3 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % necessary for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showEW
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\showNE}\MacroDef{showNE}[\Oarg{*+}\oarg{pos}]
+% Define the diagram, showing the cards for the
+% \North*!{}\textbf{--}\East*! hands.
+% \begin{macrocode}
+\NewDocumentCommand\showNE{s t+ O{c}}{%
+% \end{macrocode}
+% |showNE* +[pos]|\\
+% | 1 2 3|\\
+% |Display the NE diagram, defined by \northhand, etc|\\
+% |* Version: Display the diagram centered|\\
+% |+ Version: Also display a bidding diagram|\\
+% |pos: aligning, default c|\\
+% Description: similar to |\showAll|
+% \begin{macrocode}
+% For all suits put all cards of north and east together
+ \gdef\ODw@Spades{\ODw@NSpades\ODw@ESpades}%
+ \gdef\ODw@Hearts{\ODw@NHearts\ODw@EHearts}%
+ \gdef\ODw@Diamonds{\ODw@NDiamonds\ODw@EDiamonds}%
+ \gdef\ODw@Clubs{\ODw@NClubs\ODw@EClubs}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+ % sbox1 necessary to calc. |Compasssize| for |Nhand|
+ \sbox1{\ODw@Compass}%
+ \sbox0{%
+ \begin{tabular}[#3]{@{}c@{}l@{}}%
+ \ODw@Nhand & \ODw@RightUpperText\\
+ \usebox{1} & \ODw@Ehand\\
+ \end{tabular}%
+ }% sbox
+ \ODw@gsetlength{\ODw@Diagram@Width}{\wd0}%
+ \begin{tabular}[#3]{@{}c@{}l@{}}%
+ \ODw@ProcessHeader{2}% span 2 columns
+ \ODw@Nhand & \ODw@RightUpperText\\
+ \usebox{1} & \ODw@Ehand\\
+ \ODw@ProcessFooter{2}% span 2 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % necessary for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showNE
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\showNW}\MacroDef{showNW}[\Oarg{*+}\oarg{pos}]
+% Define the diagram, showing the cards for the
+% \North*!{}\textbf{--}\West*! hands.
+% \begin{macrocode}
+\NewDocumentCommand\showNW{s t+ O{c}}{%
+% \end{macrocode}
+% |showNW* +[pos]|\\
+% | 1 2 3|\\
+% |Display the NW diagram, defined by \northhand, etc|\\
+% |* Version: Display the diagram centered|\\
+% |+ Version: Also display a bidding diagram|\\
+% |pos: aligning, default c|\\
+% Description: similar to |\showAll|
+% \begin{macrocode}
+% For all suits put all cards of north and west together
+ \gdef\ODw@Spades{\ODw@NSpades\ODw@WSpades}%
+ \gdef\ODw@Hearts{\ODw@NHearts\ODw@WHearts}%
+ \gdef\ODw@Diamonds{\ODw@NDiamonds\ODw@WDiamonds}%
+ \gdef\ODw@Clubs{\ODw@NClubs\ODw@WClubs}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+ % sbox1 necessary to calc. |Compasssize| for |Nhand|
+ \sbox1{\ODw@Compass}%
+ \sbox0{%
+ \begin{tabular}[#3]{@{}c@{}l@{}}%
+ \ODw@LeftUpperText & \ODw@Nhand\\
+ \ODw@Whand & \usebox{1}\\
+ \end{tabular}%
+ }% sbox
+ \ODw@gsetlength{\ODw@Diagram@Width}{\wd0}%
+ \begin{tabular}[#3]{@{}r@{}c@{}}%
+ \ODw@ProcessHeader{2}% span 2 columns
+ \ODw@LeftUpperText & \ODw@Nhand\\
+ \ODw@Whand & \usebox{1}\\
+ \ODw@ProcessFooter{2}% span 2 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % necessary for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showNW
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{The Compass}
+%
+% When displaying the compass, the square with |N-S| and |E-W| axes, we try
+% to achieve several things:
+% \begin{enumerate}[itemsep=0em]
+% \item Making the size font-size dependent
+% \item Put both |N| and |S| horizontally centered
+% \item Put both |E| and |W| vertically centered
+% \item Print the vulnerable side in red if in colored mode
+% \item Underline the dealer (we \emph{over}line |S| for better clarity)
+% \end{enumerate}
+% We use the mapping as shown in the tables below. The |U| stands for
+% undefined. This reflects the situation where neither |\vulner| nor
+% |\dealer| have been called, and also there is no board number known.\\
+%
+% \hfill
+% \begin{tabular}{|c|c|}\hline
+% \multicolumn{2}{|c|}{Player} \\\hline
+% N & 0 \\
+% E & 1 \\
+% S & 2 \\
+% W & 3 \\\hline
+% \end{tabular}
+% \hfill\hfill
+% \begin{tabular}{|c|c|}\hline
+% \multicolumn{2}{|c|}{Vulner} \\\hline
+% none & 0 \\
+% all & 1 \\
+% N-S & 2 \\
+% E-W & 3 \\\hline
+% U & -1 \\\hline
+% \end{tabular}
+% \hfill\hfill
+% \begin{tabular}{|c|c|}\hline
+% \multicolumn{2}{|c|}{Dealer} \\\hline
+% N & 0 \\
+% E & 1 \\
+% S & 2 \\
+% W & 3 \\\hline
+% U & -1 \\\hline
+% \end{tabular}
+% \hfill\hfill
+%
+% \begin{macro}{\ODw@Compass}\MacroDef{ODw@Compass}
+% \begin{macrocode}
+\newcommand{\ODw@Compass}{%
+% \end{macrocode}
+% The codes for dealership (|\ODw@D|) and vulnerability (|\ODw@V|) are used
+% in |\ODw@Print|. We initialize them with the value |-1| to denote the
+% undefined state. |\@ODw| acts as a local temp variable in oder to make a
+% smooth comparison.
+% \begin{macrocode}
+ \begingroup
+ \def\ODw@V{-1}\def\ODw@D{-1}%
+%
+% Set the code for vulnerability
+%
+ \def\@ODw{\none}\ifx\ODw@Vulner\@ODw\def\ODw@V{0}\fi%
+ \def\@ODw{\none*}\ifx\ODw@Vulner\@ODw\def\ODw@V{0}\fi%
+ \def\@ODw{\none!}\ifx\ODw@Vulner\@ODw\def\ODw@V{0}\fi%
+ \def\@ODw{\none*!}\ifx\ODw@Vulner\@ODw\def\ODw@V{0}\fi%
+ \def\@ODw{\all}\ifx\ODw@Vulner\@ODw\def\ODw@V{1}\fi%
+ \def\@ODw{\all*}\ifx\ODw@Vulner\@ODw\def\ODw@V{1}\fi%
+ \def\@ODw{\all!}\ifx\ODw@Vulner\@ODw\def\ODw@V{1}\fi%
+ \def\@ODw{\all*!}\ifx\ODw@Vulner\@ODw\def\ODw@V{1}\fi%
+ \def\@ODw{\NorthSouth}\ifx\ODw@Vulner\@ODw\def\ODw@V{2}\fi%
+ \def\@ODw{\NorthSouth*}\ifx\ODw@Vulner\@ODw\def\ODw@V{2}\fi%
+ \def\@ODw{\NorthSouth!}\ifx\ODw@Vulner\@ODw\def\ODw@V{2}\fi%
+ \def\@ODw{\NorthSouth*!}\ifx\ODw@Vulner\@ODw\def\ODw@V{2}\fi%
+ \def\@ODw{\EastWest}\ifx\ODw@Vulner\@ODw\def\ODw@V{3}\fi%
+ \def\@ODw{\EastWest*}\ifx\ODw@Vulner\@ODw\def\ODw@V{3}\fi%
+ \def\@ODw{\EastWest!}\ifx\ODw@Vulner\@ODw\def\ODw@V{3}\fi%
+ \def\@ODw{\EastWest*!}\ifx\ODw@Vulner\@ODw\def\ODw@V{3}\fi%
+%
+% Set the code for dealership
+%
+ \def\@ODw{\North}\ifx\ODw@Dealer\@ODw\def\ODw@D{0}\fi%
+ \def\@ODw{\North*}\ifx\ODw@Dealer\@ODw\def\ODw@D{0}\fi%
+ \def\@ODw{\North!}\ifx\ODw@Dealer\@ODw\def\ODw@D{0}\fi%
+ \def\@ODw{\North*!}\ifx\ODw@Dealer\@ODw\def\ODw@D{0}\fi%
+ \def\@ODw{\East}\ifx\ODw@Dealer\@ODw\def\ODw@D{1}\fi%
+ \def\@ODw{\East*}\ifx\ODw@Dealer\@ODw\def\ODw@D{1}\fi%
+ \def\@ODw{\East!}\ifx\ODw@Dealer\@ODw\def\ODw@D{1}\fi%
+ \def\@ODw{\East*!}\ifx\ODw@Dealer\@ODw\def\ODw@D{1}\fi%
+ \def\@ODw{\South}\ifx\ODw@Dealer\@ODw\def\ODw@D{2}\fi%
+ \def\@ODw{\South*}\ifx\ODw@Dealer\@ODw\def\ODw@D{2}\fi%
+ \def\@ODw{\South!}\ifx\ODw@Dealer\@ODw\def\ODw@D{2}\fi%
+ \def\@ODw{\South*!}\ifx\ODw@Dealer\@ODw\def\ODw@D{2}\fi%
+ \def\@ODw{\West}\ifx\ODw@Dealer\@ODw\def\ODw@D{3}\fi%
+ \def\@ODw{\West*}\ifx\ODw@Dealer\@ODw\def\ODw@D{3}\fi%
+ \def\@ODw{\West!}\ifx\ODw@Dealer\@ODw\def\ODw@D{3}\fi%
+ \def\@ODw{\West*!}\ifx\ODw@Dealer\@ODw\def\ODw@D{3}\fi%
+%
+% \end{macrocode}
+% We use a |picture| environment and set its size to
+% $\mbox{|2.5em|} \times \mbox{|2.5em|}$
+% by setting the |\PicSize| to 500 and the unitlength to |0.005em|. Doing this
+% enables us the avoid floating point arithmetic in the calculations of
+% positions. Both |\PicSize| and |\MidSize| are local to |\ODw@Compass| and
+% skipped from indexing. The same goes for |\Hoffset| and |\Voffset|.
+% \begin{macrocode}
+ \ODw@CompassDefault% use the compass font
+ \def\PicSize{500}%
+ \def\MidSize{250}%
+ % Multiply unitlength=0.005em with CompSize (default= 1)
+ \setlength\unitlength{0.005em * \real{\ODw@CompSize}}%
+ \ODw@gsetlength\ODw@Compasssize{\unitlength * \PicSize + 2ex}%
+ \def\Hoffset{30}% distance between W (E) and frame
+ \def\Voffset{30}% distance between N (S) and frame
+ \setlength\ODw@Tmp@Width{0.1em * \real{\ODw@CompLine}}%
+ \linethickness{\ODw@Tmp@Width}%
+ % leave 1ex space on all sides
+ \parbox[c][\ODw@Compasssize]{\ODw@Compasssize}{%
+ \centering%
+ \begin{picture}(\PicSize,\PicSize)%
+ \ifODw@CompShow%
+ % the frame
+ \moveto(0,0)
+ \if\ODw@CompLine0% must do it this way, because
+ \else% linethickness zero does not suppress the line
+ \lineto(0,\PicSize)\lineto(\PicSize,\PicSize)
+ \lineto(\PicSize,0)\closepath\strokepath
+ \fi%
+ % the cardinal points
+ \put(\MidSize,\the\numexpr \PicSize - \Voffset)%
+ {\makebox[0pt]{\raisebox{-\height}{\ODw@Print{0}}}}% N
+ \put(\MidSize,\Voffset){\makebox[0pt]{\ODw@Print{2}}}% S
+ \put(\Hoffset,\MidSize){%
+ \makebox[0pt][l]{%
+ \ifODw@CompTurn%
+ \raisebox{-0.5\height}{%
+ \rotatebox[origin=t]{90}{\ODw@Print{3}}%
+ }%
+ \else%
+ \raisebox{-0.5\height}{\ODw@Print{3}}%
+ \fi%
+ }% makebox
+ }% W
+ \put(\the\numexpr \PicSize - \Hoffset,\MidSize)%
+ {\makebox[0pt][r]{%
+ \raisebox{-0.5\height}{%
+ \ifODw@CompTurn%
+ \rotatebox[origin=c]{90}{\ODw@Print{1}}%
+ \else%
+ \ODw@Print{1}%
+ \fi%
+ }%
+ }% makebox
+ }% E
+ % the center
+ \put(\MidSize,\MidSize){\makebox(0,0){\ODw@mid}}
+ \fi%
+ \end{picture}%
+ }% parbox
+ \endgroup
+}% ODw@Compass
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@Print}\MacroDef{ODw@Print}[\marg{player-code}]
+% |\ODw@Print| prints |N|, |E|, |S| and |W| in the compass. The side that
+% is vulnerable is printed in red (or italics if we are monochrome),
+% otherwise in black. The dealer is under- or overlined.
+% \par\noindent
+% The |\ifcase| distinguishes between the players. Then dealership and
+% vulnerability are tested. |\ODw@PrintColor| is called to actually print
+% the player.
+% \begin{macrocode}
+\newcommand\ODw@Print[1]{%
+% \end{macrocode}
+% |\ODw@Print{player-code}|\\
+% | 1 (player-code=0-3)|
+% \begin{macrocode}
+\bgroup
+ \smaller\smaller%
+ \ifcase#1% #1=0: print N
+ \ifboolexpr{ test {\ifnumcomp{\ODw@D}{=}{0}}}%
+ {% dealer = N
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{2}} }%
+ {\ODw@PrintColor{\underline{\ODw@N*}}}% Vul
+ {\underline{\ODw@N*}}% not Vul
+ }{% dealer <> N
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{2}} }%
+ {\ODw@PrintColor{\ODw@N*}}% Vul
+ {\ODw@N*}% not Vul
+ }%
+ \or% #1=1: print E
+ \ifboolexpr{ test {\ifnumcomp{\ODw@D}{=}{1}}}%
+ {% dealer E
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{3}} }%
+ {\ODw@PrintColor{\underline{\ODw@E*}}}% Vul
+ {\underline{\ODw@E*}}% not Vul
+ }{% dealer <> E
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{3}} }%
+ {\ODw@PrintColor{\ODw@E*}}% Vul
+ {\ODw@E*}% not Vul
+ }%
+ \or% #1=2: print S
+ \ifboolexpr{ test {\ifnumcomp{\ODw@D}{=}{2}}}%
+ {% dealer S
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{2}} }%
+ {\ODw@PrintColor{%
+ \ensuremath{\overline{\mbox{\ODw@S*}}}}%
+ }% Vul
+ {\ensuremath{\overline{\mbox{\ODw@S*}}}}% not Vul
+ }{% dealer <> S
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{2}} }%
+ {\ODw@PrintColor{\ODw@S*}}% Vul
+ {\ODw@S*}% not Vul
+ }%
+ \or% #1=3: print W
+ \ifboolexpr{ test {\ifnumcomp{\ODw@D}{=}{3}}}%
+ {% dealer W
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{3}} }%
+ {\ODw@PrintColor{\underline{\ODw@W*}}}% Vul
+ {\underline{\ODw@W*}}% not Vul
+ }{% dealer <> W
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{3}} }%
+ {\ODw@PrintColor{\ODw@W*}}% Vul
+ {\ODw@W*}% not Vul
+ }%
+ \fi% (ifcase#1)
+\egroup%
+}% ODw@Print
+% \end{macrocode}
+% \end{macro}
+%
+% \DeleteShortVerb{\|}
+% \begin{macro}{\ODw@PrintColor}\MacroDef{ODw@PrintColor}[\{|N|E|S|W\}]
+% \MakeShortVerb{\|}
+% |\ODw@PrintColor| checks if we are in monochrome mode. If that is the
+% case we print |N|, |E|, |S| or |W| in italics, otherwise in color.
+%
+% \begin{macrocode}
+\newcommand\ODw@PrintColor[1]{%
+ \ifODw@monochrome\textit{#1}\else\textcolor{red}{#1}\fi%
+}% ODw@PrintColor
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@mid}
+% Hook to write something in the middle of the compass. We write what is
+% stored in |\ODw@CompMid| a bit smaller than the |N-S| and |E-W| letters.
+% |\ODw@mid| writes the contents of |\ODw@CompMid| in the middle of the
+% compass. As there is only very limited room, this text should be very
+% short. It is primarily meant to write just a board number in the
+% compass.
+% \begin{macro}{\ODw@CompMid}
+% \begin{macrocode}
+\def\ODw@CompMid{}
+\def\ODw@mid{{\smaller\smaller\smaller\ODw@CompMid}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ODw@Box}
+% Displays a \ODwBox
+% \begin{macrocode}
+\newcommand{\ODw@Box}{%
+ \bgroup
+ \setlength{\fboxsep}{0pt}%
+ \setlength{\fboxrule}{0.1em}%
+ \fbox{\rule{0mm}{0.7em}\rule{0.7em}{0mm}}%
+ \egroup
+}% ODw@Box
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Diagram Conditions}
+%
+% Here we implement several macros that add some board information to the
+% card diagram. |\ODw@BoardText| serves as a variable to store the
+% user-defined or (by means of the board number) auto-generated text,
+% concerning the board. The macro |\boardnr| has 1 mandatory argument. If
+% it is a number, it is considered to be the board number.
+% The dealer and which side is vulnerable is then
+% calculated from it and stored by calling |\dealer| resp. |\vulner|. If
+% it is not a positive integer, it is considered user-defined text which is
+% stored 'as is' in |\ODw@BoardText|. The contents can be retrieved by the
+% user by calling |\boardtext| to actually print the board information.
+% \begin{macro}{\ODw@BoardText}
+% \begin{macrocode}
+\def\ODw@BoardText{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\boardtext}\MacroDef{boardtext}[\Oarg{*}]
+% \noindent
+% |\boardtext| has only 1 token and no arguments. The unstarred form
+% outputs only the text stored in |\ODw@BoardText|, this is normally a
+% board number. |\boardtext*| outputs something like 'Board:~23'.
+% \begin{macrocode}
+\NewDocumentCommand\boardtext{s}{%
+ \IfBooleanTF#1{\GetTranslation{Board-(ODw)}:\,\ODw@BoardText}%
+ {\ODw@BoardText}%
+}% boardtext
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\boardnr}\MacroDef{boardnr}[\marg{Nr}]
+% |\boardnr{Nr}| sets the dealership and vulnerability according to |Nr|.
+% As the system repeats itself after the 16th board, we canonize |Nr| to
+% the range of 1--16. We also set |\ODw@BoardText| accordingly. For the
+% association between boardnumber and dealer/vulner, see file
+% \emph{Compass} of the |onedown-example| collection.
+% \begin{macrocode}
+\newcommand{\boardnr}[1]{%
+ \IfInteger{#1}{%
+ \gdef\ODw@BoardText{%
+ \bgroup%
+ \ODw@OtherFont%
+% \GetTranslation{Board-(ODw)} #1%
+ #1%
+ \egroup%
+ }%
+ \setcounter{ODw@Cnt}{#1}%
+ \whiledo{\theODw@Cnt > 16}{%
+ \addtocounter{ODw@Cnt}{-16}%
+ }% whiledo, now 1 <= Cnt <= 16
+ \IfEqCase{\theODw@Cnt}{% set dealer/vulner
+% Board 0 = no board: mark dealer and vulner undefined
+ {0}{\gdef\ODw@BoardText{}\vulner[-1]\dealer[-1]}
+ {1}{\vulner[\none]\dealer[\North*!]}
+ {2}{\vulner[\NorthSouth*!]\dealer[\East*!]}
+ {3}{\vulner[\EastWest*!]\dealer[\South*!]}
+ {4}{\vulner[\all]\dealer[\West*!]}
+ {5}{\vulner[\NorthSouth*!]\dealer[\North*!]}
+ {6}{\vulner[\EastWest*!]\dealer[\East*!]}
+ {7}{\vulner[\all]\dealer[\South*!]}
+ {8}{\vulner[\none]\dealer[\West*!]}
+ {9}{\vulner[\EastWest*!]\dealer[\North*!]}
+ {10}{\vulner[\all]\dealer[\East*!]}
+ {11}{\vulner[\none]\dealer[\South*!]}
+ {12}{\vulner[\NorthSouth*!]\dealer[\West*!]}
+ {13}{\vulner[\all]\dealer[\North*!]}
+ {14}{\vulner[\none]\dealer[\East*!]}
+ {15}{\vulner[\NorthSouth*!]\dealer[\South*!]}
+ {16}{\vulner[\EastWest*!]\dealer[\West*!]}
+ }% IfEqCase
+ }{\gdef\ODw@BoardText{#1}}% otherwise take #1
+}% boardnr
+% \end{macrocode}
+% \end{macro}
+%
+% The next macros are used to add some game information above resp. below
+% the card diagram. |\ODw@HeaderText| and |\ODw@FooterText| are used as
+% variables to store the user-defined text.
+% \begin{macro}{\headlinetext}\MacroDef{headlinetext}[\marg{text}]
+% \begin{macro}{\ODw@HeaderText}
+% \begin{macrocode}
+\newcommand\headlinetext[1]{\gdef\ODw@HeaderText{#1}}
+\headlinetext{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\footlinetext}\MacroDef{footlinetext}[\marg{text}]
+% \begin{macro}{\ODw@FooterText}
+% \begin{macrocode}
+\newcommand\footlinetext[1]{\gdef\ODw@FooterText{#1}}
+\footlinetext{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The next macros are used to add some game information in the corners of
+% the card diagram. We use a |tabular| with 1 column and 3 lines to do so.
+%
+% We redefine the (originally empty) |Left[Upper/Lower]|- and\\
+% |Right[Upper/Lower]Text|, and set it to the wanted value. The
+% first (optional) parameter defines some horizontal extra space if the
+% hand and a condition text collide. The commands have 3 mandatory
+% arguments, each for 1 of the 3 condition lines, which may be empty.
+% \begin{macro}{\leftupper}\MacroDef{leftupper}[\oarg{h-offset}\marg{line1}\marg{line2}\marg{line3}]
+% \begin{macro}{\ODw@LeftUpperText}
+% \begin{macrocode}
+\def\ODw@LeftUpperText{}
+\newcommand\leftupper[4][0pt]{%
+ \gdef\ODw@LeftUpperText{%
+ \hspace{-#1}%
+ \begin{tabular}[t]{l}#2\\#3\\#4\\\end{tabular}
+ }%
+}% leftupper
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\leftlower}\MacroDef{leftlower}[\oarg{h-offset}\marg{line1}\marg{line2}\marg{line3}]
+% \begin{macro}{\ODw@LeftLowerText}
+% \begin{macrocode}
+\def\ODw@LeftLowerText{}
+\newcommand\leftlower[4][0pt]{%
+ \gdef\ODw@LeftLowerText{%
+ \hspace{-#1}%
+ \begin{tabular}[b]{l}#2\\#3\\#4\\\end{tabular}
+ }%
+}% leftlower
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\rightupper}\MacroDef{rightupper}[\oarg{h-offset}\marg{line1}\marg{line2}\marg{line3}]
+% \begin{macro}{\ODw@RightUpperText}
+% \begin{macrocode}
+\def\ODw@RightUpperText{}
+\newcommand\rightupper[4][0pt]{%
+ \gdef\ODw@RightUpperText{%
+ \hspace{#1}%
+ \begin{tabular}[t]{l}#2\\#3\\#4\\\end{tabular}
+ }%
+}% rightupper
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\rightlower}\MacroDef{rightlower}[\oarg{h-offset}\marg{line1}\marg{line2}\marg{line3}]
+% \begin{macro}{\ODw@RightLowerText}
+% \begin{macrocode}
+\def\ODw@RightLowerText{}
+\newcommand\rightlower[4][0pt]{%
+ \gdef\ODw@RightLowerText{%
+ \hspace{#1}%
+ \begin{tabular}[b]{l}#2\\#3\\#4\\\end{tabular}
+ }%
+}% rightlower
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\ODw@ProcessHeader}\MacroDef{ODw@ProcessHeader}[\marg{N}]
+% |\ODw@ProcessHeader[N]| puts |HeaderText| in a multicolumn which spans N
+% columns.
+% \begin{macrocode}
+\newcommand{\ODw@ProcessHeader}[1]{%
+% \end{macrocode}
+% Programmers note:\\
+% |\ODw@TestIfEmpty| cannot be called in here. The |\ifthenelse| called within
+% the tabular environment leads to the error:\\
+% \example{|! Misplaced |\bs|omit. |\bs|multispan ->|\bs|omit |\bs|@multispan|}
+% \par\vspace{0.5\baselineskip}\noindent
+% So the test of the emptiness of |Header-| and |FooterText| is done out of
+% the tabular. Why is (La)TeX always causing unexpected problems?:-(
+% \par\noindent
+% We set the headline/footline text to the width of the diagram with a
+% solution found at:\\
+% \url{https://tex.stackexchange.com/questions/125005/how-to-create-a-table-where-one-cell-spans-all-the-columns-and-the-text-wraps-pr}
+%
+% \begin{macrocode}
+ \ifODw@EmptyHeader% Must be this way (StackExchange)
+ \else% |\ifthenelse| bites |\multicolumn|!
+ \multicolumn{#1}{%
+ p{\dimexpr\ODw@Diagram@Width-%
+ 2\tabcolsep-2\arrayrulewidth}%
+ }{{\ODw@LegendFont\ODw@HeaderText}}\\
+ \fi%
+}% ODw@ProcessHeader
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@TestIfEmpty}\MacroDef{ODw@TestIfEmpty}[\marg{Str}\marg{Bool}]
+% Tests the emptiness of a string.
+% \begin{macrocode}
+\newcommand{\ODw@TestIfEmpty}[2]{%
+% \end{macrocode}
+% |\ODw@TestIfEmpty{Str}{Bool}|\\
+% | sets boolean Bool to true if string Str is empty|
+% \begin{macrocode}
+ \ifthenelse{\equal{#1}{}}{%
+ \setboolean{#2}{true}}{%
+ \setboolean{#2}{false}%
+ }%
+}% ODw@TestIfEmpty
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ODw@ProcessFooter}\MacroDef{ODw@ProcessFooter}[\marg{N}]
+% |\ODw@ProcessFooter[N]| puts |FooterText| in a multicolumn which spans
+% |N| columns.
+% \begin{macrocode}
+\newcommand{\ODw@ProcessFooter}[1]{%
+ \ifODw@EmptyFooter% Must be this way (StackExchange)
+ \else% |\ifthenelse| bites |\multicolumn|!
+ \multicolumn{#1}{%
+ p{\dimexpr\ODw@Diagram@Width%
+ -2\tabcolsep-2\arrayrulewidth}%
+ }{{\ODw@LegendFont\ODw@FooterText}}\\
+ \fi%
+}% ODw@ProcessFooter
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\handskip}\MacroDef{handskip}[\marg{length}]
+% |\handskip| adds \meta{length} to |SkipWidth|, i.e.\ the distance between
+% the card diagram (with or without the east hand) and the |bidding|
+% diagram.
+% \begin{macrocode}
+\newcommand\handskip[1]{%
+ \def\ODw@Skipwidth{1em + #1}% recalculate the new Skipwidth
+ \setlength\ODw@Skip@Width{\ODw@Skipwidth}%
+}% handskip
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@DealerText}
+% Typesets the string \emph{Dealer}.
+% \begin{macrocode}
+\def\ODw@DealerText{%
+ \bgroup%
+ \ODw@OtherFont\GetTranslation{Dealer-(ODw)}%
+ \egroup%
+}% ODw@DealerText
+% \end{macrocode}
+% \end{macro}
+% \par\noindent\needspace{2\baselineskip}
+% \begin{macro}{\ODw@VulnerText}
+% \makeatletter
+% \MacroDef{ODw@VulnerText}[\Oarg{*!}\hfill \ODw@VulnerText (\ODw@VulnerText*,
+% \ODw@VulnerText!, \ODw@VulnerText*!)]
+% \makeatother
+% Typesets the string \emph{vulnerable} or \emph{Vul}.
+% \begin{macrocode}
+\NewDocumentCommand\ODw@VulnerText{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF#2{\GetTranslation{Vul-(ODw)}}%
+ {\GetTranslation{Vulnerable-(ODw)}}%
+ }{%
+ \IfBooleanTF#2{\GetTranslation{vul-(ODw)}}%
+ {\GetTranslation{vulnerable-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% ODw@VulnerText
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@AwardText} Typesets the text to be put as 'title' in
+% the \emph{award} part of a expert quiz.
+% \begin{macrocode}
+\def\ODw@AwardText{\textsf{\GetTranslation{Award-(ODw)}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dealer}\MacroDef{dealer}[\oarg{dealer}]
+% If |#1 = empty| then set |\ODw@Dealer| to |#1| else output |\ODw@Dealer|
+% \begin{macrocode}
+\newcommand\dealer[1][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\ODw@Dealer}%
+ {\gdef\ODw@Dealer{#1}}%
+}% dealer
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ODw@Dealer}
+% set \north as default
+% \begin{macrocode}
+\def\ODw@Dealer{\North*}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\vulner}\MacroDef{vulner}[\oarg{vulner}]
+% If |#1 = empty| then set |\ODw@Vulner| to |#1| else output |\ODw@Vulner|
+% \begin{macrocode}
+\newcommand\vulner[1][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\ODw@Vulner}%
+ {\gdef\ODw@Vulner{#1}}%
+}% vulner
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ODw@Vulner}
+% set \NorthSouth as default
+% \begin{macrocode}
+\def\ODw@Vulner{\NorthSouth}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dealertext}
+% \begin{macrocode}
+\newcommand\dealertext[1][\ODw@Dealer]{\ODw@DealerText:\,#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\vulnertext}
+% \begin{macrocode}
+\newcommand\vulnertext[1][\ODw@Vulner]{%
+ \ifODw@LongCalls%
+ \ODw@VulnerText*%
+ \else%
+ \ODw@VulnerText*!%
+ \fi%
+ :\,#1%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\alert}
+% \begin{macrocode}
+\newcommand{\alert}{{}\ensuremath{^\textbf{*}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\announce}
+% \begin{macrocode}
+\newcommand{\announce}{{}\ensuremath{^\textbf{\smaller A}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\markit}\MacroDef{markit}
+% \begin{macrocode}
+\newcommand\markit{%
+% \end{macrocode}
+% Sets markers \emph{a, b} etc. To be used only in |bidding| diagrams.
+% \begin{macrocode}
+ \stepcounter{ODw@Nr}%
+ \footnotemark[\theODw@Nr]%
+}% markit
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\explainit}\MacroDef{explainit}[\marg{text}]
+% \begin{macrocode}
+\newcommand\explainit[1]{%
+% \end{macrocode}
+% Explains the marked items. To be used only in |bidding| diagrams. The
+% counter |ODw@Nr| associates the marker with the explanation.
+% \begin{macrocode}
+ \stepcounter{ODw@Nr}%
+ \ensuremath{{}^\textrm{\smaller\alph{ODw@Nr}}}\,#1%
+}% explainit
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The Bidding Environments}
+%
+% \subsubsection{Special Columntypes}
+%
+% \begin{macro}{\newcolumntype}
+% In order to automatically apply a macro call on all cell contents of a
+% column (translate/convert; step a counter) in |bidding| and |play| diagrams,
+% we define newcolumntypes, made possible by loading package
+% \packname{collectcell}. We define next columntypes:
+% \begin{description}[topsep=2mm,itemsep=-2mm]
+% \item{B:} Transfers suits and cards (|bidding| and |play|)
+% \item{F:} sets First column in |play| diagrams
+% \item{P:} Transfers suits and cards, accumulates won tricks (|play|)
+% \end{description}
+%
+% \begin{macrocode}
+\newcolumntype{B}{% for Biddings
+ >{\collectcell\ODw@BTfer}c<{\endcollectcell}}
+\newcolumntype{F}{% for First column in |play| diagrams
+ >{\collectcell\ODw@FTfer}c<{\endcollectcell}}
+\newcolumntype{P}{% for |Play| diagrams (2nd--4th column)
+ >{\collectcell\ODw@PTfer}c<{\endcollectcell}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{The Hidden Implementation}
+%
+% As explained before, in the |bidding| diagrams we convert |S| to the spade
+% symbol \Sp, etc. We do need packages \packname{array} and
+% \packname{collectcell} for this and define the columntype |B|. In order
+% to avoid these convertions in the top row, where names are displayed, we
+% use the |\cci|-trick to suppress expansion of the cell macro. Curiously
+% the command |\cci| (from \packname{collcell}, v0.5, 2011/02/27) sometimes
+% produces unwanted characters. The reason is unknown to me.
+% We use a space ("| |") as first character in |\cci| to avoid this.
+% \par\noindent
+% We store the |bidding| diagram without the explanations in a box, so we can
+% calculate the width of the |bidding| diagram and make our explanation part
+% exactly as wide. In the first row we write the bidders: |North| etc.\ (or
+% |N|, if it has to be short). In the second row we write the real world
+% names of the bidders, if given. If any description is given, we make a
+% multicolumn over the 4 rows with the previously stored width to write the
+% explanations. We also use this width to calculate whether the bidding
+% diagram will fit on the actual line. If not, we put it on a new line.
+% \begin{environment}{ODw@Bidding}\MacroDef{ODw@Bidding}[\oarg{pos}\parg{description}\ldots\bs endODw@Bidding]
+% \begin{macrocode}
+\NewEnviron{ODw@Bidding}[2][t]{%
+ \def\xspace{}%
+ \setlength\tabcolsep{0.2em}%
+ \sbox{0}{%
+ \begin{tabular}[#1]{BBBB}% 1st column
+ \ifODw@Bidders%
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderI%
+ \else\ODw@BidderI*%
+ \fi%
+ } &% 2nd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderII%
+ \else\ODw@BidderII*%
+ \fi%
+ } &% 3rd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIII%
+ \else\ODw@BidderIII*%
+ \fi%
+ } &% 4th column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIV%
+ \else\ODw@BidderIV*%
+ \fi%
+ } \\% end of 1st row
+ \if\ODw@All@Names\empty%
+ \else% 2nd row
+ \cci{ \ODw@NameFont\ODw@NameI} &% please
+ \cci{ \ODw@NameFont\ODw@NameII} &% mind
+ \cci{ \ODw@NameFont\ODw@NameIII} &% the
+ \cci{ \ODw@NameFont\ODw@NameIV} \\% spaces!
+ \fi%
+ \ifODw@BidLine\hline\fi%
+ \fi%
+ \BODY%
+%%%%%%
+ \end{tabular}%
+ }% sbox0
+ \setcounter{ODw@Nr}{0}%
+ \setlength{\ODw@Bid@Width}{\wd0}%
+ \global\sbox\ODw@BidBox{%
+ \begin{tabular}[#1]{BBBB}% 1st column
+ \ifODw@Bidders%
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderI%
+ \else\ODw@BidderI*%
+ \fi%
+ } &% 2nd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderII%
+ \else\ODw@BidderII*%
+ \fi%
+ } &% 3rd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIII%
+ \else\ODw@BidderIII*%
+ \fi%
+ } &% 4th column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIV%
+ \else\ODw@BidderIV*%
+ \fi%
+ } \\% end of 1st row
+ \if\ODw@All@Names\empty%
+ \else% 2nd row
+ \cci{ \ODw@NameFont\ODw@NameI} &% please
+ \cci{ \ODw@NameFont\ODw@NameII} &% mind
+ \cci{ \ODw@NameFont\ODw@NameIII} &% the
+ \cci{ \ODw@NameFont\ODw@NameIV} \\% spaces!
+ \fi%
+ \ifODw@BidLine\hline\fi%
+ \fi
+ \BODY%
+%%%%% Until here the same code as in the sbox!
+ \ifODw@description%
+ % Add the description, if not empty
+ \hline%
+ \multicolumn{4}{% span explanations over 4 cols...
+ p{\dimexpr\ODw@Bid@Width-2\tabcolsep}%
+ }{% ...with the right width
+ \setcounter{ODw@Nr}{0}%
+ \raggedright%
+ \smaller\smaller#2%
+ }\\%
+ \fi%
+ \end{tabular}%
+ }% sbox ODw@BidBox
+}% ODw@Bidding
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{ODw@Biddingpair}\MacroDef{ODw@Biddingpair}[\oarg{pos}\parg{description}\ldots\bs endODw@Biddingpair]
+% Decription: Similar to |ODw@Bidding|
+% \begin{macrocode}
+\NewEnviron{ODw@Biddingpair}[2][t]{%
+ \def\xspace{}%
+ \setlength\tabcolsep{0.2em}%
+ \sbox{0}{%
+ \begin{tabular}[#1]{BB}% 1st column
+ \ifODw@Bidders%
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderI%
+ \else\ODw@BidderI*%
+ \fi%
+ } &% 2nd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIII%
+ \else\ODw@BidderIII*%
+ \fi%
+ } \\% end of 1st row
+ \if\ODw@All@Names\empty%
+ \else% 2nd row
+ \cci{ \ODw@NameFont\ODw@NameI} &% please mind
+ \cci{ \ODw@NameFont\ODw@NameIII} \\% the spaces!
+ \fi%
+ \ifODw@BidLine\hline\fi%
+ \fi%
+ \BODY%
+%%%%%%%
+ \end{tabular}%
+ }% sbox0
+ \setcounter{ODw@Nr}{0}%
+ \setlength{\ODw@Bid@Width}{\wd0}%
+ \global\sbox\ODw@BidBox{%
+ \begin{tabular}[#1]{BB}% 1st column
+ \ifODw@Bidders%
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderI%
+ \else\ODw@BidderI*%
+ \fi%
+ } &% 2nd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIII%
+ \else\ODw@BidderIII*%
+ \fi%
+ } \\% end of 1st row
+ \if\ODw@All@Names\empty%
+ \else% 2nd row
+ \cci{ \ODw@NameFont\ODw@NameI} &% please mind
+ \cci{ \ODw@NameFont\ODw@NameIII} \\% the spaces!
+ \fi%
+ \ifODw@BidLine\hline\fi%
+ \fi%
+ \BODY%
+ %%%%%% Until here the same code as in the sbox!
+ \ifODw@description%
+ % Add the description, if not empty
+ \hline%
+ \multicolumn{2}{%
+ p{\dimexpr\ODw@Bid@Width-2\tabcolsep}%
+ }{%
+ \setcounter{ODw@Nr}{0}%
+ \raggedright%
+ \smaller\smaller#2%
+ }\\%
+ \fi%
+ \end{tabular}%
+ }% sbox ODw@BidBox
+}% ODw@Biddingpair
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{The User Environments}
+%
+% \subsubsection{Bidding}
+%
+% The |bidding| environments have 2 optional arguments: an alignment
+% \oarg{pos} and an annotation \parg{description}. There are also 3 tokens:
+% the |*| centers the |bidding| diagram, the |+| forces the short notation,
+% i.e. \North*! rather than \North* and the |-| suppresses all output.
+% \par\noindent
+% |\ODw@GameSize| takes care of the font dependent sizing of the diagram.
+% We locally redefine |\thefootnote| and reset the (general) counter
+% |ODw@Nr|, which is stepped in |\markit| and |\explainit| to make the
+% annotations correspond. In the end code we define a multicolumn over all
+% 4 (2) columns and write the annotation given in argument |#2|. With
+% |p{...\ODw@Bid@Width...}| care is taken to limit this text to the width
+% of the diagram.
+%
+% \begin{environment}{bidding}\EnvDef{bidding}[\Oarg{*!-}\oarg{pos}\parg{description}]
+% \begin{macrocode}
+\NewDocumentEnvironment{bidding}{s t! t- O{c}d()}{%
+% \end{macrocode}
+% |\begin{bidding}* ! -[pos](description)|\\
+% | 1 2 3 4 5|\\
+% The 1st token (|*|) centers the environment; the 2nd token (|!|) switches to the short
+% notation in the table header; the 3rd token (|-|) suppresses the output.
+% Argument 4 regulates the alignment of the table (default is \textbf{c}
+% and the 5th argument contains the annotations of the bidding.
+% \begin{macrocode}
+ \ODw@GameSize%
+ \renewcommand{\thefootnote}{\alph{footnote}}%
+ \setcounter{ODw@Nr}{0}%
+ \IfBooleanTF#1{\center}{}% "*" detected
+ \IfBooleanTF{#2}{\ODw@shorttrue}{}% "!" detected
+ \IfValueTF{#5}{\ODw@descriptiontrue}{\ODw@descriptionfalse}%
+ \ODw@Bidding[#4]{#5}%
+}{%
+ \endODw@Bidding%
+ \IfBooleanTF{#3}%
+ {\rule{0pt}{0pt}}%
+ % +---without this, pdflatex aborts compilation!
+ {\usebox{\ODw@BidBox}}% "-" detected
+ \IfBooleanTF#1{\endcenter}{}%
+}% bidding
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{biddingpair}\EnvDef{biddingpair}[\Oarg{*!-}\oarg{pos}\parg{description}]
+% \begin{macrocode}
+\NewDocumentEnvironment{biddingpair}{s t! t- O{c}d()}{%
+% \end{macrocode}
+% |\begin{biddingpair}* ! -[pos](description)|\\
+% | 1 2 3 4 5|\\
+% The same as with environment |bidding|, only with 2 columns instead of 4.
+% \begin{macrocode}
+ \def\xspace{}%
+ \ODw@GameSize%
+ \renewcommand{\thefootnote}{\alph{footnote}}%
+ \setcounter{ODw@Nr}{0}%
+ \IfBooleanTF#1{\center}{}% "*" detected
+ \IfBooleanTF{#2}{\ODw@shorttrue}{}% "+" detected
+ \IfValueTF{#5}{\ODw@descriptiontrue}{\ODw@descriptionfalse}%
+ \ODw@Biddingpair[#4]{#5}%
+}{%
+ \endODw@Biddingpair%
+ \IfBooleanTF{#3}%
+ {\rule{0pt}{0pt}}%
+ % +---without this, pdflatex aborts compilation!
+ {\usebox{\ODw@BidBox}}% "-" detected
+ \IfBooleanTF#1{\endcenter}{}%
+}% biddingpair
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \subsubsection{Play}
+%
+% Environment |play| displays the sequence of playing tricks. It uses
+% 2 |newcolumntype|s:
+% \begin{itemize}[itemsep=0em]
+% \item[|F|] to increment and display the current row.
+% \item[|P|] to translate an convert suits/ranks.
+% \end{itemize}
+%
+% \begin{macro}{\ODw@AccTricks}
+% |\ODw@AccTricks| calculates and shows the accumulated tricks in
+% |play| that |N-S| and |E-W| has won. The winning card is detected
+% automatically and |\ODw@LastTrick| is called to process the winning trick
+% for whichever side won it (|N-S| or |E-W|) by stepping the counter for the
+% winning side. The counter |ODw@Player| denotes the player who won the
+% trick. From the player who leads and the position that wins we calculate
+% the winning player and step the counter for his side.
+% \begin{macrocode}
+\def\ODw@AccTricks{%
+ \ODw@LastTrick{\ODw@Last}{\theODw@WinningNr}%
+ \ODw@append{\theODw@NSCnt,\theODw@EWCnt,}% store counters
+ \setcounter{ODw@Highest}{0}% reset for next trick
+}% ODw@AccTricks
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@Tricks}\MacroDef{ODw@Tricks}
+% \begin{macro}{\ODw@Last}\label{Last}
+% This macro is automatically called in TableII for column 1.
+% This column displays the player who had the lead.
+% It essentially 1) resets the |ODw@PlayerNr| which will be
+% stepped for each next column in search for the winning card 2)
+% remembers in |\ODw@Last| who had the lead. From these two values we can
+% later calculate who won this trick. The stepping of |ODw@PlayerNr| occurs
+% in |\ODw@Tfer|.
+% \begin{macrocode}
+\def\ODw@Tricks{%
+ \setcounter{ODw@PlayerNr}{0}%
+ \gdef\ODw@Last{\ODw@NextLead}%
+ \expandafter\GetTranslation%
+ \expandafter{\ODw@NextLead-(ODw)}:\,%
+% write a colon and a thin space in the table,
+% as separator between lead player and lead card.
+}% ODw@Tricks
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ODw@LastTrick}\MacroDef{ODw@LastTrick}[\marg{Player}\marg{Pos}]
+% This macro is called by |\ODw@AccTricks|.
+% It computes who won the last trick and steps the corresponding counter.
+% \begin{macrocode}
+\newcommand\ODw@LastTrick[2]{%
+% \end{macrocode}
+% |\ODw@LastTrick{Player}{Pos}|\\
+% | 1 2--- Seat Nr that won the trick|\\
+% | +---------- Player (N,E,S,W) who has led|
+% \par\vspace{0.5\baselineskip}\noindent
+% Consider the following table, where the seats are in horizontal
+% direction, starting with the player who leads in seat 1. Vertically, in
+% the first column, we have an initial value, stored in |ODw@Cnt| which is
+% associated with the leading player.
+%
+% \begin{tabular}{c|cccc}
+% & 1 & 2 & 3 & 4 \\\hline
+% 0 & W$^1$ & N$^2$ & E$^3$ & S$^4$ \\
+% 1 & N$^2$ & E$^3$ & S$^4$ & W$^5$ \\
+% 2 & E$^3$ & S$^4$ & W$^5$ & N$^6$ \\
+% 3 & S$^4$ & W$^5$ & N$^6$ & E$^7$ \\
+% \end{tabular}
+% \par\noindent
+% If we add this initial value to the
+% \emph{seat} where the trick is won, then the result gives us the
+% \emph{player} who won the trick. Suppose that e.g.\ |S| had the lead,
+% so |ODw@Cnt| $=$ 3. Suppose also that seat number 3 wins the trick. The
+% sum equals 6 and this is the seat of |N|. For clarity these sums are
+% displayed in the table as superscripts to the players
+% \par\vspace{0.5\baselineskip}\noindent
+% First we set the counter |ODw@Cnt| to the player who has the lead and add
+% the seat number (|#2|) to it. We then store who has the next lead in
+% |\ODw@NextLead| and increment the counter of the winning side.
+%
+% \begin{macrocode}
+ \IfEqCase{#1}{%
+ {W}{\setcounter{ODw@Cnt}{0}}%
+ {N}{\setcounter{ODw@Cnt}{1}}%
+ {E}{\setcounter{ODw@Cnt}{2}}%
+ {S}{\setcounter{ODw@Cnt}{3}}%
+ }% IfEqCase
+ \addtocounter{ODw@Cnt}{#2}%
+ \IfEqCase{\theODw@Cnt}{%
+ {1}{\gdef\ODw@NextLead{W}\stepcounter{ODw@EWCnt}}
+ {2}{\gdef\ODw@NextLead{N}\stepcounter{ODw@NSCnt}}
+ {3}{\gdef\ODw@NextLead{E}\stepcounter{ODw@EWCnt}}
+ {4}{\gdef\ODw@NextLead{S}\stepcounter{ODw@NSCnt}}
+ {5}{\gdef\ODw@NextLead{W}\stepcounter{ODw@EWCnt}}
+ {6}{\gdef\ODw@NextLead{N}\stepcounter{ODw@NSCnt}}
+ {7}{\gdef\ODw@NextLead{E}\stepcounter{ODw@EWCnt}}
+ }% IfEqCase
+}% ODw@LastTrick
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{play}\EnvDef{play}[*\marg{Lead}\oarg{Trump}]
+% \label{Play}
+% \changes{v0.3}{2018/02/24}{In order to avoid empty columns in environment
+% \texttt{playtricks} we reorganized it. Rather than just 1 table we use 3
+% tables. The middle one typesets the relevant tricks, stored in an
+% \texttt{lrbox}, while generating on the fly a string with the winning
+% tricks. Finally we put the running trick-number in TableI, we 'use'
+% TableII and contruct TableIII from the string with the winning tricks.}
+%
+% Finally we define environment |play|. It consists primarily of
+% these 3 tables, the middle one with the special newcolumntype
+% \textbf{P}. We reset the
+% counter for the running line (=trick) |ODw@Nr| and the winning trick
+% counters for |N|--|S| and |E|--|W|: |ODw@NSCnt| and |ODw@EWCnt|. As usual
+% |\ODw@GameSize| takes care for the correct sizing. The first row (the
+% title row) is displayed using the |\cci| method. The 3th table gets a
+% stacked |N/S| and |E/W| title.
+% \begin{macrocode}
+\NewDocumentEnvironment{play}{s mO{N}}{%
+% #1 --> s center
+% #2 --> m lead
+% #3 --> O trumpsuit (default NoTrump)
+ \def\ODw@TrumpSuit{#3}
+ \gdef\ODw@NextLead{#2}%
+ \setcounter{ODw@Nr}{0}%
+ \setcounter{ODw@NSCnt}{0}
+ \setcounter{ODw@EWCnt}{0}%
+ \ODw@GameSize%
+ \ODw@Scratch{}% make empty
+ \let\ODw@Clubs\empty%
+ \let\ODw@Diamonds\empty%
+ \let\ODw@Hearts\empty%
+ \let\ODw@Spades\empty%
+%
+% We need some data which is calculated in TableII
+% to create TableI and TableIII. So we put TableII in a
+% box and display it later at due time
+%
+\def\ODw@EXtra{0.9em}% white space in title
+%
+\provideenvironment{TableII}{%
+ \begin{tabular}[b]{FPPP}%
+ \multicolumn{1}{c}{\GetTranslation{Lead!-(ODw)}} &%
+ \cci{\GetTranslation{2nd-(ODw)}} &%
+ \cci{\GetTranslation{3rd-(ODw)}} &%
+ \cci{\GetTranslation{4th-(ODw)}} \\[0.3em]\hline%
+ \multicolumn{4}{c}{}\\[-\ODw@EXtra]%
+}{%
+ \end{tabular}%
+}% TableII
+%
+ \begin{lrbox}{0}% save TableII for later
+ \begin{TableII}
+}{%
+ \end{TableII}
+ \end{lrbox}%
+ % Check consistency of the played cards
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+%
+ \setcounter{ODw@Cnt}{0}%
+ \IfBooleanTF#1{\begin{center}}{}%
+%
+% \end{macrocode}
+% We need TableI to show the running trick number. When constructing Table
+% II, the total number of tricks that were actually displayed is available
+% in counter |ODw@Nr|. So we just need to loop |\theODw@Nr| times and write
+% the local counter value |\theODw@Cnt|. To avoid \emph{the extra line
+% problem} we use the solution from:\\
+% \url{https://tex.stackexchange.com/questions/50296/problem-with-using-loop-inside-the-tabular-environment/142562#142562}
+% \begin{macrocode}
+%
+ \begin{tabular}[b]{r}% TableI
+ \cci{\GetTranslation{Nr-(ODw)}}\\[0.3em]
+ \hline\\[-\ODw@EXtra]%
+ \setcounter{ODw@Cnt}{1}%
+ \whiledo{\theODw@Cnt<\theODw@Nr}{%
+ \theODw@Cnt\\
+ \stepcounter{ODw@Cnt}%
+ }%
+ \theODw@Cnt\\% MUST be outside the loop
+ % (the extra line problem]!
+ \end{tabular}%
+%
+% TableII showing the cards played in the tricks
+%
+ \usebox{0}%
+%
+% \end{macrocode}
+% We use TableIII to show the winning trick counts. These are already stored
+% in a CSV-list |\ODw@Scratch|, implemented as a token register. To process
+% this list we use |\docsvlist| and must only define our |\do|. As this
+% table has 2 columns, we check with |ODw@Nr| that after an item is read,
+% we put an \& and after the next item a |\\|.
+% \begin{macrocode}
+%
+ \setcounter{ODw@Nr}{0}%
+ \renewcommand*{\do}[1]{%
+ \ifnumequal{\value{ODw@Nr}}{2}{\\\setcounter{ODw@Nr}{0}}{}%
+ \stepcounter{ODw@Nr}%
+ ##1
+ \ifnumequal{\value{ODw@Nr}}{2}{}{&}%
+ }%
+ \begin{tabular}[b]{|cc}% TableIII
+ \multicolumn{1}{|c}{%
+ \cci{\scriptsize\shortstack[c]{\North*!\\\South*!}}} &%
+ \multicolumn{1}{c}{%
+ \cci{\scriptsize\shortstack[c]{\East*!\\\West*!}}%
+ }\\\hline\\[-\ODw@EXtra]%
+ \expandafter\docsvlist\expandafter{\the\ODw@Scratch}%
+ \end{tabular}%
+ \IfBooleanTF#1{\end{center}}{}%
+%
+}% play
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Card Diagrams with Bidding}
+%
+% \begin{macro}{\ODw@CondNewLine}\MacroDef{ODw@CondNewLine}[\oarg{offset}]
+% \begin{macrocode}
+\NewDocumentCommand\ODw@CondNewLine{O{0em}}{%
+% \end{macrocode}
+% |\ODw@CondNewLine| forces a newline if the |bidding| diagram does not fit on
+% the line, taking into account the width of the card diagram and the width
+% of the |bidding| diagram.
+% Otherwise the |bidding| diagram appears to the right of the card diagram at
+% distance |\ODw@Skip@Width|. We call the global macro
+% |\ODw@Diagram@Width| that contains the width of the card diagram. The
+% optional parameter of |\ODw@CondNewLine| is used to add some extra
+% offset if needed.
+%
+% \begin{macrocode}
+ {\ODw@GameFont% needed to relate skips to the font-size
+% :\the\ODw@Skip@Width:% JW XXX
+ \setlength{\ODw@Tmp@Len}{\ODw@Bid@Width}%
+ \addtolength{\ODw@Tmp@Len}{\ODw@Diagram@Width}%
+ \addtolength{\ODw@Tmp@Len}{#1}%
+ \addtolength{\ODw@Tmp@Len}{\ODw@Skip@Width}%
+ \ifthenelse{\lengthtest{\ODw@Tmp@Len > \textwidth}}{%
+ \\[1em]}{%
+ \hspace{\ODw@Skip@Width}%
+ }%
+ }%
+}% ODw@CondNewLine
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The Expert Quiz}
+%
+% \begin{macro}{\expertquiz}\MacroDef{expertquiz}[\Oarg{*!}\oarg{comment}\marg{award}]
+% The macro |\expertquiz| displays a hand, a |bidding| diagram and the award
+% for the answers. Optionally a description can be added. The hand and the
+% bidding have to be defined before. This is done to avoid having 4 more
+% arguments, needed for specifying the hand. The token '|*|' centers the
+% whole and the token '|!|' forces that the |bidding| diagram appears on a
+% new line and that the hand shifts a bit to the right. The last parameter
+% defines the award. In order to limit the width of the award we use the
+% known widths of the |bidding| diagram and the hand and set the parbox
+% accordingly to display the award.
+%
+% \begin{macrocode}
+\NewDocumentCommand\expertquiz{st! O{}m}{%
+% 12 3 4
+% \end{macrocode}
+% |\expertquiz* ![comment]{award}|\\
+% | 1 2 3 4 |\\
+
+% \begin{macrocode}
+ \noindent%
+ \IfBooleanTF#1{\begin{center}}% "*" detected
+ {\par\vspace{0.5\baselineskip}}%
+ \bgroup% keep font changes local (e.g. "\smaller").
+ \ODw@LegendFont%
+ \ifx#3\empty\else#3\par\fi%
+ \egroup%
+ \IfBooleanTF{#2}{~\hspace*{2em}}{}% "!" detected
+ \usebox{\ODw@Hand@Box}% display the saved hand
+ \IfBooleanTF{#2}{}{\quad}% no "!" detected
+ \setlength\ODw@Tmp@Width{\wd\ODw@BidBox + 1em}%
+ \IfBooleanTF{#2}%
+ {\\}%
+ {\addtolength\ODw@Tmp@Width{\wd\ODw@Hand@Box}}%
+ \usebox{\ODw@BidBox}% display the saved bidding
+ \par\vspace{0.3em}%\noindent%
+ {% keep legendfont and "smaller" local
+ \ODw@LegendFont%
+ \smaller%
+ \IfBooleanTF#1{\bgroup\centering}{}%
+ \parbox[t]{\ODw@Tmp@Width}{%
+ \textbf{\ODw@AwardText: }%
+ \raggedright#4%
+ }% parbox
+ \IfBooleanTF#1{\egroup}{}%
+ }%
+% \fi%
+ \IfBooleanTF#1{\end{center}}{}%
+}% expertquiz
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Resetting the Game}
+%
+% We use \packname{pgfkeys} with its \meta{key}=\meta{val} system to
+%specify the fonts and other things that we want to have as defaults,
+%rather than the intitial \OneDown values. Therefore we first define the
+%keys and the store for it.
+%
+% \begin{macrocode}
+\pgfkeys{%
+ /ODw/.is family, /ODw,
+% fonts
+ bidder/.store in = \ODw@BidderDefault,
+ compass/.store in = \ODw@CompassDefault,
+ game/.store in = \ODw@GameDefault,
+ legend/.store in = \ODw@LegendDefault,
+ name/.store in = \ODw@NameDefault,
+ other/.store in = \ODw@OtherDefault,
+% compass
+ compline/.store in = \ODw@CompLine,
+ compmid/.store in = \ODw@CompMid,
+ compsize/.store in = \ODw@CompSize,
+}
+% compass
+ \ODw@set{compshow/.is choice}
+ \ODw@set{compshow/off/.code={\global\ODw@CompShowfalse}}
+ \ODw@set{compshow/on/.code={\global\ODw@CompShowtrue}}
+ \ODw@set{compturn/.is choice}
+ \ODw@set{compturn/off/.code={\global\ODw@CompTurnfalse}}
+ \ODw@set{compturn/on/.code={\global\ODw@CompTurntrue}}
+% bídding
+ \ODw@set{bidders/.is choice}
+ \ODw@set{bidders/off/.code={\global\ODw@Biddersfalse}}
+ \ODw@set{bidders/on/.code={\global\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{bidlong/.is choice}
+ \ODw@set{bidlong/off/.code={\global\ODw@LongCallsfalse}}
+ \ODw@set{bidlong/on/.code={\global\ODw@LongCallstrue}}
+% synonyms
+ \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}}}
+ \ODw@set{compturn/true/.code={\pgfkeys{/ODw/compturn=on}}}
+ \ODw@set{bidline/1/.code={\pgfkeys{/ODw/bidline=on}}}
+ \ODw@set{bidders/true/.code={\pgfkeys{/ODw/bidders=on}}}
+ \ODw@set{bidders/1/.code={\pgfkeys{/ODw/bidders=on}}}
+ \ODw@set{bidline/true/.code={\pgfkeys{/ODw/bidline=on}}}
+ \ODw@set{bidlong/1/.code={\pgfkeys{/ODw/bidlong=on}}}
+ \ODw@set{bidlong/true/.code={\pgfkeys{/ODw/bidlong=on}}}
+%
+ \ODw@set{compshow/0/.code={\pgfkeys{/ODw/compshow=off}}}
+ \ODw@set{compshow/false/.code={\pgfkeys{/ODw/compshow=off}}}
+ \ODw@set{compturn/0/.code={\pgfkeys{/ODw/compturn=off}}}
+ \ODw@set{compturn/false/.code={\pgfkeys{/ODw/compturn=off}}}
+ \ODw@set{bidders/0/.code={\pgfkeys{/ODw/bidders=off}}}
+ \ODw@set{bidders/false/.code={\pgfkeys{/ODw/bidders=off}}}
+ \ODw@set{bidline/0/.code={\pgfkeys{/ODw/bidline=off}}}
+ \ODw@set{bidline/false/.code={\pgfkeys{/ODw/bidline=off}}}
+ \ODw@set{bidlong/0/.code={\pgfkeys{/ODw/bidlong=off}}}
+ \ODw@set{bidlong/false/.code={\pgfkeys{/ODw/bidlong=off}}}
+% \end{macrocode}
+%
+% \begin{macro}{\resetfonts}\MacroDef{resetfonts}
+% \begin{macrocode}
+\newcommand\resetfonts{%
+ \bidderfont{\ODw@BidderDefault}%
+ \compassfont{\ODw@CompassDefault}%
+ \gamefont{\ODw@GameDefault}%
+ \legendfont{\ODw@LegendDefault}%
+ \namefont{\ODw@NameDefault}%
+ \otherfont{\ODw@OtherDefault}%
+}% resetfonts
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setdefaults}\MacroDef{setdefaults}[*{\ttfamily[}\meta{key1=val1},\meta{key2=val2}\ldots{\ttfamily]}]
+% The available keys are those defined in |\pgfkeys| some lines up from
+% here. For the fonts they are: |bidder|, |compass|, |game|, |legend|,
+% |name| and |other|. They store the new default value in the corresponding
+% variable. In order to make the new default active, we must use
+% |\setdefaults*| which will also call |\resetfonts|.
+%
+% The keys for the compass are: |compline|, |compmid|, |compshow|,
+% |compsize| and |compturn|. They control the thickness of the frame, the
+% mid-text, the visibility of the compass, its size and the angle of the
+% compass E--W letters.
+%
+% For the |bidding| diagram we have: |bidders|, |bidfirst|, |bidline| and
+% |bidlong|. They control if bidders are to be displayed at all, which
+% bidder appears in the first column, draw a |\hline| below the header and
+% showing long calls.
+%
+% \begin{macrocode}
+\NewDocumentCommand\setdefaults{s m}{%
+ \pgfkeys{/ODw,#2}%
+ \IfBooleanTF{#1}{\resetfonts}{}%
+}% setdefaults
+%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newgame}\MacroDef{newgame}
+% |\newgame| resets and clears the stored game information to be ready for
+% a new game. We do not reset the option for warn- and err-messages, nor
+% any selected font. Setting |\boardnr{0}| executes also:\\
+% |\ODw@BoardText{}\vulner[-1]\dealer[-1]}|.
+%
+% \begin{macrocode}
+\newcommand\newgame{%
+ \boardnr{0}%
+ \headlinetext{}%
+ \footlinetext{}%
+% clear the left/right upper/lower stuff
+ \gdef\ODw@LeftUpperText{}%
+ \gdef\ODw@LeftLowerText{}%
+ \gdef\ODw@RightUpperText{}%
+ \gdef\ODw@RightLowerText{}%
+% clear the hands
+ \gdef\ODw@Nhand{\ODw@hand{t}{}{}{}{}}%
+ \gdef\ODw@Ehand{\ODw@hand{c}{}{}{}{}}%
+ \gdef\ODw@Shand{\ODw@hand{b}{}{}{}{}}%
+ \gdef\ODw@Whand{\ODw@hand{c}{}{}{}{}}%
+%
+% set default for real bidders names: no names
+% we print only the symbolic names North, East, etc.
+%
+ \namesNS{}{}\namesEW{}{}%
+%
+% reset consistency check stuff
+%
+ \gdef\ODw@Spades{}%
+ \gdef\ODw@Hearts{}%
+ \gdef\ODw@Diamonds{}%
+ \gdef\ODw@Clubs{}%
+%
+ \gdef\ODw@NSpades{}\gdef\ODw@ESpades{}%
+ \gdef\ODw@SSpades{}\gdef\ODw@WSpades{}%
+ \gdef\ODw@NHearts{}\gdef\ODw@EHearts{}%
+ \gdef\ODw@SHearts{}\gdef\ODw@WHearts{}%
+ \gdef\ODw@NDiamonds{}\gdef\ODw@EDiamonds{}%
+ \gdef\ODw@SDiamonds{}\gdef\ODw@WDiamonds{}%
+ \gdef\ODw@NClubs{}\gdef\ODw@EClubs{}%
+ \gdef\ODw@SClubs{}\gdef\ODw@WClubs{}%
+%
+}% newgame
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Error Handling}
+%
+% \subsubsection{Consistency Checks}
+%
+% We perform different checks on consistency of the cards entered:
+% \begin{enumerate}[itemsep=-2mm]
+% \item Check that a hand not has more than 13 cards (E)
+% \item Check that a hand doesn't contain multiple cards (E)
+% \item Check that a deal doesn't contain multiple cards (E)
+% \item Check that a hand has less than 13 cards (W)
+% \item check that a suit of a deal has more than 13 cards (E)
+% \item check that a suit of a deal has less than 13 cards (W)
+% \item In |play| diagrams: check that a card is played only once (E)
+% \end{enumerate}
+% The checks marked with (E) raise an error, those marked with (W) raise
+% a warning. They can be controlled with the package options |err| and
+% |warn|.
+%
+% \begin{macro}{\ODw@ChkNrOfCards}\MacroDef{ODw@ChkNrOfCards}[\marg{cards}\marg{hand}]
+% \begin{macrocode}
+\newcommand\ODw@ChkNrOfCards[2]{%
+% \end{macrocode}
+% |\ODw@ChkNrOfCards{cards}{hand}|\\
+% | 1 2|\\
+% |#1 = a string with all cards of all suits of the hand denoted by #2|\\
+% |step 1: remove all "-" (that denotes an empty suit)|\\
+% |step 2: warn if StrLen < 13 ; Err if StrLen > 13|
+%
+% \begin{macrocode}
+ \StrDel{#1}{-}[\ODw@CardStr]% remove voids
+ \StrLen{\ODw@CardStr}[\ODw@CardLen]%
+ \ifthenelse{\ODw@CardLen > 13}{%
+ \ODw@Error{#2 has \ODw@CardLen{} cards}%
+ }{%
+ \ifthenelse{\ODw@CardLen < 13}{%
+ \ODw@Warning{#2 has \ODw@CardLen{} cards}%
+ }{}%
+ }%
+}% ODw@ChkNrOfCards
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@PrErr}\MacroDef{ODw@PrErr}[\marg{rank}\marg{count}\marg{suit}]
+% \begin{macrocode}
+\newcommand\ODw@PrErr[3]{%
+% \end{macrocode}
+% |\ODw@PrErr{rank}{count}{suit}|\\
+% | 1 2 3|\\
+% This macro only outputs the warning/error if the card specified by rank
+% (\#1) and suit (\#3) does not occur (denoted by \#2) exactly $1 \times$.
+% An exception for spotcards must not be made, because in
+% |\ODw@ChkSameCards| they are not taken into account. (In fact they are
+% already filtered out by |ODw@translate|).
+%
+% \begin{macrocode}
+ \bgroup%
+ \if#1T\def\ODw@T{10}\else\def\ODw@T{#1}\fi%
+ \ifthenelse{#2 > 1}{%
+ \ODw@Error{Card #3\,\ODw@T{} occurs #2 times}%
+ }{%
+ \ifthenelse{#2 = 0}{%
+ \ODw@Warning{Card #3\,\ODw@T{} fails}}{}%
+ }%
+ \egroup%
+}% ODw@PrErr
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@ChkSameCards}\MacroDef{ODw@ChkSameCards}[\marg{cards}\marg{suit}]
+% \begin{macrocode}
+\newcommand\ODw@ChkSameCards[2]{%
+% \end{macrocode}
+% |#1 = a string with all cards of 1 suit (denoted by #2) of all hands|\\
+% |step 1: remove all "-" |\\
+% |step 2: we count the frequency of all ranks 2--9,T,J,Q,K,A| (|ODw@CCnt|)\\
+% |step 3: Warn if Freq(card) = 0 ; Err if Freq(card) > 1| (|ODw@PrErr|)\\
+%
+% \begin{macrocode}
+ \StrDel{#1}{-}[\ODw@CardStr]%
+ \StrCount{\ODw@CardStr}{2}[\ODw@CCnt]\ODw@PrErr{2}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{3}[\ODw@CCnt]\ODw@PrErr{3}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{4}[\ODw@CCnt]\ODw@PrErr{4}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{5}[\ODw@CCnt]\ODw@PrErr{5}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{6}[\ODw@CCnt]\ODw@PrErr{6}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{7}[\ODw@CCnt]\ODw@PrErr{7}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{8}[\ODw@CCnt]\ODw@PrErr{8}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{9}[\ODw@CCnt]\ODw@PrErr{9}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{T}[\ODw@CCnt]\ODw@PrErr{T}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{J}[\ODw@CCnt]\ODw@PrErr{J}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{Q}[\ODw@CCnt]\ODw@PrErr{Q}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{K}[\ODw@CCnt]\ODw@PrErr{K}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{A}[\ODw@CCnt]\ODw@PrErr{A}{\ODw@CCnt}{#2}%
+}% ODw@ChkSameCards
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Controlling Messages}
+%
+% \label{Messages}
+% \begin{macrocode}
+\newbool{ODw@Warnings}
+\newbool{ODw@Errors}
+%
+\ODw@set{warn/off/.code={%
+ \global\setbool{ODw@Warnings}{false}}}
+\ODw@set{warn/on/.code={%
+ \global\setbool{ODw@Warnings}{true}}}
+\ODw@set{err/off/.code={%
+ \global\setbool{ODw@Errors}{false}}}
+\ODw@set{err/on/.code={%
+ \global\setbool{ODw@Errors}{true}}}
+\ODw@set{warn=off}
+\ODw@set{err=on}
+
+\ProcessPgfOptions{/ODw}
+% \end{macrocode}
+
+% \begin{macro}{\ODw@Error}
+% \begin{macrocode}
+\newcommand\ODw@Error[1]{%
+ \ifbool{ODw@Errors}{%
+ \par\textcolor{red}{Error: #1}\par}{}%
+}% ODw@Error
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ODw@Warning}
+% \begin{macrocode}
+\newcommand\ODw@Warning[1]{%
+ \ifbool{ODw@Warnings}{%
+ \par\textcolor{blue}{Warning: #1}\par}{}%
+}% ODw@Warning
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Misc Bridge Terms}
+%
+% \subsubsection{Honour Cards}
+%
+% These macros retrieve the translations of the 4 alternative forms of the
+% honour cards from the |ODw|-dictionary of the active language.
+% \noindent
+% \begin{macro}{\Ace}
+% \begin{macro}{\ace}
+% \begin{macrocode}
+\NewDocumentCommand{\Ace}{s t!}{%
+ \bgroup%
+%JW \ODw@GameFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{A-(ODw)}}%
+ {\GetTranslation{Ace-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{a-(ODw)}}%
+ {\GetTranslation{ace-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Ace
+%
+\def\ace{\Ace*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\King}
+% \begin{macro}{\king}
+% \begin{macrocode}
+\NewDocumentCommand{\King}{s t!}{%
+ \bgroup%
+%JW \ODw@GameFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{K-(ODw)}}%
+ {\GetTranslation{King-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{k-(ODw)}}%
+ {\GetTranslation{king-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% King
+%
+\def\king{\King*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Queen}
+% \begin{macro}{\queen}
+% \begin{macrocode}
+\NewDocumentCommand{\Queen}{s t!}{%
+ \bgroup%
+%JW \ODw@GameFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Q-(ODw)}}%
+ {\GetTranslation{Queen-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{q-(ODw)}}%
+ {\GetTranslation{queen-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Queen
+%
+\def\queen{\Queen*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Jack}
+% \begin{macro}{\jack}
+% \begin{macrocode}
+\NewDocumentCommand{\Jack}{s t!}{%
+ \bgroup%
+%JW \ODw@GameFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{J-(ODw)}}%
+ {\GetTranslation{Jack-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{j-(ODw)}}%
+ {\GetTranslation{jack-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Jack
+%
+\def\jack{\Jack*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Vulnerability}
+%
+% These macros retrieve the translations of the 4 alternative forms of the
+% commands |\All| and |\None| from the |ODw|-dictionary of the active
+% language. As there is no short form for them in the English language, we
+% just code these entries in the |ODw|-dictionaries with an exclamation
+% mark~'|!|'.
+
+% \begin{macro}{\All}
+% \begin{macro}{\all}
+% \begin{macrocode}
+\NewDocumentCommand{\All}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{All!-(ODw)}}%
+ {\GetTranslation{All-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{all!-(ODw)}}%
+ {\GetTranslation{all-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% All
+%
+\def\all{\All*}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\None}
+% \begin{macro}{\none}
+% \begin{macrocode}
+\NewDocumentCommand{\None}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{None!-(ODw)}}%
+ {\GetTranslation{None-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{none!-(ODw)}}%
+ {\GetTranslation{none-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% None
+%
+\def\none{\None*}
+%% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Diagram Annotations}
+%
+% These macros retrieve the translations of the 4 alternative forms of the
+% commands |\Contract|, |\Lead|, |\Declarer|, |\Board| and |\Deal| from the
+% |ODw|-dictionary of the active language.
+%
+% \begin{macro}{\Contract}
+% \begin{macro}{\contract}
+% \begin{macrocode}
+\NewDocumentCommand{\Contract}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Contr-(ODw)}}%
+ {\GetTranslation{Contract-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{contr-(ODw)}}%
+ {\GetTranslation{contract-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Contract
+%
+\def\contract{\Contract*}
+%% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Lead}
+% \begin{macro}{\lead}
+% \begin{macrocode}
+\NewDocumentCommand{\Lead}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Lead!-(ODw)}}%
+ {\GetTranslation{Lead-(ODw)}}%
+ }{% else #1
+ \IfBooleanTF{#2}%
+ {\GetTranslation{lead!-(ODw)}}%
+ {\GetTranslation{lead-(ODw)}}%
+ }% #1
+ \egroup%
+ \xspace%
+}% Lead
+%
+\def\lead{\Lead*}
+%% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Declarer}
+% \begin{macro}{\declarer}
+% \begin{macrocode}
+\NewDocumentCommand{\Declarer}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Decl-(ODw)}}%
+ {\GetTranslation{Declarer-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{decl-(ODw)}}%
+ {\GetTranslation{declarer-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Declarer
+%
+\def\declarer{\Declarer*}
+%% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\by}
+% \begin{macrocode}
+\newcommand\by{%
+ \bgroup%
+ \ODw@OtherFont%
+ \GetTranslation{by-(ODw)}%
+ \egroup%
+ \xspace%
+}% by
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Board}
+% \begin{macro}{\board}
+% \begin{macrocode}
+\NewDocumentCommand{\Board}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Brd-(ODw)}}%
+ {\GetTranslation{Board-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{brd-(ODw)}}%
+ {\GetTranslation{board-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Board
+%
+\def\board{\Board*}
+%% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Deal}
+% \begin{macro}{\deal}
+% \begin{macrocode}
+\NewDocumentCommand{\Deal}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Deal!-(ODw)}}%
+ {\GetTranslation{Deal-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{deal!-(ODw)}}%
+ {\GetTranslation{deal-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Deal
+%
+\def\deal{\Deal*}
+%% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\doubled}
+% The commands |\doubled| and |\redoubled| do not have a short form.
+% \begin{macrocode}
+\NewDocumentCommand{\doubled}{s}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \GetTranslation{Doubled-(ODw)}}{%
+ \GetTranslation{doubled-(ODw)}%
+ }%
+ \egroup%
+ \xspace%
+}% doubled
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\redoubled}
+% \begin{macrocode}
+\NewDocumentCommand{\redoubled}{s}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \GetTranslation{Redoubled-(ODw)}}{%
+ \GetTranslation{redoubled-(ODw)}%
+ }%
+ \egroup%
+ \xspace%
+}% redoubled
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Point Units}
+%
+% These macros retrieve the translations of the commands |\hpts|, |\lpts|,
+% |\dpts| and |\tpts| from the |ODw|-dictionary of the active language.
+% \begin{macro}{\hpts}
+% \begin{macro}{\HCP}
+% \begin{macrocode}
+\NewDocumentCommand{\hpts}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{HCP-(ODw)}}%
+ {\GetTranslation{High Card Points-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{hcp-(ODw)}}%
+ {\GetTranslation{high card points-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% High Card Points
+%
+\def\HCP{\hpts*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\lpts}
+% \begin{macro}{\LP}
+% \begin{macrocode}
+\NewDocumentCommand{\lpts}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{LP-(ODw)}}%
+ {\GetTranslation{Length Points-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{lp-(ODw)}}%
+ {\GetTranslation{length points-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Length Points
+%
+\def\LP{\lpts*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\dpts}
+% \begin{macro}{\DP}
+% \begin{macrocode}
+\NewDocumentCommand{\dpts}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{DP-(ODw)}}%
+ {\GetTranslation{Distribution Points-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{dp-(ODw)}}%
+ {\GetTranslation{distribution points-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Distribution Points
+%
+\def\DP{\dpts*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\tpts}
+% \begin{macro}{\TP}
+% \begin{macrocode}
+\NewDocumentCommand{\tpts}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{TP-(ODw)}}%
+ {\GetTranslation{Total Points-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{tp-(ODw)}}%
+ {\GetTranslation{total points-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Total Points
+%
+\def\TP{\tpts*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Forcings}
+%
+% These macros retrieve the translations of the commands |\gforce|,
+% |\sforce|, |\nmforce|, |\tsforce| and |\fsforce| from the
+% |ODw|-dictionary of the active language.
+% \begin{macro}{\gforce}
+% \begin{macro}{\GF}
+% \begin{macrocode}
+\NewDocumentCommand{\gforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{GF-(ODw)}}%
+ {\GetTranslation{Game Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{gf-(ODw)}}%
+ {\GetTranslation{game forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Game Forcing
+%
+\def\GF{\gforce*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\sforce}
+% \begin{macro}{\SF}
+% \begin{macrocode}
+\NewDocumentCommand{\sforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{SF-(ODw)}}%
+ {\GetTranslation{Semi Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{sf-(ODw)}}%
+ {\GetTranslation{semi forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Semi Forcing
+%
+\def\SF{\sforce*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\nmforce}
+% \begin{macro}{\NMF}
+% \begin{macrocode}
+\NewDocumentCommand{\nmforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{NMF-(ODw)}}%
+ {\GetTranslation{New Minor Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{nmf-(ODw)}}%
+ {\GetTranslation{new minor forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% New Minor Forcing
+%
+\def\NMF{\nmforce*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\tsforce}
+% \begin{macro}{\TSF}
+% \begin{macrocode}
+\NewDocumentCommand{\tsforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{TSF-(ODw)}}%
+ {\GetTranslation{Third Suit Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{tsf-(ODw)}}%
+ {\GetTranslation{third suit forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Third Suit Forcing
+%
+\def\TSF{\tsforce*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\fsforce}
+% \begin{macro}{\FSF}
+% \begin{macrocode}
+\NewDocumentCommand{\fsforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{FSF-(ODw)}}%
+ {\GetTranslation{Fourth Suit Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{fsf-(ODw)}}%
+ {\GetTranslation{fourth suit forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Fourth Suit Forcing
+%
+\def\FSF{\fsforce*!}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Initialization}\label{Init}
+%
+% It's time to prepare everything. We clear the game and set the defaults.
+% \begin{macrocode}
+\newgame
+% \end{macrocode}
+% Set the default fonts
+% \begin{macrocode}
+\setdefaults{bidder=\mdseries\sffamily}
+\setdefaults{compass=\mdseries\sffamily}
+\setdefaults{game=\bfseries\sffamily}
+\setdefaults{legend=\mdseries\rmfamily}
+\setdefaults{name=\mdseries\slshape}
+\setdefaults*{other=\bfseries\sffamily}
+% \end{macrocode}
+% Set the compass
+% \begin{macrocode}
+\setdefaults{compshow=on,compturn=off}
+% \end{macrocode}
+% set the start column for bidding (West is recommended) and the long form.
+% \begin{macrocode}
+\setdefaults{bidfirst=W,bidders=on,bidlong=on}
+% \end{macrocode}
+% Now we load the dictionaries for the languages that are to be used in
+% the document. We use \packname{tracklang} to iterate over all the
+% document languages and load the corresponding |ODw|-dictionaries. Due to
+% an inconsistency between \packname{babel} and \packname{translations}
+% with respect to the Norwegian language (\packname{babel} calls this
+% language \emph{norsk} whereas \packname{translations} insist on using
+% \emph{norwegian}, we redefine |\thislang| to the latter if it happens to
+% be \emph{norsk}.
+% \begin{macrocode}
+\AtBeginDocument{%
+\ForEachTrackedLanguage{\thislang}{%
+ \ifthenelse{\equal{\thislang}{norsk}}%
+ {\def\thislang{norwegian}}{}%
+ \IfFileExists{ODw-\thislang.trsl}%
+ {%
+ \LoadDictionaryFor{\thislang}{ODw}%
+ \PackageInfo{ODw}{%
+ Translation dictionary ODw-\thislang.trsl loaded%
+ }%
+ }{%
+ \PackageWarning{ODw}{%
+ Translation dictionary ODw-\thislang.trsl not found%
+ }%
+ }%
+}% ForEach
+}% AtBeginDocument
+% \end{macrocode}
+% That's it folks, happy \TeX ing!
+% \begin{macrocode}
+\endinput% onedown.sty
+% \end{macrocode}
+
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+% \begin{thebibliography}{Laan}
+% \bibitem{Laan} Kees van der Laan:
+% \emph{Typsetting Bridge via \TeX},
+% TUGboat Vol.~11, No.~2 (1990), p265ff
+%
+% \bibitem{Pav} Richard Pavlicek:
+% \emph{Bridge Writing Style Guide},
+% \url{http://www.rpbridge.net/7z69.htm}
+% \end{thebibliography}
+%
+% \PrintChanges
+% \newpage
+% \PrintIndex
+% \ifnumequal{\pdfshellescape}{1}{%
+% \newpage
+% \enlargethispage{1\baselineskip}
+% \immediate\closeout\UCFile
+% \begin{multicols}{3}[\section{List of User Commands}]
+%
+% \IfFileExists{\jobname.odw}
+% {\noindent\input{\jobname.odw}}
+% {\PackageWarning{ODw}{File \jobname.odw not found}}
+% \end{multicols}
+% }{}
+\endinput
diff --git a/Master/texmf-dist/source/latex/onedown/onedown.ins b/Master/texmf-dist/source/latex/onedown/onedown.ins
new file mode 100644
index 00000000000..3f074da16b4
--- /dev/null
+++ b/Master/texmf-dist/source/latex/onedown/onedown.ins
@@ -0,0 +1,56 @@
+%%
+%% Copyright (C) 2016 by Jacob Wiersma <jack46@online.de>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 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.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/onedown}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2018 by Jacob Wiersma <jack46@online.de>
+
+This file may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3 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.3 or later is part of all distributions of LaTeX version
+2005/12/01 or later.
+
+\endpreamble
+
+\askforoverwritefalse
+\generate{\file{onedown.sty}{\from{onedown.dtx}{package}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* onedown.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file onedown.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile
diff --git a/Master/texmf-dist/tex/latex/onedown/ODw-danish.trsl b/Master/texmf-dist/tex/latex/onedown/ODw-danish.trsl
new file mode 100644
index 00000000000..da30963e6cd
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/ODw-danish.trsl
@@ -0,0 +1,158 @@
+% this is file ODw-danish.trsl
+%
+% Entries with a "!" denote an abreviated form
+%
+%% retrieve with e.g \GetTranslation{dealer-(ODw)} to get givare
+%
+\ProvideDictionaryFor{danish}{ODw}[V0.4]
+
+\NewDictTranslation{1st-(ODw)}{1.}
+\NewDictTranslation{2nd-(ODw)}{2.}
+\NewDictTranslation{3rd-(ODw)}{3.}
+\NewDictTranslation{4th-(ODw)}{4.}
+\NewDictTranslation{ace-(ODw)}{es}
+\NewDictTranslation{Ace-(ODw)}{Es}
+\NewDictTranslation{all-(ODw)}{alle}
+\NewDictTranslation{All-(ODw)}{Alle}
+\NewDictTranslation{all!-(ODw)}{alle}
+\NewDictTranslation{All!-(ODw)}{Alle}
+\NewDictTranslation{all pass-(ODw)}{alle passer}
+\NewDictTranslation{All pass-(ODw)}{Alle passer}
+\NewDictTranslation{a-(ODw)}{e}
+\NewDictTranslation{A-(ODw)}{E}% Es
+%\NewDictTranslation{award-(ODw)}{poäng}
+%\NewDictTranslation{Award-(ODw)}{Poäng}
+\NewDictTranslation{award-(ODw)}{värdering}
+\NewDictTranslation{Award-(ODw)}{Värdering}
+\NewDictTranslation{bid-(ODw)}{meldt}
+\NewDictTranslation{Bid-(ODw)}{Meldt}
+\NewDictTranslation{board-(ODw)}{bræt}
+\NewDictTranslation{Board-(ODw)}{Bræt}
+\NewDictTranslation{brd-(ODw)}{brt}
+\NewDictTranslation{Brd-(ODw)}{Brt}
+\NewDictTranslation{by-(ODw)}{af}
+\NewDictTranslation{call-(ODw)}{bud}
+\NewDictTranslation{Call-(ODw)}{Bud}
+\NewDictTranslation{-card-(ODw)}{-kort}
+\NewDictTranslation{contract-(ODw)}{kontrakten}
+\NewDictTranslation{Contract-(ODw)}{Kontrakten}
+\NewDictTranslation{contr-(ODw)}{kontr}
+\NewDictTranslation{Contr-(ODw)}{Kontr}
+\NewDictTranslation{Dbl-(ODw)}{Dbl}
+\NewDictTranslation{dealer-(ODw)}{givet}
+\NewDictTranslation{Dealer-(ODw)}{Givet}
+\NewDictTranslation{deal-(ODw)}{giv}
+\NewDictTranslation{Deal-(ODw)}{Giv}
+\NewDictTranslation{deal!-(ODw)}{giv}
+\NewDictTranslation{Deal!-(ODw)}{Giv}
+\NewDictTranslation{declarer-(ODw)}{spilfører}
+\NewDictTranslation{Declarer-(ODw)}{Spilfører}
+\NewDictTranslation{decl-(ODw)}{spilf}
+\NewDictTranslation{Decl-(ODw)}{Spilf}
+\NewDictTranslation{distribution points-(ODw)}{fordelingspoints}
+\NewDictTranslation{Distribution Points-(ODw)}{Fordelingspoints}
+\NewDictTranslation{doubled-(ODw)}{dubbelt}
+\NewDictTranslation{Doubled-(ODw)}{Dubbelt}
+\NewDictTranslation{double-(ODw)}{dubbelt}
+\NewDictTranslation{Double-(ODw)}{Dubbelt}
+\NewDictTranslation{dp-(ODw)}{fp}
+\NewDictTranslation{DP-(ODw)}{FP}
+\NewDictTranslation{east-(ODw)}{øst}
+\NewDictTranslation{East-(ODw)}{Øst}
+\NewDictTranslation{e-(ODw)}{ø}
+\NewDictTranslation{E-(ODw)}{Ø}
+\NewDictTranslation{fourth suit forcing-(ODw)}{fjerde farve forcing}
+\NewDictTranslation{Fourth Suit Forcing-(ODw)}{Fjerde Farve Forcing}
+\NewDictTranslation{fsf-(ODw)}{4. ff}
+\NewDictTranslation{FSF-(ODw)}{4. FF}
+\NewDictTranslation{game forcing-(ODw)}{krav till utgång}
+\NewDictTranslation{Game Forcing-(ODw)}{Krav till Utgång}
+\NewDictTranslation{gf-(ODw)}{ku}
+\NewDictTranslation{GF-(ODw)}{KU}
+\NewDictTranslation{Hand-(ODw)}{Hånd}
+\NewDictTranslation{hand-(ODw)}{hånd}
+\NewDictTranslation{hcp-(ODw)}{hp}
+\NewDictTranslation{HCP-(ODw)}{HP}
+\NewDictTranslation{high card points-(ODw)}{honnørpoints}
+\NewDictTranslation{High Card Points-(ODw)}{Honnørpoints}
+\NewDictTranslation{jack-(ODw)}{knægt}
+\NewDictTranslation{Jack-(ODw)}{Knægt}
+\NewDictTranslation{j-(ODw)}{kn}
+\NewDictTranslation{J-(ODw)}{\mbox{K\kern-0.08emn}}
+\NewDictTranslation{king-(ODw)}{konge}
+\NewDictTranslation{King-(ODw)}{Konge}
+\NewDictTranslation{k-(ODw)}{k}
+\NewDictTranslation{K-(ODw)}{K}
+\NewDictTranslation{lead!-(ODw)}{udsp.}
+\NewDictTranslation{Lead!-(ODw)}{Udsp.}
+\NewDictTranslation{Lead-(ODw)}{Udspillet}
+\NewDictTranslation{lead-(ODw)}{udspillet}
+\NewDictTranslation{length points-(ODw)}{længepoints}
+\NewDictTranslation{Length Points-(ODw)}{Længepoints}
+\NewDictTranslation{lp-(ODw)}{lp}
+\NewDictTranslation{LP-(ODw)}{LP}
+\NewDictTranslation{n-(ODw)}{n}
+\NewDictTranslation{N-(ODw)}{N}
+\NewDictTranslation{new minor forcing-(ODw)}{nye minor forcing}
+\NewDictTranslation{New Minor Forcing-(ODw)}{Nye Minor Forcing}
+\NewDictTranslation{nmf-(ODw)}{nmf}
+\NewDictTranslation{NMF-(ODw)}{NMF}
+\NewDictTranslation{none-(ODw)}{ingen}
+\NewDictTranslation{None-(ODw)}{Ingen}
+\NewDictTranslation{none!-(ODw)}{ingen}
+\NewDictTranslation{None!-(ODw)}{Ingen}
+\NewDictTranslation{north-(ODw)}{norr}
+\NewDictTranslation{North-(ODw)}{Norr}
+\NewDictTranslation{no trump-(ODw)}{uden trumf}
+\NewDictTranslation{No Trump-(ODw)}{Uden Trumf}
+\NewDictTranslation{Nr-(ODw)}{\textnumero}
+\NewDictTranslation{Nr.-(ODw)}{\textnumero.}
+\NewDictTranslation{NT-(ODw)}{U\kern-0.01emT}%Uden Trumf
+\NewDictTranslation{nt-(ODw)}{ut}
+\NewDictTranslation{pass-(ODw)}{pas}
+\NewDictTranslation{Pass-(ODw)}{Pas}
+\NewDictTranslation{pass!-(ODw)}{pas}
+\NewDictTranslation{Pass!-(ODw)}{Pas}
+\NewDictTranslation{q-(ODw)}{d}
+\NewDictTranslation{Q-(ODw)}{D}
+\NewDictTranslation{queen-(ODw)}{dame}
+\NewDictTranslation{Queen-(ODw)}{Dame}
+\NewDictTranslation{ReDbl-(ODw)}{ReDbl}
+\NewDictTranslation{redoubled-(ODw)}{redubbelt}
+\NewDictTranslation{Redoubled-(ODw)}{Redubbelt}
+\NewDictTranslation{redouble-(ODw)}{redubbelt}
+\NewDictTranslation{Redouble-(ODw)}{Redubbelt}
+\NewDictTranslation{semi forcing-(ODw)}{semi forcing}
+\NewDictTranslation{Semi Forcing-(ODw)}{Semi Forcing}
+\NewDictTranslation{sf-(ODw)}{sf}
+\NewDictTranslation{SF-(ODw)}{SF}
+\NewDictTranslation{s-(ODw)}{s}
+\NewDictTranslation{S-(ODw)}{S}
+\NewDictTranslation{south-(ODw)}{syd}
+\NewDictTranslation{South-(ODw)}{Syd}
+\NewDictTranslation{suiter-(ODw)}{farver}
+\NewDictTranslation{Suiter-(ODw)}{Farver}
+\NewDictTranslation{suit-(ODw)}{farve}
+\NewDictTranslation{Suit-(ODw)}{Farve}
+\NewDictTranslation{third suit forcing-(ODw)}{tredje farve forcing}
+\NewDictTranslation{Third Suit Forcing-(ODw)}{Tredje Farve Forcing}
+\NewDictTranslation{total points-(ODw)}{total points}
+\NewDictTranslation{Total Points-(ODw)}{Total Points}
+\NewDictTranslation{tp-(ODw)}{sp}
+\NewDictTranslation{TP-(ODw)}{SP}
+\NewDictTranslation{trial bid-(ODw)}{trial bid}
+\NewDictTranslation{Trial bid-(ODw)}{Trial bid}
+\NewDictTranslation{trick-(ODw)}{træk}
+\NewDictTranslation{Trick-(ODw)}{Træk}
+\NewDictTranslation{tsf-(ODw)}{3. ff}
+\NewDictTranslation{TSF-(ODw)}{3. FF}
+\NewDictTranslation{vulnerable-(ODw)}{sårbar}
+\NewDictTranslation{Vulnerable-(ODw)}{Sårbar}
+\NewDictTranslation{vul-(ODw)}{sår}
+\NewDictTranslation{Vul-(ODw)}{Sår}
+\NewDictTranslation{west-(ODw)}{vest}
+\NewDictTranslation{West-(ODw)}{Vest}
+\NewDictTranslation{w-(ODw)}{v}
+\NewDictTranslation{W-(ODw)}{V}
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/onedown/ODw-dutch.trsl b/Master/texmf-dist/tex/latex/onedown/ODw-dutch.trsl
new file mode 100644
index 00000000000..9fa9333af18
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/ODw-dutch.trsl
@@ -0,0 +1,158 @@
+% this is file ODw-dutch.trsl from the OneDown bundle
+%
+% Entries with a "!" denote an abreviated form
+%
+% retrieve with e.g. \GetTranslation{dealer-(ODw)} to get dealer
+%
+\ProvideDictionaryFor{dutch}{ODw}[V0.4]
+
+\NewDictTranslation{1st-(ODw)}{1ste}
+\NewDictTranslation{2nd-(ODw)}{2de}
+\NewDictTranslation{3rd-(ODw)}{3de}
+\NewDictTranslation{4th-(ODw)}{4de}
+\NewDictTranslation{ace-(ODw)}{aas}
+\NewDictTranslation{Ace-(ODw)}{Aas}
+\NewDictTranslation{all-(ODw)}{alle}
+\NewDictTranslation{All-(ODw)}{Alle}
+\NewDictTranslation{all!-(ODw)}{alle}
+\NewDictTranslation{All!-(ODw)}{Alle}
+\NewDictTranslation{all pass-(ODw)}{allen passen}
+\NewDictTranslation{All pass-(ODw)}{Allen passen}
+\NewDictTranslation{a-(ODw)}{a}
+\NewDictTranslation{A-(ODw)}{A}
+\NewDictTranslation{ap-(ODw)}{ap}
+\NewDictTranslation{AP-(ODw)}{AP}
+\NewDictTranslation{award-(ODw)}{beloning}
+\NewDictTranslation{Award-(ODw)}{Beloning}
+\NewDictTranslation{bid-(ODw)}{bod}
+\NewDictTranslation{Bid-(ODw)}{Bod}
+\NewDictTranslation{board-(ODw)}{spel}
+\NewDictTranslation{Board-(ODw)}{Spel}
+\NewDictTranslation{brd-(ODw)}{spel}
+\NewDictTranslation{Brd-(ODw)}{Spel}
+\NewDictTranslation{by-(ODw)}{door}
+\NewDictTranslation{call-(ODw)}{bod}
+\NewDictTranslation{Call-(ODw)}{Bod}
+\NewDictTranslation{-card-(ODw)}{-kaart}
+\NewDictTranslation{contract-(ODw)}{contract}
+\NewDictTranslation{Contract-(ODw)}{Contract}
+\NewDictTranslation{contr-(ODw)}{contr}
+\NewDictTranslation{Contr-(ODw)}{Contr}
+\NewDictTranslation{Dbl-(ODw)}{Dbl}
+\NewDictTranslation{dealer-(ODw)}{gever}
+\NewDictTranslation{Dealer-(ODw)}{Gever}
+\NewDictTranslation{deal-(ODw)}{spel}
+\NewDictTranslation{Deal-(ODw)}{Spel}
+\NewDictTranslation{deal!-(ODw)}{spel}
+\NewDictTranslation{Deal!-(ODw)}{Spel}
+\NewDictTranslation{declarer-(ODw)}{leider}
+\NewDictTranslation{Declarer-(ODw)}{Leider}
+\NewDictTranslation{decl-(ODw)}{leider}
+\NewDictTranslation{Decl-(ODw)}{Leider}
+\NewDictTranslation{distribution points-(ODw)}{distributie punten}
+\NewDictTranslation{Distribution Points-(ODw)}{Distributie Punten}
+\NewDictTranslation{doubled-(ODw)}{gedoubleerd}
+\NewDictTranslation{Doubled-(ODw)}{Gedoubleerd}
+\NewDictTranslation{double-(ODw)}{doublet}
+\NewDictTranslation{Double-(ODw)}{Doublet}
+\NewDictTranslation{dp-(ODw)}{dp}
+\NewDictTranslation{DP-(ODw)}{DP}
+\NewDictTranslation{east-(ODw)}{oost}
+\NewDictTranslation{East-(ODw)}{Oost}
+\NewDictTranslation{e-(ODw)}{o}
+\NewDictTranslation{E-(ODw)}{O}
+\NewDictTranslation{fourth suit forcing-(ODw)}{vierde kleur forcing}
+\NewDictTranslation{Fourth Suit Forcing-(ODw)}{Vierde Kleur Forcing}
+\NewDictTranslation{fsf-(ODw)}{4de kc}
+\NewDictTranslation{FSF-(ODw)}{4de KV}
+\NewDictTranslation{game forcing-(ODw)}{manche forcing}
+\NewDictTranslation{Game Forcing-(ODw)}{Manche Forcing}
+\NewDictTranslation{gf-(ODw)}{mf}
+\NewDictTranslation{GF-(ODw)}{MF}
+\NewDictTranslation{hand-(ODw)}{hand}
+\NewDictTranslation{Hand-(ODw)}{Hand}
+\NewDictTranslation{hcp-(ODw)}{hp}
+\NewDictTranslation{HCP-(ODw)}{HP}
+\NewDictTranslation{high card points-(ODw)}{hoge punten}
+\NewDictTranslation{High Card Points-(ODw)}{Hoge Punten}
+\NewDictTranslation{jack-(ODw)}{boer}
+\NewDictTranslation{Jack-(ODw)}{Boer}
+\NewDictTranslation{j-(ODw)}{b}
+\NewDictTranslation{J-(ODw)}{B}
+\NewDictTranslation{king-(ODw)}{heer}
+\NewDictTranslation{King-(ODw)}{Heer}
+\NewDictTranslation{k-(ODw)}{h}
+\NewDictTranslation{K-(ODw)}{H}
+\NewDictTranslation{lead!-(ODw)}{uitk.}
+\NewDictTranslation{Lead!-(ODw)}{Uitk.}
+\NewDictTranslation{lead-(ODw)}{uitkomst}
+\NewDictTranslation{Lead-(ODw)}{Uitkomst}
+\NewDictTranslation{length points-(ODw)}{lengte punten}
+\NewDictTranslation{Length Points-(ODw)}{Lengte Punten}
+\NewDictTranslation{lp-(ODw)}{lp}
+\NewDictTranslation{LP-(ODw)}{LP}
+\NewDictTranslation{new minor forcing-(ODw)}{nieuwe lage kleur forcing}
+\NewDictTranslation{New Minor Forcing-(ODw)}{Nieuwe Lage Kleur Forcing}
+\NewDictTranslation{nmf-(ODw)}{nlf}
+\NewDictTranslation{NMF-(ODw)}{NLF}
+\NewDictTranslation{n-(ODw)}{n}
+\NewDictTranslation{N-(ODw)}{N}
+\NewDictTranslation{none-(ODw)}{geen}
+\NewDictTranslation{None-(ODw)}{Geen}
+\NewDictTranslation{none!-(ODw)}{geen}
+\NewDictTranslation{None!-(ODw)}{Geen}
+\NewDictTranslation{north-(ODw)}{noord}
+\NewDictTranslation{North-(ODw)}{Noord}
+\NewDictTranslation{no trump-(ODw)}{sans atout}
+\NewDictTranslation{No Trump-(ODw)}{Sans Atout}
+\NewDictTranslation{Nr-(ODw)}{\textnumero}
+\NewDictTranslation{Nr.-(ODw)}{\textnumero.}
+\NewDictTranslation{nt-(ODw)}{sa}
+\NewDictTranslation{NT-(ODw)}{S\kern-0.01emA}
+\NewDictTranslation{pass-(ODw)}{pas}
+\NewDictTranslation{Pass-(ODw)}{Pas}
+\NewDictTranslation{pass!-(ODw)}{pas}
+\NewDictTranslation{Pass!-(ODw)}{Pas}
+\NewDictTranslation{q-(ODw)}{v}
+\NewDictTranslation{Q-(ODw)}{V}
+\NewDictTranslation{queen-(ODw)}{vrouw}
+\NewDictTranslation{Queen-(ODw)}{Vrouw}
+\NewDictTranslation{ReDbl-(ODw)}{ReDbl}
+\NewDictTranslation{redoubled-(ODw)}{geredoubleerd}
+\NewDictTranslation{Redoubled-(ODw)}{Geredoubleerd}
+\NewDictTranslation{redouble-(ODw)}{redoublet}
+\NewDictTranslation{Redouble-(ODw)}{Redoublet}
+\NewDictTranslation{semi forcing-(ODw)}{semi-mancheforcing}
+\NewDictTranslation{Semi Forcing-(ODw)}{Semi-MancheForcing}
+\NewDictTranslation{sf-(ODw)}{sf}
+\NewDictTranslation{SF-(ODw)}{SF}
+\NewDictTranslation{s-(ODw)}{z}
+\NewDictTranslation{S-(ODw)}{Z}
+\NewDictTranslation{south-(ODw)}{zuid}
+\NewDictTranslation{South-(ODw)}{Zuid}
+\NewDictTranslation{suiter-(ODw)}{kleurenspel}
+\NewDictTranslation{Suiter-(ODw)}{Kleurenspel}
+\NewDictTranslation{suit-(ODw)}{kleur}
+\NewDictTranslation{Suit-(ODw)}{Kleur}
+\NewDictTranslation{third suit forcing-(ODw)}{derde kleur forcing}
+\NewDictTranslation{Third Suit Forcing-(ODw)}{Derde Kleur Forcing}
+\NewDictTranslation{total points-(ODw)}{totaal punten}
+\NewDictTranslation{Total Points-(ODw)}{Totaal Punten}
+\NewDictTranslation{tp-(ODw)}{tp}
+\NewDictTranslation{TP-(ODw)}{TP}
+\NewDictTranslation{trial bid-(ODw)}{help bod}
+\NewDictTranslation{Trial bid-(ODw)}{Help bod}
+\NewDictTranslation{trick-(ODw)}{slag}
+\NewDictTranslation{Trick-(ODw)}{Slag}
+\NewDictTranslation{tsf-(ODw)}{3de kf}
+\NewDictTranslation{TSF-(ODw)}{3de KF}
+\NewDictTranslation{vulnerable-(ODw)}{kwetsbaar}
+\NewDictTranslation{Vulnerable-(ODw)}{Kwetsbaar}
+\NewDictTranslation{vul-(ODw)}{kwetsb}
+\NewDictTranslation{Vul-(ODw)}{Kwetsb}
+\NewDictTranslation{west-(ODw)}{west}
+\NewDictTranslation{West-(ODw)}{West}
+\NewDictTranslation{w-(ODw)}{w}
+\NewDictTranslation{W-(ODw)}{W}
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/onedown/ODw-english.trsl b/Master/texmf-dist/tex/latex/onedown/ODw-english.trsl
new file mode 100644
index 00000000000..3806b2dce73
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/ODw-english.trsl
@@ -0,0 +1,158 @@
+% this is file ODw-english.trsl from the OneDown bundle
+%
+% Entries with a "!" denote an abreviated form
+%
+% retrieve with e.g. \GetTranslation{dealer-(ODw)} to get dealer
+%
+\ProvideDictionaryFor{english}{ODw}[V0.4]
+
+\NewDictTranslation{1st-(ODw)}{1st}
+\NewDictTranslation{2nd-(ODw)}{2nd}
+\NewDictTranslation{3rd-(ODw)}{3rd}
+\NewDictTranslation{4th-(ODw)}{4th}
+\NewDictTranslation{ace-(ODw)}{ace}
+\NewDictTranslation{Ace-(ODw)}{Ace}
+\NewDictTranslation{all-(ODw)}{all}
+\NewDictTranslation{All-(ODw)}{All}
+\NewDictTranslation{all!-(ODw)}{all}
+\NewDictTranslation{All!-(ODw)}{All}
+\NewDictTranslation{all pass-(ODw)}{all pass}
+\NewDictTranslation{All pass-(ODw)}{All pass}
+\NewDictTranslation{a-(ODw)}{a}
+\NewDictTranslation{A-(ODw)}{A}
+\NewDictTranslation{ap-(ODw)}{ap}
+\NewDictTranslation{AP-(ODw)}{AP}
+\NewDictTranslation{Award-(ODw)}{Award}
+\NewDictTranslation{award-(ODw)}{award}% = points you earn in a quiz
+\NewDictTranslation{Bid-(ODw)}{Bid}
+\NewDictTranslation{bid-(ODw)}{bid}% = e.g. 2C, 4H or 6NT
+\NewDictTranslation{Board-(ODw)}{Board}
+\NewDictTranslation{board-(ODw)}{board}% = equipment that holds 1 deal
+\NewDictTranslation{Brd-(ODw)}{Brd}
+\NewDictTranslation{brd-(ODw)}{brd}% = equipment that holds 1 deal
+\NewDictTranslation{by-(ODw)}{by}
+\NewDictTranslation{Call-(ODw)}{Call}
+\NewDictTranslation{call-(ODw)}{call}% = bid + pass, (re)double
+\NewDictTranslation{-card-(ODw)}{-card}
+\NewDictTranslation{contract-(ODw)}{contract}
+\NewDictTranslation{Contract-(ODw)}{Contract}
+\NewDictTranslation{contr-(ODw)}{contr}
+\NewDictTranslation{Contr-(ODw)}{Contr}
+\NewDictTranslation{Dbl-(ODw)}{Dbl}
+\NewDictTranslation{dealer-(ODw)}{dealer}
+\NewDictTranslation{Dealer-(ODw)}{Dealer}
+\NewDictTranslation{Deal-(ODw)}{Deal}
+\NewDictTranslation{Deal!-(ODw)}{Deal}
+\NewDictTranslation{deal-(ODw)}{deal}% = 4 hands
+\NewDictTranslation{deal!-(ODw)}{deal}% = 4 hands
+\NewDictTranslation{declarer-(ODw)}{declarer}
+\NewDictTranslation{Declarer-(ODw)}{Declarer}
+\NewDictTranslation{decl-(ODw)}{decl}
+\NewDictTranslation{Decl-(ODw)}{Decl}
+\NewDictTranslation{distribution points-(ODw)}{distribution points}
+\NewDictTranslation{Distribution Points-(ODw)}{Distribution Points}
+\NewDictTranslation{doubled-(ODw)}{doubled}
+\NewDictTranslation{Doubled-(ODw)}{Doubled}
+\NewDictTranslation{double-(ODw)}{double}
+\NewDictTranslation{Double-(ODw)}{Double}
+\NewDictTranslation{dp-(ODw)}{dp}
+\NewDictTranslation{DP-(ODw)}{DP}
+\NewDictTranslation{east-(ODw)}{east}
+\NewDictTranslation{East-(ODw)}{East}
+\NewDictTranslation{e-(ODw)}{e}
+\NewDictTranslation{E-(ODw)}{E}
+\NewDictTranslation{fourth suit forcing-(ODw)}{fourth suit forcing}
+\NewDictTranslation{Fourth Suit Forcing-(ODw)}{Fourth Suit Forcing}
+\NewDictTranslation{fsf-(ODw)}{4th sf}
+\NewDictTranslation{FSF-(ODw)}{4th SF}
+\NewDictTranslation{game forcing-(ODw)}{game forcing}
+\NewDictTranslation{Game Forcing-(ODw)}{Game Forcing}
+\NewDictTranslation{gf-(ODw)}{gf}
+\NewDictTranslation{GF-(ODw)}{GF}
+\NewDictTranslation{Hand-(ODw)}{Hand}
+\NewDictTranslation{hand-(ODw)}{hand}% = 13 cards of 1 player
+\NewDictTranslation{hcp-(ODw)}{hcp}
+\NewDictTranslation{HCP-(ODw)}{HCP}
+\NewDictTranslation{high card points-(ODw)}{high card points}
+\NewDictTranslation{High Card Points-(ODw)}{High Card Points}
+\NewDictTranslation{jack-(ODw)}{jack}
+\NewDictTranslation{Jack-(ODw)}{Jack}
+\NewDictTranslation{j-(ODw)}{j}
+\NewDictTranslation{J-(ODw)}{J}
+\NewDictTranslation{king-(ODw)}{king}
+\NewDictTranslation{King-(ODw)}{King}
+\NewDictTranslation{k-(ODw)}{k}
+\NewDictTranslation{K-(ODw)}{K}
+\NewDictTranslation{lead-(ODw)}{lead}
+\NewDictTranslation{Lead-(ODw)}{Lead}
+\NewDictTranslation{lead!-(ODw)}{lead}
+\NewDictTranslation{Lead!-(ODw)}{Lead}
+\NewDictTranslation{length points-(ODw)}{length points}
+\NewDictTranslation{Length Points-(ODw)}{Length Points}
+\NewDictTranslation{lp-(ODw)}{lp}
+\NewDictTranslation{LP-(ODw)}{LP}
+\NewDictTranslation{new minor forcing-(ODw)}{new minor forcing}
+\NewDictTranslation{New Minor Forcing-(ODw)}{New Minor Forcing}
+\NewDictTranslation{nmf-(ODw)}{nmf}
+\NewDictTranslation{NMF-(ODw)}{NMF}
+\NewDictTranslation{n-(ODw)}{n}
+\NewDictTranslation{N-(ODw)}{N}
+\NewDictTranslation{none-(ODw)}{none}
+\NewDictTranslation{None-(ODw)}{None}
+\NewDictTranslation{none!-(ODw)}{none}
+\NewDictTranslation{None!-(ODw)}{None}
+\NewDictTranslation{north-(ODw)}{north}
+\NewDictTranslation{North-(ODw)}{North}
+\NewDictTranslation{no trump-(ODw)}{no trump}
+\NewDictTranslation{No Trump-(ODw)}{No Trump}
+\NewDictTranslation{Nr-(ODw)}{\textnumero}
+\NewDictTranslation{Nr.-(ODw)}{\textnumero.}
+\NewDictTranslation{NT-(ODw)}{N\kern-0.07emT}
+\NewDictTranslation{nt-(ODw)}{nt}
+\NewDictTranslation{pass-(ODw)}{pass}
+\NewDictTranslation{Pass-(ODw)}{Pass}
+\NewDictTranslation{pass!-(ODw)}{pass}
+\NewDictTranslation{Pass!-(ODw)}{Pass}
+\NewDictTranslation{q-(ODw)}{q}
+\NewDictTranslation{Q-(ODw)}{Q}
+\NewDictTranslation{queen-(ODw)}{queen}
+\NewDictTranslation{Queen-(ODw)}{Queen}
+\NewDictTranslation{ReDbl-(ODw)}{ReDbl}
+\NewDictTranslation{redoubled-(ODw)}{redoubled}
+\NewDictTranslation{Redoubled-(ODw)}{Redoubled}
+\NewDictTranslation{redouble-(ODw)}{redouble}
+\NewDictTranslation{ReDouble-(ODw)}{ReDouble}
+\NewDictTranslation{semi forcing-(ODw)}{semi forcing}
+\NewDictTranslation{Semi Forcing-(ODw)}{Semi Forcing}
+\NewDictTranslation{sf-(ODw)}{sf}
+\NewDictTranslation{SF-(ODw)}{SF}
+\NewDictTranslation{s-(ODw)}{s}
+\NewDictTranslation{S-(ODw)}{S}
+\NewDictTranslation{south-(ODw)}{south}
+\NewDictTranslation{South-(ODw)}{South}
+\NewDictTranslation{suiter-(ODw)}{suiter}
+\NewDictTranslation{Suiter-(ODw)}{Suiter}
+\NewDictTranslation{suit-(ODw)}{suit}
+\NewDictTranslation{Suit-(ODw)}{Suit}
+\NewDictTranslation{third suit forcing-(ODw)}{third suit forcing}
+\NewDictTranslation{Third Suit Forcing-(ODw)}{Third Suit Forcing}
+\NewDictTranslation{total points-(ODw)}{total points}
+\NewDictTranslation{Total Points-(ODw)}{Total Points}
+\NewDictTranslation{tp-(ODw)}{tp}
+\NewDictTranslation{TP-(ODw)}{TP}
+\NewDictTranslation{trial bid-(ODw)}{trial bid}
+\NewDictTranslation{Trial bid-(ODw)}{Trial bid}
+\NewDictTranslation{trick-(ODw)}{trick}
+\NewDictTranslation{Trick-(ODw)}{Trick}
+\NewDictTranslation{tsf-(ODw)}{3rd sf}
+\NewDictTranslation{TSF-(ODw)}{3rd SF}
+\NewDictTranslation{vulnerable-(ODw)}{vulnerable}
+\NewDictTranslation{Vulnerable-(ODw)}{Vulnerable}
+\NewDictTranslation{vul-(ODw)}{vul}
+\NewDictTranslation{Vul-(ODw)}{Vul}
+\NewDictTranslation{west-(ODw)}{west}
+\NewDictTranslation{West-(ODw)}{West}
+\NewDictTranslation{w-(ODw)}{w}
+\NewDictTranslation{W-(ODw)}{W}
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/onedown/ODw-fallback.trsl b/Master/texmf-dist/tex/latex/onedown/ODw-fallback.trsl
new file mode 100644
index 00000000000..e889919ba82
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/ODw-fallback.trsl
@@ -0,0 +1,158 @@
+% this is file ODw-fallback.trsl from the OneDown bundle
+%
+% Entries with a "!" denote an abreviated form
+%
+% retrieve with e.g. \GetTranslation{dealer-(ODw)} to get dealer
+%
+\ProvideDictionaryFor{fallback}{ODw}[V0.4]
+
+\NewDictTranslation{1st-(ODw)}{1st}
+\NewDictTranslation{2nd-(ODw)}{2nd}
+\NewDictTranslation{3rd-(ODw)}{3rd}
+\NewDictTranslation{4th-(ODw)}{4th}
+\NewDictTranslation{ace-(ODw)}{ace}
+\NewDictTranslation{Ace-(ODw)}{Ace}
+\NewDictTranslation{all-(ODw)}{all}
+\NewDictTranslation{All-(ODw)}{All}
+\NewDictTranslation{all!-(ODw)}{all}
+\NewDictTranslation{All!-(ODw)}{All}
+\NewDictTranslation{all pass-(ODw)}{all pass}
+\NewDictTranslation{All pass-(ODw)}{All pass}
+\NewDictTranslation{a-(ODw)}{a}
+\NewDictTranslation{A-(ODw)}{A}
+\NewDictTranslation{ap-(ODw)}{ap}
+\NewDictTranslation{AP-(ODw)}{AP}
+\NewDictTranslation{Award-(ODw)}{Award}
+\NewDictTranslation{award-(ODw)}{award}% = points you earn in a quiz
+\NewDictTranslation{Bid-(ODw)}{Bid}
+\NewDictTranslation{bid-(ODw)}{bid}% = e.g. 2C, 4H or 6NT
+\NewDictTranslation{Board-(ODw)}{Board}
+\NewDictTranslation{board-(ODw)}{board}% = equipment that holds 1 deal
+\NewDictTranslation{Brd-(ODw)}{Brd}
+\NewDictTranslation{brd-(ODw)}{brd}% = equipment that holds 1 deal
+\NewDictTranslation{by-(ODw)}{by}
+\NewDictTranslation{Call-(ODw)}{Call}
+\NewDictTranslation{call-(ODw)}{call}% = bid + pass, (re)double
+\NewDictTranslation{-card-(ODw)}{-card}
+\NewDictTranslation{contract-(ODw)}{contract}
+\NewDictTranslation{Contract-(ODw)}{Contract}
+\NewDictTranslation{contr-(ODw)}{contr}
+\NewDictTranslation{Contr-(ODw)}{Contr}
+\NewDictTranslation{Dbl-(ODw)}{Dbl}
+\NewDictTranslation{dealer-(ODw)}{dealer}
+\NewDictTranslation{Dealer-(ODw)}{Dealer}
+\NewDictTranslation{Deal-(ODw)}{Deal}
+\NewDictTranslation{Deal!-(ODw)}{Deal}
+\NewDictTranslation{deal-(ODw)}{deal}% = 4 hands
+\NewDictTranslation{deal!-(ODw)}{deal}% = 4 hands
+\NewDictTranslation{declarer-(ODw)}{declarer}
+\NewDictTranslation{Declarer-(ODw)}{Declarer}
+\NewDictTranslation{decl-(ODw)}{decl}
+\NewDictTranslation{Decl-(ODw)}{Decl}
+\NewDictTranslation{distribution points-(ODw)}{distribution points}
+\NewDictTranslation{Distribution Points-(ODw)}{Distribution Points}
+\NewDictTranslation{doubled-(ODw)}{doubled}
+\NewDictTranslation{Doubled-(ODw)}{Doubled}
+\NewDictTranslation{double-(ODw)}{double}
+\NewDictTranslation{Double-(ODw)}{Double}
+\NewDictTranslation{dp-(ODw)}{dp}
+\NewDictTranslation{DP-(ODw)}{DP}
+\NewDictTranslation{east-(ODw)}{east}
+\NewDictTranslation{East-(ODw)}{East}
+\NewDictTranslation{e-(ODw)}{e}
+\NewDictTranslation{E-(ODw)}{E}
+\NewDictTranslation{fourth suit forcing-(ODw)}{fourth suit forcing}
+\NewDictTranslation{Fourth Suit Forcing-(ODw)}{Fourth Suit Forcing}
+\NewDictTranslation{fsf-(ODw)}{4th sf}
+\NewDictTranslation{FSF-(ODw)}{4th SF}
+\NewDictTranslation{game forcing-(ODw)}{game forcing}
+\NewDictTranslation{Game Forcing-(ODw)}{Game Forcing}
+\NewDictTranslation{gf-(ODw)}{gf}
+\NewDictTranslation{GF-(ODw)}{GF}
+\NewDictTranslation{Hand-(ODw)}{Hand}
+\NewDictTranslation{hand-(ODw)}{hand}% = 13 cards of 1 player
+\NewDictTranslation{hcp-(ODw)}{hcp}
+\NewDictTranslation{HCP-(ODw)}{HCP}
+\NewDictTranslation{high card points-(ODw)}{high card points}
+\NewDictTranslation{High Card Points-(ODw)}{High Card Points}
+\NewDictTranslation{jack-(ODw)}{jack}
+\NewDictTranslation{Jack-(ODw)}{Jack}
+\NewDictTranslation{j-(ODw)}{j}
+\NewDictTranslation{J-(ODw)}{J}
+\NewDictTranslation{king-(ODw)}{king}
+\NewDictTranslation{King-(ODw)}{King}
+\NewDictTranslation{k-(ODw)}{k}
+\NewDictTranslation{K-(ODw)}{K}
+\NewDictTranslation{lead-(ODw)}{lead}
+\NewDictTranslation{Lead-(ODw)}{Lead}
+\NewDictTranslation{lead!-(ODw)}{lead}
+\NewDictTranslation{Lead!-(ODw)}{Lead}
+\NewDictTranslation{length points-(ODw)}{length points}
+\NewDictTranslation{Length Points-(ODw)}{Length Points}
+\NewDictTranslation{lp-(ODw)}{lp}
+\NewDictTranslation{LP-(ODw)}{LP}
+\NewDictTranslation{new minor forcing-(ODw)}{new minor forcing}
+\NewDictTranslation{New Minor Forcing-(ODw)}{New Minor Forcing}
+\NewDictTranslation{nmf-(ODw)}{nmf}
+\NewDictTranslation{NMF-(ODw)}{NMF}
+\NewDictTranslation{n-(ODw)}{n}
+\NewDictTranslation{N-(ODw)}{N}
+\NewDictTranslation{none-(ODw)}{none}
+\NewDictTranslation{None-(ODw)}{None}
+\NewDictTranslation{none!-(ODw)}{none}
+\NewDictTranslation{None!-(ODw)}{None}
+\NewDictTranslation{north-(ODw)}{north}
+\NewDictTranslation{North-(ODw)}{North}
+\NewDictTranslation{no trump-(ODw)}{no trump}
+\NewDictTranslation{No Trump-(ODw)}{No Trump}
+\NewDictTranslation{Nr-(ODw)}{\textnumero}
+\NewDictTranslation{Nr.-(ODw)}{\textnumero.}
+\NewDictTranslation{NT-(ODw)}{N\kern-0.07emT}
+\NewDictTranslation{nt-(ODw)}{nt}
+\NewDictTranslation{pass-(ODw)}{pass}
+\NewDictTranslation{Pass-(ODw)}{Pass}
+\NewDictTranslation{pass!-(ODw)}{pass}
+\NewDictTranslation{Pass!-(ODw)}{Pass}
+\NewDictTranslation{q-(ODw)}{q}
+\NewDictTranslation{Q-(ODw)}{Q}
+\NewDictTranslation{queen-(ODw)}{queen}
+\NewDictTranslation{Queen-(ODw)}{Queen}
+\NewDictTranslation{ReDbl-(ODw)}{ReDbl}
+\NewDictTranslation{redoubled-(ODw)}{redoubled}
+\NewDictTranslation{Redoubled-(ODw)}{Redoubled}
+\NewDictTranslation{redouble-(ODw)}{redouble}
+\NewDictTranslation{ReDouble-(ODw)}{ReDouble}
+\NewDictTranslation{semi forcing-(ODw)}{semi forcing}
+\NewDictTranslation{Semi Forcing-(ODw)}{Semi Forcing}
+\NewDictTranslation{sf-(ODw)}{sf}
+\NewDictTranslation{SF-(ODw)}{SF}
+\NewDictTranslation{s-(ODw)}{s}
+\NewDictTranslation{S-(ODw)}{S}
+\NewDictTranslation{south-(ODw)}{south}
+\NewDictTranslation{South-(ODw)}{South}
+\NewDictTranslation{suiter-(ODw)}{suiter}
+\NewDictTranslation{Suiter-(ODw)}{Suiter}
+\NewDictTranslation{suit-(ODw)}{suit}
+\NewDictTranslation{Suit-(ODw)}{Suit}
+\NewDictTranslation{third suit forcing-(ODw)}{third suit forcing}
+\NewDictTranslation{Third Suit Forcing-(ODw)}{Third Suit Forcing}
+\NewDictTranslation{total points-(ODw)}{total points}
+\NewDictTranslation{Total Points-(ODw)}{Total Points}
+\NewDictTranslation{tp-(ODw)}{tp}
+\NewDictTranslation{TP-(ODw)}{TP}
+\NewDictTranslation{trial bid-(ODw)}{trial bid}
+\NewDictTranslation{Trial bid-(ODw)}{Trial bid}
+\NewDictTranslation{trick-(ODw)}{trick}
+\NewDictTranslation{Trick-(ODw)}{Trick}
+\NewDictTranslation{tsf-(ODw)}{3rd sf}
+\NewDictTranslation{TSF-(ODw)}{3rd SF}
+\NewDictTranslation{vulnerable-(ODw)}{vulnerable}
+\NewDictTranslation{Vulnerable-(ODw)}{Vulnerable}
+\NewDictTranslation{vul-(ODw)}{vul}
+\NewDictTranslation{Vul-(ODw)}{Vul}
+\NewDictTranslation{west-(ODw)}{west}
+\NewDictTranslation{West-(ODw)}{West}
+\NewDictTranslation{w-(ODw)}{w}
+\NewDictTranslation{W-(ODw)}{W}
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/onedown/ODw-french.trsl b/Master/texmf-dist/tex/latex/onedown/ODw-french.trsl
new file mode 100644
index 00000000000..ea0e9fb94a4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/ODw-french.trsl
@@ -0,0 +1,158 @@
+% this is file ODw-french.trsl from the OneDown bundle
+%
+% Entries with a "!" denote an abreviated form
+%
+% retrieve with e.g. \GetTranslation{dealer-(ODw)} to get donneur
+%
+\ProvideDictionaryFor{french}{ODw}[V0.4]
+
+\NewDictTranslation{1st-(ODw)}{1er}
+\NewDictTranslation{2nd-(ODw)}{2e}
+\NewDictTranslation{3rd-(ODw)}{3e}
+\NewDictTranslation{4th-(ODw)}{4e}
+\NewDictTranslation{ace-(ODw)}{as}
+\NewDictTranslation{Ace-(ODw)}{As}
+\NewDictTranslation{all-(ODw)}{tous}
+\NewDictTranslation{All-(ODw)}{Tous}
+\NewDictTranslation{all!-(ODw)}{tous}
+\NewDictTranslation{All!-(ODw)}{Tous}
+\NewDictTranslation{all pass-(ODw)}{tous passent}
+\NewDictTranslation{All pass-(ODw)}{Tous passent}
+\NewDictTranslation{a-(ODw)}{a}
+\NewDictTranslation{A-(ODw)}{A}
+\NewDictTranslation{ap-(ODw)}{tp}
+\NewDictTranslation{AP-(ODw)}{TP}
+\NewDictTranslation{award-(ODw)}{prix}
+\NewDictTranslation{Award-(ODw)}{Prix}
+\NewDictTranslation{bid-(ODw)}{enchère}
+\NewDictTranslation{Bid-(ODw)}{Enchère}
+\NewDictTranslation{board-(ODw)}{etui}
+\NewDictTranslation{Board-(ODw)}{Etui}
+\NewDictTranslation{brd-(ODw)}{bte}
+\NewDictTranslation{Brd-(ODw)}{Bte}
+\NewDictTranslation{by-(ODw)}{pour}
+\NewDictTranslation{call-(ODw)}{annonce}
+\NewDictTranslation{Call-(ODw)}{Annonce}
+\NewDictTranslation{-card-(ODw)}{-carte}
+\NewDictTranslation{contract-(ODw)}{contrat}
+\NewDictTranslation{Contract-(ODw)}{Contrat}
+\NewDictTranslation{contr-(ODw)}{contr}
+\NewDictTranslation{Contr-(ODw)}{Contr}
+\NewDictTranslation{Dbl-(ODw)}{Ctr}
+\NewDictTranslation{dealer-(ODw)}{donneur}
+\NewDictTranslation{Dealer-(ODw)}{Donneur}
+\NewDictTranslation{deal!-(ODw)}{donne}
+\NewDictTranslation{Deal!-(ODw)}{Donne}
+\NewDictTranslation{deal-(ODw)}{donne}
+\NewDictTranslation{Deal-(ODw)}{Donne}
+\NewDictTranslation{declarer-(ODw)}{déclarant}
+\NewDictTranslation{Declarer-(ODw)}{Déclarant}
+\NewDictTranslation{decl-(ODw)}{décl}
+\NewDictTranslation{Decl-(ODw)}{Décl}
+\NewDictTranslation{distribution points-(ODw)}{points de Distribution}
+\NewDictTranslation{Distribution Points-(ODw)}{Points de Distribution}
+\NewDictTranslation{doubled-(ODw)}{contré}
+\NewDictTranslation{Doubled-(ODw)}{Contré}
+\NewDictTranslation{double-(ODw)}{contre}
+\NewDictTranslation{Double-(ODw)}{Contre}
+\NewDictTranslation{dp-(ODw)}{pd}
+\NewDictTranslation{DP-(ODw)}{PD}
+\NewDictTranslation{east-(ODw)}{est}
+\NewDictTranslation{East-(ODw)}{Est}
+\NewDictTranslation{e-(ODw)}{e}
+\NewDictTranslation{E-(ODw)}{E}
+\NewDictTranslation{fourth suit forcing-(ODw)}{quatrième couleur forcing}
+\NewDictTranslation{Fourth Suit Forcing-(ODw)}{Quatrième Couleur Forcing}
+\NewDictTranslation{fsf-(ODw)}{4e cf}
+\NewDictTranslation{FSF-(ODw)}{4e CF}
+\NewDictTranslation{game forcing-(ODw)}{forcing de manche}
+\NewDictTranslation{Game Forcing-(ODw)}{Forcing de Manche}
+\NewDictTranslation{GF-(ODw)}{FM}
+\NewDictTranslation{gf-(ODw)}{gf}
+\NewDictTranslation{hand-(ODw)}{main}
+\NewDictTranslation{Hand-(ODw)}{Main}
+\NewDictTranslation{hcp-(ODw)}{ph}
+\NewDictTranslation{HCP-(ODw)}{PH}
+\NewDictTranslation{high card points-(ODw)}{points d'honneurs}
+\NewDictTranslation{High Card Points-(ODw)}{Points d'Honneurs}
+\NewDictTranslation{jack-(ODw)}{valet}
+\NewDictTranslation{Jack-(ODw)}{Valet}
+\NewDictTranslation{j-(ODw)}{v}
+\NewDictTranslation{J-(ODw)}{V}
+\NewDictTranslation{king-(ODw)}{roi}
+\NewDictTranslation{King-(ODw)}{Roi}
+\NewDictTranslation{k-(ODw)}{r}
+\NewDictTranslation{K-(ODw)}{R}
+\NewDictTranslation{lead!-(ODw)}{ent.}
+\NewDictTranslation{Lead!-(ODw)}{Ent.}
+\NewDictTranslation{lead-(ODw)}{entame}
+\NewDictTranslation{Lead-(ODw)}{Entame}
+\NewDictTranslation{length points-(ODw)}{points de longueur}
+\NewDictTranslation{Length Points-(ODw)}{Points de Longueur}
+\NewDictTranslation{lp-(ODw)}{pl}
+\NewDictTranslation{LP-(ODw)}{PL}
+\NewDictTranslation{new minor forcing-(ODw)}{nouvelle mineure forcing}
+\NewDictTranslation{New Minor Forcing-(ODw)}{Nouvelle Mineure Forcing}
+\NewDictTranslation{nmf-(ODw)}{nmf}
+\NewDictTranslation{NMF-(ODw)}{NMF}
+\NewDictTranslation{n-(ODw)}{n}
+\NewDictTranslation{N-(ODw)}{N}
+\NewDictTranslation{none-(ODw)}{aucun}
+\NewDictTranslation{None-(ODw)}{Aucun}
+\NewDictTranslation{none!-(ODw)}{aucun}
+\NewDictTranslation{None!-(ODw)}{Aucun}
+\NewDictTranslation{north-(ODw)}{nord}
+\NewDictTranslation{North-(ODw)}{Nord}
+\NewDictTranslation{no trump-(ODw)}{sans atout}
+\NewDictTranslation{No Trump-(ODw)}{Sans Atout}
+\NewDictTranslation{Nr-(ODw)}{\textnumero}
+\NewDictTranslation{Nr.-(ODw)}{\textnumero.}
+\NewDictTranslation{nt-(ODw)}{sa}
+\NewDictTranslation{NT-(ODw)}{S\kern-0.01emA}
+\NewDictTranslation{pass-(ODw)}{passe}
+\NewDictTranslation{Pass-(ODw)}{Passe}
+\NewDictTranslation{pass!-(ODw)}{passe}
+\NewDictTranslation{Pass!-(ODw)}{Passe}
+\NewDictTranslation{q-(ODw)}{d}
+\NewDictTranslation{Q-(ODw)}{D}
+\NewDictTranslation{queen-(ODw)}{dame}
+\NewDictTranslation{Queen-(ODw)}{Dame}
+\NewDictTranslation{ReDbl-(ODw)}{SurC}
+\NewDictTranslation{redoubled-(ODw)}{surcontré}
+\NewDictTranslation{Redoubled-(ODw)}{Surcontré}
+\NewDictTranslation{redouble-(ODw)}{surcontre}
+\NewDictTranslation{Redouble-(ODw)}{Surcontre}
+\NewDictTranslation{semi forcing-(ODw)}{semi forcing}
+\NewDictTranslation{Semi Forcing-(ODw)}{Semi Forcing}
+\NewDictTranslation{SF-(ODw)}{SF}
+\NewDictTranslation{sf-(ODw)}{sf}
+\NewDictTranslation{s-(ODw)}{s}
+\NewDictTranslation{S-(ODw)}{S}
+\NewDictTranslation{south-(ODw)}{sud}
+\NewDictTranslation{South-(ODw)}{Sud}
+\NewDictTranslation{suiter-(ODw)}{colore}
+\NewDictTranslation{Suiter-(ODw)}{Colore}
+\NewDictTranslation{suit-(ODw)}{couleur}
+\NewDictTranslation{Suit-(ODw)}{Couleur}
+\NewDictTranslation{third suit forcing-(ODw)}{troisième couleur forcing}
+\NewDictTranslation{Third Suit Forcing-(ODw)}{Troisième Couleur Forcing}
+\NewDictTranslation{total points-(ODw)}{points total}
+\NewDictTranslation{Total Points-(ODw)}{Points Total}
+\NewDictTranslation{TP-(ODw)}{PT}
+\NewDictTranslation{tp-(ODw)}{tp}
+\NewDictTranslation{trial bid-(ODw)}{trial bid}
+\NewDictTranslation{Trial bid-(ODw)}{Trial bid}
+\NewDictTranslation{trick-(ODw)}{levée}
+\NewDictTranslation{Trick-(ODw)}{Levée}
+\NewDictTranslation{tsf-(ODw)}{3e cf}
+\NewDictTranslation{TSF-(ODw)}{3e CF}
+\NewDictTranslation{vulnerable-(ODw)}{vulnérable}
+\NewDictTranslation{Vulnerable-(ODw)}{Vulnérable}
+\NewDictTranslation{vul-(ODw)}{vul}
+\NewDictTranslation{Vul-(ODw)}{Vul}
+\NewDictTranslation{west-(ODw)}{ouest}
+\NewDictTranslation{West-(ODw)}{Ouest}
+\NewDictTranslation{w-(ODw)}{o}
+\NewDictTranslation{W-(ODw)}{O}
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/onedown/ODw-german.trsl b/Master/texmf-dist/tex/latex/onedown/ODw-german.trsl
new file mode 100644
index 00000000000..9f2e86753e1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/ODw-german.trsl
@@ -0,0 +1,158 @@
+% this is file ODw-german.trsl from the OneDown bundle
+%
+% Entries with a "!" denote an abreviated form
+%
+% retrieve with e.g. \GetTranslation{dealer-(ODw)} to get teiler
+%
+\ProvideDictionaryFor{german}{ODw}[V0.4]
+
+\NewDictTranslation{1st-(ODw)}{1.}
+\NewDictTranslation{2nd-(ODw)}{2.}
+\NewDictTranslation{3rd-(ODw)}{3.}
+\NewDictTranslation{4th-(ODw)}{4.}
+\NewDictTranslation{ace-(ODw)}{ass}
+\NewDictTranslation{Ace-(ODw)}{Ass}
+\NewDictTranslation{all-(ODw)}{alle}
+\NewDictTranslation{All-(ODw)}{Alle}
+\NewDictTranslation{all!-(ODw)}{alle}
+\NewDictTranslation{All!-(ODw)}{Alle}
+\NewDictTranslation{all pass-(ODw)}{alle passen}
+\NewDictTranslation{All pass-(ODw)}{Alle passen}
+\NewDictTranslation{a-(ODw)}{a}
+\NewDictTranslation{A-(ODw)}{A}
+\NewDictTranslation{ap-(ODw)}{ap}
+\NewDictTranslation{AP-(ODw)}{AP}
+\NewDictTranslation{award-(ODw)}{Bewertung}
+\NewDictTranslation{Award-(ODw)}{Bewertung}
+\NewDictTranslation{bid-(ODw)}{gebot}
+\NewDictTranslation{Bid-(ODw)}{Gebot}
+\NewDictTranslation{board-(ODw)}{board}
+\NewDictTranslation{Board-(ODw)}{Board}
+\NewDictTranslation{brd-(ODw)}{brd}
+\NewDictTranslation{Brd-(ODw)}{Brd}
+\NewDictTranslation{by-(ODw)}{von}
+\NewDictTranslation{call-(ODw)}{ansage}
+\NewDictTranslation{Call-(ODw)}{Ansage}
+\NewDictTranslation{-card-(ODw)}{er}
+\NewDictTranslation{contract-(ODw)}{kontrakt}
+\NewDictTranslation{Contract-(ODw)}{Kontrakt}
+\NewDictTranslation{contr-(ODw)}{kontr}
+\NewDictTranslation{Contr-(ODw)}{Kontr}
+\NewDictTranslation{Dbl-(ODw)}{Kontra}
+\NewDictTranslation{dealer-(ODw)}{teiler}
+\NewDictTranslation{Dealer-(ODw)}{Teiler}
+\NewDictTranslation{deal!-(ODw)}{aust}
+\NewDictTranslation{Deal!-(ODw)}{Aust}
+\NewDictTranslation{deal-(ODw)}{austeilung}
+\NewDictTranslation{Deal-(ODw)}{Austeilung}
+\NewDictTranslation{declarer-(ODw)}{alleinspieler}
+\NewDictTranslation{Declarer-(ODw)}{Alleinspieler}
+\NewDictTranslation{decl-(ODw)}{alleinsp}
+\NewDictTranslation{Decl-(ODw)}{Alleinsp}
+\NewDictTranslation{distribution points-(ODw)}{verteilungspunkte}
+\NewDictTranslation{Distribution Points-(ODw)}{Verteilungspunkte}
+\NewDictTranslation{doubled-(ODw)}{kontriert}
+\NewDictTranslation{Doubled-(ODw)}{Kontriert}
+\NewDictTranslation{double-(ODw)}{kontra}
+\NewDictTranslation{Double-(ODw)}{Kontra}
+\NewDictTranslation{dp-(ODw)}{v}
+\NewDictTranslation{DP-(ODw)}{V}
+\NewDictTranslation{east-(ODw)}{ost}
+\NewDictTranslation{East-(ODw)}{Ost}
+\NewDictTranslation{e-(ODw)}{o}
+\NewDictTranslation{E-(ODw)}{O}
+\NewDictTranslation{fourth suit forcing-(ODw)}{vierte farbe forcing}
+\NewDictTranslation{Fourth Suit Forcing-(ODw)}{Vierte Farbe Forcing}
+\NewDictTranslation{fsf-(ODw)}{4. farbe forcing}
+\NewDictTranslation{FSF-(ODw)}{4. Farbe forcing}
+\NewDictTranslation{game forcing-(ODw)}{partie forcing}
+\NewDictTranslation{Game Forcing-(ODw)}{Partie Forcing}
+\NewDictTranslation{gf-(ODw)}{pf}
+\NewDictTranslation{GF-(ODw)}{PF}
+\NewDictTranslation{hand-(ODw)}{blatt}
+\NewDictTranslation{Hand-(ODw)}{Blatt}
+\NewDictTranslation{hcp-(ODw)}{fp}
+\NewDictTranslation{HCP-(ODw)}{FP}
+\NewDictTranslation{high card points-(ODw)}{figuren-punkte}
+\NewDictTranslation{High Card Points-(ODw)}{Figuren-Punkte}
+\NewDictTranslation{jack-(ODw)}{bube}
+\NewDictTranslation{Jack-(ODw)}{Bube}
+\NewDictTranslation{j-(ODw)}{b}
+\NewDictTranslation{J-(ODw)}{B}
+\NewDictTranslation{king-(ODw)}{könig}
+\NewDictTranslation{King-(ODw)}{König}
+\NewDictTranslation{k-(ODw)}{k}
+\NewDictTranslation{K-(ODw)}{K}
+\NewDictTranslation{lead!-(ODw)}{aussp.}
+\NewDictTranslation{Lead!-(ODw)}{Aussp.}
+\NewDictTranslation{lead-(ODw)}{ausspiel}
+\NewDictTranslation{Lead-(ODw)}{Ausspiel}
+\NewDictTranslation{length points-(ODw)}{längenpunkte}
+\NewDictTranslation{Length Points-(ODw)}{Längenpunkte}
+\NewDictTranslation{lp-(ODw)}{fl}
+\NewDictTranslation{LP-(ODw)}{FL}
+\NewDictTranslation{new minor forcing-(ODw)}{neue unterfarbe forcing}
+\NewDictTranslation{New Minor Forcing-(ODw)}{Neue Unterfarbe Forcing}
+\NewDictTranslation{nmf-(ODw)}{nuf}
+\NewDictTranslation{NMF-(ODw)}{NUF}
+\NewDictTranslation{n-(ODw)}{n}
+\NewDictTranslation{N-(ODw)}{N}
+\NewDictTranslation{none-(ODw)}{keiner}
+\NewDictTranslation{None-(ODw)}{Keiner}
+\NewDictTranslation{none!-(ODw)}{keiner}
+\NewDictTranslation{None!-(ODw)}{Keiner}
+\NewDictTranslation{north-(ODw)}{nord}
+\NewDictTranslation{North-(ODw)}{Nord}
+\NewDictTranslation{no trump-(ODw)}{sans atout}
+\NewDictTranslation{No Trump-(ODw)}{Sans Atout}
+\NewDictTranslation{Nr-(ODw)}{\textnumero}
+\NewDictTranslation{Nr.-(ODw)}{\textnumero.}
+\NewDictTranslation{nt-(ODw)}{sa}
+\NewDictTranslation{NT-(ODw)}{S\kern-0.01emA}
+\NewDictTranslation{pass-(ODw)}{passe}
+\NewDictTranslation{Pass-(ODw)}{Passe}
+\NewDictTranslation{pass!-(ODw)}{passe}
+\NewDictTranslation{Pass!-(ODw)}{Passe}
+\NewDictTranslation{q-(ODw)}{d}
+\NewDictTranslation{Q-(ODw)}{D}
+\NewDictTranslation{queen-(ODw)}{dame}
+\NewDictTranslation{Queen-(ODw)}{Dame}
+\NewDictTranslation{ReDbl-(ODw)}{ReKontra}
+\NewDictTranslation{redoubled-(ODw)}{rekontriert}
+\NewDictTranslation{Redoubled-(ODw)}{Rekontriert}
+\NewDictTranslation{redouble-(ODw)}{rekontra}
+\NewDictTranslation{Redouble-(ODw)}{Rekontra}
+\NewDictTranslation{semi forcing-(ODw)}{semi forcing}
+\NewDictTranslation{Semi Forcing-(ODw)}{Semi Forcing}
+\NewDictTranslation{sf-(ODw)}{sf}
+\NewDictTranslation{SF-(ODw)}{SF}
+\NewDictTranslation{s-(ODw)}{s}
+\NewDictTranslation{S-(ODw)}{S}
+\NewDictTranslation{south-(ODw)}{süd}
+\NewDictTranslation{South-(ODw)}{Süd}
+\NewDictTranslation{suiter-(ODw)}{färber}
+\NewDictTranslation{Suiter-(ODw)}{Färber}
+\NewDictTranslation{suit-(ODw)}{farbe}
+\NewDictTranslation{Suit-(ODw)}{Farbe}
+\NewDictTranslation{third suit forcing-(ODw)}{dritte farbe forcing}
+\NewDictTranslation{Third Suit Forcing-(ODw)}{Dritte Farbe Forcing}
+\NewDictTranslation{total points-(ODw)}{figuren-verteilungspunkte}
+\NewDictTranslation{Total Points-(ODw)}{Figuren-Verteilungspunkte}
+\NewDictTranslation{tp-(ODw)}{fv}
+\NewDictTranslation{TP-(ODw)}{FV}
+\NewDictTranslation{trial bid-(ODw)}{versuchsgebot}
+\NewDictTranslation{Trial bid-(ODw)}{Versuchsgebot}
+\NewDictTranslation{trick-(ODw)}{stich}
+\NewDictTranslation{Trick-(ODw)}{Stich}
+\NewDictTranslation{tsf-(ODw)}{3. farbe forcing}
+\NewDictTranslation{TSF-(ODw)}{3. Farbe Forcing}
+\NewDictTranslation{vulnerable-(ODw)}{gefahr}
+\NewDictTranslation{Vulnerable-(ODw)}{Gefahr}
+\NewDictTranslation{vul-(ODw)}{gef}
+\NewDictTranslation{Vul-(ODw)}{Gef}
+\NewDictTranslation{west-(ODw)}{west}
+\NewDictTranslation{West-(ODw)}{West}
+\NewDictTranslation{w-(ODw)}{w}
+\NewDictTranslation{W-(ODw)}{W}
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/onedown/ODw-norwegian.trsl b/Master/texmf-dist/tex/latex/onedown/ODw-norwegian.trsl
new file mode 100644
index 00000000000..d0975002594
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/ODw-norwegian.trsl
@@ -0,0 +1,159 @@
+% this is file ODw-norsk.trsl from the OneDown bundle
+% Entries with a "!" denote an abreviated form
+% Thanks to Gunnar & Anne
+%
+% retrieve with e.g \GetTranslation{dealer-(ODw)} to get givare
+%
+\ProvideDictionaryFor{norwegian}{ODw}[V0.4]
+%\ProvideDictionaryFor{norsk}{ODw}[V0.4]
+
+\NewDictTranslation{1st-(ODw)}{1.}
+\NewDictTranslation{2nd-(ODw)}{2.}
+\NewDictTranslation{3rd-(ODw)}{3.}
+\NewDictTranslation{4th-(ODw)}{4.}
+\NewDictTranslation{ace-(ODw)}{ess}
+\NewDictTranslation{Ace-(ODw)}{Ess}
+\NewDictTranslation{all-(ODw)}{alle}
+\NewDictTranslation{All-(ODw)}{Alle}
+\NewDictTranslation{all!-(ODw)}{alle}
+\NewDictTranslation{All!-(ODw)}{Alle}
+\NewDictTranslation{all pass-(ODw)}{pass rundt}
+\NewDictTranslation{All pass-(ODw)}{Pass rundt}
+\NewDictTranslation{a-(ODw)}{e}
+\NewDictTranslation{A-(ODw)}{E}
+%\NewDictTranslation{award-(ODw)}{poeng}
+%\NewDictTranslation{Award-(ODw)}{Poeng}
+\NewDictTranslation{award-(ODw)}{vurdering}
+\NewDictTranslation{Award-(ODw)}{Vurdering}
+\NewDictTranslation{bid-(ODw)}{bud}
+\NewDictTranslation{Bid-(ODw)}{Bud}
+\NewDictTranslation{board-(ODw)}{spill}
+\NewDictTranslation{Board-(ODw)}{Spill}
+\NewDictTranslation{brd-(ODw)}{spill}
+\NewDictTranslation{Brd-(ODw)}{Spill}
+\NewDictTranslation{by-(ODw)}{ved}
+\NewDictTranslation{call-(ODw)}{bud}
+\NewDictTranslation{Call-(ODw)}{Bud}
+\NewDictTranslation{-card-(ODw)}{-kortfarger}
+\NewDictTranslation{contract-(ODw)}{kontrakt}
+\NewDictTranslation{Contract-(ODw)}{Kontrakt}
+\NewDictTranslation{contr-(ODw)}{kontr}
+\NewDictTranslation{Contr-(ODw)}{Kontr}
+\NewDictTranslation{Dbl-(ODw)}{Dbl}
+\NewDictTranslation{dealer-(ODw)}{giver}
+\NewDictTranslation{Dealer-(ODw)}{Giver}
+\NewDictTranslation{deal-(ODw)}{giv}
+\NewDictTranslation{Deal-(ODw)}{Giv}
+\NewDictTranslation{deal!-(ODw)}{giv}
+\NewDictTranslation{Deal!-(ODw)}{Giv}
+\NewDictTranslation{declarer-(ODw)}{spilleförer}
+\NewDictTranslation{Declarer-(ODw)}{Spilleförer}
+\NewDictTranslation{decl-(ODw)}{spför}
+\NewDictTranslation{Decl-(ODw)}{Spför}
+\NewDictTranslation{distribution points-(ODw)}{trumfpoeng}
+\NewDictTranslation{Distribution Points-(ODw)}{Trumfpoeng}
+\NewDictTranslation{doubled-(ODw)}{doblet}
+\NewDictTranslation{Doubled-(ODw)}{Doblet}
+\NewDictTranslation{double-(ODw)}{doblet}
+\NewDictTranslation{Double-(ODw)}{Doblet}
+\NewDictTranslation{dp-(ODw)}{tp}
+\NewDictTranslation{DP-(ODw)}{TP}
+\NewDictTranslation{east-(ODw)}{øst}
+\NewDictTranslation{East-(ODw)}{Øst}
+\NewDictTranslation{e-(ODw)}{ø}
+\NewDictTranslation{E-(ODw)}{Ø}
+\NewDictTranslation{fourth suit forcing-(ODw)}{fjerde farge forcing}
+\NewDictTranslation{Fourth Suit Forcing-(ODw)}{Fjerde Farge Forcing}
+\NewDictTranslation{fsf-(ODw)}{4. ff}
+\NewDictTranslation{FSF-(ODw)}{4. FF}
+\NewDictTranslation{game forcing-(ODw)}{utgangskrav}
+\NewDictTranslation{Game Forcing-(ODw)}{UtgangsKrav}
+\NewDictTranslation{gf-(ODw)}{uk}
+\NewDictTranslation{GF-(ODw)}{UK}
+\NewDictTranslation{Hand-(ODw)}{Hånd}
+\NewDictTranslation{hand-(ODw)}{hånd}
+\NewDictTranslation{hcp-(ODw)}{hp}
+\NewDictTranslation{HCP-(ODw)}{HP}
+\NewDictTranslation{high card points-(ODw)}{høy kort poeng}
+\NewDictTranslation{High Card Points-(ODw)}{høy Kort Poeng}
+\NewDictTranslation{jack-(ODw)}{knekt}
+\NewDictTranslation{Jack-(ODw)}{Knekt}
+\NewDictTranslation{J-(ODw)}{\mbox{K\kern-0.08emn}}
+\NewDictTranslation{j-(ODw)}{\mbox{kn}}
+\NewDictTranslation{king-(ODw)}{konge}
+\NewDictTranslation{King-(ODw)}{Konge}
+\NewDictTranslation{k-(ODw)}{k}
+\NewDictTranslation{K-(ODw)}{K}
+\NewDictTranslation{lead!-(ODw)}{utsp.}
+\NewDictTranslation{Lead!-(ODw)}{Utsp.}
+\NewDictTranslation{lead-(ODw)}{utspill}
+\NewDictTranslation{Lead-(ODw)}{Utspill}
+\NewDictTranslation{length points-(ODw)}{lengde poeng}
+\NewDictTranslation{Length Points-(ODw)}{Lengde Poeng}
+\NewDictTranslation{lp-(ODw)}{lp}
+\NewDictTranslation{LP-(ODw)}{LP}
+\NewDictTranslation{new minor forcing-(ODw)}{nye minor krav}
+\NewDictTranslation{New Minor Forcing-(ODw)}{Nye Minor Krav}
+\NewDictTranslation{nmf-(ODw)}{nmk}
+\NewDictTranslation{NMF-(ODw)}{NMK}
+\NewDictTranslation{n-(ODw)}{n}
+\NewDictTranslation{N-(ODw)}{N}
+\NewDictTranslation{none!-(ODw)}{ing}
+\NewDictTranslation{None!-(ODw)}{Ing}
+\NewDictTranslation{none-(ODw)}{ingen}
+\NewDictTranslation{None-(ODw)}{Ingen}
+\NewDictTranslation{north-(ODw)}{nord}
+\NewDictTranslation{North-(ODw)}{Nord}
+\NewDictTranslation{no trump-(ODw)}{uten trumf}
+\NewDictTranslation{No Trump-(ODw)}{Uten Trumf}
+\NewDictTranslation{Nr-(ODw)}{\textnumero}
+\NewDictTranslation{Nr.-(ODw)}{\textnumero.}
+\NewDictTranslation{NT-(ODw)}{N\kern-0.07emT}
+\NewDictTranslation{nt-(ODw)}{nt}
+\NewDictTranslation{pass-(ODw)}{pass}
+\NewDictTranslation{Pass-(ODw)}{Pass}
+\NewDictTranslation{pass!-(ODw)}{pass}
+\NewDictTranslation{Pass!-(ODw)}{Pass}
+\NewDictTranslation{q-(ODw)}{d}
+\NewDictTranslation{Q-(ODw)}{D}
+\NewDictTranslation{queen-(ODw)}{dame}
+\NewDictTranslation{Queen-(ODw)}{Dame}
+\NewDictTranslation{ReDbl-(ODw)}{ReDbl}
+\NewDictTranslation{redoubled-(ODw)}{redoblet}
+\NewDictTranslation{Redoubled-(ODw)}{Redoblet}
+\NewDictTranslation{redouble-(ODw)}{redoblet}
+\NewDictTranslation{Redouble-(ODw)}{Redoblet}
+\NewDictTranslation{semi forcing-(ODw)}{RundKrav}
+\NewDictTranslation{Semi Forcing-(ODw)}{RundKrav}
+\NewDictTranslation{sf-(ODw)}{rk}
+\NewDictTranslation{SF-(ODw)}{RK}
+\NewDictTranslation{s-(ODw)}{s}
+\NewDictTranslation{S-(ODw)}{S}
+\NewDictTranslation{south-(ODw)}{syd}
+\NewDictTranslation{South-(ODw)}{Syd}
+\NewDictTranslation{suiter-(ODw)}{farger}
+\NewDictTranslation{Suiter-(ODw)}{Farger}
+\NewDictTranslation{suit-(ODw)}{farge}
+\NewDictTranslation{Suit-(ODw)}{Farge}
+\NewDictTranslation{third suit forcing-(ODw)}{tredje farge forcing}
+\NewDictTranslation{Third Suit Forcing-(ODw)}{Tredje Farge Forcing}
+\NewDictTranslation{total points-(ODw)}{totalt poeng}
+\NewDictTranslation{Total Points-(ODw)}{Totalt Poeng}
+\NewDictTranslation{tp-(ODw)}{sp}
+\NewDictTranslation{TP-(ODw)}{SP}
+\NewDictTranslation{trial bid-(ODw)}{prøving bud}
+\NewDictTranslation{Trial bid-(ODw)}{Prøving bud}
+\NewDictTranslation{trick-(ODw)}{trekk}
+\NewDictTranslation{Trick-(ODw)}{Trekk}
+\NewDictTranslation{tsf-(ODw)}{3. ff}
+\NewDictTranslation{TSF-(ODw)}{3. FF}
+\NewDictTranslation{vulnerable-(ODw)}{sone}
+\NewDictTranslation{Vulnerable-(ODw)}{Sone}
+\NewDictTranslation{vul-(ODw)}{sone}
+\NewDictTranslation{Vul-(ODw)}{Sone}
+\NewDictTranslation{west-(ODw)}{vest}
+\NewDictTranslation{West-(ODw)}{Vest}
+\NewDictTranslation{w-(ODw)}{v}
+\NewDictTranslation{W-(ODw)}{V}
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/onedown/ODw-swedish.trsl b/Master/texmf-dist/tex/latex/onedown/ODw-swedish.trsl
new file mode 100644
index 00000000000..ec0d4d269d2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/ODw-swedish.trsl
@@ -0,0 +1,160 @@
+% this is file ODw-swedish.trsl from the OneDown bundle
+%
+% Entries with a "!" denote an abreviated form
+% Thanks to Per Karlberg
+% retrieve with e.g \GetTranslation{dealer-(ODw)} to get givare
+%
+\ProvideDictionaryFor{swedish}{ODw}[V0.4]
+
+\NewDictTranslation{1st-(ODw)}{1:a}
+\NewDictTranslation{2nd-(ODw)}{2:a}
+\NewDictTranslation{3rd-(ODw)}{3:e}
+\NewDictTranslation{4th-(ODw)}{4:e}
+\NewDictTranslation{ace-(ODw)}{äss}
+\NewDictTranslation{Ace-(ODw)}{Äss}
+\NewDictTranslation{all-(ODw)}{alla}
+\NewDictTranslation{All-(ODw)}{Alla}
+\NewDictTranslation{all!-(ODw)}{alla}
+\NewDictTranslation{All!-(ODw)}{Alla}
+\NewDictTranslation{all pass-(ODw)}{alla passet}
+\NewDictTranslation{All pass-(ODw)}{Alla passet}
+\NewDictTranslation{a-(ODw)}{ä}
+\NewDictTranslation{A-(ODw)}{Ä}
+\NewDictTranslation{ap-(ODw)}{ap}
+\NewDictTranslation{AP-(ODw)}{AP}
+%\NewDictTranslation{award-(ODw)}{poäng}
+%\NewDictTranslation{Award-(ODw)}{Poäng}
+\NewDictTranslation{award-(ODw)}{värdering}
+\NewDictTranslation{Award-(ODw)}{Värdering}
+\NewDictTranslation{bid-(ODw)}{bud}
+\NewDictTranslation{Bid-(ODw)}{Bud}
+\NewDictTranslation{board-(ODw)}{bricka}
+\NewDictTranslation{Board-(ODw)}{Bricka}
+\NewDictTranslation{brd-(ODw)}{brck}
+\NewDictTranslation{Brd-(ODw)}{Brck}
+\NewDictTranslation{by-(ODw)}{per}
+\NewDictTranslation{call-(ODw)}{bud}
+\NewDictTranslation{Call-(ODw)}{Bud}
+\NewDictTranslation{-card-(ODw)}{-kort}
+\NewDictTranslation{contract-(ODw)}{kontrakt}
+\NewDictTranslation{Contract-(ODw)}{Kontrakt}
+\NewDictTranslation{contr-(ODw)}{kontr}
+\NewDictTranslation{Contr-(ODw)}{Kontr}
+\NewDictTranslation{Dbl-(ODw)}{Dbl}
+\NewDictTranslation{dealer-(ODw)}{givare}
+\NewDictTranslation{Dealer-(ODw)}{Givare}
+\NewDictTranslation{deal-(ODw)}{giv}
+\NewDictTranslation{Deal-(ODw)}{Giv}
+\NewDictTranslation{deal!-(ODw)}{giv}
+\NewDictTranslation{Deal!-(ODw)}{Giv}
+\NewDictTranslation{declarer-(ODw)}{spelförare}
+\NewDictTranslation{Declarer-(ODw)}{Spelförare}
+\NewDictTranslation{decl-(ODw)}{spför}
+\NewDictTranslation{Decl-(ODw)}{Spför}
+\NewDictTranslation{distribution points-(ODw)}{fördelningpoints}
+\NewDictTranslation{Distribution Points-(ODw)}{Fördelningpoints}
+\NewDictTranslation{doubled-(ODw)}{dubbelt}
+\NewDictTranslation{Doubled-(ODw)}{Dubbelt}
+\NewDictTranslation{double-(ODw)}{dubbelt}
+\NewDictTranslation{Double-(ODw)}{Dubbelt}
+\NewDictTranslation{dp-(ODw)}{fp}
+\NewDictTranslation{DP-(ODw)}{FP}
+\NewDictTranslation{east-(ODw)}{öst}
+\NewDictTranslation{East-(ODw)}{Öst}
+\NewDictTranslation{e-(ODw)}{ö}
+\NewDictTranslation{E-(ODw)}{Ö}
+\NewDictTranslation{fourth suit forcing-(ODw)}{fjärde farve forcing}
+\NewDictTranslation{Fourth Suit Forcing-(ODw)}{Fjärde Farve Forcing}
+\NewDictTranslation{fsf-(ODw)}{4:e ff}
+\NewDictTranslation{FSF-(ODw)}{4:e FF}
+\NewDictTranslation{game forcing-(ODw)}{krav till udgang}
+\NewDictTranslation{Game Forcing-(ODw)}{Krav till Udgang}
+\NewDictTranslation{gf-(ODw)}{ku}
+\NewDictTranslation{GF-(ODw)}{KU}
+\NewDictTranslation{Hand-(ODw)}{Hand}
+\NewDictTranslation{hand-(ODw)}{hand}
+\NewDictTranslation{hcp-(ODw)}{hp}
+\NewDictTranslation{HCP-(ODw)}{HP}
+\NewDictTranslation{high card points-(ODw)}{Honnørpoints}
+\NewDictTranslation{High Card Points-(ODw)}{honnørpoints}
+\NewDictTranslation{jack-(ODw)}{knekt}
+\NewDictTranslation{Jack-(ODw)}{Knekt}
+\NewDictTranslation{j-(ODw)}{kn}
+\NewDictTranslation{J-(ODw)}{\mbox{K\kern-0.08emn}}
+\NewDictTranslation{king-(ODw)}{kung}
+\NewDictTranslation{King-(ODw)}{Kung}
+\NewDictTranslation{k-(ODw)}{k}
+\NewDictTranslation{K-(ODw)}{K}
+\NewDictTranslation{lead!-(ODw)}{utsp.}
+\NewDictTranslation{Lead!-(ODw)}{Utsp.}
+\NewDictTranslation{lead-(ODw)}{utspel}
+\NewDictTranslation{Lead-(ODw)}{Utspel}
+\NewDictTranslation{length points-(ODw)}{längd points}
+\NewDictTranslation{Length Points-(ODw)}{Längd Points}
+\NewDictTranslation{lp-(ODw)}{lp}
+\NewDictTranslation{LP-(ODw)}{LP}
+\NewDictTranslation{new minor forcing-(ODw)}{new minor forcing}
+\NewDictTranslation{New Minor Forcing-(ODw)}{New Minor Forcing}
+\NewDictTranslation{nmf-(ODw)}{nmf}
+\NewDictTranslation{NMF-(ODw)}{NMF}
+\NewDictTranslation{n-(ODw)}{n}
+\NewDictTranslation{N-(ODw)}{N}
+\NewDictTranslation{none!-(ODw)}{ing}
+\NewDictTranslation{None!-(ODw)}{Ing}
+\NewDictTranslation{none-(ODw)}{ingen}
+\NewDictTranslation{None-(ODw)}{Ingen}
+\NewDictTranslation{north-(ODw)}{norr}
+\NewDictTranslation{North-(ODw)}{Norr}
+\NewDictTranslation{no trump-(ODw)}{utan trumf}
+\NewDictTranslation{No Trump-(ODw)}{Utan Trumf}
+\NewDictTranslation{Nr-(ODw)}{\textnumero}
+\NewDictTranslation{Nr.-(ODw)}{\textnumero.}
+\NewDictTranslation{NT-(ODw)}{N\kern-0.07emT}
+\NewDictTranslation{nt-(ODw)}{nt}
+\NewDictTranslation{pass-(ODw)}{pass}
+\NewDictTranslation{Pass-(ODw)}{Pass}
+\NewDictTranslation{pass!-(ODw)}{pass}
+\NewDictTranslation{Pass!-(ODw)}{Pass}
+\NewDictTranslation{q-(ODw)}{d}
+\NewDictTranslation{Q-(ODw)}{D}
+\NewDictTranslation{queen-(ODw)}{dame}
+\NewDictTranslation{Queen-(ODw)}{Dame}
+\NewDictTranslation{ReDbl-(ODw)}{ReDbl}
+\NewDictTranslation{redoubled-(ODw)}{redubbelt}
+\NewDictTranslation{Redoubled-(ODw)}{Redubbelt}
+\NewDictTranslation{redouble-(ODw)}{redubbelt}
+\NewDictTranslation{Redouble-(ODw)}{Redubbelt}
+\NewDictTranslation{semi forcing-(ODw)}{semi forcing}
+\NewDictTranslation{Semi Forcing-(ODw)}{Semi Forcing}
+\NewDictTranslation{sf-(ODw)}{sf}
+\NewDictTranslation{SF-(ODw)}{SF}
+\NewDictTranslation{s-(ODw)}{s}
+\NewDictTranslation{S-(ODw)}{S}
+\NewDictTranslation{south-(ODw)}{syd}
+\NewDictTranslation{South-(ODw)}{Syd}
+\NewDictTranslation{suiter-(ODw)}{farver}
+\NewDictTranslation{Suiter-(ODw)}{Farver}
+\NewDictTranslation{suit-(ODw)}{farve}
+\NewDictTranslation{Suit-(ODw)}{Farve}
+\NewDictTranslation{third suit forcing-(ODw)}{tredje farve forcing}
+\NewDictTranslation{Third Suit Forcing-(ODw)}{Tredje Farve Forcing}
+\NewDictTranslation{total points-(ODw)}{total points}
+\NewDictTranslation{Total Points-(ODw)}{Total Points}
+\NewDictTranslation{tp-(ODw)}{sp}
+\NewDictTranslation{TP-(ODw)}{SP}
+\NewDictTranslation{trial bid-(ODw)}{pröv bud}
+\NewDictTranslation{Trial bid-(ODw)}{Pröv bud}
+\NewDictTranslation{trick-(ODw)}{stik}
+\NewDictTranslation{Trick-(ODw)}{Stik}
+\NewDictTranslation{tsf-(ODw)}{3:e ff}
+\NewDictTranslation{TSF-(ODw)}{3:e FF}
+\NewDictTranslation{vulnerable-(ODw)}{zon}
+\NewDictTranslation{Vulnerable-(ODw)}{Zon}
+\NewDictTranslation{vul-(ODw)}{zon}
+\NewDictTranslation{Vul-(ODw)}{Zon}
+\NewDictTranslation{west-(ODw)}{väst}
+\NewDictTranslation{West-(ODw)}{Väst}
+\NewDictTranslation{w-(ODw)}{v}
+\NewDictTranslation{W-(ODw)}{V}
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/onedown/ODw-turkish.trsl b/Master/texmf-dist/tex/latex/onedown/ODw-turkish.trsl
new file mode 100644
index 00000000000..06786e7af4c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/ODw-turkish.trsl
@@ -0,0 +1,158 @@
+% this is file ODw-turkish.trsl from the OneDown bundle
+% thanks to Yilmaz Aksoy
+% Entries with a "!" denote an abreviated form
+%
+% retrieve with e.g. \GetTranslation{dealer-(ODw)} to get kâğıdı
+%
+\ProvideDictionaryFor{turkish}{ODw}[V0.4]
+
+\NewDictTranslation{1st-(ODw)}{1.}
+\NewDictTranslation{2nd-(ODw)}{2.}
+\NewDictTranslation{3rd-(ODw)}{3.}
+\NewDictTranslation{4th-(ODw)}{4.}
+\NewDictTranslation{ace-(ODw)}{as}
+\NewDictTranslation{Ace-(ODw)}{As}
+\NewDictTranslation{all!-(ODw)}{herk}
+\NewDictTranslation{All!-(ODw)}{Herk}
+\NewDictTranslation{all-(ODw)}{herkes}
+\NewDictTranslation{All-(ODw)}{Herkes}
+\NewDictTranslation{all pass-(ODw)}{pas geçildi}
+\NewDictTranslation{All pass-(ODw)}{Pas geçildi}
+\NewDictTranslation{a-(ODw)}{a}
+\NewDictTranslation{A-(ODw)}{A}
+\NewDictTranslation{ap-(ODw)}{ap}
+\NewDictTranslation{AP-(ODw)}{AP}
+\NewDictTranslation{award-(ODw)}{puan}
+\NewDictTranslation{Award-(ODw)}{Puan}
+\NewDictTranslation{Bid-(ODw)}{Deklare}
+\NewDictTranslation{bid-(ODw)}{deklare}
+\NewDictTranslation{Board-(ODw)}{Oyun Tahtası}
+\NewDictTranslation{board-(ODw)}{oyun tahtası}
+\NewDictTranslation{Brd-(ODw)}{Oyun}
+\NewDictTranslation{brd-(ODw)}{oyun}
+\NewDictTranslation{by-(ODw)}{tarafından}
+\NewDictTranslation{Call-(ODw)}{İlan etme}
+\NewDictTranslation{call-(ODw)}{ilan etme}
+\NewDictTranslation{-card-(ODw)}{-card}
+\NewDictTranslation{contract-(ODw)}{kontrat}
+\NewDictTranslation{Contract-(ODw)}{Kontrat}
+\NewDictTranslation{contr-(ODw)}{kontr}
+\NewDictTranslation{Contr-(ODw)}{Kontr}
+\NewDictTranslation{Dbl-(ODw)}{Knt}
+\NewDictTranslation{dealer-(ODw)}{dağıtan}
+\NewDictTranslation{Dealer-(ODw)}{Dağıtan}
+\NewDictTranslation{Deal-(ODw)}{El}
+\NewDictTranslation{Deal!-(ODw)}{El}
+\NewDictTranslation{deal-(ODw)}{el}
+\NewDictTranslation{deal!-(ODw)}{el}
+\NewDictTranslation{declarer-(ODw)}{deklaran}
+\NewDictTranslation{Declarer-(ODw)}{Deklaran}
+\NewDictTranslation{decl-(ODw)}{dekl}
+\NewDictTranslation{Decl-(ODw)}{Dekl}
+\NewDictTranslation{distribution points-(ODw)}{dağılım puanı}
+\NewDictTranslation{Distribution Points-(ODw)}{Dağılım Puanı}
+\NewDictTranslation{doubled-(ODw)}{konturlu}
+\NewDictTranslation{Doubled-(ODw)}{Konturlu}
+\NewDictTranslation{double-(ODw)}{kontur}
+\NewDictTranslation{Double-(ODw)}{Kontur}
+\NewDictTranslation{dp-(ODw)}{dp}
+\NewDictTranslation{DP-(ODw)}{DP}
+\NewDictTranslation{east-(ODw)}{doğu}
+\NewDictTranslation{East-(ODw)}{Doğu}
+\NewDictTranslation{e-(ODw)}{d}
+\NewDictTranslation{E-(ODw)}{D}
+\NewDictTranslation{fourth suit forcing-(ODw)}{dördüncü renk forsingi}
+\NewDictTranslation{Fourth Suit Forcing-(ODw)}{Dördüncü Renk Forsingi}
+\NewDictTranslation{fsf-(ODw)}{4. rf}
+\NewDictTranslation{FSF-(ODw)}{4. RF}
+\NewDictTranslation{game forcing-(ODw)}{manş forsingi}
+\NewDictTranslation{Game Forcing-(ODw)}{Manş Forsingi}
+\NewDictTranslation{gf-(ODw)}{mf}
+\NewDictTranslation{GF-(ODw)}{MF}
+\NewDictTranslation{hand-(ODw)}{el}
+\NewDictTranslation{Hand-(ODw)}{El}
+\NewDictTranslation{hcp-(ODw)}{op}
+\NewDictTranslation{HCP-(ODw)}{OP}
+\NewDictTranslation{high card points-(ODw)}{onör puanı}
+\NewDictTranslation{High Card Points-(ODw)}{Onör Puanı}
+\NewDictTranslation{jack-(ODw)}{vale}
+\NewDictTranslation{Jack-(ODw)}{Vale}
+\NewDictTranslation{j-(ODw)}{v}
+\NewDictTranslation{J-(ODw)}{V}
+\NewDictTranslation{king-(ODw)}{papaz}
+\NewDictTranslation{King-(ODw)}{Papaz}
+\NewDictTranslation{k-(ODw)}{p}
+\NewDictTranslation{K-(ODw)}{P}
+\NewDictTranslation{Lead!-(ODw)}{Atak}
+\NewDictTranslation{lead-(ODw)}{atak}
+\NewDictTranslation{Lead-(ODw)}{Atak}
+\NewDictTranslation{lead!-(ODw)}{atak}
+\NewDictTranslation{length points-(ODw)}{uzunluk puanları}
+\NewDictTranslation{Length Points-(ODw)}{Uunluk Puanları}
+\NewDictTranslation{lp-(ODw)}{up}
+\NewDictTranslation{LP-(ODw)}{UP}
+\NewDictTranslation{new minor forcing-(ODw)}{yeni minör forsingi}
+\NewDictTranslation{New Minor Forcing-(ODw)}{Yeni Minör Forsingi}
+\NewDictTranslation{nmf-(ODw)}{nmf}
+\NewDictTranslation{NMF-(ODw)}{NMF}
+\NewDictTranslation{n-(ODw)}{k}
+\NewDictTranslation{N-(ODw)}{K}
+\NewDictTranslation{none-(ODw)}{hiç}
+\NewDictTranslation{None-(ODw)}{Hiç}
+\NewDictTranslation{none!-(ODw)}{hiç}
+\NewDictTranslation{None!-(ODw)}{Hiç}
+\NewDictTranslation{north-(ODw)}{kuzey}
+\NewDictTranslation{North-(ODw)}{Kuzey}
+\NewDictTranslation{no trump-(ODw)}{sanzatu}
+\NewDictTranslation{No Trump-(ODw)}{Sanzatu}
+\NewDictTranslation{Nr-(ODw)}{\textnumero}
+\NewDictTranslation{Nr.-(ODw)}{\textnumero.}
+\NewDictTranslation{nt-(ODw)}{sa}
+\NewDictTranslation{NT-(ODw)}{S\kern-0.01emA}
+\NewDictTranslation{pass-(ODw)}{pas}
+\NewDictTranslation{Pass-(ODw)}{Pas}
+\NewDictTranslation{pass!-(ODw)}{pas}
+\NewDictTranslation{Pass!-(ODw)}{Pas}
+\NewDictTranslation{q-(ODw)}{k}
+\NewDictTranslation{Q-(ODw)}{K}
+\NewDictTranslation{queen-(ODw)}{kız}
+\NewDictTranslation{Queen-(ODw)}{Kız}
+\NewDictTranslation{ReDbl-(ODw)}{SürKnt}
+\NewDictTranslation{Redoubled-(ODw)}{Sürkonturlu}
+\NewDictTranslation{redoubled-(ODw)}{sürkonturlu}
+\NewDictTranslation{redouble-(ODw)}{sürkontur}
+\NewDictTranslation{Redouble-(ODw)}{Sürkontur}
+\NewDictTranslation{semi forcing-(ODw)}{semi forsingi}
+\NewDictTranslation{Semi Forcing-(ODw)}{Semi Forsingi}
+\NewDictTranslation{sf-(ODw)}{sf}
+\NewDictTranslation{SF-(ODw)}{SF}
+\NewDictTranslation{s-(ODw)}{g}
+\NewDictTranslation{S-(ODw)}{G}
+\NewDictTranslation{south-(ODw)}{güney}
+\NewDictTranslation{South-(ODw)}{Güney}
+\NewDictTranslation{suiter-(ODw)}{renkli}
+\NewDictTranslation{Suiter-(ODw)}{Renkli}
+\NewDictTranslation{suit-(ODw)}{renk}
+\NewDictTranslation{Suit-(ODw)}{Renk}
+\NewDictTranslation{third suit forcing-(ODw)}{üçüncü renk forsingi}
+\NewDictTranslation{Third Suit Forcing-(ODw)}{Üçüncü Renk Forsingi}
+\NewDictTranslation{total points-(ODw)}{onör destek puanı}
+\NewDictTranslation{Total Points-(ODw)}{Onör Destek Puanı}
+\NewDictTranslation{tp-(ODw)}{odp}
+\NewDictTranslation{TP-(ODw)}{ODP}
+\NewDictTranslation{trial bid-(ODw)}{trial bid}
+\NewDictTranslation{Trial bid-(ODw)}{Trial bid}
+\NewDictTranslation{trick-(ODw)}{löve}
+\NewDictTranslation{Trick-(ODw)}{Löve}
+\NewDictTranslation{tsf-(ODw)}{3. sf}
+\NewDictTranslation{TSF-(ODw)}{3. SF}
+\NewDictTranslation{vulnerable-(ODw)}{zonda}
+\NewDictTranslation{Vulnerable-(ODw)}{Zonda}
+\NewDictTranslation{vul-(ODw)}{zon}
+\NewDictTranslation{Vul-(ODw)}{Zon}
+\NewDictTranslation{west-(ODw)}{batı}
+\NewDictTranslation{West-(ODw)}{Batı}
+\NewDictTranslation{w-(ODw)}{b}
+\NewDictTranslation{W-(ODw)}{B}
+%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/onedown/onedown.sty b/Master/texmf-dist/tex/latex/onedown/onedown.sty
new file mode 100644
index 00000000000..0134ff66660
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onedown/onedown.sty
@@ -0,0 +1,2177 @@
+%%
+%% This is file `onedown.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% onedown.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2018 by Jacob Wiersma <jack46@online.de>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 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.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[2014/05/01]
+\def\ODwstyleversion{1.0}\def\ODwstyledate{2018/05/23}
+\ProvidesPackage{onedown}
+ [\ODwstyledate\space v\ODwstyleversion\space
+ Typeset Bridge Diagrams - Jacob Wiersma (C) 2016-2018]
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{%
+ xcolor,% colorizing symbols \Sp etc.
+ textcomp,% for the numbersign in environment play.
+ moresize,% add \HUGE and \ssmall to font-sizes
+ relsize,% relative font-sizes. (e.g. \smaller)
+ makecmds,% needed for provideenvironment
+ expl3,% needed for LaTeX3 packages (xparse)
+ xparse,% optional params and starred commands
+ xspace,% handling of spacing behind a command
+ calc,% makes calculations and lengths easier
+ ifthen,% easy booleans, tests and loops
+ adjustbox,% stacked boxes in L-/R-Lower captions
+ translations,% auto-translate terms (e.g. East->Ost)
+ array,% actions for tabular column cells
+ collcell,% macro calls for tabular column cells
+ pgfopts,% for keyval opts, loads also pgfkeys
+ environ,% for handling bidding environments
+ xstring,% for easy string processing.
+ tracklang,% for iterating over loaded languages
+ pict2e,% for drawing the compass
+}
+\xspaceaddexceptions{%
+ = \markit \, \suit \GetTranslation
+ 2 3 4 5 6 7 8 9 T J Q K A
+}
+\LoadDictionaryFor{fallback}{ODw}
+\pgfkeys{/ODw/.is family}
+\def\ODw@set#1{\pgfkeys{/ODw,#1}}
+\ODw@set{colors/.is choice,}
+\ODw@set{warn/.is choice,}
+\ODw@set{err/.is choice,}
+\AtBeginDocument{%
+ \renewcommand{\,}[1][1]{%
+ \ifmmode\mskip#1\thinmuskip%
+ \else\thinspace[#1]\fi%
+ }%
+ \renewcommand{\thinspace}[1][1]{%
+ \kern#1\dimexpr0.16667em\relax%
+ }%
+}% AtBeginDocument
+\gdef\ODw@gsetlength#1#2{%
+ \begingroup
+ \setlength\skip@{#2}% local assign to scratch reg.
+ \global#1=\skip@% global assignment to #1;
+ \endgroup% restore \skip@ by endgroup.
+}% ODw@gsetlength
+\gdef\ODw@append#1{%
+ \bgroup%
+ \edef\tmp{\the\ODw@Scratch #1}%
+ \global\ODw@Scratch=\expandafter{\tmp}%
+ \egroup%
+}% ODw@append
+\def\ODw@CompSize{1}% factor to enlarge the compass
+\def\ODw@CompLine{}% thickness of compass frame
+\def\ODw@Skipwidth{1em}%
+\newif\ifODw@description% must typeset an annotation
+\newif\ifODw@short% short form in bidding header
+\newif\ifODw@monochrome% no colors wanted
+\newif\ifOdW@CardSkip% skip between ranks needed
+\newif\ifODw@Bidders% suppress bidders in bidding header
+\newif\ifODw@BidLine% draw \hline below bidding header
+\newif\ifODw@LongCalls% switch between long/short calls
+\newif\ifODw@CompShow% show compass or not
+\newif\ifODw@CompTurn% turn E-W letters 90°
+\newboolean{ODw@EmptyHeader}% = 'header is empty'
+\newboolean{ODw@EmptyFooter}% = 'footer is empty'
+\newsavebox\ODw@Diagram@Box
+\newsavebox\ODw@Hand@Box
+\newsavebox\ODw@BidBox
+\newlength\ODw@Compasssize% the size of the compass.
+\newlength\ODw@Diagram@Width
+\newlength\ODw@Card@Skip
+\setlength\ODw@Card@Skip{.15em}% space between cards
+\newlength\ODw@Bid@Width
+\newlength\ODw@Skip@Width
+ \setlength\ODw@Skip@Width{\ODw@Skipwidth}
+\newlength\ODw@Tmp@Len% temp var for computations
+\newlength\ODw@Tmp@Width% temp var for computations
+\newcounter{ODw@Nr}
+\newcounter{ODw@Cnt}
+\newcounter{ODw@PlayerNr}
+\newcounter{ODw@NSCnt}
+\newcounter{ODw@EWCnt}
+\newtoks{\ODw@Scratch}
+\newcommand\bidderfont[1]{\gdef\ODw@BidderFont{#1}}
+\newcommand\compassfont[1]{\gdef\ODw@CompassFont{#1}}
+\newcommand\namefont[1]{\gdef\ODw@NameFont{#1}}
+\newcommand\legendfont[1]{\gdef\ODw@LegendFont{#1}}
+\newcommand\otherfont[1]{\gdef\ODw@OtherFont{#1}}
+\newcommand\gamefont[1]{%
+ \gdef\ODw@GameFont{#1}%
+ \gdef\ODw@GameSize{% recalculate dimens for the new font
+ \ODw@GameFont%
+ \setlength\ODw@Skip@Width{\ODw@Skipwidth}%
+ }%
+}% gamefont
+\fontencoding{T1}\fontfamily{stix}
+\fontseries{m}\fontshape{n}\selectfont
+\DeclareSymbolFont{symbols}{OMS}{txsy}{m}{n}
+\SetSymbolFont{symbols}{bold}{OMS}{txsy}{bx}{n}
+\DeclareFontSubstitution{OMS}{txsy}{m}{n}
+\DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n}
+\SetSymbolFont{symbolsC}{bold}{U}{txsyc}{bx}{n}
+\DeclareFontSubstitution{U}{txsyc}{m}{n}
+\DeclareMathSymbol{\ODw@spadesuit}{\mathord}{symbols}{127}
+\DeclareMathSymbol{\ODw@varheart}{\mathord}{symbolsC}{114}
+\DeclareMathSymbol{\ODw@vardiamond}{\mathord}{symbolsC}{113}
+\DeclareMathSymbol{\ODw@clubsuit}{\mathord}{symbols}{124}
+\def\Cl{}\def\Di{}\def\He{}\def\Sp{}%
+\ODw@set{%
+ colors/0/.code={%
+ \ODw@monochrometrue%
+ \renewrobustcmd\Cl{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}%
+ \renewrobustcmd\He{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@varheart}}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/mono/.code={\pgfkeys{/ODw/colors=0}}}
+\ODw@set{colors/black/.code={\pgfkeys{/ODw/colors=0}}}
+\ODw@set{%
+ colors/1/.code={%
+ \ODw@monochrometrue%
+ \renewrobustcmd\Cl{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\,[0.3]\ensuremath{\diamondsuit}\xspace}%
+ \renewrobustcmd\He{\,[0.3]\ensuremath{\heartsuit}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/b+w/.code={\pgfkeys{/ODw/colors=1}}}
+\ODw@set{%
+ colors/2/.code={%
+ \renewrobustcmd\Cl{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\textcolor{red}%
+ {\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}%
+ \renewrobustcmd\He{\textcolor{red}%
+ {\,[0.3]\ensuremath{\ODw@varheart}}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/b+r/.code={\pgfkeys{/ODw/colors=2}}}
+\ODw@set{%
+ colors/4A/.code={%
+ \renewrobustcmd\Cl{\textcolor{green}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\textcolor{orange}%
+ {\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}%
+ \renewrobustcmd\He{\textcolor{red}%
+ {\,[0.3]\ensuremath{\ODw@varheart}}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{blue}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/fourA/.code={\pgfkeys{/ODw/colors=4A}}}
+\ODw@set{colors/4a/.code={\pgfkeys{/ODw/colors=4A}}}
+\ODw@set{%
+ colors/4B/.code={%
+ \renewrobustcmd\Cl{\textcolor{black}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\textcolor{orange}%
+ {\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}%
+ \renewrobustcmd\He{\textcolor{red}%
+ {\,[0.3]\ensuremath{\ODw@varheart}}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{green}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\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%
+ \IfBooleanTF#1{%
+ \IfBooleanTF#2
+ {\,[0.3]\GetTranslation{NT-(ODw)}}%
+ {\GetTranslation{No Trump-(ODw)}}%
+ }{%
+ \IfBooleanTF#2
+ {\,[0.3]\GetTranslation{nt-(ODw)}}%
+ {\GetTranslation{no trump-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% nt
+\def\NT{\nt*!}
+\gdef\ODw@SuitPlayed{N}
+\gdef\ODw@SuitLead{N}
+\gdef\ODw@TrumpSuit{N}
+\newcounter{ODw@Rank}
+\def\ODw@SetRank#1{%
+ \ifthenelse{\equal{\ODw@SuitPlayed}{\ODw@SuitLead}}%
+ % if a suit is followed, store the intrinsic rank
+ {\setcounter{ODw@Rank}{#1}}%
+ {% else, if a suit is not followed then ...
+ % (at NoTrump, the trumpsuit is coded 'N' and will
+ % never match a real suit (coded C, D, H and S))
+ % thus avoiding that trump cards are detected
+ \ifthenelse{\equal{\ODw@SuitPlayed}{\ODw@TrumpSuit}}%
+ % if it is a trump card, increase the rank
+ {\setcounter{ODw@Rank}{#1}%
+ \addtocounter{ODw@Rank}{15}}%
+ % if it is a discard, set the rank to 0 to make
+ % sure it will never win
+ {\setcounter{ODw@Rank}{0}}%
+ }% ifthen
+ % If the card was of another suit,
+ % then ODw@SuitPlayed was changed.
+ % If we encounter 'unsuited' cards,
+ % then we must reestablish the
+ % original ODw@SuitPlayed.
+ \global\edef\ODw@SuitPlayed{\ODw@SuitLead}% org. suit
+}% ODw@SetRank
+\ExplSyntaxOn
+ % NB: now all spaces are ignored, use '~' if needed.
+\NewDocumentCommand{\ODw@Xfer}{m}{
+ \bgroup
+ % we do not want spaces here
+ \def\xspace{}
+ \tl_map_function:nN {#1} \ODw@translate:n
+ \egroup
+}% ODw@Xfer
+\cs_new_protected:Nn \ODw@translate:n
+ {
+ \setcounter{ODw@Rank}{0}
+ \str_case:nnTF {#1}
+ { % Store the suit of the card played
+ % needed to determine the winner
+ % and for checking for multiple cards
+ {C}{\Cl\gdef\ODw@SuitPlayed{C}}
+ {D}{\Di\gdef\ODw@SuitPlayed{D}}
+ {H}{\He\gdef\ODw@SuitPlayed{H}}
+ {S}{\Sp\gdef\ODw@SuitPlayed{S}}
+ {N}{\NT\gdef\ODw@SuitPlayed{N}}
+ % Translate a hyphen into an en-dash
+ {-}{--}
+ %
+ % 1: translate the honour cards,
+ % 2: store the played cards for checking
+ % 3: and set their rank. This must be done last, because
+ % \ODw@SetRank resets \ODw@SuitPlayed to \ODw@SuitLead
+ % Honour Cards
+ % 1 2
+ {A}{\Ace*!\ODw@AppendCard{\ODw@SuitPlayed}{A}
+ \ODw@SetRank{14}}% 3
+ {K}{\King*!\ODw@AppendCard{\ODw@SuitPlayed}{K}
+ \ODw@SetRank{13}}
+ {Q}{\Queen*!\ODw@AppendCard{\ODw@SuitPlayed}{Q}
+ \ODw@SetRank{12}}
+ {J}{\Jack*!\ODw@AppendCard{\ODw@SuitPlayed}{J}
+ \ODw@SetRank{11}}
+ {T}{\kern-0.1em1\kern-0.1em0% massage 1 and 0 a bit
+ \ODw@AppendCard{\ODw@SuitPlayed}{T}\ODw@SetRank{10}}
+ % Numeral Cards
+ {9}{9\ODw@AppendCard{\ODw@SuitPlayed}{9}\ODw@SetRank{9}}
+ {8}{8\ODw@AppendCard{\ODw@SuitPlayed}{8}\ODw@SetRank{8}}
+ {7}{7\ODw@AppendCard{\ODw@SuitPlayed}{7}\ODw@SetRank{7}}
+ {6}{6\ODw@AppendCard{\ODw@SuitPlayed}{6}\ODw@SetRank{6}}
+ {5}{5\ODw@AppendCard{\ODw@SuitPlayed}{5}\ODw@SetRank{5}}
+ {4}{4\ODw@AppendCard{\ODw@SuitPlayed}{4}\ODw@SetRank{4}}
+ {3}{3\ODw@AppendCard{\ODw@SuitPlayed}{3}\ODw@SetRank{3}}
+ {2}{2\ODw@AppendCard{\ODw@SuitPlayed}{2}\ODw@SetRank{2}}
+ % A spot card has rank 0
+ {x}{x\ODw@SetRank{0}}
+ %
+ % Non cards (bidding only)
+ {1}{1}% this enables e.g. 1\He in biddings
+ {p}{\ifODw@LongCalls\Pass*\else\Pass!\fi}
+ {P}{\ifODw@LongCalls\Allpass*\else\Allpass*!\fi}
+ {X}{\ifODw@LongCalls\Double*\else\Double!\fi}
+ {R}{\ifODw@LongCalls\Redouble*\else\Redouble!\fi}
+ }% case
+ {% if matched (case T(rue))
+ \ifOdW@CardSkip\hspace{\ODw@Card@Skip}\fi
+ % suit of 1st card (ODw@SuitLead) is ODw@SuitPlayed
+ \if\theODw@PlayerNr1
+ \global\edef\ODw@SuitLead{\ODw@SuitPlayed}
+ \fi
+ }
+ {% if not matched (case F(alse))
+ \ifx#1\Cl\gdef\ODw@SuitPlayed{C}\fi
+ \ifx#1\Di\gdef\ODw@SuitPlayed{D}\fi
+ \ifx#1\He\gdef\ODw@SuitPlayed{H}\fi
+ \ifx#1\Sp\gdef\ODw@SuitPlayed{S}\fi
+ \expandafter{#1}% enables e.g. 1\He
+ % suit of 1st card (ODw@SuitLead) is ODw@SuitPlayed
+ \if\theODw@PlayerNr1
+ \global\edef\ODw@SuitLead{\ODw@SuitPlayed}
+ \fi
+ }
+}% ODw@translate
+\ExplSyntaxOff
+\newcommand{\ODw@appendcard}[2]{\xdef#1{#1#2}}
+
+\newcommand\ODw@AppendCard[2]{%
+ \IfEqCase{#1}{%
+ {C}{\ODw@appendcard{\ODw@Clubs}{#2}}%
+ {D}{\ODw@appendcard{\ODw@Diamonds}{#2}}%
+ {H}{\ODw@appendcard{\ODw@Hearts}{#2}}%
+ {S}{\ODw@appendcard{\ODw@Spades}{#2}}%
+ }%
+}% ODw@AppendCard
+\newcounter{ODw@Highest}% the highest rank until now
+\setcounter{ODw@Highest}{0}
+\newcounter{ODw@WinningNr}% player with the highest rank
+\setcounter{ODw@WinningNr}{0}
+
+\def\ODw@PTfer#1{%
+ \stepcounter{ODw@PlayerNr}%
+ \ODw@Xfer{#1}% ODw@Rank = the rank for this card
+ \ifthenelse{\value{ODw@Rank} > \value{ODw@Highest}}%
+ {% This rank is higher than previous highest one
+ \setcounter{ODw@WinningNr}{\theODw@PlayerNr}%
+ \setcounter{ODw@Highest}{\theODw@Rank}%
+ }%
+ {}%
+ \ifthenelse{\value{ODw@PlayerNr} = 4}%
+ {% last player: Process the winning trick:
+ \stepcounter{ODw@Nr}% Start new row with new player
+ \ODw@AccTricks% Accumulate tricks for N-S/E-W
+ }%
+ {}%
+}
+\def\ODw@FTfer#1{%
+ \ODw@Tricks%
+ \ODw@PTfer{#1}%
+}% ODw@FTfer
+\def\ODw@BTfer#1{%
+ \ODw@Xfer{#1}%
+}
+\NewDocumentCommand\North{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\ODw@N*}{\ODw@North*}%
+ }{%
+ \IfBooleanTF{#2}{\ODw@N}{\ODw@North}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% North
+\def\north{\North*}
+
+\NewDocumentCommand\East{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\ODw@E*}{\ODw@East*}%
+ }{%
+ \IfBooleanTF{#2}{\ODw@E}{\ODw@East}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% East
+\def\east{\East*}
+
+\NewDocumentCommand\South{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\ODw@S*}{\ODw@South*}%
+ }{%
+ \IfBooleanTF{#2}{\ODw@S}{\ODw@South}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% South
+\def\south{\South*}
+
+\NewDocumentCommand\West{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\ODw@W*}{\ODw@West*}%
+ }{%
+ \IfBooleanTF{#2}{\ODw@W}{\ODw@West}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% West
+\def\west{\West*}
+\NewDocumentCommand\NorthSouth{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\North*!--\South*!}{\North*--\South*}%
+ }{%
+ \IfBooleanTF{#2}{\North!--\South!}{\North--\South}%
+ }%
+ \egroup%
+ \xspace%
+}% NorthSouth
+\def\northsouth{\NorthSouth*}
+
+\NewDocumentCommand\EastWest{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}{\East*!--\West*!}{\East*--\West*}%
+ }{%
+ \IfBooleanTF{#2}{\East!--\West!}{\East--\West}%
+ }%
+ \egroup%
+ \xspace%
+}% EastWest
+\def\eastwest{\EastWest*}
+\def\ODw@N{%
+ \@ifstar{\GetTranslation{N-(ODw)}}%
+ {\GetTranslation{n-(ODw)}}%
+}
+\def\ODw@E{%
+ \@ifstar{\GetTranslation{E-(ODw)}}%
+ {\GetTranslation{e-(ODw)}}%
+}
+\def\ODw@S{%
+ \@ifstar{\GetTranslation{S-(ODw)}}%
+ {\GetTranslation{s-(ODw)}}%
+}
+\def\ODw@W{%
+ \@ifstar{\GetTranslation{W-(ODw)}}%
+ {\GetTranslation{w-(ODw)}}%
+}
+\def\ODw@NS{\ODw@N--\ODw@S}
+\def\ODw@EW{\ODw@E--\ODw@W}
+\def\ODw@North{%
+ \@ifstar{\GetTranslation{North-(ODw)}}%
+ {\GetTranslation{north-(ODw)}}%
+}
+\def\ODw@East{%
+ \@ifstar{\GetTranslation{East-(ODw)}}%
+ {\GetTranslation{east-(ODw)}}%
+}
+\def\ODw@South{%
+ \@ifstar{\GetTranslation{South-(ODw)}}%
+ {\GetTranslation{south-(ODw)}}%
+}
+\def\ODw@West{%
+ \@ifstar{\GetTranslation{West-(ODw)}}%
+ {\GetTranslation{west-(ODw)}}%
+}
+\NewDocumentCommand\Pass{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Pass!-(ODw)}}%
+ {\GetTranslation{Pass-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{pass!-(ODw)}}%
+ {\GetTranslation{pass-(ODw)}}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% Pass
+\def\pass{\Pass*}
+
+\NewDocumentCommand\Allpass{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{AP-(ODw)}}%
+ {\GetTranslation{All pass-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{ap-(ODw)}}%
+ {\GetTranslation{all pass-(ODw)}}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% Allpass
+\def\allpass{\Allpass*}
+
+\NewDocumentCommand\Double{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Dbl-(ODw)}}%
+ {\GetTranslation{Double-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {X}%
+ {\GetTranslation{double-(ODw)}}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% Double
+\def\double{\Double*}
+
+\NewDocumentCommand\Redouble{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{ReDbl-(ODw)}}%
+ {\GetTranslation{ReDouble-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\mbox{X\kern-0.1em X}}%
+ {\GetTranslation{redouble-(ODw)}}%
+ }% TF#1
+ \egroup%
+ \xspace%
+}% Redouble
+\def\redouble{\Redouble*}
+\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}%
+ }%
+ {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}%
+ }%
+ {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}%
+ }%
+ {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}%
+ }%
+ }% IfEqCase
+}% ODw@FirstBidCol
+\newcommand\namesNS[2]{%
+ \gdef\ODw@North@Name{#1}%
+ \gdef\ODw@South@Name{#2}%
+ \gdef\ODw@All@Names{#1#2\ODw@East@Name\ODw@West@Name}%
+}% namesNS
+\newcommand\namesEW[2]{%
+ \gdef\ODw@East@Name{#1}%
+ \gdef\ODw@West@Name{#2}%
+ \gdef\ODw@All@Names{#1#2\ODw@North@Name\ODw@South@Name}%
+}% namesEW
+\newcommand\northhand[5][0pt]{%
+ \ODw@ChkNrOfCards{#2#3#4#5}{\north}%
+ \gdef\ODw@NSpades{#2}% Save norths cards
+ \gdef\ODw@NHearts{#3}% of all suits
+ \gdef\ODw@NDiamonds{#4}% for later
+ \gdef\ODw@NClubs{#5}% checking
+ \gdef\ODw@Nhand{%
+ \makebox[\ODw@Compasssize + 2ex][l]{%
+ \ODw@hand{t}{#2}{#3}{#4}{#5}%
+ }%
+ \vspace{#1}%
+ }%
+}% northhand
+
+\newcommand\easthand[5][0pt]{%
+ \ODw@ChkNrOfCards{#2#3#4#5}{\east}%
+ \gdef\ODw@ESpades{#2}% Save easts cards
+ \gdef\ODw@EHearts{#3}% of all suits
+ \gdef\ODw@EDiamonds{#4}% for later
+ \gdef\ODw@EClubs{#5}% checking
+ \gdef\ODw@Ehand{%
+ \hspace{#1}%
+ \ODw@hand{c}{#2}{#3}{#4}{#5}%
+ }%
+}% easthand
+
+\newcommand\southhand[5][0pt]{%
+ \ODw@ChkNrOfCards{#2#3#4#5}{\south}%
+ \gdef\ODw@SSpades{#2}% Save souths cards
+ \gdef\ODw@SHearts{#3}% of all suits
+ \gdef\ODw@SDiamonds{#4}% for later
+ \gdef\ODw@SClubs{#5}% checking
+ \gdef\ODw@Shand{%
+ \parbox[b]{\ODw@Compasssize + 2ex}{%
+ \vspace*{#1}\par%
+ \makebox[0pt][l]{%
+ \ODw@hand{b}{#2}{#3}{#4}{#5}%
+ }%
+ }%
+ }%
+}% southhand
+
+\newcommand\westhand[5][0pt]{%
+ \ODw@ChkNrOfCards{#2#3#4#5}{\west}%
+ \gdef\ODw@WSpades{#2}% Save wests cards
+ \gdef\ODw@WHearts{#3}% of all suits
+ \gdef\ODw@WDiamonds{#4}% for later
+ \gdef\ODw@WClubs{#5}% checking
+ \gdef\ODw@Whand{%
+ \ODw@hand{c}{#2}{#3}{#4}{#5}%
+ \hspace*{#1}%
+ }%
+}% westhand
+\NewDocumentCommand\hand{s t! t- O{c}mmmm}{%
+ \ODw@ChkNrOfCards{#5#6#7#8}{Hand}%
+ \ODw@ChkSameCards{#5}{\Sp}%
+ \ODw@ChkSameCards{#6}{\He}%
+ \ODw@ChkSameCards{#7}{\Di}%
+ \ODw@ChkSameCards{#8}{\Cl}%
+ \global\sbox{\ODw@Hand@Box}{%
+ \bgroup%
+ \ODw@GameSize%
+ \IfBooleanTF{#2}%
+ {\ODw@vhand[#4]{#5}{#6}{#7}{#8}}%
+ {\ODw@hhand{#5}{#6}{#7}{#8}}%
+ \egroup%
+ }% sbox
+ \IfBooleanTF{#3}{}{%
+ \IfBooleanTF{#1}%
+ {{\centering \usebox{\ODw@Hand@Box}\par}}%
+ {\usebox{\ODw@Hand@Box}}%
+ }%
+}% hand
+\newcommand\ODw@hhand[4]{%
+ \bgroup%
+ \def\xspace{}% undo xspace locally
+ % it screws the distance between suit and cards
+ \setlength\tabcolsep{1\ODw@Card@Skip}%
+ \begin{tabular}{llll}
+ % we can't use \suit here: it would cause double checks!
+ \Sp\hspace{0.3em}\ODw@Cards{#1} &%
+ \He\hspace{0.3em}\ODw@Cards{#2} &%
+ \Di\hspace{0.3em}\ODw@Cards{#3} &%
+ \Cl\hspace{0.3em}\ODw@Cards{#4} \\
+ \end{tabular}%
+ \egroup%
+}% ODw@hhand
+\newcommand\ODw@vhand[5][c]{%
+ \ODw@hand{#1}{#2}{#3}{#4}{#5}%
+}% ODw@vhand
+\newcommand\ODw@hand[5]{%
+ \ifthenelse{\equal{#2#3#4#5}{}}{}{%
+ \setlength\tabcolsep{\ODw@Card@Skip}%
+ \begin{tabular}[#1]{ll}%
+ % we can't use \suit here: it would cause double checks!
+ \Sp & \ODw@Cards{#2}\\[-0.5ex]
+ \He & \ODw@Cards{#3}\\[-0.5ex]
+ \Di & \ODw@Cards{#4}\\[-0.5ex]
+ \Cl & \ODw@Cards{#5}\\
+ \end{tabular}%
+ }% ifthenelse
+}% ODw@hand
+\NewDocumentCommand\onesuitAll{s t! mmmm}{%
+ \ODw@ChkSameCards{#3#4#5#6}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \setlength\tabcolsep{0em}%
+\begin{tabular}{@{}r@{ }c@{ }l@{}}%
+ & \ODw@Cards{#3} \IfBooleanTF#2{\\[-0.2em]}{\\}%
+ \ODw@Cards{#6} & \IfBooleanTF#2{\ODw@Compass}{\ODw@Box}%
+ & \ODw@Cards{#5} \IfBooleanTF#2{\\[-0.2em]}{\\}%
+ & \ODw@Cards{#4}\\
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitAll
+\NewDocumentCommand\onesuitNS{s t! mm}{%
+ \ODw@ChkSameCards{#3#4}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \begin{tabular}{@{}c@{}}%
+ \ODw@Cards{#3}\IfBooleanTF#2{\\[-0.2em]}{\\}%
+ \IfBooleanTF#2{\ODw@Compass\\[-0.2em]}{\ODw@Box\\}%
+ \ODw@Cards{#4}%
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitNS
+\NewDocumentCommand\onesuitEW{s t! mm}{%
+ \ODw@ChkSameCards{#3#4}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \begin{tabular}{@{}r@{ }c@{ }l@{}}%
+ \ODw@Cards{#4} &%
+ \IfBooleanTF#2{\ODw@Compass}{\ODw@Box} &%
+ \ODw@Cards{#3} \\%
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitEW
+\NewDocumentCommand\onesuitNE{s t! mm}{%
+ \ODw@ChkSameCards{#3#4}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \begin{tabular}[b]{c@{ }l@{}}%
+ \ODw@Cards{#3} \\%
+ \IfBooleanTF#2{\ODw@Compass}{\ODw@Box} &%
+ \ODw@Cards{#4} \\%
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitEW
+\NewDocumentCommand\onesuitNW{s t! mm}{%
+ \ODw@ChkSameCards{#3#4}{}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \ODw@GameSize%
+ \begin{tabular}[b]{r@{ }c}%
+ & \ODw@Cards{#3} \\%
+ \ODw@Cards{#4} & \IfBooleanTF#2{\ODw@Compass}{\ODw@Box} \\%
+ \end{tabular}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% onesuitEW
+\newcommand\suit[2][]{%
+ \ODw@ChkNrOfCards{#2}{suit}%
+ \ODw@ChkSameCards{#2}{#1}%
+ \bgroup% keep font change local
+ #1\ODw@Cards{#2}%
+ \egroup%
+ \xspace%
+}% suit
+\newcommand{\ODw@Cards}[1]{%
+ \OdW@CardSkiptrue%
+ \ODw@Xfer{#1}%
+}% ODw@Cards
+\NewDocumentCommand\showAll{s t+ O{c}}{%
+ \gdef\ODw@Spades{% store all Spades together
+ \ODw@NSpades\ODw@ESpades\ODw@SSpades\ODw@WSpades%
+ }%
+ \gdef\ODw@Hearts{% store all Hearts together
+ \ODw@NHearts\ODw@EHearts\ODw@SHearts\ODw@WHearts%
+ }%
+ \gdef\ODw@Diamonds{% store all Diamonds together
+ \ODw@NDiamonds\ODw@EDiamonds\ODw@SDiamonds\ODw@WDiamonds%
+ }%
+ \gdef\ODw@Clubs{% store all Clubs together
+ \ODw@NClubs\ODw@EClubs\ODw@SClubs\ODw@WClubs%
+ }%
+ % check for multiple and nr. of cards
+ \ODw@ChkNrOfCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkNrOfCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkNrOfCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkNrOfCards{\ODw@Clubs}{\Cl}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+ % sbox1 necessary to calc. |Compasssize| for |Nhand|
+ \sbox1{\ODw@Compass}%
+ \sbox0{%
+\begin{tabular}[#3]{@{}r@{}c@{}l@{}}%
+ \ODw@LeftUpperText & \ODw@Nhand & \ODw@RightUpperText\\
+ \ODw@Whand & \usebox{1} & \ODw@Ehand\\
+ \ODw@LeftLowerText & \ODw@Shand & \ODw@RightLowerText\\
+\end{tabular}%
+ }% sbox
+ \ODw@gsetlength{\ODw@Diagram@Width}{\wd0}%
+ \begin{tabular}[#3]{@{}r@{}c@{}l@{}}%
+ \ODw@ProcessHeader{3}% span 3 columns
+ \ODw@LeftUpperText & \ODw@Nhand & \ODw@RightUpperText\\
+ \ODw@Whand & \usebox{1} & \ODw@Ehand\\
+ \ODw@LeftLowerText & \ODw@Shand & \ODw@RightLowerText\\
+ \ODw@ProcessFooter{3}% span 3 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % needed for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showAll
+\NewDocumentCommand\showNS{s t+ O{c}}{%
+ \gdef\ODw@Spades{\ODw@NSpades\ODw@SSpades}%
+ \gdef\ODw@Hearts{\ODw@NHearts\ODw@SHearts}%
+ \gdef\ODw@Diamonds{\ODw@NDiamonds\ODw@SDiamonds}%
+ \gdef\ODw@Clubs{\ODw@NClubs\ODw@SClubs}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+ % sbox1 necessary to calc. |Compasssize| for |Nhand|
+ \sbox1{\ODw@Compass}%
+ \sbox0{%
+ \begin{tabular}[#3]{@{}r@{}c@{}l@{}}%
+ & \ODw@Nhand & \\
+ & \usebox{1} & \\
+ & \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 & \\
+ & \usebox{1} & \\
+ & \ODw@Shand & \\
+ \ODw@ProcessFooter{3}% span 3 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % necessary for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showNS
+\NewDocumentCommand\showEW{s t+ O{c}}{%
+ \gdef\ODw@Spades{\ODw@ESpades\ODw@WSpades}%
+ \gdef\ODw@Hearts{\ODw@EHearts\ODw@WHearts}%
+ \gdef\ODw@Diamonds{\ODw@EDiamonds\ODw@WDiamonds}%
+ \gdef\ODw@Clubs{\ODw@EClubs\ODw@WClubs}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+ \sbox0{%
+ \begin{tabular}[#3]{@{}r@{}c@{}l@{}}%
+ \ODw@Whand & \ODw@Compass & \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 \\
+ \ODw@ProcessFooter{3}% span 3 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % necessary for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showEW
+\NewDocumentCommand\showNE{s t+ O{c}}{%
+ \gdef\ODw@Spades{\ODw@NSpades\ODw@ESpades}%
+ \gdef\ODw@Hearts{\ODw@NHearts\ODw@EHearts}%
+ \gdef\ODw@Diamonds{\ODw@NDiamonds\ODw@EDiamonds}%
+ \gdef\ODw@Clubs{\ODw@NClubs\ODw@EClubs}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+ % sbox1 necessary to calc. |Compasssize| for |Nhand|
+ \sbox1{\ODw@Compass}%
+ \sbox0{%
+ \begin{tabular}[#3]{@{}c@{}l@{}}%
+ \ODw@Nhand & \ODw@RightUpperText\\
+ \usebox{1} & \ODw@Ehand\\
+ \end{tabular}%
+ }% sbox
+ \ODw@gsetlength{\ODw@Diagram@Width}{\wd0}%
+ \begin{tabular}[#3]{@{}c@{}l@{}}%
+ \ODw@ProcessHeader{2}% span 2 columns
+ \ODw@Nhand & \ODw@RightUpperText\\
+ \usebox{1} & \ODw@Ehand\\
+ \ODw@ProcessFooter{2}% span 2 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % necessary for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showNE
+\NewDocumentCommand\showNW{s t+ O{c}}{%
+ \gdef\ODw@Spades{\ODw@NSpades\ODw@WSpades}%
+ \gdef\ODw@Hearts{\ODw@NHearts\ODw@WHearts}%
+ \gdef\ODw@Diamonds{\ODw@NDiamonds\ODw@WDiamonds}%
+ \gdef\ODw@Clubs{\ODw@NClubs\ODw@WClubs}%
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \bgroup%
+ \setlength\tabcolsep{0em}%
+ \ODw@GameSize%
+ \ODw@TestIfEmpty{\ODw@HeaderText}{ODw@EmptyHeader}%
+ \ODw@TestIfEmpty{\ODw@FooterText}{ODw@EmptyFooter}%
+ % sbox1 necessary to calc. |Compasssize| for |Nhand|
+ \sbox1{\ODw@Compass}%
+ \sbox0{%
+ \begin{tabular}[#3]{@{}c@{}l@{}}%
+ \ODw@LeftUpperText & \ODw@Nhand\\
+ \ODw@Whand & \usebox{1}\\
+ \end{tabular}%
+ }% sbox
+ \ODw@gsetlength{\ODw@Diagram@Width}{\wd0}%
+ \begin{tabular}[#3]{@{}r@{}c@{}}%
+ \ODw@ProcessHeader{2}% span 2 columns
+ \ODw@LeftUpperText & \ODw@Nhand\\
+ \ODw@Whand & \usebox{1}\\
+ \ODw@ProcessFooter{2}% span 2 columns
+ \end{tabular}%
+ \IfBooleanTF#2{%
+ % necessary for \ODw@CondNewLine
+ \setlength{\ODw@Bid@Width}{\wd\ODw@BidBox}%
+ \ODw@CondNewLine%
+ \usebox{\ODw@BidBox}%
+ }{}%
+ \egroup%
+ \IfBooleanTF#1{\end{center}}{}%
+}% showNW
+\newcommand{\ODw@Compass}{%
+ \begingroup
+ \def\ODw@V{-1}\def\ODw@D{-1}%
+ \def\@ODw{\none}\ifx\ODw@Vulner\@ODw\def\ODw@V{0}\fi%
+ \def\@ODw{\none*}\ifx\ODw@Vulner\@ODw\def\ODw@V{0}\fi%
+ \def\@ODw{\none!}\ifx\ODw@Vulner\@ODw\def\ODw@V{0}\fi%
+ \def\@ODw{\none*!}\ifx\ODw@Vulner\@ODw\def\ODw@V{0}\fi%
+ \def\@ODw{\all}\ifx\ODw@Vulner\@ODw\def\ODw@V{1}\fi%
+ \def\@ODw{\all*}\ifx\ODw@Vulner\@ODw\def\ODw@V{1}\fi%
+ \def\@ODw{\all!}\ifx\ODw@Vulner\@ODw\def\ODw@V{1}\fi%
+ \def\@ODw{\all*!}\ifx\ODw@Vulner\@ODw\def\ODw@V{1}\fi%
+ \def\@ODw{\NorthSouth}\ifx\ODw@Vulner\@ODw\def\ODw@V{2}\fi%
+ \def\@ODw{\NorthSouth*}\ifx\ODw@Vulner\@ODw\def\ODw@V{2}\fi%
+ \def\@ODw{\NorthSouth!}\ifx\ODw@Vulner\@ODw\def\ODw@V{2}\fi%
+ \def\@ODw{\NorthSouth*!}\ifx\ODw@Vulner\@ODw\def\ODw@V{2}\fi%
+ \def\@ODw{\EastWest}\ifx\ODw@Vulner\@ODw\def\ODw@V{3}\fi%
+ \def\@ODw{\EastWest*}\ifx\ODw@Vulner\@ODw\def\ODw@V{3}\fi%
+ \def\@ODw{\EastWest!}\ifx\ODw@Vulner\@ODw\def\ODw@V{3}\fi%
+ \def\@ODw{\EastWest*!}\ifx\ODw@Vulner\@ODw\def\ODw@V{3}\fi%
+ \def\@ODw{\North}\ifx\ODw@Dealer\@ODw\def\ODw@D{0}\fi%
+ \def\@ODw{\North*}\ifx\ODw@Dealer\@ODw\def\ODw@D{0}\fi%
+ \def\@ODw{\North!}\ifx\ODw@Dealer\@ODw\def\ODw@D{0}\fi%
+ \def\@ODw{\North*!}\ifx\ODw@Dealer\@ODw\def\ODw@D{0}\fi%
+ \def\@ODw{\East}\ifx\ODw@Dealer\@ODw\def\ODw@D{1}\fi%
+ \def\@ODw{\East*}\ifx\ODw@Dealer\@ODw\def\ODw@D{1}\fi%
+ \def\@ODw{\East!}\ifx\ODw@Dealer\@ODw\def\ODw@D{1}\fi%
+ \def\@ODw{\East*!}\ifx\ODw@Dealer\@ODw\def\ODw@D{1}\fi%
+ \def\@ODw{\South}\ifx\ODw@Dealer\@ODw\def\ODw@D{2}\fi%
+ \def\@ODw{\South*}\ifx\ODw@Dealer\@ODw\def\ODw@D{2}\fi%
+ \def\@ODw{\South!}\ifx\ODw@Dealer\@ODw\def\ODw@D{2}\fi%
+ \def\@ODw{\South*!}\ifx\ODw@Dealer\@ODw\def\ODw@D{2}\fi%
+ \def\@ODw{\West}\ifx\ODw@Dealer\@ODw\def\ODw@D{3}\fi%
+ \def\@ODw{\West*}\ifx\ODw@Dealer\@ODw\def\ODw@D{3}\fi%
+ \def\@ODw{\West!}\ifx\ODw@Dealer\@ODw\def\ODw@D{3}\fi%
+ \def\@ODw{\West*!}\ifx\ODw@Dealer\@ODw\def\ODw@D{3}\fi%
+ \ODw@CompassDefault% use the compass font
+ \def\PicSize{500}%
+ \def\MidSize{250}%
+ % Multiply unitlength=0.005em with CompSize (default= 1)
+ \setlength\unitlength{0.005em * \real{\ODw@CompSize}}%
+ \ODw@gsetlength\ODw@Compasssize{\unitlength * \PicSize + 2ex}%
+ \def\Hoffset{30}% distance between W (E) and frame
+ \def\Voffset{30}% distance between N (S) and frame
+ \setlength\ODw@Tmp@Width{0.1em * \real{\ODw@CompLine}}%
+ \linethickness{\ODw@Tmp@Width}%
+ % leave 1ex space on all sides
+ \parbox[c][\ODw@Compasssize]{\ODw@Compasssize}{%
+ \centering%
+ \begin{picture}(\PicSize,\PicSize)%
+ \ifODw@CompShow%
+ % the frame
+ \moveto(0,0)
+ \if\ODw@CompLine0% must do it this way, because
+ \else% linethickness zero does not suppress the line
+ \lineto(0,\PicSize)\lineto(\PicSize,\PicSize)
+ \lineto(\PicSize,0)\closepath\strokepath
+ \fi%
+ % the cardinal points
+ \put(\MidSize,\the\numexpr \PicSize - \Voffset)%
+ {\makebox[0pt]{\raisebox{-\height}{\ODw@Print{0}}}}% N
+ \put(\MidSize,\Voffset){\makebox[0pt]{\ODw@Print{2}}}% S
+ \put(\Hoffset,\MidSize){%
+ \makebox[0pt][l]{%
+ \ifODw@CompTurn%
+ \raisebox{-0.5\height}{%
+ \rotatebox[origin=t]{90}{\ODw@Print{3}}%
+ }%
+ \else%
+ \raisebox{-0.5\height}{\ODw@Print{3}}%
+ \fi%
+ }% makebox
+ }% W
+ \put(\the\numexpr \PicSize - \Hoffset,\MidSize)%
+ {\makebox[0pt][r]{%
+ \raisebox{-0.5\height}{%
+ \ifODw@CompTurn%
+ \rotatebox[origin=c]{90}{\ODw@Print{1}}%
+ \else%
+ \ODw@Print{1}%
+ \fi%
+ }%
+ }% makebox
+ }% E
+ % the center
+ \put(\MidSize,\MidSize){\makebox(0,0){\ODw@mid}}
+ \fi%
+ \end{picture}%
+ }% parbox
+ \endgroup
+}% ODw@Compass
+\newcommand\ODw@Print[1]{%
+\bgroup
+ \smaller\smaller%
+ \ifcase#1% #1=0: print N
+ \ifboolexpr{ test {\ifnumcomp{\ODw@D}{=}{0}}}%
+ {% dealer = N
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{2}} }%
+ {\ODw@PrintColor{\underline{\ODw@N*}}}% Vul
+ {\underline{\ODw@N*}}% not Vul
+ }{% dealer <> N
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{2}} }%
+ {\ODw@PrintColor{\ODw@N*}}% Vul
+ {\ODw@N*}% not Vul
+ }%
+ \or% #1=1: print E
+ \ifboolexpr{ test {\ifnumcomp{\ODw@D}{=}{1}}}%
+ {% dealer E
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{3}} }%
+ {\ODw@PrintColor{\underline{\ODw@E*}}}% Vul
+ {\underline{\ODw@E*}}% not Vul
+ }{% dealer <> E
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{3}} }%
+ {\ODw@PrintColor{\ODw@E*}}% Vul
+ {\ODw@E*}% not Vul
+ }%
+ \or% #1=2: print S
+ \ifboolexpr{ test {\ifnumcomp{\ODw@D}{=}{2}}}%
+ {% dealer S
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{2}} }%
+ {\ODw@PrintColor{%
+ \ensuremath{\overline{\mbox{\ODw@S*}}}}%
+ }% Vul
+ {\ensuremath{\overline{\mbox{\ODw@S*}}}}% not Vul
+ }{% dealer <> S
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{2}} }%
+ {\ODw@PrintColor{\ODw@S*}}% Vul
+ {\ODw@S*}% not Vul
+ }%
+ \or% #1=3: print W
+ \ifboolexpr{ test {\ifnumcomp{\ODw@D}{=}{3}}}%
+ {% dealer W
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{3}} }%
+ {\ODw@PrintColor{\underline{\ODw@W*}}}% Vul
+ {\underline{\ODw@W*}}% not Vul
+ }{% dealer <> W
+ \ifboolexpr{ test {\ifnumcomp{\ODw@V}{=}{1}} or%
+ test {\ifnumcomp{\ODw@V}{=}{3}} }%
+ {\ODw@PrintColor{\ODw@W*}}% Vul
+ {\ODw@W*}% not Vul
+ }%
+ \fi% (ifcase#1)
+\egroup%
+}% ODw@Print
+\newcommand\ODw@PrintColor[1]{%
+ \ifODw@monochrome\textit{#1}\else\textcolor{red}{#1}\fi%
+}% ODw@PrintColor
+\def\ODw@CompMid{}
+\def\ODw@mid{{\smaller\smaller\smaller\ODw@CompMid}}
+\newcommand{\ODw@Box}{%
+ \bgroup
+ \setlength{\fboxsep}{0pt}%
+ \setlength{\fboxrule}{0.1em}%
+ \fbox{\rule{0mm}{0.7em}\rule{0.7em}{0mm}}%
+ \egroup
+}% ODw@Box
+\def\ODw@BoardText{}
+\NewDocumentCommand\boardtext{s}{%
+ \IfBooleanTF#1{\GetTranslation{Board-(ODw)}:\,\ODw@BoardText}%
+ {\ODw@BoardText}%
+}% boardtext
+\newcommand{\boardnr}[1]{%
+ \IfInteger{#1}{%
+ \gdef\ODw@BoardText{%
+ \bgroup%
+ \ODw@OtherFont%
+ #1%
+ \egroup%
+ }%
+ \setcounter{ODw@Cnt}{#1}%
+ \whiledo{\theODw@Cnt > 16}{%
+ \addtocounter{ODw@Cnt}{-16}%
+ }% whiledo, now 1 <= Cnt <= 16
+ \IfEqCase{\theODw@Cnt}{% set dealer/vulner
+ {0}{\gdef\ODw@BoardText{}\vulner[-1]\dealer[-1]}
+ {1}{\vulner[\none]\dealer[\North*!]}
+ {2}{\vulner[\NorthSouth*!]\dealer[\East*!]}
+ {3}{\vulner[\EastWest*!]\dealer[\South*!]}
+ {4}{\vulner[\all]\dealer[\West*!]}
+ {5}{\vulner[\NorthSouth*!]\dealer[\North*!]}
+ {6}{\vulner[\EastWest*!]\dealer[\East*!]}
+ {7}{\vulner[\all]\dealer[\South*!]}
+ {8}{\vulner[\none]\dealer[\West*!]}
+ {9}{\vulner[\EastWest*!]\dealer[\North*!]}
+ {10}{\vulner[\all]\dealer[\East*!]}
+ {11}{\vulner[\none]\dealer[\South*!]}
+ {12}{\vulner[\NorthSouth*!]\dealer[\West*!]}
+ {13}{\vulner[\all]\dealer[\North*!]}
+ {14}{\vulner[\none]\dealer[\East*!]}
+ {15}{\vulner[\NorthSouth*!]\dealer[\South*!]}
+ {16}{\vulner[\EastWest*!]\dealer[\West*!]}
+ }% IfEqCase
+ }{\gdef\ODw@BoardText{#1}}% otherwise take #1
+}% boardnr
+\newcommand\headlinetext[1]{\gdef\ODw@HeaderText{#1}}
+\headlinetext{}
+\newcommand\footlinetext[1]{\gdef\ODw@FooterText{#1}}
+\footlinetext{}
+\def\ODw@LeftUpperText{}
+\newcommand\leftupper[4][0pt]{%
+ \gdef\ODw@LeftUpperText{%
+ \hspace{-#1}%
+ \begin{tabular}[t]{l}#2\\#3\\#4\\\end{tabular}
+ }%
+}% leftupper
+\def\ODw@LeftLowerText{}
+\newcommand\leftlower[4][0pt]{%
+ \gdef\ODw@LeftLowerText{%
+ \hspace{-#1}%
+ \begin{tabular}[b]{l}#2\\#3\\#4\\\end{tabular}
+ }%
+}% leftlower
+\def\ODw@RightUpperText{}
+\newcommand\rightupper[4][0pt]{%
+ \gdef\ODw@RightUpperText{%
+ \hspace{#1}%
+ \begin{tabular}[t]{l}#2\\#3\\#4\\\end{tabular}
+ }%
+}% rightupper
+\def\ODw@RightLowerText{}
+\newcommand\rightlower[4][0pt]{%
+ \gdef\ODw@RightLowerText{%
+ \hspace{#1}%
+ \begin{tabular}[b]{l}#2\\#3\\#4\\\end{tabular}
+ }%
+}% rightlower
+\newcommand{\ODw@ProcessHeader}[1]{%
+ \ifODw@EmptyHeader% Must be this way (StackExchange)
+ \else% |\ifthenelse| bites |\multicolumn|!
+ \multicolumn{#1}{%
+ p{\dimexpr\ODw@Diagram@Width-%
+ 2\tabcolsep-2\arrayrulewidth}%
+ }{{\ODw@LegendFont\ODw@HeaderText}}\\
+ \fi%
+}% ODw@ProcessHeader
+\newcommand{\ODw@TestIfEmpty}[2]{%
+ \ifthenelse{\equal{#1}{}}{%
+ \setboolean{#2}{true}}{%
+ \setboolean{#2}{false}%
+ }%
+}% ODw@TestIfEmpty
+\newcommand{\ODw@ProcessFooter}[1]{%
+ \ifODw@EmptyFooter% Must be this way (StackExchange)
+ \else% |\ifthenelse| bites |\multicolumn|!
+ \multicolumn{#1}{%
+ p{\dimexpr\ODw@Diagram@Width%
+ -2\tabcolsep-2\arrayrulewidth}%
+ }{{\ODw@LegendFont\ODw@FooterText}}\\
+ \fi%
+}% ODw@ProcessFooter
+\newcommand\handskip[1]{%
+ \def\ODw@Skipwidth{1em + #1}% recalculate the new Skipwidth
+ \setlength\ODw@Skip@Width{\ODw@Skipwidth}%
+}% handskip
+\def\ODw@DealerText{%
+ \bgroup%
+ \ODw@OtherFont\GetTranslation{Dealer-(ODw)}%
+ \egroup%
+}% ODw@DealerText
+\NewDocumentCommand\ODw@VulnerText{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF#1{%
+ \IfBooleanTF#2{\GetTranslation{Vul-(ODw)}}%
+ {\GetTranslation{Vulnerable-(ODw)}}%
+ }{%
+ \IfBooleanTF#2{\GetTranslation{vul-(ODw)}}%
+ {\GetTranslation{vulnerable-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% ODw@VulnerText
+\def\ODw@AwardText{\textsf{\GetTranslation{Award-(ODw)}}}
+\newcommand\dealer[1][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\ODw@Dealer}%
+ {\gdef\ODw@Dealer{#1}}%
+}% dealer
+\def\ODw@Dealer{\North*}
+\newcommand\vulner[1][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\ODw@Vulner}%
+ {\gdef\ODw@Vulner{#1}}%
+}% vulner
+\def\ODw@Vulner{\NorthSouth}
+\newcommand\dealertext[1][\ODw@Dealer]{\ODw@DealerText:\,#1}
+\newcommand\vulnertext[1][\ODw@Vulner]{%
+ \ifODw@LongCalls%
+ \ODw@VulnerText*%
+ \else%
+ \ODw@VulnerText*!%
+ \fi%
+ :\,#1%
+}
+\newcommand{\alert}{{}\ensuremath{^\textbf{*}}}
+\newcommand{\announce}{{}\ensuremath{^\textbf{\smaller A}}}
+\newcommand\markit{%
+ \stepcounter{ODw@Nr}%
+ \footnotemark[\theODw@Nr]%
+}% markit
+\newcommand\explainit[1]{%
+ \stepcounter{ODw@Nr}%
+ \ensuremath{{}^\textrm{\smaller\alph{ODw@Nr}}}\,#1%
+}% explainit
+\newcolumntype{B}{% for Biddings
+ >{\collectcell\ODw@BTfer}c<{\endcollectcell}}
+\newcolumntype{F}{% for First column in |play| diagrams
+ >{\collectcell\ODw@FTfer}c<{\endcollectcell}}
+\newcolumntype{P}{% for |Play| diagrams (2nd--4th column)
+ >{\collectcell\ODw@PTfer}c<{\endcollectcell}}
+\NewEnviron{ODw@Bidding}[2][t]{%
+ \def\xspace{}%
+ \setlength\tabcolsep{0.2em}%
+ \sbox{0}{%
+ \begin{tabular}[#1]{BBBB}% 1st column
+ \ifODw@Bidders%
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderI%
+ \else\ODw@BidderI*%
+ \fi%
+ } &% 2nd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderII%
+ \else\ODw@BidderII*%
+ \fi%
+ } &% 3rd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIII%
+ \else\ODw@BidderIII*%
+ \fi%
+ } &% 4th column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIV%
+ \else\ODw@BidderIV*%
+ \fi%
+ } \\% end of 1st row
+ \if\ODw@All@Names\empty%
+ \else% 2nd row
+ \cci{ \ODw@NameFont\ODw@NameI} &% please
+ \cci{ \ODw@NameFont\ODw@NameII} &% mind
+ \cci{ \ODw@NameFont\ODw@NameIII} &% the
+ \cci{ \ODw@NameFont\ODw@NameIV} \\% spaces!
+ \fi%
+ \ifODw@BidLine\hline\fi%
+ \fi%
+ \BODY%
+%%%%%%
+ \end{tabular}%
+ }% sbox0
+ \setcounter{ODw@Nr}{0}%
+ \setlength{\ODw@Bid@Width}{\wd0}%
+ \global\sbox\ODw@BidBox{%
+ \begin{tabular}[#1]{BBBB}% 1st column
+ \ifODw@Bidders%
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderI%
+ \else\ODw@BidderI*%
+ \fi%
+ } &% 2nd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderII%
+ \else\ODw@BidderII*%
+ \fi%
+ } &% 3rd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIII%
+ \else\ODw@BidderIII*%
+ \fi%
+ } &% 4th column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIV%
+ \else\ODw@BidderIV*%
+ \fi%
+ } \\% end of 1st row
+ \if\ODw@All@Names\empty%
+ \else% 2nd row
+ \cci{ \ODw@NameFont\ODw@NameI} &% please
+ \cci{ \ODw@NameFont\ODw@NameII} &% mind
+ \cci{ \ODw@NameFont\ODw@NameIII} &% the
+ \cci{ \ODw@NameFont\ODw@NameIV} \\% spaces!
+ \fi%
+ \ifODw@BidLine\hline\fi%
+ \fi
+ \BODY%
+%%%%% Until here the same code as in the sbox!
+ \ifODw@description%
+ % Add the description, if not empty
+ \hline%
+ \multicolumn{4}{% span explanations over 4 cols...
+ p{\dimexpr\ODw@Bid@Width-2\tabcolsep}%
+ }{% ...with the right width
+ \setcounter{ODw@Nr}{0}%
+ \raggedright%
+ \smaller\smaller#2%
+ }\\%
+ \fi%
+ \end{tabular}%
+ }% sbox ODw@BidBox
+}% ODw@Bidding
+\NewEnviron{ODw@Biddingpair}[2][t]{%
+ \def\xspace{}%
+ \setlength\tabcolsep{0.2em}%
+ \sbox{0}{%
+ \begin{tabular}[#1]{BB}% 1st column
+ \ifODw@Bidders%
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderI%
+ \else\ODw@BidderI*%
+ \fi%
+ } &% 2nd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIII%
+ \else\ODw@BidderIII*%
+ \fi%
+ } \\% end of 1st row
+ \if\ODw@All@Names\empty%
+ \else% 2nd row
+ \cci{ \ODw@NameFont\ODw@NameI} &% please mind
+ \cci{ \ODw@NameFont\ODw@NameIII} \\% the spaces!
+ \fi%
+ \ifODw@BidLine\hline\fi%
+ \fi%
+ \BODY%
+%%%%%%%
+ \end{tabular}%
+ }% sbox0
+ \setcounter{ODw@Nr}{0}%
+ \setlength{\ODw@Bid@Width}{\wd0}%
+ \global\sbox\ODw@BidBox{%
+ \begin{tabular}[#1]{BB}% 1st column
+ \ifODw@Bidders%
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderI%
+ \else\ODw@BidderI*%
+ \fi%
+ } &% 2nd column
+ \cci{ % there MUST be a ' ' (space)
+ \ODw@BidderFont%
+ \ifODw@short\ODw@BidderIII%
+ \else\ODw@BidderIII*%
+ \fi%
+ } \\% end of 1st row
+ \if\ODw@All@Names\empty%
+ \else% 2nd row
+ \cci{ \ODw@NameFont\ODw@NameI} &% please mind
+ \cci{ \ODw@NameFont\ODw@NameIII} \\% the spaces!
+ \fi%
+ \ifODw@BidLine\hline\fi%
+ \fi%
+ \BODY%
+ %%%%%% Until here the same code as in the sbox!
+ \ifODw@description%
+ % Add the description, if not empty
+ \hline%
+ \multicolumn{2}{%
+ p{\dimexpr\ODw@Bid@Width-2\tabcolsep}%
+ }{%
+ \setcounter{ODw@Nr}{0}%
+ \raggedright%
+ \smaller\smaller#2%
+ }\\%
+ \fi%
+ \end{tabular}%
+ }% sbox ODw@BidBox
+}% ODw@Biddingpair
+\NewDocumentEnvironment{bidding}{s t! t- O{c}d()}{%
+ \ODw@GameSize%
+ \renewcommand{\thefootnote}{\alph{footnote}}%
+ \setcounter{ODw@Nr}{0}%
+ \IfBooleanTF#1{\center}{}% "*" detected
+ \IfBooleanTF{#2}{\ODw@shorttrue}{}% "!" detected
+ \IfValueTF{#5}{\ODw@descriptiontrue}{\ODw@descriptionfalse}%
+ \ODw@Bidding[#4]{#5}%
+}{%
+ \endODw@Bidding%
+ \IfBooleanTF{#3}%
+ {\rule{0pt}{0pt}}%
+ % +---without this, pdflatex aborts compilation!
+ {\usebox{\ODw@BidBox}}% "-" detected
+ \IfBooleanTF#1{\endcenter}{}%
+}% bidding
+\NewDocumentEnvironment{biddingpair}{s t! t- O{c}d()}{%
+ \def\xspace{}%
+ \ODw@GameSize%
+ \renewcommand{\thefootnote}{\alph{footnote}}%
+ \setcounter{ODw@Nr}{0}%
+ \IfBooleanTF#1{\center}{}% "*" detected
+ \IfBooleanTF{#2}{\ODw@shorttrue}{}% "+" detected
+ \IfValueTF{#5}{\ODw@descriptiontrue}{\ODw@descriptionfalse}%
+ \ODw@Biddingpair[#4]{#5}%
+}{%
+ \endODw@Biddingpair%
+ \IfBooleanTF{#3}%
+ {\rule{0pt}{0pt}}%
+ % +---without this, pdflatex aborts compilation!
+ {\usebox{\ODw@BidBox}}% "-" detected
+ \IfBooleanTF#1{\endcenter}{}%
+}% biddingpair
+\def\ODw@AccTricks{%
+ \ODw@LastTrick{\ODw@Last}{\theODw@WinningNr}%
+ \ODw@append{\theODw@NSCnt,\theODw@EWCnt,}% store counters
+ \setcounter{ODw@Highest}{0}% reset for next trick
+}% ODw@AccTricks
+\def\ODw@Tricks{%
+ \setcounter{ODw@PlayerNr}{0}%
+ \gdef\ODw@Last{\ODw@NextLead}%
+ \expandafter\GetTranslation%
+ \expandafter{\ODw@NextLead-(ODw)}:\,%
+}% ODw@Tricks
+\newcommand\ODw@LastTrick[2]{%
+ \IfEqCase{#1}{%
+ {W}{\setcounter{ODw@Cnt}{0}}%
+ {N}{\setcounter{ODw@Cnt}{1}}%
+ {E}{\setcounter{ODw@Cnt}{2}}%
+ {S}{\setcounter{ODw@Cnt}{3}}%
+ }% IfEqCase
+ \addtocounter{ODw@Cnt}{#2}%
+ \IfEqCase{\theODw@Cnt}{%
+ {1}{\gdef\ODw@NextLead{W}\stepcounter{ODw@EWCnt}}
+ {2}{\gdef\ODw@NextLead{N}\stepcounter{ODw@NSCnt}}
+ {3}{\gdef\ODw@NextLead{E}\stepcounter{ODw@EWCnt}}
+ {4}{\gdef\ODw@NextLead{S}\stepcounter{ODw@NSCnt}}
+ {5}{\gdef\ODw@NextLead{W}\stepcounter{ODw@EWCnt}}
+ {6}{\gdef\ODw@NextLead{N}\stepcounter{ODw@NSCnt}}
+ {7}{\gdef\ODw@NextLead{E}\stepcounter{ODw@EWCnt}}
+ }% IfEqCase
+}% ODw@LastTrick
+\NewDocumentEnvironment{play}{s mO{N}}{%
+ \def\ODw@TrumpSuit{#3}
+ \gdef\ODw@NextLead{#2}%
+ \setcounter{ODw@Nr}{0}%
+ \setcounter{ODw@NSCnt}{0}
+ \setcounter{ODw@EWCnt}{0}%
+ \ODw@GameSize%
+ \ODw@Scratch{}% make empty
+ \let\ODw@Clubs\empty%
+ \let\ODw@Diamonds\empty%
+ \let\ODw@Hearts\empty%
+ \let\ODw@Spades\empty%
+\def\ODw@EXtra{0.9em}% white space in title
+\provideenvironment{TableII}{%
+ \begin{tabular}[b]{FPPP}%
+ \multicolumn{1}{c}{\GetTranslation{Lead!-(ODw)}} &%
+ \cci{\GetTranslation{2nd-(ODw)}} &%
+ \cci{\GetTranslation{3rd-(ODw)}} &%
+ \cci{\GetTranslation{4th-(ODw)}} \\[0.3em]\hline%
+ \multicolumn{4}{c}{}\\[-\ODw@EXtra]%
+}{%
+ \end{tabular}%
+}% TableII
+ \begin{lrbox}{0}% save TableII for later
+ \begin{TableII}
+}{%
+ \end{TableII}
+ \end{lrbox}%
+ % Check consistency of the played cards
+ \ODw@ChkSameCards{\ODw@Spades}{\Sp}%
+ \ODw@ChkSameCards{\ODw@Hearts}{\He}%
+ \ODw@ChkSameCards{\ODw@Diamonds}{\Di}%
+ \ODw@ChkSameCards{\ODw@Clubs}{\Cl}%
+ \setcounter{ODw@Cnt}{0}%
+ \IfBooleanTF#1{\begin{center}}{}%
+ \begin{tabular}[b]{r}% TableI
+ \cci{\GetTranslation{Nr-(ODw)}}\\[0.3em]
+ \hline\\[-\ODw@EXtra]%
+ \setcounter{ODw@Cnt}{1}%
+ \whiledo{\theODw@Cnt<\theODw@Nr}{%
+ \theODw@Cnt\\
+ \stepcounter{ODw@Cnt}%
+ }%
+ \theODw@Cnt\\% MUST be outside the loop
+ % (the extra line problem]!
+ \end{tabular}%
+ \usebox{0}%
+ \setcounter{ODw@Nr}{0}%
+ \renewcommand*{\do}[1]{%
+ \ifnumequal{\value{ODw@Nr}}{2}{\\\setcounter{ODw@Nr}{0}}{}%
+ \stepcounter{ODw@Nr}%
+ ##1
+ \ifnumequal{\value{ODw@Nr}}{2}{}{&}%
+ }%
+ \begin{tabular}[b]{|cc}% TableIII
+ \multicolumn{1}{|c}{%
+ \cci{\scriptsize\shortstack[c]{\North*!\\\South*!}}} &%
+ \multicolumn{1}{c}{%
+ \cci{\scriptsize\shortstack[c]{\East*!\\\West*!}}%
+ }\\\hline\\[-\ODw@EXtra]%
+ \expandafter\docsvlist\expandafter{\the\ODw@Scratch}%
+ \end{tabular}%
+ \IfBooleanTF#1{\end{center}}{}%
+}% play
+\NewDocumentCommand\ODw@CondNewLine{O{0em}}{%
+ {\ODw@GameFont% needed to relate skips to the font-size
+ \setlength{\ODw@Tmp@Len}{\ODw@Bid@Width}%
+ \addtolength{\ODw@Tmp@Len}{\ODw@Diagram@Width}%
+ \addtolength{\ODw@Tmp@Len}{#1}%
+ \addtolength{\ODw@Tmp@Len}{\ODw@Skip@Width}%
+ \ifthenelse{\lengthtest{\ODw@Tmp@Len > \textwidth}}{%
+ \\[1em]}{%
+ \hspace{\ODw@Skip@Width}%
+ }%
+ }%
+}% ODw@CondNewLine
+\NewDocumentCommand\expertquiz{st! O{}m}{%
+
+ \noindent%
+ \IfBooleanTF#1{\begin{center}}% "*" detected
+ {\par\vspace{0.5\baselineskip}}%
+ \bgroup% keep font changes local (e.g. "\smaller").
+ \ODw@LegendFont%
+ \ifx#3\empty\else#3\par\fi%
+ \egroup%
+ \IfBooleanTF{#2}{~\hspace*{2em}}{}% "!" detected
+ \usebox{\ODw@Hand@Box}% display the saved hand
+ \IfBooleanTF{#2}{}{\quad}% no "!" detected
+ \setlength\ODw@Tmp@Width{\wd\ODw@BidBox + 1em}%
+ \IfBooleanTF{#2}%
+ {\\}%
+ {\addtolength\ODw@Tmp@Width{\wd\ODw@Hand@Box}}%
+ \usebox{\ODw@BidBox}% display the saved bidding
+ \par\vspace{0.3em}%\noindent%
+ {% keep legendfont and "smaller" local
+ \ODw@LegendFont%
+ \smaller%
+ \IfBooleanTF#1{\bgroup\centering}{}%
+ \parbox[t]{\ODw@Tmp@Width}{%
+ \textbf{\ODw@AwardText: }%
+ \raggedright#4%
+ }% parbox
+ \IfBooleanTF#1{\egroup}{}%
+ }%
+ \IfBooleanTF#1{\end{center}}{}%
+}% expertquiz
+\pgfkeys{%
+ /ODw/.is family, /ODw,
+ bidder/.store in = \ODw@BidderDefault,
+ compass/.store in = \ODw@CompassDefault,
+ game/.store in = \ODw@GameDefault,
+ legend/.store in = \ODw@LegendDefault,
+ name/.store in = \ODw@NameDefault,
+ other/.store in = \ODw@OtherDefault,
+ compline/.store in = \ODw@CompLine,
+ compmid/.store in = \ODw@CompMid,
+ 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{compturn/.is choice}
+ \ODw@set{compturn/off/.code={\global\ODw@CompTurnfalse}}
+ \ODw@set{compturn/on/.code={\global\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{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{bidlong/.is choice}
+ \ODw@set{bidlong/off/.code={\global\ODw@LongCallsfalse}}
+ \ODw@set{bidlong/on/.code={\global\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}}}
+ \ODw@set{compturn/true/.code={\pgfkeys{/ODw/compturn=on}}}
+ \ODw@set{bidline/1/.code={\pgfkeys{/ODw/bidline=on}}}
+ \ODw@set{bidders/true/.code={\pgfkeys{/ODw/bidders=on}}}
+ \ODw@set{bidders/1/.code={\pgfkeys{/ODw/bidders=on}}}
+ \ODw@set{bidline/true/.code={\pgfkeys{/ODw/bidline=on}}}
+ \ODw@set{bidlong/1/.code={\pgfkeys{/ODw/bidlong=on}}}
+ \ODw@set{bidlong/true/.code={\pgfkeys{/ODw/bidlong=on}}}
+ \ODw@set{compshow/0/.code={\pgfkeys{/ODw/compshow=off}}}
+ \ODw@set{compshow/false/.code={\pgfkeys{/ODw/compshow=off}}}
+ \ODw@set{compturn/0/.code={\pgfkeys{/ODw/compturn=off}}}
+ \ODw@set{compturn/false/.code={\pgfkeys{/ODw/compturn=off}}}
+ \ODw@set{bidders/0/.code={\pgfkeys{/ODw/bidders=off}}}
+ \ODw@set{bidders/false/.code={\pgfkeys{/ODw/bidders=off}}}
+ \ODw@set{bidline/0/.code={\pgfkeys{/ODw/bidline=off}}}
+ \ODw@set{bidline/false/.code={\pgfkeys{/ODw/bidline=off}}}
+ \ODw@set{bidlong/0/.code={\pgfkeys{/ODw/bidlong=off}}}
+ \ODw@set{bidlong/false/.code={\pgfkeys{/ODw/bidlong=off}}}
+\newcommand\resetfonts{%
+ \bidderfont{\ODw@BidderDefault}%
+ \compassfont{\ODw@CompassDefault}%
+ \gamefont{\ODw@GameDefault}%
+ \legendfont{\ODw@LegendDefault}%
+ \namefont{\ODw@NameDefault}%
+ \otherfont{\ODw@OtherDefault}%
+}% resetfonts
+\NewDocumentCommand\setdefaults{s m}{%
+ \pgfkeys{/ODw,#2}%
+ \IfBooleanTF{#1}{\resetfonts}{}%
+}% setdefaults
+\newcommand\newgame{%
+ \boardnr{0}%
+ \headlinetext{}%
+ \footlinetext{}%
+ \gdef\ODw@LeftUpperText{}%
+ \gdef\ODw@LeftLowerText{}%
+ \gdef\ODw@RightUpperText{}%
+ \gdef\ODw@RightLowerText{}%
+ \gdef\ODw@Nhand{\ODw@hand{t}{}{}{}{}}%
+ \gdef\ODw@Ehand{\ODw@hand{c}{}{}{}{}}%
+ \gdef\ODw@Shand{\ODw@hand{b}{}{}{}{}}%
+ \gdef\ODw@Whand{\ODw@hand{c}{}{}{}{}}%
+ \namesNS{}{}\namesEW{}{}%
+ \gdef\ODw@Spades{}%
+ \gdef\ODw@Hearts{}%
+ \gdef\ODw@Diamonds{}%
+ \gdef\ODw@Clubs{}%
+ \gdef\ODw@NSpades{}\gdef\ODw@ESpades{}%
+ \gdef\ODw@SSpades{}\gdef\ODw@WSpades{}%
+ \gdef\ODw@NHearts{}\gdef\ODw@EHearts{}%
+ \gdef\ODw@SHearts{}\gdef\ODw@WHearts{}%
+ \gdef\ODw@NDiamonds{}\gdef\ODw@EDiamonds{}%
+ \gdef\ODw@SDiamonds{}\gdef\ODw@WDiamonds{}%
+ \gdef\ODw@NClubs{}\gdef\ODw@EClubs{}%
+ \gdef\ODw@SClubs{}\gdef\ODw@WClubs{}%
+}% newgame
+\newcommand\ODw@ChkNrOfCards[2]{%
+ \StrDel{#1}{-}[\ODw@CardStr]% remove voids
+ \StrLen{\ODw@CardStr}[\ODw@CardLen]%
+ \ifthenelse{\ODw@CardLen > 13}{%
+ \ODw@Error{#2 has \ODw@CardLen{} cards}%
+ }{%
+ \ifthenelse{\ODw@CardLen < 13}{%
+ \ODw@Warning{#2 has \ODw@CardLen{} cards}%
+ }{}%
+ }%
+}% ODw@ChkNrOfCards
+\newcommand\ODw@PrErr[3]{%
+ \bgroup%
+ \if#1T\def\ODw@T{10}\else\def\ODw@T{#1}\fi%
+ \ifthenelse{#2 > 1}{%
+ \ODw@Error{Card #3\,\ODw@T{} occurs #2 times}%
+ }{%
+ \ifthenelse{#2 = 0}{%
+ \ODw@Warning{Card #3\,\ODw@T{} fails}}{}%
+ }%
+ \egroup%
+}% ODw@PrErr
+\newcommand\ODw@ChkSameCards[2]{%
+ \StrDel{#1}{-}[\ODw@CardStr]%
+ \StrCount{\ODw@CardStr}{2}[\ODw@CCnt]\ODw@PrErr{2}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{3}[\ODw@CCnt]\ODw@PrErr{3}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{4}[\ODw@CCnt]\ODw@PrErr{4}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{5}[\ODw@CCnt]\ODw@PrErr{5}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{6}[\ODw@CCnt]\ODw@PrErr{6}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{7}[\ODw@CCnt]\ODw@PrErr{7}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{8}[\ODw@CCnt]\ODw@PrErr{8}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{9}[\ODw@CCnt]\ODw@PrErr{9}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{T}[\ODw@CCnt]\ODw@PrErr{T}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{J}[\ODw@CCnt]\ODw@PrErr{J}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{Q}[\ODw@CCnt]\ODw@PrErr{Q}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{K}[\ODw@CCnt]\ODw@PrErr{K}{\ODw@CCnt}{#2}%
+ \StrCount{\ODw@CardStr}{A}[\ODw@CCnt]\ODw@PrErr{A}{\ODw@CCnt}{#2}%
+}% ODw@ChkSameCards
+\newbool{ODw@Warnings}
+\newbool{ODw@Errors}
+\ODw@set{warn/off/.code={%
+ \global\setbool{ODw@Warnings}{false}}}
+\ODw@set{warn/on/.code={%
+ \global\setbool{ODw@Warnings}{true}}}
+\ODw@set{err/off/.code={%
+ \global\setbool{ODw@Errors}{false}}}
+\ODw@set{err/on/.code={%
+ \global\setbool{ODw@Errors}{true}}}
+\ODw@set{warn=off}
+\ODw@set{err=on}
+
+\ProcessPgfOptions{/ODw}
+
+\newcommand\ODw@Error[1]{%
+ \ifbool{ODw@Errors}{%
+ \par\textcolor{red}{Error: #1}\par}{}%
+}% ODw@Error
+\newcommand\ODw@Warning[1]{%
+ \ifbool{ODw@Warnings}{%
+ \par\textcolor{blue}{Warning: #1}\par}{}%
+}% ODw@Warning
+\NewDocumentCommand{\Ace}{s t!}{%
+ \bgroup%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{A-(ODw)}}%
+ {\GetTranslation{Ace-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{a-(ODw)}}%
+ {\GetTranslation{ace-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Ace
+\def\ace{\Ace*!}
+\NewDocumentCommand{\King}{s t!}{%
+ \bgroup%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{K-(ODw)}}%
+ {\GetTranslation{King-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{k-(ODw)}}%
+ {\GetTranslation{king-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% King
+\def\king{\King*!}
+\NewDocumentCommand{\Queen}{s t!}{%
+ \bgroup%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Q-(ODw)}}%
+ {\GetTranslation{Queen-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{q-(ODw)}}%
+ {\GetTranslation{queen-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Queen
+\def\queen{\Queen*!}
+\NewDocumentCommand{\Jack}{s t!}{%
+ \bgroup%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{J-(ODw)}}%
+ {\GetTranslation{Jack-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{j-(ODw)}}%
+ {\GetTranslation{jack-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Jack
+\def\jack{\Jack*!}
+
+\NewDocumentCommand{\All}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{All!-(ODw)}}%
+ {\GetTranslation{All-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{all!-(ODw)}}%
+ {\GetTranslation{all-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% All
+\def\all{\All*}
+
+\NewDocumentCommand{\None}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{None!-(ODw)}}%
+ {\GetTranslation{None-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{none!-(ODw)}}%
+ {\GetTranslation{none-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% None
+\def\none{\None*}
+%% \end{macrocode}
+\NewDocumentCommand{\Contract}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Contr-(ODw)}}%
+ {\GetTranslation{Contract-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{contr-(ODw)}}%
+ {\GetTranslation{contract-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Contract
+\def\contract{\Contract*}
+%% \end{macrocode}
+\NewDocumentCommand{\Lead}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Lead!-(ODw)}}%
+ {\GetTranslation{Lead-(ODw)}}%
+ }{% else #1
+ \IfBooleanTF{#2}%
+ {\GetTranslation{lead!-(ODw)}}%
+ {\GetTranslation{lead-(ODw)}}%
+ }% #1
+ \egroup%
+ \xspace%
+}% Lead
+\def\lead{\Lead*}
+%% \end{macrocode}
+\NewDocumentCommand{\Declarer}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Decl-(ODw)}}%
+ {\GetTranslation{Declarer-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{decl-(ODw)}}%
+ {\GetTranslation{declarer-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Declarer
+\def\declarer{\Declarer*}
+%% \end{macrocode}
+\newcommand\by{%
+ \bgroup%
+ \ODw@OtherFont%
+ \GetTranslation{by-(ODw)}%
+ \egroup%
+ \xspace%
+}% by
+\NewDocumentCommand{\Board}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Brd-(ODw)}}%
+ {\GetTranslation{Board-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{brd-(ODw)}}%
+ {\GetTranslation{board-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Board
+\def\board{\Board*}
+%% \end{macrocode}
+\NewDocumentCommand{\Deal}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{Deal!-(ODw)}}%
+ {\GetTranslation{Deal-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{deal!-(ODw)}}%
+ {\GetTranslation{deal-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Deal
+\def\deal{\Deal*}
+%% \end{macrocode}
+\NewDocumentCommand{\doubled}{s}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \GetTranslation{Doubled-(ODw)}}{%
+ \GetTranslation{doubled-(ODw)}%
+ }%
+ \egroup%
+ \xspace%
+}% doubled
+\NewDocumentCommand{\redoubled}{s}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \GetTranslation{Redoubled-(ODw)}}{%
+ \GetTranslation{redoubled-(ODw)}%
+ }%
+ \egroup%
+ \xspace%
+}% redoubled
+\NewDocumentCommand{\hpts}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{HCP-(ODw)}}%
+ {\GetTranslation{High Card Points-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{hcp-(ODw)}}%
+ {\GetTranslation{high card points-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% High Card Points
+\def\HCP{\hpts*!}
+\NewDocumentCommand{\lpts}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{LP-(ODw)}}%
+ {\GetTranslation{Length Points-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{lp-(ODw)}}%
+ {\GetTranslation{length points-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Length Points
+\def\LP{\lpts*!}
+\NewDocumentCommand{\dpts}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{DP-(ODw)}}%
+ {\GetTranslation{Distribution Points-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{dp-(ODw)}}%
+ {\GetTranslation{distribution points-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Distribution Points
+\def\DP{\dpts*!}
+\NewDocumentCommand{\tpts}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{TP-(ODw)}}%
+ {\GetTranslation{Total Points-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{tp-(ODw)}}%
+ {\GetTranslation{total points-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Total Points
+\def\TP{\tpts*!}
+\NewDocumentCommand{\gforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{GF-(ODw)}}%
+ {\GetTranslation{Game Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{gf-(ODw)}}%
+ {\GetTranslation{game forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Game Forcing
+\def\GF{\gforce*!}
+\NewDocumentCommand{\sforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{SF-(ODw)}}%
+ {\GetTranslation{Semi Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{sf-(ODw)}}%
+ {\GetTranslation{semi forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Semi Forcing
+\def\SF{\sforce*!}
+\NewDocumentCommand{\nmforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{NMF-(ODw)}}%
+ {\GetTranslation{New Minor Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{nmf-(ODw)}}%
+ {\GetTranslation{new minor forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% New Minor Forcing
+\def\NMF{\nmforce*!}
+\NewDocumentCommand{\tsforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{TSF-(ODw)}}%
+ {\GetTranslation{Third Suit Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{tsf-(ODw)}}%
+ {\GetTranslation{third suit forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Third Suit Forcing
+\def\TSF{\tsforce*!}
+\NewDocumentCommand{\fsforce}{s t!}{%
+ \bgroup%
+ \ODw@OtherFont%
+ \IfBooleanTF{#1}{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{FSF-(ODw)}}%
+ {\GetTranslation{Fourth Suit Forcing-(ODw)}}%
+ }{%
+ \IfBooleanTF{#2}%
+ {\GetTranslation{fsf-(ODw)}}%
+ {\GetTranslation{fourth suit forcing-(ODw)}}%
+ }%
+ \egroup%
+ \xspace%
+}% Fourth Suit Forcing
+\def\FSF{\fsforce*!}
+\newgame
+\setdefaults{bidder=\mdseries\sffamily}
+\setdefaults{compass=\mdseries\sffamily}
+\setdefaults{game=\bfseries\sffamily}
+\setdefaults{legend=\mdseries\rmfamily}
+\setdefaults{name=\mdseries\slshape}
+\setdefaults*{other=\bfseries\sffamily}
+\setdefaults{compshow=on,compturn=off}
+\setdefaults{bidfirst=W,bidders=on,bidlong=on}
+\AtBeginDocument{%
+\ForEachTrackedLanguage{\thislang}{%
+ \ifthenelse{\equal{\thislang}{norsk}}%
+ {\def\thislang{norwegian}}{}%
+ \IfFileExists{ODw-\thislang.trsl}%
+ {%
+ \LoadDictionaryFor{\thislang}{ODw}%
+ \PackageInfo{ODw}{%
+ Translation dictionary ODw-\thislang.trsl loaded%
+ }%
+ }{%
+ \PackageWarning{ODw}{%
+ Translation dictionary ODw-\thislang.trsl not found%
+ }%
+ }%
+}% ForEach
+}% AtBeginDocument
+\endinput% onedown.sty
+
+\endinput
+%%
+%% End of file `onedown.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index c2aa4a409c9..b664a859d29 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -472,7 +472,7 @@ my @TLP_working = qw(
odsfile ofs
ogham oinuit old-arrows oldlatin oldstandard
oldstyle olsak-misc
- onlyamsmath onrannual opcit opensans oplotsymbl
+ onedown onlyamsmath onrannual opcit opensans oplotsymbl
opteng optidef optional options
ordinalpt orkhun oscola ot-tableau othello othelloboard
oubraces outline outliner outlines outlining overlays overlock overpic
diff --git a/Master/tlpkg/tlpsrc/collection-games.tlpsrc b/Master/tlpkg/tlpsrc/collection-games.tlpsrc
index 155a8088313..c8a503c59ce 100644
--- a/Master/tlpkg/tlpsrc/collection-games.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-games.tlpsrc
@@ -21,6 +21,7 @@ depend horoscop
depend labyrinth
depend logicpuzzle
depend musikui
+depend onedown
depend othello
depend othelloboard
depend pas-crosswords
diff --git a/Master/tlpkg/tlpsrc/onedown.tlpsrc b/Master/tlpkg/tlpsrc/onedown.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/onedown.tlpsrc