Template:Chess diagram svg/doc

Template usage

This template is an SVG replacement for template:chess diagram and template:chaturanga diagram. To use, cut and paste one of the examples given below and replace the piece codes with the desired game position. The diagram heading and caption can be changed as desired or removed.

The second line contains the justification parameter which may be "tleft", "tright" or blank (none). This controls the position of the diagram on the page and how the text will float around it. Leave everything else exactly as it is shown.

To get a chaturanga style board with no checkered markings, invoke the template with "check=no" in the parameters. Setting check to anything other than "no" or omitting it altogether will default to the standard chess board. Note that the range of icons available is not identical for the two boards, in particular, the coloured icons are only available for the chaturanga board.

Standard board

Diagram Heading
abcdefgh
8a8 black rookb8 black knightc8 black bishopd8 black queene8 black kingf8 black bishopg8 black knighth8 black rook8
7a7 black pawnb7 black pawnc7 black pawnd7 black pawne7 black pawnf7 black pawng7 black pawnh7 black pawn7
66
55
44
33
2a2 white pawnb2 white pawnc2 white pawnd2 white pawne2 white pawnf2 white pawng2 white pawnh2 white pawn2
1a1 white rookb1 white knightc1 white bishopd1 white queene1 white kingf1 white bishopg1 white knighth1 white rook1
abcdefgh
Diagram caption: chess starting position.

This has been invoked with;

{{Chess diagram svg|=| tleft| Diagram Heading|rd|nd|bd|qd|kd|bd|nd|rd|pd|pd|pd|pd|pd|pd|pd|pd|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |pl|pl|pl|pl|pl|pl|pl|pl|rl|nl|bl|ql|kl|bl|nl|rl| Diagram caption: chess starting position.}}

There are parameters for table heading and caption text. Note also the use of the parameter "tleft" which causes the table to float left. This parameter must be "tleft" or "tright" or blank. The remaining parameters are the codes for the pieces which are taken from the table below or left blank.

Available icons

Pieces
Invoked by:klqlrlblnlplkdqdrdbdndpd
Light squares
Dark squares
Board markings
Invoked by:<sp>x1x2x3x4x5x6x7x8x9x0xxxo
Light squares
Dark squares

Chaturanga board

Diagram Heading
abcdefgh
8a8 black rookb8 black knightc8 black bishopd8 black kinge8 black queenf8 black bishopg8 black knighth8 black rook8
7a7 black pawnb7 black pawnc7 black pawnd7 black pawne7 black pawnf7 black pawng7 black pawnh7 black pawn7
66
55
44
33
2a2 white pawnb2 white pawnc2 white pawnd2 white pawne2 white pawnf2 white pawng2 white pawnh2 white pawn2
1a1 white rookb1 white knightc1 white bishopd1 white queene1 white kingf1 white bishopg1 white knighth1 white rook1
abcdefgh
Diagram caption: chaturanga starting position.

This has been invoked with;

{{Chess diagram svg|=| tleft|check=no| Diagram Heading|rd|nd|bd|kd|qd|bd|nd|rd|pd|pd|pd|pd|pd|pd|pd|pd|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |pl|pl|pl|pl|pl|pl|pl|pl|rl|nl|bl|ql|kl|bl|nl|rl| Diagram caption: chaturanga starting position.}}

Note the "check=no" parameter. Coloured icons are available for this board intended for the game of chaturaji.


Available icons

Invoked by:klqlrlblnlplkdqdrdbdndpd
All squares

Icons for chaturaji

Invoked by:kdedndsdpdkrernrsrprxx
All squares
Invoked by:kgegngsgpgkyeynysypy
All squares
Invoked by:kbebnbsbpb
All squares

See also

Other templates

Note that all these templates are based on the png icons. The standard chess pieces are common to both sets, but other pieces may not be.