Standard chess diagram
From Wikimedia Commons, the free media repository
Standard chess diagram template is a result of discussions and votings which took place in WikiProject Chess on Meta-Wiki. It is based on the template "Chess position" widely used in English Wikipedia. Both the template and the images of pieces were modified.
Contents |
[edit] Syntax
There are two standard chess diagram templates:
- Chess diagram (square size 26x26 px)
- Chess diagram small (square size 22x22 px)
and some templates for special purposes:
- Chess diagram 8x10 (chessboard with ten columns, 26x26 px)
- Chaturanga diagram (uncheckered chessboard, 26x26 px)
- Mutation Chess diagram (colored chessboard, 26x26 px)
- Omega Chess diagram (10x10 chessboard + 4 corners, 22x22 px)
- Raumschach diagram (5x5x5 chessboard, 22x22 px)
The syntax is similar for all of them.
{{Chess diagram|=
| <alignment>
| <header>
| <a8> | <b8> | <c8> | <d8> | <e8> | <f8> | <g8> | <h8>
| <a7> | <b7> | <c7> | <d7> | <e7> | <f7> | <g7> | <h7>
| <a6> | <b6> | <c6> | <d6> | <e6> | <f6> | <g6> | <h6>
| <a5> | <b5> | <c5> | <d5> | <e5> | <f5> | <g5> | <h5>
| <a4> | <b4> | <c4> | <d4> | <e4> | <f4> | <g4> | <h4>
| <a3> | <b3> | <c3> | <d3> | <e3> | <f3> | <g3> | <h3>
| <a2> | <b2> | <c2> | <d2> | <e2> | <f2> | <g2> | <h2>
| <a1> | <b1> | <c1> | <d1> | <e1> | <f1> | <g1> | <h1>
| <footer>
}}
Parameters:
- <alignment> - defines horizontal alignment of the whole image, must be "tright" or "tleft";
- <header> - the text which appears above the diagram, may be empty;
- <a8>, <b8>, ... <h1> - define corresponding squares of the chessboard, see below;
- <footer> - the text which appears beneath the diagram, may be empty.
A square is defined by the name of piece or empty parameter. The names of the pieces are those given in algebraic notation:
- k = king
- q = queen
- r = rook
- b = bishop
- n = knight
- p = pawn
Also, several fairy chess pieces are present:
- a = Archbishop (Capablanca chess)/Marshall (Grand Chess) (bishop + knight)
- c = Chancellor (Capablanca)/Cardinal (Grand) (rook + knight)
- h = inverted knight (unicorn in Raumschach chess)
- w = Wizard (Omega Chess)
- z = Champion (Omega Chess)
These letters are combined with either "l" for Light=White, or "d" for Dark=Black. So "kl" is White's king, and "nd" is Black's knight.
An empty square is written either using underscores, spaces, or nothing at all. Two spaces are recommended. You can also use "xx" for a cross, "xo" for a circle on an empty square, and "x1" through "x9" for a space marked with a number.
[edit] Examples
To see how it works, compare the diagrams below and the code which generates them. To use it - just copy the code, paste it into your article and change parameters.
In the following examples the rows and columns are numbered. Because any text between "|=" and the next "|" is ignored, numbers and letters can be added without affecting output.
Some practical hints:
- be careful not to change general schema, especially leave "|" and "=" characters just where they are,
- you cannot use "|" character in the captions (footers and headers),
- if you want to use "=" in the caption you have to enclose it in nowiki tags,
- you can use some formatting like bolds, italics.
[edit] Standard diagram
This diagram is recommended for common use as a main diagram in the articles on chess openings, endings, games, positions etc. See the corresponding code below.
More examples:
{{Chess diagram|=
| tright
|
|=
8 |rd|nd|bd|qd|kd|bd|nd|rd|=
7 |pd|pd|pd| | |pd|pd|pd|=
6 | | | | |pd| | | |=
5 | | | |pd| | | | |=
4 | | |pl|pl| | | | |=
3 | | | | | | | | |=
2 |pl|pl| | | | |pl|pl|=
1 |rl|nl|bl|ql|kl|bl|nl|rl|=
a b c d e f g h
| The Queen's Gambit Declined
}}
[edit] Diagram without captions
See the corresponding code below. If you don't want the captions, just remove them, but don't delete "|" character.
The diagram floats to the left to illustrate the use of the first parameter.
{{Chess diagram|=
| tleft
|
|=
8 | | | | | | | | |=
7 | | | | | | | | |=
6 | |xx|xo|xx| | | | |=
5 | | |pl| | | | | |=
4 | | | | | |xo| | |=
3 | | | | |xx|xo|xx| |=
2 | | | | | |pl| | |=
1 | | | | | | | | |=
a b c d e f g h
|
}}
[edit] Small diagram
This one may be useful in articles with many diagrams. It uses another template named "Chess diagram small".
{{Chess diagram small|=
| tright
|
|=
8 |rd| | |qd| |rd|kd| |=
7 |pd|pd| | |pd|pd|bd|pd|=
6 | |nd|pd| | |nd|pd| |=
5 | | |ql| | | |bl| |=
4 | | | |pl|pl| |bd| |=
3 | | |nl| | |nl| | |=
2 |pl|pl| | | |pl|pl|pl|=
1 | | | |rl|kl|bl| |rl|=
a b c d e f g h
| The position after 11. Bg5.
}}
[edit] Capablanca chess
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Capablanca chess | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Chessboards of nonstandard dimensions need special templates.
{{Chess diagram 8x10|=
| tright
|
|=
8 |rd|nd|ad|bd|qd|kd|bd|cd|nd|rd|=
7 |pd|pd|pd|pd|pd|pd|pd|pd|pd|pd|=
6 | | | | | | | | | | |=
5 | | | | | | | | | | |=
4 | | | | | | | | | | |=
3 | | | | | | | | | | |=
2 |pl|pl|pl|pl|pl|pl|pl|pl|pl|pl|=
1 |rl|nl|al|bl|ql|kl|bl|cl|nl|rl|=
a b c d e f g h i j
| Capablanca chess
}}
[edit] Chaturanga
Chaturanga template may be used in any games played on 8x8 board.
More examples:
{{Chaturanga diagram|=
| tright
|
|=
8 |rd|nd|bd|qd|kd|bd|nd|rd|=
7 | | | | | | | | |=
6 |pd|pd|pd|pd|pd|pd|pd|pd|=
5 | | | | | | | | |=
4 | | | | | | | | |=
3 |pl|pl|pl|pl|pl|pl|pl|pl|=
2 | | | | | | | | |=
1 |rl|nl|bl|ql|kl|bl|nl|rl|=
a b c d e f g h
| '''Makruk''' - start position
}}
[edit] Chess Mutation
{{Chess Mutation diagram|=
| tright
|
|=
8 |pd|pd|pd|pd|kd|pd|pd|pd|=
7 |pd|pd|pd|pd|pd|pd|pd|pd|=
6 | | | | | | | | |=
5 | | | | | | | | |=
4 | | | | | | | | |=
3 | | | | | | | | |=
2 |pl|pl|pl|pl|pl|pl|pl|pl|=
1 |pl|pl|pl|pl|kl|pl|pl|pl|=
a b c d e f g h
| Start position
}}
[edit] Omega Chess
Omega Chess template on a 10x10 board with 4 extra corners.
{{Omega Chess diagram|=
| tright
|
|=
w4 w3
|wd|= |wd|=
9 |zd|rd|nd|bd|qd|kd|bd|nd|rd|zd|=
8 |pd|pd|pd|pd|pd|pd|pd|pd|pd|pd|=
7 | | | | | | | | | | |=
6 | | | | | | | | | | |=
5 | | | | | | | | | | |=
4 | | | | | | | | | | |=
3 | | | | | | | | | | |=
2 | | | | | | | | | | |=
1 |pl|pl|pl|pl|pl|pl|pl|pl|pl|pl|=
0 |zl|rl|nl|bl|ql|kl|bl|nl|rl|zl|=
|wl|= |wl|=
w1 a b c d e f g h i j w2
| '''Omega Chess''' - start position
}}
[edit] Raumschach
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Raumschach | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Raumschach template on a 5x5x5 board.
{{Raumschach diagram|=
| tright
|
|=
5 |rd|nd|kd|nd|rd|=
4 |pd|pd|pd|pd|pd|=
3 | | | | | |=
2 | | | | | |=
1 | | | | | |=
Ea Eb Ec Ed Ee
5 |bd|hd|qd|bd|hd|=
4 |pd|pd|pd|pd|pd|=
3 | | | | | |=
2 | | | | | |=
1 | | | | | |=
Da Db Dc Dd De
5 | | | | | |=
4 | | | | | |=
3 | | | | | |=
2 | | | | | |=
1 | | | | | |=
Ca Cb Cc Cd Ce
5 | | | | | |=
4 | | | | | |=
3 | | | | | |=
2 |pl|pl|pl|pl|pl|=
1 |bl|hl|ql|bl|hl|=
Ba Bb Bc Bd Be
5 | | | | | |=
4 | | | | | |=
3 | | | | | |=
2 |pl|pl|pl|pl|pl|=
1 |rl|nl|kl|nl|rl|=
Aa Ab Ac Ad Ae
| Raumschach
}}
[edit] Tools
- FEN2Wikipedia converts FEN to this chess diagram format.