Template:Chess diagram svg

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Solid white.svg a b c d e f g h Solid white.svg
8 a8 black king b8 black king c8 black king d8 black king e8 black king f8 black king g8 black king h8 black king 8
7 a7 black king b7 black king c7 black king d7 black king e7 black king f7 black king g7 black king h7 black king 7
6 a6 black king b6 black king c6 black king d6 black king e6 black king f6 black king g6 black king h6 black king 6
5 a5 black king b5 black king c5 black king d5 black king e5 black king f5 black king g5 black king h5 black king 5
4 a4 black king b4 black king c4 black king d4 black king e4 black king f4 black king g4 black king h4 black king 4
3 a3 black king b3 black king c3 black king d3 black king e3 black king f3 black king g3 black king h3 black king 3
2 a2 black king b2 black king c2 black king d2 black king e2 black king f2 black king g2 black king h2 black king 2
1 a1 black king b1 black king c1 black king d1 black king e1 black king f1 black king g1 black king h1 black king 1
Solid white.svg a b c d e f g h Solid white.svg
[edit] [history] [purge] Documentation icon Template documentation

Contents

[edit] 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.

[edit] Standard board

Diagram Heading
Solid white.svg a b c d e f g h Solid white.svg
8 a8 black rook b8 black knight c8 black bishop d8 black queen e8 black king f8 black bishop g8 black knight h8 black rook 8
7 a7 black pawn b7 black pawn c7 black pawn d7 black pawn e7 black pawn f7 black pawn g7 black pawn h7 black pawn 7
6 a6 black king b6 black king c6 black king d6 black king e6 black king f6 black king g6 black king h6 black king 6
5 a5 black king b5 black king c5 black king d5 black king e5 black king f5 black king g5 black king h5 black king 5
4 a4 black king b4 black king c4 black king d4 black king e4 black king f4 black king g4 black king h4 black king 4
3 a3 black king b3 black king c3 black king d3 black king e3 black king f3 black king g3 black king h3 black king 3
2 a2 white pawn b2 white pawn c2 white pawn d2 white pawn e2 white pawn f2 white pawn g2 white pawn h2 white pawn 2
1 a1 white rook b1 white knight c1 white bishop d1 white queen e1 white king f1 white bishop g1 white knight h1 white rook 1
Solid white.svg a b c d e f g h Solid white.svg
Diagram caption: chess starting position.

This has been invoked with with;

{{Chess diagram svg|=
 | tleft
 | Diagram Heading
 |=
  8 |rd|nd|bd|qd|kd|bd|nd|rd|=
  7 |pd|pd|pd|pd|pd|pd|pd|pd|=
  6 |  |  |  |  |  |  |  |  |=
  5 |  |  |  |  |  |  |  |  |=
  4 |  |  |  |  |  |  |  |  |=
  3 |  |  |  |  |  |  |  |  |=
  2 |pl|pl|pl|pl|pl|pl|pl|pl|=
  1 |rl|nl|bl|ql|kl|bl|nl|rl|=
     a  b  c  d  e  f  g  h
 | 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.

[edit] Available icons

Pieces
Invoked by: kl ql rl bl nl pl kd qd rd bd nd pd
Light squares Chess kll45.svg Chess qll45.svg Chess rll45.svg Chess bll45.svg Chess nll45.svg Chess pll45.svg Chess kdl45.svg Chess qdl45.svg Chess rdl45.svg Chess bdl45.svg Chess ndl45.svg Chess pdl45.svg
Dark squares Chess kld45.svg Chess qld45.svg Chess rld45.svg Chess bld45.svg Chess nld45.svg Chess pld45.svg Chess kdd45.svg Chess qdd45.svg Chess rdd45.svg Chess bdd45.svg Chess ndd45.svg Chess pdd45.svg
Board markings
Invoked by: <sp> xl x2 x3 x4 x5 x6 x7 x8 x9 xx xo
Light squares Chess l45.svg Chess x1l45.svg Chess x2l45.svg Chess x3l45.svg Chess x4l45.svg Chess x5l45.svg Chess x6l45.svg Chess x7l45.svg Chess x8l45.svg Chess x9l45.svg Chess xxl45.svg Chess xol45.svg
Dark squares Chess d45.svg Chess x1d45.svg Chess x2d45.svg Chess x3d45.svg Chess x4d45.svg Chess x5d45.svg Chess x6d45.svg Chess x7d45.svg Chess x8d45.svg Chess x9d45.svg Chess xxd45.svg Chess xod45.svg

[edit] Chaturanga board

Diagram Heading
Solid white.svg a b c d e f g h Solid white.svg
8 a8 black rook b8 black knight c8 black bishop d8 black king e8 black queen f8 black bishop g8 black knight h8 black rook 8
7 a7 black pawn b7 black pawn c7 black pawn d7 black pawn e7 black pawn f7 black pawn g7 black pawn h7 black pawn 7
6 a6 black king b6 black king c6 black king d6 black king e6 black king f6 black king g6 black king h6 black king 6
5 a5 black king b5 black king c5 black king d5 black king e5 black king f5 black king g5 black king h5 black king 5
4 a4 black king b4 black king c4 black king d4 black king e4 black king f4 black king g4 black king h4 black king 4
3 a3 black king b3 black king c3 black king d3 black king e3 black king f3 black king g3 black king h3 black king 3
2 a2 white pawn b2 white pawn c2 white pawn d2 white pawn e2 white pawn f2 white pawn g2 white pawn h2 white pawn 2
1 a1 white rook b1 white knight c1 white bishop d1 white queen e1 white king f1 white bishop g1 white knight h1 white rook 1
Solid white.svg a b c d e f g h Solid white.svg
Diagram caption: chaturanga starting position.

This has been invoked with with;

{{Chess diagram svg|=
 | tleft|check=no
 | Diagram Heading
 |=
  8 |rd|nd|bd|kd|qd|bd|nd|rd|=
  7 |pd|pd|pd|pd|pd|pd|pd|pd|=
  6 |  |  |  |  |  |  |  |  |=
  5 |  |  |  |  |  |  |  |  |=
  4 |  |  |  |  |  |  |  |  |=
  3 |  |  |  |  |  |  |  |  |=
  2 |pl|pl|pl|pl|pl|pl|pl|pl|=
  1 |rl|nl|bl|ql|kl|bl|nl|rl|=
     a  b  c  d  e  f  g  h
 | Diagram caption: chaturanga starting position.}}

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


[edit] Available icons

Invoked by: kl ql rl bl nl pl kd qd rd bd nd pd
All squares Chess klg45.svg Chess qlg45.svg Chess rlg45.svg Chess blg45.svg Chess nlg45.svg Chess plg45.svg Chess kdg45.svg Chess qdg45.svg Chess rdg45.svg Chess bdg45.svg Chess ndg45.svg Chess pdg45.svg

[edit] Icons for chaturaji

Invoked by: kd ed nd sd pd kr er nr sr pr xx
All squares Chess kdg45.svg Chess edg45.svg Chess ndg45.svg Chess sdg45.svg Chess pdg45.svg Chess krg45.svg Chess erg45.svg Chess nrg45.svg Chess srg45.svg Chess prg45.svg Chess xxg45.svg
Invoked by: kg eg ng sg pg ky ey ny sy py
All squares Chess kgg45.svg Chess egg45.svg Chess ngg45.svg Chess sgg45.svg Chess pgg45.svg Chess kyg45.svg Chess eyg45.svg Chess nyg45.svg Chess syg45.svg Chess pyg45.svg

[edit] See also

[edit] 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.

Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox