forked from Kungsgeten/bml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbml.tex
103 lines (87 loc) · 2.8 KB
/
bml.tex
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
\usepackage{txfonts} % For \varheartsuit and \vardiamondsuit
\usepackage[usenames,dvipsnames]{color} % dvipsnames necessary to made PDFLaTeX work.
\usepackage{enumerate}
\usepackage{listliketab}
\usepackage{latexsym} % \Box
\usepackage{pbox} % \Box
% suits
%%% Black and white
% \renewcommand{\c}{$\clubsuit$}
% \renewcommand{\d}{$\diamondsuit$}
% \newcommand{\h}{$\heartsuit$}
% \newcommand{\s}{$\spadesuit32$}
%%% Colors
\renewcommand{\c}{\textcolor{OliveGreen}{$\clubsuit$}}
\renewcommand{\d}{\textcolor{RedOrange}{$\vardiamondsuit$}}
\newcommand{\h}{\textcolor{Red}{$\varheartsuit${}}}
\newcommand{\s}{\textcolor{Blue}{$\spadesuit${}}}
%suits for pdf-friendly titles
\newcommand{\pdfc}{\texorpdfstring{\c{}}{C}}
\newcommand{\pdfd}{\texorpdfstring{\d{}}{D}}
\newcommand{\pdfh}{\texorpdfstring{\h{}}{H}}
\newcommand{\pdfs}{\texorpdfstring{\s{}}{S}}
\newenvironment{bidtable}
{\begin{tabbing}
xxxxxxxxx\=xxxxxxxxx\=xxxxxxxxx\=xxxxxxxxx\=xxxxxxxxx\=xxxxxxxxx\=\kill}
{\end{tabbing} }%
\newenvironment{bidding}%
{\begin{tabbing}
xxxxxx\=xxxxxx\=xxxxxx\=xxxxxx \kill
}{\end{tabbing} }%end bidding
% writing hands
\newcommand{\cards}[1]{\textsf{#1}}
\newcommand{\spades}[1]{\s\cards{#1}}
\newcommand{\hearts}[1]{\h\cards{#1}}
\newcommand{\diamonds}[1]{\d\cards{#1}}
\newcommand{\clubs}[1]{\c\cards{#1}}
\newcommand{\void}{--}
\newcommand{\hand}[4]{\spades{#1}\ \hearts{#2}\ \diamonds{#3} \clubs{#4}}
\newcommand{\vhand}[4]{\spades{#1}\\\hearts{#2}\\\diamonds{#3}\\\clubs{#4}}
% The \Box should always appear the same distance from the left margin
\newcommand\onesuit[4]%
{%
\begin{center}%
\begin{tabular}{>{\hfill}p{3cm}cp{3cm}}
& \cards{#2} \\%
\cards{#1}& $\Box$ & \cards{#3} \\%
& \cards{#4} %
\end{tabular}
\end{center}%
}
% A special command if the south hand is not shown to avoid whitespace
\newcommand\onesuitenw[3]%
{%
\begin{center}%
\begin{tabular}{>{\hfill}p{3cm}cp{3cm}}%
& \cards{#2} \\%
\cards{#1}& $\Box$ & \cards{#3}%
\end{tabular}%
\end{center}%
}
\newcommand\dealdiagram[5]%
{%
\begin{center}%
\begin{tabular}{>{\hfill}p{3cm}cp{3cm}}
\pbox{20cm}{\small #5}& \pbox{20cm}{#2} \\%
\pbox{20cm}{#1}& $\Box$ & \pbox{20cm}{#3} \\%
& \pbox{20cm}{#4} %
\end{tabular}
\end{center}%
}
\newcommand\dealdiagramenw[4]%
{%
\begin{center}%
\begin{tabular}{>{\hfill}p{3cm}cp{3cm}}
\pbox{20cm}{\small #4}& \pbox{20cm}{#2} \\%
\pbox{20cm}{#1}& $\Box$ & \pbox{20cm}{#3} \\%
\end{tabular}
\end{center}%
}
\newcommand\dealdiagramew[2]%
{%
\begin{center}%
\begin{tabular}{>{\hfill}p{3cm}cp{3cm}}
\pbox{20cm}{#1}& $\Box$ & \pbox{20cm}{#2} \\%
\end{tabular}
\end{center}%
}