[Welcome to Sensei's Library!]

StartingPoints
ReferenceSection
About


Paths
UsingAndContribut...

Referenced by
SGFFile
TextFormattingRules
HowToUseWiki
SLConventions
SandBox
WinMGTToSLFConverter
WikiNews
TextFormattingRul...

Homepages
RichardHunter
Sebastian

 

How Diagrams Work
Path: UsingAndContributingToSenseiSLibrary   · Prev: AboutPageHeaders   · 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 for you to select the "Edit page" link from time to time to see how these diagrams were made.



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:

  • A dot (".") is an empty intersection.
  • "X" is a black stone and "O" is a white stone.
  • A comma (",") is a hoshi (star point).
  • Edges are marked with any of "|", "+" and "-".



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

[Diagram]
Board markup

Diagrams can contain markup:

  • "C" is a circle on an empty intersection.
  • "B" is a circle on a black stone.
  • "W" is a circle on a white stone.
  • "S" is a square on an empty intersection.
  • "#" is a square on a black stone.
  • "@" is a square on a white stone.
  • Any lowercase letter marks an empty intersection with that letter.



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.



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 list. 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

This will appear like this:

B1, W2 ... W10, BC, BS, B, WC, WS, W

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.

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?

AvatarDJFlux Yes, please. How do you number the diagrams in their titles? So that it reads: Diag. 1: Title of diagram

ArnoHollosi: Is there a need for such a feature? Won't renumbering diagrams be painful, when you add/move diagrams?

unkx80: Numbering of diagrams does pose quite a lot of problems when inserting/deleting diagrams, such as the mess in BQM8 before WikiMasterEditing. As such, there was consensus that we don't want to number diagrams. That's why I have stripped all the diagram numbers when I WikiMasterEdited that page.

AvatarDJFlux Thx mates, there's some sense in what you say... ;-)
Sorry for making silly remarks!

Quagmire: For some reason the diagrams don't seem to work on my computer and all I see is "x [diagram]" where one should be. Could anyone please suggest a possible reason why this might be?

SAS: A possible reason is that you have an old browser that doesn't understand PNG images. (I'm assuming you can see images on most other websites without a problem.)

Quagmire: I downloaded a browser update and that fixed the problem. Thank you.


(feature request moved to Guinea Pigs Feedback)

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



Path: UsingAndContributingToSenseiSLibrary   · Prev: AboutPageHeaders   · Next: HowPathsWork
This is a copy of the living page "How Diagrams Work" at Sensei's Library.
(OC) 2003 the Authors, published under the OpenContent License V1.0.