Template:Chess diagram/doc:修订间差异
解決了仙靈棋子沒顯示的問題和翻譯了These letters are combined with either "l" for Light=White, or "d" for Dark=Black. So "kl" is White's king, and "nd" is Black's knight. |
无编辑摘要 |
||
(未显示1个用户的3个中间版本) | |||
第13行: | 第13行: | ||
=== 使用方法 === |
=== 使用方法 === |
||
這裏有幾個[[國際象棋]]圖表的模板: |
|||
There are several standard [[chess]] diagram templates: |
|||
* [[Template:Chess diagram]] |
* [[Template:Chess diagram]](方格大小26x26 px) |
||
* [[Template:Chess diagram small]] |
* [[Template:Chess diagram small]](方格大小22x22 px) |
||
* [[Template:Chess diagram 4x4]] |
* [[Template:Chess diagram 4x4]](方格大小26x26 px) |
||
<!--* [[Template:Chess diagram 4x5]] |
<!--* [[Template:Chess diagram 4x5]](方格大小26x26 px)--> |
||
* [[Template:Chess diagram 5x5]] |
* [[Template:Chess diagram 5x5]](方格大小26x26 px) |
||
<!--* [[Template:Chess diagram 5x6]] |
<!--* [[Template:Chess diagram 5x6]](方格大小26x26 px)--> |
||
<!--* [[Template:Chess diagram 6x6]] |
<!--* [[Template:Chess diagram 6x6]](方格大小26x26 px)--> |
||
* [[Template:Chess diagram 8x10]] |
* [[Template:Chess diagram 8x10]]([[卡帕布蘭卡象棋]],方格大小26x26 px) |
||
<!--* [[Template:Chess diagram 9x9]] |
<!--* [[Template:Chess diagram 9x9]](方格大小26x26 px)--> |
||
* [[Template:Chess diagram 10x10]] |
* [[Template:Chess diagram 10x10]](方格大小26x26 px) |
||
<!--* [[Template:Chess diagram 10x10 small]] |
<!--* [[Template:Chess diagram 10x10 small]](方格大小26x26 px)--> |
||
* |
* 如果想顯示其它棋盤大小,就用{{#invoke:chessboard mxn|board|cols=|rows= |
||
這裏也有為[[國際象棋變體]]而設的模版: |
|||
There are also templates for [[chess variant]]s: |
|||
* [[Template:Alice chess diagram]] |
* [[Template:Alice chess diagram]]([[愛麗絲象棋]],方格大小22x22 px) |
||
<!--* [[Template:Bughouse chess diagram]] |
<!--* [[Template:Bughouse chess diagram]]([[四狂象棋]],方格大小22x22 px)--> |
||
* [[Template:Omega Chess diagram]] ([[ |
* [[Template:Omega Chess diagram]] ([[歐梅加象棋]],是一個有四個角落的10x10棋盤、方格大小22x22 px) |
||
<!--* [[Template:Raumschach diagram]] (5x5x5 board for one type of [[Three-dimensional chess]], 22x22 px)--> |
<!--* [[Template:Raumschach diagram]] (5x5x5 board for one type of [[Three-dimensional chess]], 22x22 px)--> |
||
<!--* [[Template:3D chess diagram]] (3x8x8 board for some types of [[Three-dimensional chess]], 22x22 px)--> |
<!--* [[Template:3D chess diagram]] (3x8x8 board for some types of [[Three-dimensional chess]], 22x22 px)--> |
||
以上模板所使用的文法,基本上是相同的。 |
|||
The syntax is basically the same for all of them. |
|||
<pre> |
<pre> |
||
{{Chess diagram |
{{Chess diagram |
||
| < |
| <排列> (參數#1) |
||
| <標題> (#2) |
| <標題> (#2) |
||
| size = |
| size = |
||
第52行: | 第52行: | ||
</pre> |
</pre> |
||
當棋盤大小為8x8,可以用另一種文法。(see [[#Alternative way to place the pieces: FEN]] below): |
|||
<pre> |
<pre> |
||
{{Chess diagram |
{{Chess diagram |
||
第69行: | 第69行: | ||
參數: |
參數: |
||
* <code>< |
* <code><排列></code> – 「tleft」會令模板泊向左方,而「tright」則會泊向右方 |
||
* <code><標題></code> – |
* <code><標題></code> – 這是會出現在棋盤上方的文字(可以留空) |
||
* <code>size</code> - |
* <code>size</code> - 用像素指明每個方格的大小,預設為26 |
||
* <code>numbers</code> - |
* <code>numbers</code> - 指明代表行的數字在哪裏顯示。可以填入:''left''、''right''、''both''(預設)或''neither''。 |
||
* <code>letters</code> - |
* <code>letters</code> - 指明代表列的字母在哪裏顯示。可以填入:''top''、''bottom''、''both''(預設)或''neither''。 |
||
* <code><a8>, <b8>, ... <nowiki><h1></nowiki></code> – |
* <code><a8>, <b8>, ... <nowiki><h1></nowiki></code> – 指明對應方格顯示什麼棋子。下面有詳細說明。 |
||
* <code><脚注></code> – 這是會出現在棋盤下方的文字(可以留空) |
|||
* <code><脚注></code> – the text which appears beneath the diagram, may be empty; optional – can be left out (currently not in the other templates) |
|||
一個方格是由棋子的名稱或空白的參數定義。棋子是由代數記譜法命名: |
一個方格是由棋子的名稱或空白的參數定義。棋子是由代數記譜法命名: |
||
第86行: | 第86行: | ||
* [[Image:Chess pld45.svg|26px]] [[Image:Chess pll45.svg|26px]] [[Image:Chess pdd45.svg|26px]] [[Image:Chess pdl45.svg|26px]] p = [[兵 (國際象棋)|兵]] |
* [[Image:Chess pld45.svg|26px]] [[Image:Chess pll45.svg|26px]] [[Image:Chess pdd45.svg|26px]] [[Image:Chess pdl45.svg|26px]] p = [[兵 (國際象棋)|兵]] |
||
這 |
這裏也有一些仙靈棋子可以使用: |
||
[[File:Chess klg45.svg|26px]] |
[[File:Chess klg45.svg|26px]] |
||
[[File:Chess elg45.svg|26px]] |
[[File:Chess elg45.svg|26px]] |
||
第96行: | 第96行: | ||
[[File:RoyalKnightFinish Done.svg|26px]] |
[[File:RoyalKnightFinish Done.svg|26px]] |
||
* [[Image:Chess all45.svg|26px]] [[Image:Chess ald45.svg|26px]] [[Image:Chess adl45.svg|26px]] [[Image:Chess add45.svg|26px]] a = |
* [[Image:Chess all45.svg|26px]] [[Image:Chess ald45.svg|26px]] [[Image:Chess adl45.svg|26px]] [[Image:Chess add45.svg|26px]] a = 大主教(馬+象的合體,可以代表[[大主教 (仙靈棋)|公主]]) |
||
* [[Image:Chess cld45.svg|26px]] [[Image:Chess cll45.svg|26px]] [[Image:Chess cdd45.svg|26px]] [[Image:Chess cdl45.svg|26px]] c = |
* [[Image:Chess cld45.svg|26px]] [[Image:Chess cll45.svg|26px]] [[Image:Chess cdd45.svg|26px]] [[Image:Chess cdl45.svg|26px]] c = 首相(馬+車的合體,可以代表[[首相 (仙靈棋)|皇帝]]) |
||
* [[Image:Chess fll45.svg|26px]] [[Image:Chess fld45.svg|26px]] [[Image:Chess fdl45.svg|26px]] [[Image:Chess fdd45.svg|26px]] f = |
* [[Image:Chess fll45.svg|26px]] [[Image:Chess fld45.svg|26px]] [[Image:Chess fdl45.svg|26px]] [[Image:Chess fdd45.svg|26px]] f = 倒轉的王(可以代表{{link-en|丈夫 (仙靈棋) | Mann (chess)|丈夫}}) |
||
* [[Image:Chess gld45.svg|26px]] [[Image:Chess gll45.svg|26px]] [[Image:Chess gdd45.svg|26px]] [[Image:Chess gdl45.svg|26px]] g = |
* [[Image:Chess gld45.svg|26px]] [[Image:Chess gll45.svg|26px]] [[Image:Chess gdd45.svg|26px]] [[Image:Chess gdl45.svg|26px]] g = 倒轉的后(可以代表[[蚱蜢 (仙靈棋)|蚱蜢]]) |
||
* [[Image:Chess mll45.svg|26px]] [[Image:Chess mld45.svg|26px]] [[Image:Chess mdl45.svg|26px]] [[Image:Chess mdd45.svg|26px]] m = |
* [[Image:Chess mll45.svg|26px]] [[Image:Chess mld45.svg|26px]] [[Image:Chess mdl45.svg|26px]] [[Image:Chess mdd45.svg|26px]] m = 倒轉的車(可以代表[[洞屋 (仙靈棋)|洞屋]]、[[跳躍者 (仙靈棋)|跳躍者]]、或者[[華西爾 (仙靈棋)|華西爾]]) |
||
* [[Image:Chess eld45.svg|26px]] [[Image:Chess ell45.svg|26px]] [[Image:Chess edd45.svg|26px]] [[Image:Chess edl45.svg|26px]] j(e) = |
* [[Image:Chess eld45.svg|26px]] [[Image:Chess ell45.svg|26px]] [[Image:Chess edd45.svg|26px]] [[Image:Chess edl45.svg|26px]] j(e) = 大象(可以代表[[象 (仙靈棋)|象]]或者[[維齊爾 (仙靈棋)|維齊爾]]) |
||
* [[Image:Chess sll45.svg|26px]] [[Image:Chess sld45.svg|26px]] [[Image:Chess sdl45.svg|26px]] [[Image:Chess sdd45.svg|26px]] N(s) = |
* [[Image:Chess sll45.svg|26px]] [[Image:Chess sld45.svg|26px]] [[Image:Chess sdl45.svg|26px]] [[Image:Chess sdd45.svg|26px]] N(s) = 倒轉的馬(可以代表{{link-en|駱駝 (仙靈棋) |Camel (chess)|駱駝}}、[[中將棋|麒麟]]、[[夢魘 (仙靈棋)|夢魘]]、或者[[中將棋|鳳凰]]) |
||
* [[Image:Chess hld45.svg|26px]] [[Image:Chess hll45.svg|26px]] [[Image:Chess hdd45.svg|26px]] [[Image:Chess hdl45.svg|26px]] h = |
* [[Image:Chess hld45.svg|26px]] [[Image:Chess hll45.svg|26px]] [[Image:Chess hdd45.svg|26px]] [[Image:Chess hdl45.svg|26px]] h = 倒轉的兵(可以代表{{link-en|貝羅利納象棋|Berolina chess|貝羅利納兵}}) |
||
* [[Image:Chess zll45.svg|26px]] [[Image:Chess zld45.svg|26px]] [[Image:Chess zdl45.svg|26px]] [[Image:Chess zdd45.svg|26px]] z = |
* [[Image:Chess zll45.svg|26px]] [[Image:Chess zld45.svg|26px]] [[Image:Chess zdl45.svg|26px]] [[Image:Chess zdd45.svg|26px]] z = 歐梅加象棋的勇 |
||
* [[Image:Chess wld45.svg|26px]] [[Image:Chess wll45.svg|26px]] [[Image:Chess wdd45.svg|26px]] [[Image:Chess wdl45.svg|26px]] w = |
* [[Image:Chess wld45.svg|26px]] [[Image:Chess wll45.svg|26px]] [[Image:Chess wdd45.svg|26px]] [[Image:Chess wdl45.svg|26px]] w = 歐梅加象棋的巫 |
||
* [[Image:Chess tld45.svg|26px]] [[Image:Chess tll45.svg|26px]] [[Image:Chess tdd45.svg|26px]] [[Image:Chess tdl45.svg|26px]] t = |
* [[Image:Chess tld45.svg|26px]] [[Image:Chess tll45.svg|26px]] [[Image:Chess tdd45.svg|26px]] [[Image:Chess tdl45.svg|26px]] t = 歐梅加象棋的傻 |
||
* [[Image:Mann_white_on_light_(an_icon_of_the_chess_piece).png|26px]] [[Image:Mann_white_on_dark_(an_icon_of_the_chess_piece).png|26px]] [[Image:Mann_black_on_light_(an_icon_of_the_chess_piece).png|26px]] [[Image:Mann_black_on_dark_(an_icon_of_the_chess_piece).png|26px]] M = |
* [[Image:Mann_white_on_light_(an_icon_of_the_chess_piece).png|26px]] [[Image:Mann_white_on_dark_(an_icon_of_the_chess_piece).png|26px]] [[Image:Mann_black_on_light_(an_icon_of_the_chess_piece).png|26px]] [[Image:Mann_black_on_dark_(an_icon_of_the_chess_piece).png|26px]] M = 另外一個可以代表{{link-en|丈夫 (仙靈棋) | Mann (chess)|丈夫}}的符號 |
||
*[[Image:Centaur on white squares.png|26px]] [[Image:Centaur on dark squares.png|26px]] C = |
*[[Image:Centaur on white squares.png|26px]] [[Image:Centaur on dark squares.png|26px]] C = [[亞馬遜 (仙靈棋)|亞馬遜]] |
||
這些字母與「l」(代表白棋)和「d」(代表黑棋)組合來使用。所以「kl」是白王,而「nd」則是黑馬。 |
這些字母與「l」(代表白棋)和「d」(代表黑棋)組合來使用。所以「kl」是白王,而「nd」則是黑馬。 |
||
一個空的方格可以用下劃線、空格或者什麼都不打來表達。建議使用兩個空格。 |
|||
An empty square is written either using underscores, spaces, or nothing at all. Two spaces are recommended. |
|||
* [[Image:Chess d45.svg|26px]][[Image:Chess l45.svg|26px]] < |
* [[Image:Chess d45.svg|26px]][[Image:Chess l45.svg|26px]] <空格> = 空的方格 |
||
你也可以用「xx」代表黑色交叉、「ox」代表白色交叉、「xo」代表黑色圓圈或者「oo」代表白色圓圈。 |
|||
You can also use "xx" for a black cross, "ox" for a white cross, "xo" for a black circle on an empty square or "oo" for a white one. |
|||
* [[Image:Chess xxd45.svg|26px]][[Image:Chess xxl45.svg|26px]] xx = 黑叉 |
* [[Image:Chess xxd45.svg|26px]][[Image:Chess xxl45.svg|26px]] xx = 黑叉 |
||
第123行: | 第123行: | ||
* [[Image:Chess ood45.svg|26px]][[Image:Chess ool45.svg|26px]] oo = 白圈 |
* [[Image:Chess ood45.svg|26px]][[Image:Chess ool45.svg|26px]] oo = 白圈 |
||
當你想表示棋子的移動方向,就可以用箭頭: |
|||
When showing movement directions on the board, arrows are available |
|||
* [[Image:Chess uld45.svg|26px]][[Image:Chess ull45.svg|26px]] ul = 左上 |
* [[Image:Chess uld45.svg|26px]][[Image:Chess ull45.svg|26px]] ul = 左上 |
||
第136行: | 第136行: | ||
* [[Image:Chess drd45.svg|26px]][[Image:Chess drl45.svg|26px]] dr = 右下 |
* [[Image:Chess drd45.svg|26px]][[Image:Chess drl45.svg|26px]] dr = 右下 |
||
數字也可以放入方格——「x0」代表0、「x1」代表1、「x2」代表2、⋯、「x9」代表9。 |
|||
Numbers can also be added to squares by using "x0" for 0, "x1" for 1, "x2" for 2, ..., "x9" for 9. |
|||
* [[Image:Chess x0d45.svg|26px]][[Image:Chess x0l45.svg|26px]] x0 |
* [[Image:Chess x0d45.svg|26px]][[Image:Chess x0l45.svg|26px]] x0 |
||
第880行: | 第880行: | ||
<includeonly>{{Sandbox other|| |
<includeonly>{{Sandbox other|| |
||
[[Category:体育模板|{{PAGENAME}}]] |
|||
[[Category:國際象棋模板|{{PAGENAME}}]] |
[[Category:國際象棋模板|{{PAGENAME}}]] |
||
}}</includeonly> |
}}</includeonly> |
2023年1月13日 (五) 10:22的最新版本
此頁面是Template:Chess diagram的Template文档。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
此模板使用Lua语言: |
使用方法
[编辑]這裏有幾個國際象棋圖表的模板:
- Template:Chess diagram(方格大小26x26 px)
- Template:Chess diagram small(方格大小22x22 px)
- Template:Chess diagram 4x4(方格大小26x26 px)
- Template:Chess diagram 5x5(方格大小26x26 px)
- Template:Chess diagram 8x10(卡帕布蘭卡象棋,方格大小26x26 px)
- Template:Chess diagram 10x10(方格大小26x26 px)
- 如果想顯示其它棋盤大小,就用{{#invoke:chessboard mxn|board|cols=|rows=
這裏也有為國際象棋變體而設的模版:
- Template:Alice chess diagram(愛麗絲象棋,方格大小22x22 px)
- Template:Omega Chess diagram (歐梅加象棋,是一個有四個角落的10x10棋盤、方格大小22x22 px)
以上模板所使用的文法,基本上是相同的。
{{Chess diagram | <排列> (參數#1) | <標題> (#2) | size = | numbers = | letters = | <a8> | <b8> | ... | <h8> (#3 to ... | <a7> | <b7> | ... | <h7> ... | <a1> | <b1> | ... | <h1> ( ... #66) | <脚注> (#67) | reverse = }}
當棋盤大小為8x8,可以用另一種文法。(see #Alternative way to place the pieces: FEN below):
{{Chess diagram | fen = | align = | clear = | header = | footer = | size = | numbers = | letters = | reverse = }}
參數:
<排列>
– 「tleft」會令模板泊向左方,而「tright」則會泊向右方<標題>
– 這是會出現在棋盤上方的文字(可以留空)size
- 用像素指明每個方格的大小,預設為26numbers
- 指明代表行的數字在哪裏顯示。可以填入:left、right、both(預設)或neither。letters
- 指明代表列的字母在哪裏顯示。可以填入:top、bottom、both(預設)或neither。<a8>, <b8>, ... <h1>
– 指明對應方格顯示什麼棋子。下面有詳細說明。<脚注>
– 這是會出現在棋盤下方的文字(可以留空)
一個方格是由棋子的名稱或空白的參數定義。棋子是由代數記譜法命名:
- a = 大主教(馬+象的合體,可以代表公主)
- c = 首相(馬+車的合體,可以代表皇帝)
- f = 倒轉的王(可以代表丈夫)
- g = 倒轉的后(可以代表蚱蜢)
- m = 倒轉的車(可以代表洞屋、跳躍者、或者華西爾)
- j(e) = 大象(可以代表象或者維齊爾)
- N(s) = 倒轉的馬(可以代表駱駝、麒麟、夢魘、或者鳳凰)
- h = 倒轉的兵(可以代表貝羅利納兵)
- z = 歐梅加象棋的勇
- w = 歐梅加象棋的巫
- t = 歐梅加象棋的傻
- M = 另外一個可以代表丈夫的符號
- C = 亞馬遜
這些字母與「l」(代表白棋)和「d」(代表黑棋)組合來使用。所以「kl」是白王,而「nd」則是黑馬。
一個空的方格可以用下劃線、空格或者什麼都不打來表達。建議使用兩個空格。
你也可以用「xx」代表黑色交叉、「ox」代表白色交叉、「xo」代表黑色圓圈或者「oo」代表白色圓圈。
當你想表示棋子的移動方向,就可以用箭頭:
數字也可以放入方格——「x0」代表0、「x1」代表1、「x2」代表2、⋯、「x9」代表9。
範例
[编辑]Standard diagram
[编辑]This diagram is recommended for common use as a main diagram in the articles on chess openings, endings, games, positions etc. See the corresponding code below.
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 | tright | |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 | The King's Gambit }}
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 | tright | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 空板 }}
兩行脚注
[编辑]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 |
It may be convenient to use this in the articles on chess problems. Please note that in the header and footer you can use bolds or italics. You can also use <br>
to break the lines.
{{Chess diagram | tright | '''W. Langstaff''', ''Chess Amateur'' 1922 | | | | |kd| | |rd | | | | | | | | | | | | | |bl| |pl | | | |rl| |kl|pd|pl | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '''Mate in two.''' <br> This problem uses ''partial retrograde analysis'' method. }}
無脚注
[编辑]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 |
See the corresponding code below. If you don't want the captions, just remove them, but don't delete the second "|" pipe character for the caption above; it is possible to delete the last pipe for the longer caption below.
The diagram floats to the left to illustrate the use of the first parameter.
{{Chess diagram | tleft | | | | | | | | | | | | | | | | | | |xx|xo|xx| | | | | | |pl| | | | | | | | | | |xo| | | | | | |xx|xo|xx| | | | | | |pl| | | | | | | | | | }}
Movement example
[编辑]This can be used to show how pieces move.
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 | tleft | | | |ua| | | | | | | |ua| | | | | |la|la|rd|ra|ra|ra|ra|ra | | |da| | | | | | | |da| |ul|ua|ur| | | |da| |la|kl|ra| | | |da| |dl|da|dr| | | |da| | | | | |Example showing how white king can move any direction, but only one square, while black rook can move any number of squares but only up and down, and right and left. }}
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 | tright | | |ul| |ua| |ur| | | | |ul|ua|ur| | | |la|la|la|ql|ra|ra|ra|ra | | |dl|da|dr| | | | |dl| |da| |dr| | |dl| | |da| | |dr| | | | |da| | | |dr | | | |da| | | | }}
In the board on the right, it is shown that the white queen can go any distance in any of these directions.
Another method for the rook example:
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 | tleft | | | | | | | | | | | |ud| | | | | | |lr|rd|lr| | | | | | |ud| | | | | | | | | |ul|ua|ur| | | | | |la|kl|ra| | | | | |dl|da|dr| | | | | | | | | }}
小图
[编辑]This one may be useful in articles with many diagrams. It uses another template named {{Chess diagram small}}.
The small diagrams can have header, too.
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 small | tright | |rd| | |qd| |rd|kd| |pd|pd| | |pd|pd|bd|pd | |nd|pd| | |nd|pd| | | |ql| | | |bl| | | | |pl|pl| |bd| | | |nl| | |nl| | |pl|pl| | | |pl|pl|pl | | | |rl|kl|bl| |rl | Position after 11.Bg5 }}
不同板子尺寸
[编辑]Chess boards of non-standard dimensions need special templates. There are templates for the following boards:
{{Chess diagram 5x5 | tright | |kd|qd|bd|nd|rd |pd|pd|pd|pd|pd | | | | | |pl|pl|pl|pl|pl |kl|ql|bl|nl|rl | Gardner minichess }} |
{{Chess diagram 8x10 | tright | |rd|nd|ad|bd|qd|kd|bd|cd|nd|rd |pd|pd|pd|pd|pd|pd|pd|pd|pd|pd | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |pl|pl|pl|pl|pl|pl|pl|pl|pl|pl |rl|nl|al|bl|ql|kl|bl|cl|nl|rl | Capablanca Chess }} |
{{Chess diagram 10x10 | tright | |rd| | | | | | | | |rd | |nd|bd|qd|kd|cd|ad|bd|nd| |pd|pd|pd|pd|pd|pd|pd|pd|pd|pd | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |pl|pl|pl|pl|pl|pl|pl|pl|pl|pl | |nl|bl|ql|kl|cl|al|bl|nl| |rl| | | | | | | | |rl | Grand Chess }} |
{{alice chess diagram | tright | |rd|nd|bd|qd|kd| |nd|rd |pd|pd|pd|pd| |pd|pd|pd | | | | | | | | | | | | |nl| | | | | | | | | | | | | | | | | | | |pl|pl|pl|pl|pl|pl|pl|pl |rl|nl|bl|ql|kl|bl| |rl | | | | | | | | | | | | | | | | | | | | |pd| | | | | |bd| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Position after '''1. Nf3 e6 2. Ne5 Bc5''' }} |
Different shaped board
[编辑]{{Omega Chess diagram
|
| [[Omega Chess]] (10×10 + 4 corners)
|wd |wd
|zd|rd|nd|bd|qd|kd|bd|nd|rd|zd
|pd|pd|pd|pd|pd|pd|pd|pd|pd|pd
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
|pl|pl|pl|pl|pl|pl|pl|pl|pl|pl
|zl|rl|nl|bl|ql|kl|bl|nl|rl|zl
|wl |wl
| '''Omega Chess''' starting position
}}
|
Omega Chess (10x10 + 4 corners)
|
Alternative way to place the pieces: FEN
[编辑]{{Chess diagram|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR|align=tleft}}
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 |
It is possible to populate the board using Forsyth–Edwards Notation, instead of positional parameters.
To do this, the "fen" parameter is used. For instance, this is the opening board of a chess game, defined using the "fen" parameter "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR":
{{Chess diagram|fen=rnbqkbnr/acfghzwt/8/8/8/8/ACFGHZWT/RNBQKBNR|align=tleft}}
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 |
It is also possible to show "fairy" pieces using the FEN notation. However, because the FEN notation uses uppercase and lowercase to denote the color of the piece, it is not possible to display the inverted knight fairy piece (denoted by "N") using the fen parameter. Here is a board where the pawns are replaced by fairy pieces:
Only 8x8 boards can use the "fen" parameter. For other size boards, positional parameters should be used.
Displaying the board from the Black's point of view
[编辑]{{Chess diagram|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR|align=tleft|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 |
The "reverse=true" parameter causes the board to be shown from Black's point of view, that is, with the h8 square at lower-left corner, and a1 at the upper-right. This works for all sizes of the normal chessboard template, but not for the Alice, Bughouse, Omega, or Raumschach templates. Here, the same FEN notation as in the previous example produces a board with Black's starting position at the bottom.
參見
[编辑]- {{Xiangqi diagram}}