====== Weiqi plugin demo ====== This is a demo page of the [[doku>wiki:plugins:weiqi|Weiqi plugin]] for [[doku>wiki:dokuwiki|DokuWiki]]. It allows you to display some diagrams of this game (also called Go or Igo or Baduk) in your wiki pages. See [[wp>Go_(board_game)|this Wikipedia article]] to learn what //Weiqi// is. If you find it nice, it's only because of the nice images provided by [[http://www.dragongoserver.net/|Dragon Go Server]]. Thanks guys. Sorry, you can't edit this page to try the plugin here. You can go to the [[playground:playground]] instead. But first, have a look at these examples. ===== The basics ===== The diagram syntax begins with '''' and ends with ''''. Then if you start a line with ''attributes:'', you can change some characteristics of the goban (size of the squares, color...). Attributes are space separated. You can display a caption for your diagram starting a line with ''caption:''. For the diagram code itself you have two modes: //normal code// and //advanced code//. In //normal code//, each character represents an intersection, and in //advanced code// two characters are needed for each intersection. ===== Standard code ===== ==== First example ==== The ''attributes:demo'' item allows us to see the wiki code used to produce the diagram automaticly. I think you won't use it very often. A full 19x19 goban is easier to see with ''grid_size=17''. The ''grid_size=xx'' attribute will make the Weiqi plugin display images in the ''img/xx/'' directory. If the relevant directory is not found, it will send an error message. You can see all the different sizes available on this [[full test]] page (when using it yourself, be sure to download all the image files). attributes: demo grid_size=17 +-----------------+ |.................| |Xo..o........x...| |.xo.....,.....,x.| |.................| |.x...............| |...............o.| |.................| |.................| |.x,.....,.....,o.| |.................| |.................| |.................| |.o...............| |.................| |..o.....,.....x..| |............x....| |.................| +-----------------+ Note that if you use an uppercase 'o' you'll get a marked white stone, while an uppercase 'x' will give you a marked black stone like the one in the top left corner. You can also use letters (except o, O, x and X) and numbers from 1 to 9, as in the next example. ==== Letters and numbers ==== attributes: demo +--------------------------+ |abcdefghijklmnopqrstuvwxyz| |ABCDEFGHIJKLMNOPQRSTUVWXYZ| |123456789,................| +--------------------------+ These are the only board symbols you can have with the //standard code//. Now let's explore some other possibilities of the //standard code//, this concerns caption, goban color and co-ordinates. ==== Caption, goban color and co-ordinates ==== You can display a caption using with a line like ''caption:This is my caption''. By default we have ''goban=1'' while ''goban=2'' will just change the goban color. The ''goban=xx'' attribute will make the Weiqi plugin display images in the ''img/images/'' directory with the ''xx'' suffix. If the relevant files are not found, it will send an error message. ''coords'' displays co-ordinates all around the goban. Only images from //1// to //25//, //a// to //h// and //j// to //z// are available. caption:Black to kill attributes: demo goban=2 coords |......... xxx,.x.... oooxx..... |..oox.... +ox--x---- That could be enough but you can also ''reverse_letters'' and ''reverse_numbers''. ==== Reverse co-ordinates ==== attributes: demo coords reverse_letters reverse_numbers +---+ |...| |.xX| |..o| +---+ But it's not as useful as starting the numbers or letters from something else than //1// or //a//. ==== Corners ==== attributes: demo coords start_number=15 start_letter=n _-----+ ......| ..x...| ...,x.| ......| Note that if the Weiqi plugin doesn't understand a character ("''_''" is a mistake here), it will report it as a blinking //@//. Anyway you can use those mistakes on purpose too... ===== Advanced code ===== ==== First example ==== Now a diagram symbol is defined by **two** characters. If the second is a blank, standard code applies (don't forget the last space). If it's not a blank, you gain access to new symbols, like squares, circles, triangles... for stones or empty intersections. attributes: demo advanced + - - - + | . . . | | . x X | | . . o | + - - - + Note that if the Weiqi plugin doesn't understand a pair of characters ("''_ ''" or "''-:''" are mistakes here), it will report it as a blinking //@// too. ==== All the available symbols in a few diagrams ==== This section will show you all the available symbols at size 25, while [[full_test|this page]] shows them in all available sizes: 5, 7, 9, 11, 13, 17, 21, 25, 29, 35, 42 and 50. Again, many thanks to [[http://www.dragongoserver.net/|Dragon Go Server]] for the image files. === The remaining letters and numbers === If you append an "''l''" to "''o''", "''O''", "''x''" or "''X''", you can display the missing letters of the //normal code//. Numbers from 10 to 99 are now available. attributes: demo advanced + - - - - - - - - - - - - - - - - - - - - - - - - - - + | a b c d e f g h i j k l m n olp q r s t u v w xly z | | A B C D E F G H I J K L M N OlP Q R S T U V W XlY Z | | 1 2 3 4 5 6 7 8 9 1011121314151617181920212223. 9899| + - - - - - - - - - - - - - - - - - - - - - - - - - - + === Stones === caption:Available stone symbols with advanced code attributes: demo advanced + - - - - - - - - - - - - - - - - - + | x X xcxsxtxw. x1x2x3x4x5x6x7x8x9x0| | o O ocosot. obo1o2o3o4o5o6o7o8o9o0| + - - - - - - - - - - - - - - - - - + === Marks === attributes: demo advanced +c-c-c+c |c.c,c|c +c-c-c+c attributes: demo advanced +s-s-s+s |s.s,s|s +s-s-s+s attributes: demo advanced +t-t-t+t |t.t,t|t +t-t-t+t attributes: demo advanced +b-b-b+b |b.b,b|b +b-b-b+b attributes: demo advanced +w-w-w+w |w.w,w|w +w-w-w+w attributes: demo advanced +x-x-x+x |x.x,x|x +x-x-x+x attributes: demo advanced +r-r-r+r |r.r,r|r +r-r-r+r attributes: demo advanced +g-g-g+g |g.g,g|g +g-g-g+g ===== Notes ===== Some error messages are produced if ever the wiki code is not correct, whether in the attributes or on the diagram (red lines instead of the diagram or blinking //@//s). Please refer to [[doku>wiki:plugins:weiqi|the Weiqi plugin homepage]] for further information.