summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/examples/Compass.tex
blob: 7cd46ecc79bb09ca11dd02d2c490f3767eb7498b (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
\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=c}
\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