Standard chess diagram

From Wikimedia Commons, the free media repository
Jump to: navigation, search

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.


Syntax[edit]

There are two standard chess diagram templates:

and some templates for special purposes:

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:

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.

Examples[edit]

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.



Standard diagram[edit]

Chess zhor 26.png
Chess zver 26.png
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
Chess zver 26.png
Chess zhor 26.png
The position of the pieces at the start of a game of chess.

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
}}


Chess zhor 26.png
Chess zver 26.png
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
Chess zver 26.png
Chess zhor 26.png

Diagram without captions[edit]

Chess zhor 26.png
Chess zver 26.png
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
Chess zver 26.png
Chess zhor 26.png

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  

| 
}}

Small diagram[edit]

Chess zhor 22.png
Chess zver 22.png
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
Chess zver 22.png
Chess zhor 22.png
The position after 11. Bg5.

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


Capablanca chess[edit]

Chess zh10 26.png
Chess zver 26.png
a8 b8 c8 d8 e8 f8 g8 h8 i8 j8
a7 b7 c7 d7 e7 f7 g7 h7 i7 j7
a6 b6 c6 d6 e6 f6 g6 h6 i6 j6
a5 b5 c5 d5 e5 f5 g5 h5 i5 j5
a4 b4 c4 d4 e4 f4 g4 h4 i4 j4
a3 b3 c3 d3 e3 f3 g3 h3 i3 j3
a2 b2 c2 d2 e2 f2 g2 h2 i2 j2
a1 b1 c1 d1 e1 f1 g1 h1 i1 j1
Chess zver 26.png
Chess zh10 26.png
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
}}

Chaturanga[edit]

Chess zhor 26.png
Chess zver 26.png
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
Chess zver 26.png
Chess zhor 26.png
Makruk - start position

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
}}

Chess Mutation[edit]

Chess zhor 26.svg
Chess zver 26.png
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
a8 b8 c8 d8 e8 f8 g8 h8
Chess zver 26.png
Chess zhor 26.svg
Start position



{{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
}}

Omega Chess[edit]


w4 Chess Omega ht440 44.png w3
Chess Omega vl44 440.png
a9 b9 c9 d9 e9 f9 g9 h9 i9 j9
a8 b8 c8 d8 e8 f8 g8 h8 i8 j8
a7 b7 c7 d7 e7 f7 g7 h7 i7 j7
a6 b6 c6 d6 e6 f6 g6 h6 i6 j6
a5 b5 c5 d5 e5 f5 g5 h5 i5 j5
a4 b4 c4 d4 e4 f4 g4 h4 i4 j4
a3 b3 c3 d3 e3 f3 g3 h3 i3 j3
a2 b2 c2 d2 e2 f2 g2 h2 i2 j2
a1 b1 c1 d1 e1 f1 g1 h1 i1 j1
a0 b0 c0 d0 e0 f0 g0 h0 i0 j0
Chess Omega vr44 440.png
w1 Chess Omega hb440 44.png w2
Omega Chess - start position

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
}}


Raumschach[edit]

Ea5 Eb5 Ec5 Ed5 Ee5
Ea4 Eb4 Ec4 Ed4 Ee4
Ea3 Eb3 Ec3 Ed3 Ee3
Ea2 Eb2 Ec2 Ed2 Ee2
Ea1 Eb1 Ec1 Ed1 Ee1

E

Da5 Db5 Dc5 Dd5 De5
Da4 Db4 Dc4 Dd4 De4
Da3 Db3 Dc3 Dd3 De3
Da2 Db2 Dc2 Dd2 De2
Da1 Db1 Dc1 Dd1 De1

D

Ca5 Cb5 Cc5 Cd5 Ce5
Ca4 Cb4 Cc4 Cd4 Ce4
Ca3 Cb3 Cc3 Cd3 Ce3
Ca2 Cb2 Cc2 Cd2 Ce2
Ca1 Cb1 Cc1 Cd1 Ce1

C

Ba5 Bb5 Bc5 Bd5 Be5
Ba4 Bb4 Bc4 Bd4 Be4
Ba3 Bb3 Bc3 Bd3 Be3
Ba2 Bb2 Bc2 Bd2 Be2
Ba1 Bb1 Bc1 Bd1 Be1

B

Aa5 Ab5 Ac5 Ad5 Ae5
Aa4 Ab4 Ac4 Ad4 Ae4
Aa3 Ab3 Ac3 Ad3 Ae3
Aa2 Ab2 Ac2 Ad2 Ae2
Aa1 Ab1 Ac1 Ad1 Ae1

A

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 |sd|bd|qd|sd|bd|=
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|sl|ql|bl|sl|=
   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
}}

Tools[edit]