How Diagrams Work

Path: HowToUseWiki   · Prev: TextFormattingRules   · Next: HowPathsWork
    Keywords: SL description
[Diagram]

A taisha variation

Diagrams make discussing Go much easier. Don't worry! They are quite easy to use.

SGF files are generated automatically from diagrams. Clicking on a diagram will download the corresponding SGF file. You may wish to examine some of these diagrams with your favorite SGF editor.

As you read these instructions, it will be helpful to open Edit page in a second window to see what's under the hood. Before closing it, please press cancel.



Basics

 $$ A taisha variation
 $$  ------------------
 $$ | . . . . . . . . .
 $$ | . . . . . . . . .
 $$ | . . 7 3 X d . . .
 $$ | . . O 1 O 6 . . .
 $$ | . . 4 2 5 c . . .
 $$ | . . 8 X a . . . .
 $$ | . . . b . . . . .
 $$ | . . . . . . . . .
 $$ | . . . . . . . . .

All diagram lines start with two dollar signs ("$$").

The title of the diagram goes on the first line, separated from the dollar signs by a space (" ").

The rest of the lines describe the board. The syntax used is similar to that commonly used in newsgroups and email:



Moves

You can represent a sequence of moves with the numbers 1-9 and 0 (0 represents move 10).

By default, move 1 and all odd-numbered moves are black, and all even-numbered moves are white. You can reverse this by putting "W" after the dollar signs on the first line: "$$W". Using "B" makes explicit the default behavior of Black going first. Think of a line beginning with "$$B" as meaning "Black to play."

[Diagram]

Black to play

[Diagram]

White to play

[Diagram]

Ko (5 at 1, 8 at 2)

If two moves are made at the same intersection, put the second move in the diagram's title in the form "a at b" (for example, "5 at 1"). This causes the move to be included in the generated SGF file.



Markup


Diagrams can contain markup, and then be referred to in the text:

[Diagram]

Board markup



   In      In     Appears     Meaning
 Diagram  Text      as
 --------------------------------------------------------
   X       BO       B     plain black stone
   O       WO       W     plain white stone
 1..9     B1,W2    B1,W2   Black's move 1, White's move 2
 0 (zero) B10,W10  B10,W10   Black's or White's move 10
   B       BC       BC     black stone with circle
   W       WC       WC     white stone with circle
   #       BS       BS     black stone with square
   @       WS       WS     white stone with square
   C       EC       [circled point]     circle on empty intersection
   S       ES       [squared point]     square on empty intersection
 a..z     a..z     a..z    letter on empty intersection



Coordinate markers and board size

[Diagram]

Nadare joseki

You can cause a diagram to show coordinate markers by putting "c" after the dollar signs on the first line: "$$c". The "c" must follow the color indicator ("B" or "W"), if present: "$$Bc".

The diagram must show at least two perpendicular edges for the coordinate markers to appear.

[Diagram]

Nadare joseki on a small board

If the diagram shows an entire board (that is, it shows all four edges), then its size will be calculated automatically. You can specify a size for a partial board by placing it after the dollar signs on the first line: "$$13". The size must follow the color indicator and "c", if present: "$$B13", "$$c13" or "$$Bc13". Without an explicit size, a partial board will be assumed to be 19x19.

Note that the coordinate markers on the left of the example diagram go to 13 rather than 19.



Comparison diagrams

[Diagram]

Example

Use _ to make separator in the diagram. Press "edit page" button to look in details.



Links in diagrams

Syntax:

 $$ [ MarkupCharacter | PageName ]

Just add lines like the upper one at the bottom of a diagram to create a link between a marked stone/point and a page.

MarkupCharacter
is the same character used on the board itself.
PageName
is any name, external link, or local name.

[2] Examples:

The following diagram contains three examples for links. It is the result of the code to the right.

[Diagram]

Links in diagrams - examples



 $$ Links in diagrams - examples
 $$  --------------
 $$ | . . . . . . .
 $$ | . C . . . . .
 $$ | . . . 1 6 . .
 $$ | . . 5 4 . . .
 $$ | . . 3 2 . . .
 $$ | . . a . . C .
 $$ | . . . . . . .
 $$ [2|NadareJoseki] [21]
 $$ [a|http://gtl.jeudego.org/members/info?p_key=349] [22]
 $$ [C|#1] [23]


[21] links W2 to the page called NadareJoseki.
[22] links a to Arno's GTL info.
[23] links all the circled points to the footnote called [#1].


Works with every kind of markup and with marked stones. Does not work with plain stones or on the empty board.



Stones in Text

In text, you can refer to stones like this:

B1, W2 ... W10, BC, BS, BO, WC, WS, WO, ES, EC

This will appear like this:

B1, W2 ... W10, BC, BS, B, WC, WS, W, [squared point], [circled point]

You can suppress the special meaning of these words by preceeding them with an exclamation mark: i.e. !BC gives BC.



Other information

Sensei's Library has [ext] a tool that generates a diagram from an SGF file. (A link to the tool is also given when you edit a page).

HolIgor has made a tool that generates a Sensei's Library-style diagram from a text diagram such as is produced by WinMGT. See WinMGT to SLF converter.

Kombilo also has a feature which allows diagram export for SL. Choose File > Export Current Position > Wiki Mode.

In order to set up a game position yourself, you may copy what's at Goban, or Corner diagram for a corner position.

For odd board shapes, look at Creating Irregular Gobans With Wiki.

Discussion

If you are in edit-mode and scroll down the window you will see that we have put two diagrams there for you to copy & paste. Also, there's a quick help included as well. Any questions left?


[1] - This is the footnote referred to in the example diagram above [2].


Path: HowToUseWiki   · Prev: TextFormattingRules   · Next: HowPathsWork
This is a copy of the living page "How Diagrams Work" at Sensei's Library.
(OC) 2004 the Authors, published under the OpenContent License V1.0.
[Welcome to Sensei's Library!]
StartingPoints
ReferenceSection
About