Difference between revisions of "Template:Chess diagram"

From Chess Variant Wiki
Jump to: navigation, search
(version 1.15 clear layout from pointlessly nested tables AND divs)
(attempt to fix problem with leading space in title parameter leading to preformat monospace treatment of title)
Line 4: Line 4:
 
1.03 2005-09-24 adding square names in hover hints
 
1.03 2005-09-24 adding square names in hover hints
  
--><div class="{{{1}}}" style="clear: right; width: 268px; padding-top: 6px; padding-bottom: 10px; text-align:center">
+
--><div class="{{{1}}}" style="clear: right; width: 268px; padding-top: 6px; padding-bottom: 10px; text-align:center">{{{2}}}
{{{2}}}
+
 
<div style="border:1px solid #b0b0b0; background:#f9f9f9; padding-top:6px">
 
<div style="border:1px solid #b0b0b0; background:#f9f9f9; padding-top:6px">
  

Revision as of 06:47, 25 January 2008

{{Chess diagram|=
| <alignment>
| <header>
| <a8> | <b8> | ... | <h8>
| <a7> | <b7> | ... | <h7>
...
| <a1> | <b1> | ... | <h1>
| <footer>
}}

Parameters:

  • <alignment> - defines horizontal alignment of the whole image, must be "tright" or "tleft";
  • <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.

A square is defined by the name of piece or empty parameter. The names of the pieces are those given in algebraic notation:

There are also some fairy chess pieces available:

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.

An empty square is written either using underscores, spaces, or nothing at all. Two spaces are recommended.

You can also use "xx" for a cross, "xo" for a black circle on an empty square or "oo" for a white one.

Numbers can also be added to squares by using "x1" for 1, "x2" for 2, ..., "x9" for 9. There is no 0.

bg:Шаблон:Шахматна позиция de:Vorlage:Schachbrett es:Plantilla:Diagrama de ajedrez eo:Ŝablono:Ŝakdiagramo fr:Modèle:Diagramme d'échecs it:Template:Diagramma scacchi la:Formula:Scaccarium lt:Šablonas:ŠachmatųLenta hu:Sablon:Sakkállás mk:Шаблон:Шаховски дијаграм ja:Template:Chess diagram pl:Szablon:SzachyDiagram pt:Predefinição:Diagrama de xadrez ru:Шаблон:Шахматная диаграмма sl:Predloga:Chess diagram fi:Malline:Shakkilauta vi:Tiêu bản:Chess diagram