Template:4pc diagram
a | b | c | d | e | f | g | h | i | j | k | l | m | n | ||
14 | 14 | ||||||||||||||
13 | 13 | ||||||||||||||
12 | 12 | ||||||||||||||
11 | 11 | ||||||||||||||
10 | 10 | ||||||||||||||
9 | 9 | ||||||||||||||
8 | 8 | ||||||||||||||
7 | 7 | ||||||||||||||
6 | 6 | ||||||||||||||
5 | 5 | ||||||||||||||
4 | 4 | ||||||||||||||
3 | 3 | ||||||||||||||
2 | 2 | ||||||||||||||
1 | 1 | ||||||||||||||
a | b | c | d | e | f | g | h | i | j | k | l | m | n |
Usage
[edit source]The syntax for the four-player chess diagram is as follows:
{{4pc diagram | <header> (param #1) | <alignment> (#2) | size = | numbers = | letters = | | | |<d14>|<e14>|...|<k14>| | | | (#3 to ...) | | | |<d13>|<e13>|...|<k13>| | | | | | | |<d12>|<e12>|...|<k12>| | | | |<a11>|<b11>|...|<n11>| ... |<a4>|<b4>|...|<n4>| | | | |<d3>|<e3>|...|<k2>| | | | | | | |<d2>|<e2>|...|<k2>| | | | | | | |<d1>|<e1>|...|<k1>| | | | (... #198) | <footer> (#199) }}
Parameters:
<header>
— The text which appears above the diagram. (Optional.)<alignment>
— Defines horizontal alignment (floating) of the whole table. Options are:tright
ortleft
(or nothing).size
— Defines the size of the squares in pixels. (Default: 25px. Use 20px minimum.)numbers
— Specifies whether the rank numbers are displayed or not. Options are: left, right, both (default) or neither.letters
— Specifies whether the file letters are displayed or not. Options are: top, bottom, both (default) or neither.<d1>, <e1>, ... <k14>
— Define corresponding squares of the chessboard. (See below.)<footer>
— The text which appears beneath the diagram. (Optional.)
The occupancy of a square is defined by the piece identifier or an empty parameter (two spaces are recommended). The piece identifiers consist of a lowercase letter for the colour (r = red, b = blue, y = yellow and g = green) and an uppercase letter for the piece (P = pawn, N = knight, B = bishop, R = rook, Q = queen and K = king).
= rK | = bK | = yK | = gK |
= rQ | = bQ | = yQ | = gQ |
= rR | = bR | = yR | = gR |
= rB | = bB | = yB | = gB |
= rN | = bN | = yN | = gN |
= rP | = bP | = yP | = gP |
Arrows can be used to show movement directions and a cross and circle are available to mark squares.
Examples
[edit source]For the sake of clarity, it is possible to add the file letters and rank numbers in the source, as in the following example. Any text between "|=" and the next "|" is ignored.
{{4pc diagram | '''Four-player chess board''' | tright |= 14 | | | |yR|yN|yB|yK|yQ|yB|yN|yR| | | |= 13 | | | |yP|yP|yP|yP|yP|yP|yP|yP| | | |= 12 | | | | | | | | | | | | | | |= 11 |bR|bP| | | | | | | | | | |gP|gR|= 10 |bN|bP| | | | | | | | | | |gP|gN|= 9 |bB|bP| | | | | | | | | | |gP|gB|= 8 |bK|bP| | | | | | | | | | |gP|gQ|= 7 |bQ|bP| | | | | | | | | | |gP|gK|= 6 |bB|bP| | | | | | | | | | |gP|gB|= 5 |bN|bP| | | | | | | | | | |gP|gN|= 4 |bR|bP| | | | | | | | | | |gP|gR|= 3 | | | | | | | | | | | | | | |= 2 | | | |rP|rP|rP|rP|rP|rP|rP|rP| | | |= 1 | | | |rR|rN|rB|rQ|rK|rB|rN|rR| | | |= a b c d e f g h i j k l m n | Starting position. }}
Another example with a reduced square size and without file and rank labels.
{{4pc diagram | '''Small four-player chess board''' | tright | size = 20 | numbers = neither | letters = neither |= 14 | | | |yR|yN|yB|yK|yQ|yB|yN|yR| | | |= 13 | | | |yP|yP|yP|yP|yP|yP|yP|yP| | | |= 12 | | | | | | | | | | | | | | |= 11 |bR|bP| | | | | | | | | | |gP|gR|= 10 |bN|bP| | | | | | | | | | |gP|gN|= 9 |bB|bP| | | | | | | | | | |gP|gB|= 8 |bK|bP| | | | | | | | | | |gP|gQ|= 7 |bQ|bP| | | | | | | | | | |gP|gK|= 6 |bB|bP| | | | | | | | | | |gP|gB|= 5 |bN|bP| | | | | | | | | | |gP|gN|= 4 |bR|bP| | | | | | | | | | |gP|gR|= 3 | | | | | | | | | | | | | | |= 2 | | | |rP|rP|rP|rP|rP|rP|rP|rP| | | |= 1 | | | |rR|rN|rB|rQ|rK|rB|rN|rR| | | |= a b c d e f g h i j k l m n | Smaller diagram without file and rank labels. }}
The next example shows a diagram with arrows and marked squares.
{{4pc diagram | '''Four-player chess board with arrows''' | tright | size = 20 | numbers = neither | letters = neither |= 14 | | | |yR|yN|yB|yK|yQ|yB|yN|yR| | | |= 13 | | | |yP|yP|yP|yP|di|yP|yP|yP| | | |= 12 | | | | | | |di|yP| | | | | | |= 11 |bR|bP| | | |di| | | | | | |gP|gR|= 10 |bN|bP| | |di| | | | | |xx| |gP|gN|= 9 |bB|bP| |di| | | | | | | |gP| |gB|= 8 |bK|bP|di| | | | | | | |xx| |gP|gQ|= 7 |bQ|di|bP| | | | | | | | | |gP|gK|= 6 |bB|bP| | | | | | | | | | |gP|gB|= 5 |bN|bP|la|la|la|la|la|la|la|la|xo| |gP|gN|= 4 |bR|bP| | | | | | | |ur| | |gP|gR|= 3 | | | | | | | |rP|ur| | | | | |= 2 | | | |rP|rP|rP|rP|ur|rP|rP|rP| | | |= 1 | | | |rR|rN|rB|rQ|rK|rB|rN|rR| | | |= a b c d e f g h i j k l m n | Diagram with arrows and marked squares. }}