Template:Chess diagram: differenze tra le versioni

Da UZ wiki.
(Template update)
(Inserting documentation)
 
Riga 1: Riga 1:
 
<!---
 
<!---
Copied from https://en.wikipedia.org/w/index.php?title=Template:Chess_diagram&oldid=167586066
+
Copied from https://en.wikipedia.org/w/index.php?title=Template:Chess_diagram&oldid=264026694
 +
Documentation at https://en.wikipedia.org/w/index.php?title=Template:Chess_diagram/doc&oldid=225397284
 
--->
 
--->
  
Riga 89: Riga 90:
 
</div>
 
</div>
 
</div>
 
</div>
 +
 +
<noinclude>
 +
=== Syntax ===
 +
 +
<pre>
 +
{{Chess diagram
 +
| <alignment> (param #1)
 +
| <header>    (#2)
 +
| <a8> | <b8> | ... | <h8>  (#3 to ...
 +
| <a7> | <b7> | ... | <h7>
 +
...
 +
| <a1> | <b1> | ... | <h1>  ( ... #66)
 +
| <footer> (#67)
 +
}}
 +
</pre>
 +
 +
Parameters:
 +
 +
* <code><alignment></code> – defines horizontal alignment (floating) of the whole table, must be <code>tright</code> or <code>tleft</code> (or nothing)
 +
* <code><header></code> – the text which appears above the diagram, may be empty;
 +
* <code><a8>, <b8>, ... <nowiki><h1></nowiki></code> – define corresponding squares of the chessboard, see below;
 +
* <code><footer></code> – the text which appears beneath the diagram, may be empty; optional – can be left out (currently not in the other templates)
 +
 +
A square is defined by the name of piece or empty parameter. The names of the pieces are those given in algebraic notation:
 +
 +
* [[Image:Chess Kl44.png|26px]] [[Image:Chess Kd44.png|26px]] [[Image:Chess kl44.png|26px]] [[Image:Chess kd44.png|26px]] k = king
 +
* [[Image:Chess Qd44.png|26px]] [[Image:Chess Ql44.png|26px]] [[Image:Chess qd44.png|26px]] [[Image:Chess ql44.png|26px]] q = queen
 +
* [[Image:Chess Rl44.png|26px]] [[Image:Chess Rd44.png|26px]] [[Image:Chess rl44.png|26px]] [[Image:Chess rd44.png|26px]] r = rook
 +
* [[Image:Chess Bd44.png|26px]] [[Image:Chess Bl44.png|26px]] [[Image:Chess bd44.png|26px]] [[Image:Chess bl44.png|26px]] b = bishop
 +
* [[Image:Chess Nl44.png|26px]] [[Image:Chess Nd44.png|26px]] [[Image:Chess nl44.png|26px]] [[Image:Chess nd44.png|26px]] n = knight
 +
* [[Image:Chess Pd44.png|26px]] [[Image:Chess Pl44.png|26px]] [[Image:Chess pd44.png|26px]] [[Image:Chess pl44.png|26px]] p = pawn
 +
 +
White pieces are uppercase, while black pieces are lowercase.
 +
 +
An empty square is written either using underscores, spaces, or nothing at all. One space is recommended.
 +
 +
* [[Image:Chess d44.png|26px]][[Image:Chess l44.png|26px]] <space> = empty square
 +
 +
You can also use "x" for a cross and "o" for a black circle on an empty square.
 +
 +
* [[Image:Chess xd44.png|26px]][[Image:Chess xl44.png|26px]] x = cross/x
 +
* [[Image:Chess od44.png|26px]][[Image:Chess ol44.png|26px]] o = black circle
 +
 +
=== Examples ===
 +
 +
{{Chess diagram
 +
| tright
 +
| '''W. Langstaff''', ''Chess Amateur'' 1922
 +
|=
 +
8 | | | | |k| | |r|=
 +
7 | | | | | | | | |=
 +
6 | | | | | |B| |P|=
 +
5 | | | |R| |K|p|P|=
 +
4 | | | | | | | | |=
 +
3 | | | | | | | | |=
 +
2 | | | | | | | | |=
 +
1 | | | | | | | | |=
 +
    a b c d e f g h 
 +
 +
| '''Mate in two.''' <br> This problem uses ''partial retrograde analysis'' method.
 +
}}
 +
 +
<pre style="overflow:auto">
 +
{{Chess diagram
 +
| tright
 +
| '''W. Langstaff''', ''Chess Amateur'' 1922
 +
|=
 +
8 | | | | |k| | |r|=
 +
7 | | | | | | | | |=
 +
6 | | | | | |B| |P|=
 +
5 | | | |R| |K|p|P|=
 +
4 | | | | | | | | |=
 +
3 | | | | | | | | |=
 +
2 | | | | | | | | |=
 +
1 | | | | | | | | |=
 +
    a b c d e f g h 
 +
 +
| '''Mate in two.''' <br> This problem uses ''partial retrograde analysis'' method.
 +
}}
 +
</pre>
 +
</noinclude>

Versione attuale delle 15:09, 26 set 2018


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


Syntax

{{Chess diagram
| <alignment> (param #1)
| <header>    (#2) 
| <a8> | <b8> | ... | <h8>  (#3 to ...
| <a7> | <b7> | ... | <h7>
...
| <a1> | <b1> | ... | <h1>  ( ... #66)
| <footer> (#67)
}}

Parameters:

  • <alignment> – defines horizontal alignment (floating) of the whole table, must be tright or tleft (or nothing)
  • <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; optional – can be left out (currently not in the other templates)

A square is defined by the name of piece or empty parameter. The names of the pieces are those given in algebraic notation:

  • Chess Kl44.png Chess Kd44.png Chess kl44.png Chess kd44.png k = king
  • Chess Qd44.png Chess Ql44.png Chess qd44.png Chess ql44.png q = queen
  • Chess Rl44.png Chess Rd44.png Chess rl44.png Chess rd44.png r = rook
  • Chess Bd44.png Chess Bl44.png Chess bd44.png Chess bl44.png b = bishop
  • Chess Nl44.png Chess Nd44.png Chess nl44.png Chess nd44.png n = knight
  • Chess Pd44.png Chess Pl44.png Chess pd44.png Chess pl44.png p = pawn

White pieces are uppercase, while black pieces are lowercase.

An empty square is written either using underscores, spaces, or nothing at all. One space is recommended.

  • Chess d44.pngChess l44.png <space> = empty square

You can also use "x" for a cross and "o" for a black circle on an empty square.

  • Chess xd44.pngChess xl44.png x = cross/x
  • Chess od44.pngChess ol44.png o = black circle

Examples

W. Langstaff, Chess Amateur 1922
Chess zhor 26.png
Chess zver 26.png a8 b8 c8 d8 e8 k f8 g8 h8 r Chess zver 26.png
a7 b7 c7 d7 e7 f7 g7 h7
a6 b6 c6 d6 e6 f6 B g6 h6 P
a5 b5 c5 d5 R e5 f5 K g5 p h5 P
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 zhor 26.png
Mate in two.
This problem uses partial retrograde analysis method.


{{Chess diagram
| tright
| '''W. Langstaff''', ''Chess Amateur'' 1922
|= 
 8 | | | | |k| | |r|=
 7 | | | | | | | | |=
 6 | | | | | |B| |P|=
 5 | | | |R| |K|p|P|=
 4 | | | | | | | | |=
 3 | | | | | | | | |=
 2 | | | | | | | | |=
 1 | | | | | | | | |=
    a b c d e f g h  

| '''Mate in two.''' <br> This problem uses ''partial retrograde analysis'' method.
}}