summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/bridge.sty
blob: 7baf42a46f0b28ab40e21c047867ae033cfffd1b (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
% original definitions by Kees van der Laan
%
% nowadays the file is seldom found in TeX distributions so we pack it with
% the examples of LGC2

\providecommand\club{\ensuremath{\clubsuit}}
\providecommand\diam{\ensuremath{\diamondsuit}}
\providecommand\heart{\ensuremath{\heartsuit}}
\providecommand\spade{\ensuremath{\spadesuit}}

\providecommand{\hand}[4]{
 \begin{minipage}[t]{8em}%I chose \br=8em
 \begin{tabbing}
 %width of parbox depends on the parameters:
 %min{\br, max{string #1, ..., string #4}}
  \(\spadesuit\)  \= #1 \\
  \(\heartsuit\)  \> #2 \\
  \(\diamondsuit\)\> #3 \\
  \(\clubsuit\)   \> #4
 \end{tabbing}
 \end{minipage}     }%end \hand

\newsavebox{\NESW}
\savebox{\NESW}[4em]{%
\raisebox{-1.5\baselineskip}%
{\fbox{\small W
   \raisebox{2.6ex}{N}
   \hspace*{-1em}
   \raisebox{-2.6ex}{S}
   \,\,{E}%
      }
}          }%end \NESW
%
\providecommand{\crdima}[6]{%
\begin{tabular}{lll}
 #1 & #3             & #2\\
 #4 & \usebox{\NESW} & #5\\
    & #6             &
\end{tabular}
}%end \crdima

\newenvironment{bidding}
{\hrule height 0pt    %   this rule is to make tabbing take the full
                      %   line  within the example minipages
 \begin{tabbing}
 xxxxxx\=xxxxxx\=xxxxxx\=xxxxxx \kill
 West  \>North \>East  \> South\\
}{\end{tabbing} 
}%end bidding

\endinput