A diagram of a go board consists of 6 parts:
1) The opening tag, which is the word 'go' enclosed in brackets. This usually goes on one line by itself.
2) One line which includes several display codes and the label.
It starts with two dollar signs ('$$')
Next is optional, either a 'B or a 'W', indicating what color is the first move. ( If not specified, it defaults to 'B'. )
An optional lower case 'c' can be added for coordinates.
An optional lower case 'm' can be added, followed by one or more digits to indicate the number of the first move. ( Defaults to 'm1' )
3) The top of the board, which is two dollar signs and a row of dashes. ( '$$---------------' )
4) Multiple - up to 19 - lines which define the board. Each line should start with two dollar signs ('$$').
A period (".") is an empty intersection.
A comma (",") is a star point.
A vertical line ( "|" )( usually a shifted tab key ) is the edge of the board
5) The bottom of the board, which is two dollar signs and a row of dashes. ( '$$---------------' )
6) The closing tag, which is the word '/go' enclosed in brackets. This usually goes on one line by itself.
Strictly speaking, only parts 1 and 6 are necessary. In practice, usually only 3 or 5 are skipped to form portions of a board.
====================================================================================================================
Here it is:
- Click Here To Show Diagram Code
[go]$$c This is a label for the diagram. Remember to replace it with something relevant.
$$ ---------------------------------------
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ ---------------------------------------[/go]
Directly above this sentence, there should be a sentence in blue that says "Click here to show diagram code". It will show you all 6 parts put together.
====================================================================================================================
The above generates a blank board. Now let's look at putting something on the board. To do this, replace the periods with letters, numbers, or other symbols.
X = black stone
O = white stone
* = half black and half white
V = half wood and half white
A = half wood and half black
B = black stone with circle
W = white stone with circle
C = circle on empty intersection
# = black stone with square
@ = white stone with square
S = square on empty intersection
Y = black stone with triangle
Q = white stone with triangle
T = triangle on empty intersection
Z = black stone with X
P = white stone with X
M = X on empty intersection
? = shading
- Click Here To Show Diagram Code
[go]$$Wcm31 Thanks to Kirby, \n we can now put line breaks \n in the label. \nAgain, click on the blue line \n below to see how it is done.
$$ ---------------------------------------
$$ | . . . . . . . . . . . . . . ? ? ? ? ? |
$$ | . . . . . . . . . . . . . . ? ? ? ? ? |
$$ | . . . . . . . . . . . . . . ? ? ? ? ? |
$$ | . . X X X . . A . * . V . . O O O . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . B . . . . . C . . . . . W . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . # . . . . . S . . . . . @ . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . Y . . . . . T . . . . . Q . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . Z . . . . . M . . . . . P . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . 1 . 2 . 3 . 4 . 5 . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . a . b . c . d . x . y . z . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ ---------------------------------------[/go]
You can also use lowercase letters which appear literally.
Also, a hyphen can be used like this:
- Click Here To Show Diagram Code
[go]$$W
$$ -------------------------------
$$ - . . . . . . . - . . . . . . .
$$ - . . . . . . . - . . 1 . . . .
$$ - . 0 3 X . . . - . X O X 3 . .
$$ - . . 4 5 . . . - . . X O . . .
$$ - . . 6 1 . . . - . 2 X O . . .
$$ - . 9 7 8 . . . - . O O X 5 . .
$$ - . . 2 . . . . - . 4 X 6 . . .
$$ - . . . . . . . - . . . . . . .
$$ - . . . . . . . - . . . . . . .[/go]
Lines and Arrows:
- Click Here To Show Diagram Code
[go]$$Bc Example: using arrows to show influence
$$ ------------------
$$ | . . . . . . . . .
$$ | . . . . . . . . .
$$ | . O O O . O . . .
$$ | . O X X X . . . .
$$ | . X . . . . . . .
$$ | . . X . . . . . .
$$ | . . . . . . . . .
$$ | . . . . . . . . .
$$ | . . . . . . . . .
$$ {AR C14 C11}
$$ {AR 5:6 5:9}[/go]
As it is hard to visualize and edit such lines in edit mode, lines and arrows are specified in extra lines - usually after the diagram. The code for the above diagram looks like this:
$$ {AR C14 C11}
$$ {AR 5:6 5:9}
The syntax basically is "$$ {command point1 point2}".
Command can be either ''AR'' for arrows or ''LN'' for lines. Coordinates can be given in two different ways:
1) Board coordinates: this is the usual Go coordinate system. Points are denoted as A1 .. T19. For this to work the diagram has to be anchored in at least one corner, i.e. center diagrams cannot use this method. IOW, if you can switch on coordinates with the $$c option, then this method works.
2) Relative coordinates: points are denoted in 'X:Y' syntax. X and Y are a coordinate system with the root being in the upper left - numbering starts at 1:1. The second arrow in the example uses this system. These coordinates will always work, as they do not rely on borders and corners.
EDIT(10-10-15): For those who don't want to learn the nuts and bolts, Herman Hiddema has a very useful tool at
http://hiddema.nl/diagrammer/