forked from Kungsgeten/bml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.txt
264 lines (212 loc) · 7.82 KB
/
example.txt
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
#+TITLE: BML 5542
#+AUTHOR: Erik Sjöstrand
#+DESCRIPTION: Short club with transfer responses.
* Introduction
Welcome to BML! This is a normal paragraph, and above we can see
the =#+TITLE=, the =#+AUTHOR= and the =#+DESCRIPTION= of the file. =#+TITLE= is
the name of the system and =#+DESCRIPTION= is a /short summary of/ how
the system works. =#+AUTHOR= is self explanatory. =Introduction= above,
"headed by an asterisk", sets a section at the first level (the second
level would have two asterisks etc).
In the paragraph above I encapsulated some words between equal
signs. This means that they will show up as a monospaced font when
exported to HTML or LaTeX. It is also possible to make words (or
sentences) *strong or bold* or /in italics/.
The system presented in this example file is meant to showcase many
of the current features in BML. Let's start with the basic opening
structure of the system:
1C 2+!c. Natural or balanced
1D 4+ suit, unbalanced
1M 5+ suit
2C 20--21 bal / Any game force
2D 6+!h or 6+!s, 5--9 hcp
2HS 6+ suit, 10--13 hcp
2N 22--24
3X Preemptive
3N Gambling
The above is an example of a bidding table; the reason why BML is
more suited for bridge system notes than other markup languages. You
start by writing the bid, then a number of whitespaces, and then the
description of the bid. Simple! C is for clubs, D for diamonds, H
for hearts, S for spades and N for no trump. There's also some
special cases which you could use, above we use 1M (1H and 1S), 2HS
(2H and 2S) and 3X (3C, 3D, 3H and 3S). We'll see more of these
later.
The reason why the 1NT opening is left out above is a secret for
now!
* The 1!c opening
You might have noticed the !c in the title of this section? This
will be replaced by a club suit symbol when exported. The same is
true for !d, !h and !s (but these will be converted to diamonds,
hearts and spades, ofcourse).
In this example we use transfer responses to the 1!c opening:
1C---
1red Transfer. 4+ major, 0+ hcp
1S INV+ with 5+!d / Negative NT
1N Game forcing, 5+!c or balanced
2C 5+!c, 5--9 hcp
2X 6+ suit, 4--8 hcp
2N Invitational
By writing 1C--- we define that the following bids should be
continuations to the sequence 1C. We could write 1C- or 1C-- too,
the number of dashes only matters to the way the output looks. Also
note the 1red response, this defines both 1D and 1H.
** After a transfer
This section has two asterisks, meaning it will be at level two
(so its a subsection). You might also have noticed that the
paragraphs, the sections and the bidtables are separated by a
blank line? This is important in BML, as the blankline are used to
separate elements.
1C-1D;
1H Minimum with 2--3!h
1S 4+!h, 4!s, at most invitational
1N Sign off
2C Puppet to 2!d
2D Forced
2H Mildly invitational with 5!h
2S Invitational, 5+!h and 4!s
2N Strongly invitational with 5!h
3m Invitational with 4!h and 5+ minor
3H 6!h, about 11--12 hcp
2D Artificial game force
2H 6+!h, about 9--10 hcp
1S 5+!c, 4+!s, unlimited
1N 17--19 bal, 2--3!h
2C 5+!c, unbal, 0--2!h, 0--3!s
2D Reverse
2H Minimum, 4!h
2S 16+ hcp, 5+!c and 4+!h
3D Retransfer
3H
3S Cue bid, slam interest
4CD Cue bid, slam interest
4H To play
3H Invitational
3S Splinter
4CD Splinter
4H To play
2N 16+ hcp, 6+!c. 18+ if 3!h
3C Suggestion to play
3D Relay
3H 3!h, 18+ hcp
3H Game forcing with 6+!h
3C 15--17 hcp, 6+!c and 3!h
3D Retransfer
3H Invitational
3D 17--19 bal, 4!h
3H To play
3H 13--15 hcp, good hand, 5+!c and 4!h
3N Asking for singleton
This bidding table shows a couple of new features. The most
prominent is the ability to add continuations directly in the
table, by using whitespaces. We also see another example of
appending bids to an existing sequence, by using 1C-1D; in the
beginning. There's also the use of 3m, meaning both 3C and 3D.
* Defense to 1NT
Defining bidding when both sides bid is a little bit more tricky,
since you have to write all the bids (even passes). The opponents'
bid are indicated by encapsulating them in parentheses. P is used
for Pass, D for Double and R for Redouble.
(1N)---
#COPY nt_defense
D Strength, ca 15+
2C At least 5-4 majors
(D)
P 5+!c, suggestion to play
R Asking for better/longer major
2D 5+!d, suggestion to play
(P)
2D Asking for better/longer major
2D A weak major or a strong minor
(P)
2H Pass/correct
2S Pass/correct
2N Asking
2HS Constructive
2N 5-5 minors
3X Preemptive
#ENDCOPY
Note that the above is only for a direct overcall over 1NT. To
define the above also when balancing. We've used BML's
copy/cut/paste functionality in order to showcase that you do not
have to write it all over again. Take a look below (only visible in
the /example.txt/ file, not in HTML, LaTeX or .pdf):
#HIDE
(1N)-P-(P)---
#PASTE nt_defense
First we used the =#COPY= command; the text between =#COPY= and =#ENDCOPY=
got put into a sort of clipboard, with the tag nt_defense which we
specified. To paste it into the bidding table above we used
the =#PASTE= command. We also used the =#HIDE= option. When this is
present in a bidding table the table will be exported to Full
Disclosure, but not to HTML or LaTeX.
You could also include other BML-files into your main file by using
the =#INCLUDE= command. Just type =#INCLUDE <filename>= and the entire
file will be inserted at the point where you wrote the command. This
is a useful way to separate your system into modules, or perhaps
just to make it more manageable.
It is also possible to add continuations when the opponents
interfere:
1C-(1D)---
D 4+!h
1H 4+!s
1S INV+ with 5+!d / Negative NT
1N Game forcing, 5+!c or balanced
2C 5+!c, 5--9 hcp
2X 6+ suit, 4--8 hcp
2N Invitational
* The 1NT opening
Here's the reason why I left out the 1NT opening earlier: I will
showcase how to make sequences dependant on vulnerability and
seat. This will be a bit messy, so hold tight!
#CUT nt_module
2C Stayman
2D No major
2N 4-4 majors, minimum
3C 4-4 majors, maximum
2red Transfer
2S Minor suit stayman
2N Invitational
#ENDCUT
We start by cutting our NT-module, since this will be used on all
NT-openings. =#CUT= is similar to the =#COPY= command, but using =#CUT=
means that it isn't parsed as a bidding table until it is pasted.
#VUL N0
The =#VUL= command is used to set the vulnerability. It takes an
argument of two characters, each can be Y, N or 0. The first
character asks if we are vulnerable and the second asks if our
opponents are vulnerable. Y is for Yes, N is for No and 0 means that
it doesn't matter.
#SEAT 12
The =#SEAT= command sets the seat in which the bid should be valid. 0
means that the seat doesn't matter (all seats), 12 means first or
second and 34 means third or fourth. 1--4 could also be used.
#HIDE
1N 12--14
#PASTE nt_module
So when we're not vulnerable we open 1NT 12--14 in 1st and 2nd seat.
#SEAT 34
#HIDE
1N 14--16
#PASTE nt_module
But in third and fourth seat it is 14--16.
#VUL Y0
#SEAT 0
#HIDE
1N 14--16
When we're vulnerable we always open 1NT 14--16.
1N---
#PASTE nt_module
We've been using the =#HIDE= command, so we don't have to see our
NT-system over and over again. This time tough we paste it
normally, so that we see it at least once.
* Lists
I'd like to show you how to make lists in BML. It is pretty
simple:
- Here's a list!
- With a couple of
- Items in it
You could also make ordered lists:
1. This is ordered
2. Just add numbers
3. To each item