跳转到内容

Template:Chess diagram/doc:修订间差异

维基百科,自由的百科全书
删除的内容 添加的内容
无编辑摘要
无编辑摘要
 
(未显示6个用户的13个中间版本)
第1行: 第1行:
<IncludeOnly><!-- 在這裡加入模板的保護標識 --></IncludeOnly>
<IncludeOnly><!-- 在這裡加入模板的保護標識 --></IncludeOnly>
<!-- 在本行下編輯模板說明 -->
<!-- 在本行下編輯模板說明 -->
{{documentation subpage}}
== 使用方法 ==
{{#switch:{{BASEPAGENAME}}
使用方法如下說明:
|Chess diagram small
|Chess diagram={{lua|Module:Chessboard}}
|Alice chess diagram
|Bughouse chess diagram
|Omega Chess diagram
|Raumschach diagram=
|#default = {{lua|Module:Chessboard mxn}}
}}
=== 使用方法 ===


這裏有幾個[[國際象棋]]圖表的模板:
第一個變數用來定義模版CSS格式,例如設為「tleft」會泊向左方,而「tright」會泊向右方。


* [[Template:Chess diagram]](方格大小26x26 px)
第二個變數則是標題。
* [[Template:Chess diagram small]](方格大小22x22 px)
* [[Template:Chess diagram 4x4]](方格大小26x26 px)
<!--* [[Template:Chess diagram 4x5]](方格大小26x26 px)-->
* [[Template:Chess diagram 5x5]](方格大小26x26 px)
<!--* [[Template:Chess diagram 5x6]](方格大小26x26 px)-->
<!--* [[Template:Chess diagram 6x6]](方格大小26x26 px)-->
* [[Template:Chess diagram 8x10]]([[卡帕布蘭卡象棋]],方格大小26x26 px)
<!--* [[Template:Chess diagram 9x9]](方格大小26x26 px)-->
* [[Template:Chess diagram 10x10]](方格大小26x26 px)
<!--* [[Template:Chess diagram 10x10 small]](方格大小26x26 px)-->
* 如果想顯示其它棋盤大小,就用{{#invoke:chessboard mxn|board|cols=|rows=
這裏也有為[[國際象棋變體]]而設的模版:
* [[Template:Alice chess diagram]]([[愛麗絲象棋]],方格大小22x22 px)
<!--* [[Template:Bughouse chess diagram]]([[四狂象棋]],方格大小22x22 px)-->
* [[Template:Omega Chess diagram]] ([[歐梅加象棋]],是一個有四個角落的10x10棋盤、方格大小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)-->


以上模板所使用的文法,基本上是相同的。
第三至第六十六個變數定為棋子種類和顏色,以下表為示:

<pre>
{{Chess diagram
| <排列> (參數#1)
| <標題> (#2)
| size =
| numbers =
| letters =
| <a8> | <b8> | ... | <h8> (#3 to ...
| <a7> | <b7> | ... | <h7>
...
| <a1> | <b1> | ... | <h1> ( ... #66)
| <脚注> (#67)
| reverse =
}}
</pre>

當棋盤大小為8x8,可以用另一種文法。(see [[#Alternative way to place the pieces: FEN]] below):
<pre>
{{Chess diagram
| fen =
| align =
| clear =
| header =
| footer =
| size =
| numbers =
| letters =
| reverse =
}}
</pre>

參數:

* <code><排列></code> – 「tleft」會令模板泊向左方,而「tright」則會泊向右方
* <code><標題></code> – 這是會出現在棋盤上方的文字(可以留空)
* <code>size</code> - 用像素指明每個方格的大小,預設為26
* <code>numbers</code> - 指明代表行的數字在哪裏顯示。可以填入:''left''、''right''、''both''(預設)或''neither''。
* <code>letters</code> - 指明代表列的字母在哪裏顯示。可以填入:''top''、''bottom''、''both''(預設)或''neither''。
* <code><a8>, <b8>, ... <nowiki><h1></nowiki></code> – 指明對應方格顯示什麼棋子。下面有詳細說明。
* <code><脚注></code> – 這是會出現在棋盤下方的文字(可以留空)

一個方格是由棋子的名稱或空白的參數定義。棋子是由代數記譜法命名:

* [[Image:Chess kll45.svg|26px]] [[Image:Chess kld45.svg|26px]] [[Image:Chess kdl45.svg|26px]] [[Image:Chess kdd45.svg|26px]] k = [[王 (國際象棋)|王]]
* [[Image:Chess qld45.svg|26px]] [[Image:Chess qll45.svg|26px]] [[Image:Chess qdd45.svg|26px]] [[Image:Chess qdl45.svg|26px]] q = [[后 (國際象棋)|-{后}-]]
* [[Image:Chess rll45.svg|26px]] [[Image:Chess rld45.svg|26px]] [[Image:Chess rdl45.svg|26px]] [[Image:Chess rdd45.svg|26px]] r = [[車 (國際象棋)|車]](城堡)
* [[Image:Chess bld45.svg|26px]] [[Image:Chess bll45.svg|26px]] [[Image:Chess bdd45.svg|26px]] [[Image:Chess bdl45.svg|26px]] b = [[象 (國際象棋)|象]](主教)
* [[Image:Chess nll45.svg|26px]] [[Image:Chess nld45.svg|26px]] [[Image:Chess ndl45.svg|26px]] [[Image:Chess ndd45.svg|26px]] n = [[馬 (國際象棋)|馬]](騎士)
* [[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 elg45.svg|26px]]
[[File:Chess nlg45.svg|26px]]
[[File:Chess slg45.svg|26px]]
[[File:Chess plg45.svg|26px]]
[[File:Chess_Mdt45.svg|26px]]
[[File:Chess_Mlt45.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 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 = 倒轉的王(可以代表{{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 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 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 = 倒轉的兵(可以代表{{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 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: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 = [[亞馬遜 (仙靈棋)|亞馬遜]]

這些字母與「l」(代表白棋)和「d」(代表黑棋)組合來使用。所以「kl」是白王,而「nd」則是黑馬。

一個空的方格可以用下劃線、空格或者什麼都不打來表達。建議使用兩個空格。

* [[Image:Chess d45.svg|26px]][[Image:Chess l45.svg|26px]] <空格> = 空的方格

你也可以用「xx」代表黑色交叉、「ox」代表白色交叉、「xo」代表黑色圓圈或者「oo」代表白色圓圈。

* [[Image:Chess xxd45.svg|26px]][[Image:Chess xxl45.svg|26px]] xx = 黑叉
* [[Image:Chess oxd45.svg|26px]][[Image:Chess oxl45.svg|26px]] ox = 白叉
* [[Image:Chess xod45.svg|26px]][[Image:Chess xol45.svg|26px]] xo = 黑圈
* [[Image:Chess ood45.svg|26px]][[Image:Chess ool45.svg|26px]] oo = 白圈

當你想表示棋子的移動方向,就可以用箭頭:

* [[Image:Chess uld45.svg|26px]][[Image:Chess ull45.svg|26px]] ul = 左上
* [[Image:Chess uad45.svg|26px]][[Image:Chess ual45.svg|26px]] ua = 上
* [[Image:Chess urd45.svg|26px]][[Image:Chess url45.svg|26px]] ur = 右上
* [[Image:Chess lad45.svg|26px]][[Image:Chess lal45.svg|26px]] la = 左
* [[Image:Chess lrd45.svg|26px]][[Image:Chess lrl45.svg|26px]] lr = 左右
* [[Image:Chess udd45.svg|26px]][[Image:Chess udl45.svg|26px]] ud = 上下
* [[Image:Chess rad45.svg|26px]][[Image:Chess ral45.svg|26px]] ra = 右
* [[Image:Chess dld45.svg|26px]][[Image:Chess dll45.svg|26px]] dl = 左下
* [[Image:Chess dad45.svg|26px]][[Image:Chess dal45.svg|26px]] da = 下
* [[Image:Chess drd45.svg|26px]][[Image:Chess drl45.svg|26px]] dr = 右下

數字也可以放入方格——「x0」代表0、「x1」代表1、「x2」代表2、⋯、「x9」代表9。

* [[Image:Chess x0d45.svg|26px]][[Image:Chess x0l45.svg|26px]] x0
* [[Image:Chess x1d45.svg|26px]][[Image:Chess x1l45.svg|26px]] x1
* [[Image:Chess x2d45.svg|26px]][[Image:Chess x2l45.svg|26px]] x2
* [[Image:Chess x3d45.svg|26px]][[Image:Chess x3l45.svg|26px]] x3
* [[Image:Chess x4d45.svg|26px]][[Image:Chess x4l45.svg|26px]] x4
* [[Image:Chess x5d45.svg|26px]][[Image:Chess x5l45.svg|26px]] x5
* [[Image:Chess x6d45.svg|26px]][[Image:Chess x6l45.svg|26px]] x6
* [[Image:Chess x7d45.svg|26px]][[Image:Chess x7l45.svg|26px]] x7
* [[Image:Chess x8d45.svg|26px]][[Image:Chess x8l45.svg|26px]] x8
* [[Image:Chess x9d45.svg|26px]][[Image:Chess x9l45.svg|26px]] x9

=== 範例 ===

==== 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.

{{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
}}

<pre style="margin-right:280px;">
{{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
}}
</pre>

{{Chess diagram
| tright
|

| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |

| 空板
}}

<pre style="margin-right:280px;">
{{Chess diagram
| tright
|

| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |

| 空板
}}
</pre>

==== 兩行脚注 ====

{{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.
}}

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 <code>&lt;br></code> to break the lines.

<pre style="overflow:auto">
{{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.
}}
</pre>

==== 無脚注 ====

{{Chess diagram
| tleft
|

| | | | | | | |
| | | | | | | |
| |xx|xo|xx| | | |
| | |pl| | | | |
| | | | | |xo| |
| | | | |xx|xo|xx|
| | | | | |pl| |
| | | | | | | |

}}

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.

<pre style="margin-left:280px;">
{{Chess diagram
| tleft
|

| | | | | | | |
| | | | | | | |
| |xx|xo|xx| | | |
| | |pl| | | | |
| | | | | |xo| |
| | | | |xx|xo|xx|
| | | | | |pl| |
| | | | | | | |

}}
</pre>

==== Movement example ====
This can be used to show how pieces move.
{{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.
}}
<pre style="margin-left:280px;">
{{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.
}}
</pre>
{{clear}}
{{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| | | |

}}
<pre style="margin-right:280px;">
{{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| | | |

}}
</pre>
In the board on the right, it is shown that the white queen can go any distance in any of these directions.
{{clear}}
Another method for the rook example:
{{Chess diagram
| tleft
|

| | | | | | | |
| | |ud| | | | |
| |lr|rd|lr| | | |
| | |ud| | | | |
| | | | |ul|ua|ur|
| | | | |la|kl|ra|
| | | | |dl|da|dr|
| | | | | | | |

}}
<pre style="margin-left:280px;">
{{Chess diagram
| tleft
|

| | | | | | | |
| | |ud| | | | |
| |lr|rd|lr| | | |
| | |ud| | | | |
| | | | |ul|ua|ur|
| | | | |la|kl|ra|
| | | | |dl|da|dr|
| | | | | | | |

}}
</pre>
{{clear}}

==== 小图 ====

This one may be useful in articles with many diagrams. It uses another template named {{tl|Chess diagram small}}.

The small diagrams can have header, too.

{{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
}}

<pre style="margin-right:280px">
{{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
}}
</pre>

==== 不同板子尺寸 ====

Chess boards of non-standard dimensions need special templates. There are templates for
the following boards:


{|
{|
|+ [[Minichess]] (5×5) – [[Template:Chess diagram 5x5]]
| 棋種
| colspan=2 | 黑
| colspan=2 | 白
|-
|-
| <pre>
| [[王 (國際象棋)|王]]
{{Chess diagram 5x5
| kd
| tright
| [[File:chess_kdl45.svg|26px]]
| kl
|

| [[File:chess_kll45.svg|26px]]
|kd|qd|bd|nd|rd
|pd|pd|pd|pd|pd
| | | | |
|pl|pl|pl|pl|pl
|kl|ql|bl|nl|rl

| Gardner minichess
}}
</pre>
|
{{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
}}
|}

<!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{|
|+ [[Los Alamos chess]] (6×6) – [[Template:Chess diagram 6x6]]
|-
|-
| <pre>
| [[后 (國際象棋)|-{后}-]]
{{Chess diagram 6x6
| qd
| tright
| [[File:chess_qdl45.svg|26px]]
| ql
|

| [[File:chess_qll45.svg|26px]]
|rd|nd|qd|kd|nd|rd
|pd|pd|pd|pd|pd|pd
| | | | | |
| | | | | |
|pl|pl|pl|pl|pl|pl
|rl|nl|ql|kl|nl|rl

| Los Alamos chess
}}
</pre>
|
{{Chess diagram 6x6
| tright
|

|rd|nd|qd|kd|nd|rd
|pd|pd|pd|pd|pd|pd
| | | | | |
| | | | | |
|pl|pl|pl|pl|pl|pl
|rl|nl|ql|kl|nl|rl

| Los Alamos chess
}}
|}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

{|
|+ [[Capablanca Chess]] (8×10)
|-
|-
| <pre>
| [[車 (國際象棋)|車]](城堡)
{{Chess diagram 8x10
| rd
| tright
| [[File:chess_rdl45.svg|26px]]
| rl
|

| [[File:chess_rll45.svg|26px]]
|rd|nd|ad|bd|qd|kd|bd|cd|nd|rd
|-
|pd|pd|pd|pd|pd|pd|pd|pd|pd|pd
| [[象 (國際象棋)|象]](主教)
| | | | | | | | | |
| bd
| | | | | | | | | |
| [[File:chess_bdl45.svg|26px]]
| | | | | | | | | |
| bl
| | | | | | | | | |
| [[File:chess_bll45.svg|26px]]
|pl|pl|pl|pl|pl|pl|pl|pl|pl|pl
|-
|rl|nl|al|bl|ql|kl|bl|cl|nl|rl
| [[馬 (國際象棋)|馬]](騎士)

| nd
| Capablanca Chess
| [[File:chess_ndl45.svg|26px]]
}}
| nl
</pre>
| [[File:chess_nll45.svg|26px]]
|-
|
{{Chess diagram 8x10
| [[兵 (國際象棋)|兵]]
| pd
| tright
|
| [[File:chess_pdl45.svg|26px]]

| pl
|rd|nd|ad|bd|qd|kd|bd|cd|nd|rd
| [[File:chess_pll45.svg|26px]]
|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
}}
|}
|}

{|
{|
|+ [[Grand Chess]]
| 其他
|-
| xo
| [[File:chess_xol45.svg|26px]]
| oo
| [[File:chess_ool45.svg|26px]]
| xx
| [[File:chess_xxl45.svg|26px]]
| (空)
| [[File:chess_l45.svg|26px]]
|-
|-
| x1
| <pre>
{{Chess diagram 10x10
| [[File:chess_x1l45.svg|26px]]
| x2
| tright
|
| [[File:chess_x2l45.svg|26px]]

| x3
|rd| | | | | | | | |rd
| [[File:chess_x3l45.svg|26px]]
| |nd|bd|qd|kd|cd|ad|bd|nd|
| x4
|pd|pd|pd|pd|pd|pd|pd|pd|pd|pd
| [[File:chess_x4l45.svg|26px]]
| | | | | | | | | |
| x5
| | | | | | | | | |
| [[File:chess_x5l45.svg|26px]]
| | | | | | | | | |
| x6
| | | | | | | | | |
| [[File:chess_x6l45.svg|26px]]
|pl|pl|pl|pl|pl|pl|pl|pl|pl|pl
| x7
| |nl|bl|ql|kl|cl|al|bl|nl|
| [[File:chess_x7l45.svg|26px]]
|rl| | | | | | | | |rl
| x8

| [[File:chess_x8l45.svg|26px]]
| Grand Chess
| x9
}}
| [[File:chess_x9l45.svg|26px]]
</pre>
| {{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
}}
|}
|}


<!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
第六十七個變數則是說明文字。
==== 兩個板子 ====


{|
== 範例 ==
|+ [[Bughouse chess]] (four players)
|- style="vertical-align: top;"
| <pre style="margin-right:1em">
{{bughouse chess diagram
| A1=Team 1, Board A
| A2=Team 2, Board A
| B1=Team 1, Board B
| B2=Team 2, Board B
| tright
|


|rd|nd|bd|qd|kd|bd|nd|rd
<pre>{{Chess diagram
|pd|pd|pd|pd|pd|pd|pd|pd
| tleft
| | | | | | | |
| 標題
| | | | | | | |
|=
8 |rd|nd|bd|qd|kd|bd|nd|rd|=
| | | | | | | |
7 |pd|pd|pd|pd|pd|pd|pd|pd|=
| | | | | | | |
6 | | | | | | | | |=
|pl|pl|pl|pl|pl|pl|pl|pl
5 | | | | | | | | |=
|rl|nl|bl|ql|kl|bl|nl|rl
4 | | | | | | | | |=
3 | | | | | | | | |=
2 |pl|pl|pl|pl|pl|pl|pl|pl|=
1 |rl|nl|bl|ql|kl|bl|nl|rl|=
a b c d e f g h


|rl|nl|bl|kl|ql|bl|nl|rl
| 說明。
|pl|pl|pl|pl|pl|pl|pl|pl
}}</pre>
| | | | | | | |
{{Chess diagram
| | | | | | | |
| tleft
| | | | | | | |
| 標題
| | | | | | | |
|=
8 |rd|nd|bd|qd|kd|bd|nd|rd|=
|pd|pd|pd|pd|pd|pd|pd|pd
7 |pd|pd|pd|pd|pd|pd|pd|pd|=
|rd|nd|bd|kd|qd|bd|nd|rd
6 | | | | | | | | |=
5 | | | | | | | | |=
4 | | | | | | | | |=
3 | | | | | | | | |=
2 |pl|pl|pl|pl|pl|pl|pl|pl|=
1 |rl|nl|bl|ql|kl|bl|nl|rl|=
a b c d e f g h


| '''Bughouse''' setup and starting position
| 說明。
}}
}}
</pre>
{{clear}}
|
== 注意事项 ==
{{bughouse chess diagram
| A1=Team 1, Board A
| A2=Team 2, Board A
| B1=Team 1, Board B
| B2=Team 2, Board B
|
|


|rd|nd|bd|qd|kd|bd|nd|rd
== 參見 ==
|pd|pd|pd|pd|pd|pd|pd|pd
*[[模板:Xiangqi diagram]]
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
|pl|pl|pl|pl|pl|pl|pl|pl
|rl|nl|bl|ql|kl|bl|nl|rl


|rl|nl|bl|kl|ql|bl|nl|rl
<IncludeOnly>
|pl|pl|pl|pl|pl|pl|pl|pl
<!-- 本行下加入模板的分類 -->
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
|pd|pd|pd|pd|pd|pd|pd|pd
|rd|nd|bd|kd|qd|bd|nd|rd

| '''Bughouse''' setup and starting position}}
|}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

==== [[Alice Chess]] ====

{|
|+ [[Alice Chess]] (two players)
|- style="vertical-align: top;"
| <pre style="margin-right:1em; padding-right:0">
{{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'''
}}

</pre>
|
{{alice chess diagram
|
|

|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 ====
<!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{|
|+ [[Three-dimensional chess]] (Raumschach) – [[Template:Raumschach diagram]]
|- style="vertical-align: top;"
| <pre>
{{Raumschach diagram
| tright
|

|rd|nd|kd|nd|rd
|pd|pd|pd|pd|pd
| | | | |
| | | | |
| | | | |

|Nd|bd|qd|Nd|bd
|pd|pd|pd|pd|pd
| | | | |
| | | | |
| | | | |

| | | | |
| | | | |
| | | | |
| | | | |
| | | | |

| | | | |
| | | | |
| | | | |
|pl|pl|pl|pl|pl
|bl|Nl|ql|bl|Nl

| | | | |
| | | | |
| | | | |
|pl|pl|pl|pl|pl
|rl|nl|kl|nl|rl

| '''Raumschach''' starting position
}}
</pre>
|
{{Raumschach diagram
| tright
|

|rd|nd|kd|nd|rd
|pd|pd|pd|pd|pd
| | | | |
| | | | |
| | | | |

|Nd|bd|qd|Nd|bd
|pd|pd|pd|pd|pd
| | | | |
| | | | |
| | | | |

| | | | |
| | | | |
| | | | |
| | | | |
| | | | |

| | | | |
| | | | |
| | | | |
|pl|pl|pl|pl|pl
|bl|Nl|ql|bl|Nl

| | | | |
| | | | |
| | | | |
|pl|pl|pl|pl|pl
|rl|nl|kl|nl|rl

| '''Raumschach''' starting position
}}
|}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

{|
|+ [[Omega Chess]] – [[Template:Omega Chess diagram]]
|-
| <syntaxhighlight lang="moin" style="padding-right:1ex; margin-right:1em">
{{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
}}
</syntaxhighlight>
| {{Omega Chess diagram
|
| [[Omega Chess]] (10x10 + 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
}}
|}

==Alternative way to place the pieces: FEN==
<pre>
{{Chess diagram|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR|align=tleft}}
</pre>
{{Chess diagram|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR|align=tleft}}
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":
{{-}}
<pre>
{{Chess diagram|fen=rnbqkbnr/acfghzwt/8/8/8/8/ACFGHZWT/RNBQKBNR|align=tleft}}
</pre>
{{Chess diagram|fen=rnbqkbnr/acfghzwt/8/8/8/8/ACFGHZWT/RNBQKBNR|align=tleft}}
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 ==
<pre>
{{Chess diagram|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR|align=tleft|reverse=true}}
</pre>
{{Chess diagram|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR|align=tleft|reverse=true}}
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.
{{-}}

== 參見 ==
* {{tl|Xiangqi diagram}}


<includeonly>{{Sandbox other||
<!-- 本行下加入模板的跨語言鏈接 -->
[[Category:体育模板|{{PAGENAME}}]]
[[Category:國際象棋模板|{{PAGENAME}}]]
[[Category:國際象棋模板|{{PAGENAME}}]]
}}</includeonly>
[[ar:قالب:مخطط رقعة شطرنج]]
[[bg:Шаблон:Шахматна позиция]]
[[de:Vorlage:Schachbrett]]
[[en:Template:Chess diagram]]
[[eo:Ŝablono:Ŝakdiagramo]]
[[es:Plantilla:Diagrama de ajedrez]]
[[fi:Malline:Shakkilauta]]
[[fr:Modèle:Diagramme d'échecs]]
[[gl:Modelo:Taboleiro de xadrez]]
[[hu:Sablon:Sakkállás]]
[[it:Template:Diagramma scacchi]]
[[ja:Template:Chess diagram]]
[[la:Formula:Scaccarium]]
[[lt:Šablonas:ŠachmatųLenta]]
[[lv:Veidne:Šaha diagramma]]
[[mk:Шаблон:Шаховски дијаграм]]
[[pl:Szablon:SzachyDiagram]]
[[pt:Predefinição:Diagrama de xadrez]]
[[ru:Шаблон:Шахматная диаграмма]]
[[sl:Predloga:Chess diagram]]
[[ta:வார்ப்புரு:Chess diagram]]
[[tl:Suleras:Chess diagram]]
[[tt:Үрнәк:Шахмат диаграммасы]]
[[uk:Шаблон:Шахова діаграма]]
[[vi:Bản mẫu:Chess diagram]]
</IncludeOnly>

2023年1月13日 (五) 10:22的最新版本

使用方法

[编辑]

這裏有幾個國際象棋圖表的模板:

這裏也有為國際象棋變體而設的模版:

以上模板所使用的文法,基本上是相同的。

{{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 - 用像素指明每個方格的大小,預設為26
  • numbers - 指明代表行的數字在哪裏顯示。可以填入:leftrightboth(預設)或neither
  • letters - 指明代表列的字母在哪裏顯示。可以填入:topbottomboth(預設)或neither
  • <a8>, <b8>, ... <h1> – 指明對應方格顯示什麼棋子。下面有詳細說明。
  • <脚注> – 這是會出現在棋盤下方的文字(可以留空)

一個方格是由棋子的名稱或空白的參數定義。棋子是由代數記譜法命名:

這裏也有一些仙靈棋子可以使用:

這些字母與「l」(代表白棋)和「d」(代表黑棋)組合來使用。所以「kl」是白王,而「nd」則是黑馬。

一個空的方格可以用下劃線、空格或者什麼都不打來表達。建議使用兩個空格。

  • <空格> = 空的方格

你也可以用「xx」代表黑色交叉、「ox」代表白色交叉、「xo」代表黑色圓圈或者「oo」代表白色圓圈。

  • xx = 黑叉
  • ox = 白叉
  • xo = 黑圈
  • oo = 白圈

當你想表示棋子的移動方向,就可以用箭頭:

  • ul = 左上
  • ua = 上
  • ur = 右上
  • la = 左
  • lr = 左右
  • ud = 上下
  • ra = 右
  • dl = 左下
  • da = 下
  • dr = 右下

數字也可以放入方格——「x0」代表0、「x1」代表1、「x2」代表2、⋯、「x9」代表9。

  • x0
  • x1
  • x2
  • x3
  • x4
  • x5
  • x6
  • x7
  • x8
  • x9

範例

[编辑]

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.

abcdefgh
8
a8 black rook
b8 black knight
c8 black bishop
d8 black queen
e8 black king
f8 black bishop
g8 black knight
h8 black rook
a7 black pawn
b7 black pawn
c7 black pawn
d7 black pawn
f7 black pawn
g7 black pawn
h7 black pawn
e5 black pawn
e4 white pawn
f4 white pawn
a2 white pawn
b2 white pawn
c2 white pawn
d2 white pawn
g2 white pawn
h2 white pawn
a1 white rook
b1 white knight
c1 white bishop
d1 white queen
e1 white king
f1 white bishop
g1 white knight
h1 white rook
8
77
66
55
44
33
22
11
abcdefgh
The King's Gambit
{{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
}}
abcdefgh
8
8
77
66
55
44
33
22
11
abcdefgh
空板
{{Chess diagram
| tright
| 

|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  

| 空板
}}

兩行脚注

[编辑]
W. Langstaff, Chess Amateur 1922
abcdefgh
8
e8 black king
h8 black rook
f6 white bishop
h6 white pawn
d5 white rook
f5 white king
g5 black pawn
h5 white pawn
8
77
66
55
44
33
22
11
abcdefgh
Mate in two.
This problem uses partial retrograde analysis method.

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.
}}

無脚注

[编辑]
abcdefgh
8
b6 black cross
c6 black circle
d6 black cross
c5 white pawn
f4 black circle
e3 black cross
f3 black circle
g3 black cross
f2 white pawn
8
77
66
55
44
33
22
11
abcdefgh

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.

abcdefgh
8
c8 up arrow
c7 up arrow
a6 left arrow
b6 left arrow
c6 black rook
d6 right arrow
e6 right arrow
f6 right arrow
g6 right arrow
h6 right arrow
c5 down arrow
c4 down arrow
e4 up-left arrow
f4 up arrow
g4 up-right arrow
c3 down arrow
e3 left arrow
f3 white king
g3 right arrow
c2 down arrow
e2 down-left arrow
f2 down arrow
g2 down-right arrow
c1 down arrow
8
77
66
55
44
33
22
11
abcdefgh
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.

{{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.
}}
abcdefgh
8
b8 up-left arrow
d8 up arrow
f8 up-right arrow
c7 up-left arrow
d7 up arrow
e7 up-right arrow
a6 left arrow
b6 left arrow
c6 left arrow
d6 white queen
e6 right arrow
f6 right arrow
g6 right arrow
h6 right arrow
c5 down-left arrow
d5 down arrow
e5 down-right arrow
b4 down-left arrow
d4 down arrow
f4 down-right arrow
a3 down-left arrow
d3 down arrow
g3 down-right arrow
d2 down arrow
h2 down-right arrow
d1 down arrow
8
77
66
55
44
33
22
11
abcdefgh
{{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:

abcdefgh
8
c7 up-down arrow
b6 left-right arrow
c6 black rook
d6 left-right arrow
c5 up-down arrow
e4 up-left arrow
f4 up arrow
g4 up-right arrow
e3 left arrow
f3 white king
g3 right arrow
e2 down-left arrow
f2 down arrow
g2 down-right arrow
8
77
66
55
44
33
22
11
abcdefgh
{{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.

abcdefgh
8
a8 black rook
d8 black queen
f8 black rook
g8 black king
a7 black pawn
b7 black pawn
e7 black pawn
f7 black pawn
g7 black bishop
h7 black pawn
b6 black knight
c6 black pawn
f6 black knight
g6 black pawn
c5 white queen
g5 white bishop
d4 white pawn
e4 white pawn
g4 black bishop
c3 white knight
f3 white knight
a2 white pawn
b2 white pawn
f2 white pawn
g2 white pawn
h2 white pawn
d1 white rook
e1 white king
f1 white bishop
h1 white rook
8
77
66
55
44
33
22
11
abcdefgh
Position after 11.Bg5
{{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:

Minichess (5×5) – Template:Chess diagram 5x5
{{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
}}
a5 black kingb5 black queenc5 black bishopd5 black knighte5 black rook
a4 black pawnb4 black pawnc4 black pawnd4 black pawne4 black pawn
a3b3c3d3e3
a2 white pawnb2 white pawnc2 white pawnd2 white pawne2 white pawn
a1 white kingb1 white queenc1 white bishopd1 white knighte1 white rook
Gardner minichess


Capablanca Chess (8×10)
{{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
}}
abcdefghij
8a8 black rookb8 black knightc8 black princessd8 black bishope8 black queenf8 black kingg8 black bishoph8 black empressi8 black knightj8 black rook8
7a7 black pawnb7 black pawnc7 black pawnd7 black pawne7 black pawnf7 black pawng7 black pawnh7 black pawni7 black pawnj7 black pawn7
6a6b6c6d6e6f6g6h6i6j66
5a5b5c5d5e5f5g5h5i5j55
4a4b4c4d4e4f4g4h4i4j44
3a3b3c3d3e3f3g3h3i3j33
2a2 white pawnb2 white pawnc2 white pawnd2 white pawne2 white pawnf2 white pawng2 white pawnh2 white pawni2 white pawnj2 white pawn2
1a1 white rookb1 white knightc1 white princessd1 white bishope1 white queenf1 white kingg1 white bishoph1 white empressi1 white knightj1 white rook1
abcdefghij
Capablanca Chess
Grand 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
}}
abcdefghij
10a10 black rookb10c10d10e10f10g10h10i10j10 black rook10
9a9b9 black knightc9 black bishopd9 black queene9 black kingf9 black empressg9 black princessh9 black bishopi9 black knightj99
8a8 black pawnb8 black pawnc8 black pawnd8 black pawne8 black pawnf8 black pawng8 black pawnh8 black pawni8 black pawnj8 black pawn8
7a7b7c7d7e7f7g7h7i7j77
6a6b6c6d6e6f6g6h6i6j66
5a5b5c5d5e5f5g5h5i5j55
4a4b4c4d4e4f4g4h4i4j44
3a3 white pawnb3 white pawnc3 white pawnd3 white pawne3 white pawnf3 white pawng3 white pawnh3 white pawni3 white pawnj3 white pawn3
2a2b2 white knightc2 white bishopd2 white queene2 white kingf2 white empressg2 white princessh2 white bishopi2 white knightj22
1a1 white rookb1c1d1e1f1g1h1i1j1 white rook1
abcdefghij
Grand Chess


Alice Chess (two players)
{{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'''
}}


a8 b8 c8 d8 e8 f8 g8 h8
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
A
a8 b8 c8 d8 e8 f8 g8 h8
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
B
Position after 1. Nf3 e6 2. Ne5 Bc5

Different shaped board

[编辑]
Omega ChessTemplate:Omega Chess diagram
{{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)
w4 wd <W4
   A

 B

 C

 D

 E

 F

 G

 H

 I
W3>
   J
w3 wd
9 a9 zd b9 rd c9 nd d9 bd e9 qd f9 kd g9 bd h9 nd i9 rd j9 zd 9
8 a8 pd b8 pd c8 pd d8 pd e8 pd f8 pd g8 pd h8 pd i8 pd j8 pd 8
7 a7 b7 c7 d7 e7 f7 g7 h7 i7 j7 7
6 a6 b6 c6 d6 e6 f6 g6 h6 i6 j6 6
5 a5 b5 c5 d5 e5 f5 g5 h5 i5 j5 5
4 a4 b4 c4 d4 e4 f4 g4 h4 i4 j4 4
3 a3 b3 c3 d3 e3 f3 g3 h3 i3 j3 3
2 a2 b2 c2 d2 e2 f2 g2 h2 i2 j2 2
1 a1 pl b1 pl c1 pl d1 pl e1 pl f1 pl g1 pl h1 pl i1 pl j1 pl 1
0 a0 zl b0 rl c0 nl d0 bl e0 ql f0 kl g0 bl h0 nl i0 rl j0 zl 0
w1 wl    A
<W1
 B
 C
 D
 E
 F
 G
 H
 I
   J
W2>
w2 wl
Omega Chess starting position

Alternative way to place the pieces: FEN

[编辑]
{{Chess diagram|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR|align=tleft}}
abcdefgh
8
a8 black rook
b8 black knight
c8 black bishop
d8 black queen
e8 black king
f8 black bishop
g8 black knight
h8 black rook
a7 black pawn
b7 black pawn
c7 black pawn
d7 black pawn
e7 black pawn
f7 black pawn
g7 black pawn
h7 black pawn
a2 white pawn
b2 white pawn
c2 white pawn
d2 white pawn
e2 white pawn
f2 white pawn
g2 white pawn
h2 white pawn
a1 white rook
b1 white knight
c1 white bishop
d1 white queen
e1 white king
f1 white bishop
g1 white knight
h1 white rook
8
77
66
55
44
33
22
11
abcdefgh

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}}
abcdefgh
8
a8 black rook
b8 black knight
c8 black bishop
d8 black queen
e8 black king
f8 black bishop
g8 black knight
h8 black rook
a7 black archbishop
b7 black chancellor
c7 black upside-down king
d7 black upside-down queen
e7 black upside-down pawn
f7 black champion
g7 black wizard
h7 black fool
a2 white archbishop
b2 white chancellor
c2 white upside-down king
d2 white upside-down queen
e2 white upside-down pawn
f2 white champion
g2 white wizard
h2 white fool
a1 white rook
b1 white knight
c1 white bishop
d1 white queen
e1 white king
f1 white bishop
g1 white knight
h1 white rook
8
77
66
55
44
33
22
11
abcdefgh

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}}
hgfedcba
1
h1 white rook
g1 white knight
f1 white bishop
e1 white king
d1 white queen
c1 white bishop
b1 white knight
a1 white rook
h2 white pawn
g2 white pawn
f2 white pawn
e2 white pawn
d2 white pawn
c2 white pawn
b2 white pawn
a2 white pawn
h7 black pawn
g7 black pawn
f7 black pawn
e7 black pawn
d7 black pawn
c7 black pawn
b7 black pawn
a7 black pawn
h8 black rook
g8 black knight
f8 black bishop
e8 black king
d8 black queen
c8 black bishop
b8 black knight
a8 black rook
1
22
33
44
55
66
77
88
hgfedcba

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.

參見

[编辑]