Template:Chess diagram-fen/doc
Jump to navigation
Jump to search
| This is a documentation subpage for Template:Chess diagram-fen. It contains usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
This template displays a chess board, given a FEN. It was built with the intention of eventually replacing {{Chess diagram}}
parameters:
- fen: the string representing the location of the pieces. supposedly, it will ignore the "tail end" of the FEN string that does not represent the actual pieces.
- size: integer, represent the size of one square in pixels. optional - defaults to 26 (size=23 corresponds to "chess diagram small")
- reverse: use true to show the board from the black's point of view.
- align: can be "tleft" or "tright". default to "tleft"
- header: text to show above the board
- footer: text to show below the board
Some examples:
{{chess diagram-fen}}
| a | b | c | d | e | f | g | h | ||
| 8 | 8 | ||||||||
| 7 | 7 | ||||||||
| 6 | 6 | ||||||||
| 5 | 5 | ||||||||
| 4 | 4 | ||||||||
| 3 | 3 | ||||||||
| 2 | 2 | ||||||||
| 1 | 1 | ||||||||
| a | b | c | d | e | f | g | h | ||
{{chess diagram-fen
|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
|size=20
|align=tright
|reverse=false
|header=standard opening position of a chess game
|footer=White moves first
}}
standard opening position of a chess game
| a | b | c | d | e | f | g | h | ||
| 8 | 8 | ||||||||
| 7 | 7 | ||||||||
| 6 | 6 | ||||||||
| 5 | 5 | ||||||||
| 4 | 4 | ||||||||
| 3 | 3 | ||||||||
| 2 | 2 | ||||||||
| 1 | 1 | ||||||||
| a | b | c | d | e | f | g | h | ||
White moves first
{{chess diagram-fen
|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
|reverse=true
}}
| h | g | f | e | d | c | b | a | ||
| 1 | 1 | ||||||||
| 2 | 2 | ||||||||
| 3 | 3 | ||||||||
| 4 | 4 | ||||||||
| 5 | 5 | ||||||||
| 6 | 6 | ||||||||
| 7 | 7 | ||||||||
| 8 | 8 | ||||||||
| h | g | f | e | d | c | b | a | ||
{{chess diagram-fen
|fen=r3r1k1/1bqn1p1p/ppnpp1p1/6P1/P2NPP2/2N4R/1PP2QBP/5R1K
}}
| a | b | c | d | e | f | g | h | ||
| 8 | 8 | ||||||||
| 7 | 7 | ||||||||
| 6 | 6 | ||||||||
| 5 | 5 | ||||||||
| 4 | 4 | ||||||||
| 3 | 3 | ||||||||
| 2 | 2 | ||||||||
| 1 | 1 | ||||||||
| a | b | c | d | e | f | g | h | ||
{{chess diagram-fen
|fen=r3r1k1/1bqn1p1p/ppnpp1p1/6P1/P2NPP2/2N4R/1PP2QBP/5R1K
|reverse=true
}}
| h | g | f | e | d | c | b | a | ||
| 1 | 1 | ||||||||
| 2 | 2 | ||||||||
| 3 | 3 | ||||||||
| 4 | 4 | ||||||||
| 5 | 5 | ||||||||
| 6 | 6 | ||||||||
| 7 | 7 | ||||||||
| 8 | 8 | ||||||||
| h | g | f | e | d | c | b | a | ||
{{chess diagram-fen
|fen=r3r1k1/1bqn1p1p/ppnpp1p1/6P1/P2NPP2/2N4R/1PP2QBP/5R1K
|size=40
}}
| a | b | c | d | e | f | g | h | ||
| 8 | 8 | ||||||||
| 7 | 7 | ||||||||
| 6 | 6 | ||||||||
| 5 | 5 | ||||||||
| 4 | 4 | ||||||||
| 3 | 3 | ||||||||
| 2 | 2 | ||||||||
| 1 | 1 | ||||||||
| a | b | c | d | e | f | g | h | ||