summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/examples/Bidding.tex
blob: 18ca0f7c3c87f01dc00e8580261cbdac86104249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
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