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= | + | 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 14:09, 26 set 2018
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 betright
ortleft
(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:
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.
You can also use "x" for a cross and "o" for a black circle on an empty square.
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. }}