From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 macros/latex/contrib/onedown/examples/Bidding.tex | 244 ++++++++++++++++++++++
 1 file changed, 244 insertions(+)
 create mode 100644 macros/latex/contrib/onedown/examples/Bidding.tex

(limited to 'macros/latex/contrib/onedown/examples/Bidding.tex')

diff --git a/macros/latex/contrib/onedown/examples/Bidding.tex b/macros/latex/contrib/onedown/examples/Bidding.tex
new file mode 100644
index 0000000000..18ca0f7c3c
--- /dev/null
+++ b/macros/latex/contrib/onedown/examples/Bidding.tex
@@ -0,0 +1,244 @@
+\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.
+Please observe that the change to |bidfirst=N| is made local by the
+surrounding |{...}|
+
+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}.
+
+In the first example we also added an |\alert| and an |\announce|, just to
+show their layout.
+\vfill
+%
+\begin{HBox}{{bidding, alignment and long/short forms}\hfill File: \FileName}
+%\gamefont{\smaller\smaller}
+A
+\begin{bidding}% default= [c]
+1\Cl\announce & 1D & 1H & 1S\alert \\
+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
+
-- 
cgit v1.2.3

