跳转到内容

Template:Chess diagram svg

维基百科,自由的百科全书


{{{2}}}
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
{{{67}}}
已隱藏部分未翻譯内容,歡迎參與翻譯

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
a8 b8 c8 d8 e8 f8 g8 [[File:chess_rd

d45.svg|26px|h8]]

a7 b7 c7 d7 e7 f7 g7 [[File:chess_pd

l45.svg|26px|h7]]

a6 b6 c6 d6 e6 f6 g6 [[File:chess_

d45.svg|26px|h6]]

a5 b5 c5 d5 e5 f5 g5 [[File:chess_

l45.svg|26px|h5]]

a4 b4 c4 d4 e4 f4 g4 [[File:chess_

d45.svg|26px|h4]]

a3 b3 c3 d3 e3 f3 g3 [[File:chess_

l45.svg|26px|h3]]

a2 b2 c2 d2 e2 f2 g2 [[File:chess_pl

d45.svg|26px|h2]]

a1 b1 c1 d1 e1 f1 g1 [[File:chess_rl

l45.svg|26px|h1]]

a b c d e f g h


This has been invoked with 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
|   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.

Available icons

Pieces
Invoked by: kl ql rl bl nl pl kd qd rd bd nd pd
Light squares
Dark squares
Board markings
Invoked by: <sp></sp> xl x2 x3 x4 x5 x6 x7 x8 x9 xx xo
Light squares
Dark squares

Chaturanga board

Diagram Heading
a8 b8 c8 d8 e8 f8 g8 [[File:chess_rd

g45.svg|26px|h8]]

a7 b7 c7 d7 e7 f7 g7 [[File:chess_pd

g45.svg|26px|h7]]

a6 b6 c6 d6 e6 f6 g6 [[File:chess_

g45.svg|26px|h6]]

a5 b5 c5 d5 e5 f5 g5 [[File:chess_

g45.svg|26px|h5]]

a4 b4 c4 d4 e4 f4 g4 [[File:chess_

g45.svg|26px|h4]]

a3 b3 c3 d3 e3 f3 g3 [[File:chess_

g45.svg|26px|h3]]

a2 b2 c2 d2 e2 f2 g2 [[File:chess_pl

g45.svg|26px|h2]]

a1 b1 c1 d1 e1 f1 g1 [[File:chess_rl

g45.svg|26px|h1]]

a b c d e f g h


This has been invoked with 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|=
|  |  |  |  |  |  |  |  |=
|  |  |  |  |  |  |  |  |=
 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.


Available icons

Invoked by: kl ql rl bl nl pl kd qd rd bd nd pd
All squares

Icons for chaturaji

Invoked by: kd ed nd sd pd kr er nr sr pr xx
All squares
Invoked by: kg eg ng sg pg ky ey ny sy py
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.