1 #% Do not delete the line below; configure depends on this
2 # \DeclareLaTeXClass[article,lyxskak.sty]{article (Chess)}
3 # chess article textclass definition file.
5 # This layout file was designed to allow easy access to all
6 # the cool features of the skak package for chess notation.
8 # Author : Kayvan A. Sylvan <kayvan@sylvan.com>
10 # Copyright (C) 2001 - The LyX team.
12 # Remaining minor problem:
14 # Sometimes there is too much space under a \showboard, especially
15 # if you use some of the ornamentation commands (\printknightmove,
16 # \highlight or \printarrow). For now, a workaround for the problem
17 # is to insert (using ERT) a \vspace* command (for example,
22 \usepackage[ps,mover]{lyxskak}
24 %%% Modified routines from skak.sty
26 \def\lyxprintarrow#1{\lyxprintarrow@#1@}
27 \def\lyxprintarrow@#1->#2@{\ncline[style=psskak]{-|>}{#1}{#2}}
29 \def\lyxknightmove#1{\lyxknightmove@#1@}
30 \def\lyxknightmove@#1->#2@{%
31 \setcounter{ps@knightangle}{\get@fileangle{\First#1}{\First#2}+%
32 \get@rankangle{\Second#1}{\Second#2} + \value{ps@inverse}}%
33 \ncdiagg[style=psskak,angleA=\arabic{ps@knightangle}]{-|>}{#1}{#2}}
35 %%% Variation indent (You can set this in your preamble)
37 \newlength{\lyxvarindent}
38 \setlength{\lyxvarindent}{0.2in}
40 %%% \Var[ moves ] - use in the Variation paragraph styles.
42 \def\Var[#1]{\variation{#1}}
51 # To be filled in later. This makes Standard first on the list of layouts.
54 # This is the main line of the chess game. Use PGN notation here.
55 # Also, this layout can be continued with Control-Enter without
56 # starting a new paragraph.
64 LabelString "Mainline: "
80 # This is a variation. It shows up in the normal fashion (styleB).
81 # You are free to redefine it by making a new \variationstyle
82 # as talked about in the skak documentation.
87 LatexName hspace*\lyxvarindent\variation
88 LabelString "Variation: "
92 # Same as mainline, but it does not print the moves (only updates the
98 LabelString "HideMoves: "
101 # This simply prints a block left chessboard.
107 LabelString "[chessboard]"
114 # This prints a centered chessboard.
119 LatexName [\showboard\]
120 LeftMargin MMMMMMMMMMMMM
121 LabelString "[centered board]"
128 # This should be a list of comma-separated chessboard squares.
129 # Should be placed after a ChessBoard or BoardCentered.
136 LabelString "Highlights: "
148 # This should be a list of two squares with an ascii arrow (a1->c3)
149 # Should be placed after a ChessBoard or BoardCentered.
154 LatexName lyxprintarrow
156 LabelString "Arrow: "
159 # This should be a list of two chessboard squares (again, like g1->e2)
160 # Should be placed after a ChessBoard or BoardCentered.
165 LatexName lyxknightmove
167 LabelString "KnightMove: "