summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-31 00:32:32 +0000
committerKarl Berry <karl@freefriends.org>2008-07-31 00:32:32 +0000
commit0afeedcaa724ef694a1e475f019ddb0472184acc (patch)
tree576832b85fe8e5ee24627f04d2dda34cabe7f115 /Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
parentbe371ff8aedc081ba88a978a51bfd97311b3872d (diff)
xskak update (30jul08)
git-svn-id: svn://tug.org/texlive/trunk@9917 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xskak/xskak-keys.sty')
-rw-r--r--Master/texmf-dist/tex/latex/xskak/xskak-keys.sty765
1 files changed, 2 insertions, 763 deletions
diff --git a/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty b/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
index aee7a402343..bb29aa17c2b 100644
--- a/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
+++ b/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
@@ -4,10 +4,10 @@
%%
%% The original source files were:
%%
-%% xskak-src.dtx (with options: `keys')
+%% xskak-src.dtx (with options: `xskak-keys')
%%
%% xskak: an extension to the package skak for chess typesetting
-%% Copyright 2007 UlrikeFischer (skak@nililand.de)
+%% Copyright 2007 Ulrike Fischer (skak@nililand.de)
%% -------------------------------------------
%%
%% This file can be redistributed and/or modified under the terms of
@@ -16,767 +16,6 @@
%% License, or (at your option) any later version.
%%
%% For error reports see documentation.
-\ProvidesFile{xskak-keys.sty}[2007/12/20 key definitions for xskak.sty v1]
-
-
-%%%%%%%%%%%%%%%%%%%%%
-%%%% Keys
-%%%%%%%%%%%%%%%%%%%%%
-%% \newchessgame: fam: new
-\define@key[UFXS]{new}{id}[\xskak@val@defaultid]{\xdef\xskak@val@gameid{#1}}
-
-\define@key[UFXS]{new}{movenr}{\xdef\xskak@val@movenr{#1}}
-
-\define@key[UFXS]{new}{player}{\xdef\xskak@val@player{#1}}
-
-\define@key[UFXS]{new}{moveid}[\xskak@val@defaultmovenr\xskak@val@defaultplayer]{%
- \edef\@tempa{#1}%
- \xskak@split@moveid{\@tempa}%
- \global\let\xskak@val@movenr\xskak@temp@movenr
- \global\let\xskak@val@player\xskak@temp@player}
-
-\define@key[UFXS]{new}{newvar}[\xskak@val@gameid]{%
- \xdef\xskak@val@refgameid{#1}%
- \xdef\xskak@val@movenr{\csname Xskak#1lastmovenr\endcsname}%
- \xdef\xskak@val@player{\csname Xskak#1lastplayer\endcsname}}%
-
-
-
-\define@key[UFXS]{new}{reftag}{%
- \xdef\xskak@val@currenttag{#1}}
-
-\define@key[UFXS]{new}{refid}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFXS@new@id{\csname xskak@tag@#1@refid\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFXS]{new}{refpastmovenr}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFXS@new@movenr{\csname xskak@tag@#1@refpastmovenr\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFXS]{new}{refnextmovenr}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFXS@new@movenr{\csname xskak@tag@#1@refnextmovenr\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFXS]{new}{refpastplayer}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFXS@new@movenr{\csname xskak@tag@#1@refpastmovenr\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFXS]{new}{refnextplayer}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFXS@new@player{\csname xskak@tag@#1@refnextplayer\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFXS]{new}{refpastmoveid}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFXS@new@moveid{%
- \csname xskak@tag@#1@refpastmovenr\endcsname
- \csname xskak@tag@#1@refpastplayer\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFXS]{new}{refnextmoveid}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi
- \UFXS@new@moveid{%
- \csname xskak@tag@#1@refnextmovenr\endcsname
- \csname xskak@tag@#1@refnextplayer\endcsname}}
-
-\define@key[UFXS]{new}{refpast}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi
- \UFXS@new@refpastmoveid{#1}%
- \UFXS@new@refid{#1}}
-
-\define@key[UFXS]{new}{refnext}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFXS@new@refnextmoveid{#1}%
- \UFXS@new@refid{#1}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-%% \xskakset: fam set
-\define@key[UFXS]{set}{id}[\xskak@val@defaultid]{\UFXS@new@id{#1}}
-
-\define@key[UFXS]{set}{movenr}{\UFXS@new@moveid{#1}}
-
-\define@key[UFXS]{set}{player}{\UFXS@new@player{#1}}
-
-\define@key[UFXS]{set}{moveid}[\xskak@val@defaultmovenr\xskak@val@defaultplayer]{%
- \UFXS@new@moveid{#1}}%
-
-\define@key[UFXS]{set}{stepmoveid}[1]{%
- \count@=#1\relax
- \ifthenelse{\the\count@>0}
- {\whiledo{\the\count@>0}%
- {\xskak@do@getnextmoveid{\xskak@val@movenr}{\xskak@val@player}%
- \advance\count@ by -1%
- \global\let\xskak@val@movenr\xskak@temp@movenr
- \global\let\xskak@val@player\xskak@temp@player}%
- }%
- {\ifthenelse{\the\count@=0}%
- {}%
- {\whiledo{\the\count@<0}%
- {\xskak@do@getpreviousmoveid{\xskak@val@movenr}{\xskak@val@player}%
- \advance\count@ by 1%
- \global\let\xskak@val@movenr\xskak@temp@movenr
- \global\let\xskak@val@player\xskak@temp@player}%
- \ifthenelse{\the\count@<1}%
- {\PackageWarning{xskak}{Move number below 1!}{}}%
- {}}}}
-
-\define@key[UFXS]{set}{lastmoveid}[\xskak@val@gameid]{%
- \ifcsname Xskak#1initfen\endcsname
- \xdef\xskak@val@gameid{#1}%
- \else\PackageError{xskak}{Game with the id #1 doesn't exist.}{}%
- \fi
- \xdef\xskak@val@movenr{\csname Xskak\xskak@val@gameid lastmovenr\endcsname}%
- \xdef\xskak@val@player{\csname Xskak\xskak@val@gameid lastplayer\endcsname}}%
-
-\define@key[UFXS]{set}{defaultmoveid}{%
- \edef\@tempa{#1}\xskak@split@moveid{\@tempa}%
- %\xdef\xskak@val@movedefaultid{#1}%
- \xdef\xskak@val@defaultmovenr{\xskak@temp@movenr}%
- \xdef\xskak@val@defaultplayer{\xskak@temp@player}}
-
-\define@key[UFXS]{set}{defaultmovenr}{%
- \xdef\xskak@val@defaultmovenr{#1}}
-
-\define@key[UFXS]{set}{defaultplayer}{%
- \xdef\xskak@val@defaultplayer{#1}}
-
-\define@key[UFXS]{set}{defaultid}{\gdef\xskak@val@defaultid{#1}}
-
-\define@key[UFXS]{set}{defaultfen}{\gdef\xskak@val@defaultfen{#1}}
-
-\define@key[UFXS]{set}{tag}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \PackageWarning{xskak}{Overwrite tag name #1}{}%
- \fi
- \expandafter\xdef
- \csname xskak@tag@#1@refid\endcsname{\xskak@val@gameid}%
- \ifnum\the\c@move=0
- \PackageWarning{xskak}{You haven't started a game yet. I won't set a tag!}{}%
- \else
- \expandafter\xdef
- \csname xskak@tag@#1@refnextmovenr\endcsname{\the\c@move}%
- \expandafter\xdef
- \csname xskak@tag@#1@refnextplayer\endcsname{\WhiteToMove{w}{b}}%
- \expandafter\xdef
- \csname xskak@tag@#1@refpastplayer\endcsname{\WhiteToMove{b}{w}}%
- \expandafter\xdef
- \csname xskak@tag@#1@refnextmoveid\endcsname{\the\c@move\WhiteToMove{w}{b}}%
- \WhiteToMove
- {\expandafter\xdef
- \csname xskak@tag@#1@refpastmovenr\endcsname{\the\numexpr\the\c@move-1\relax}}
- {\expandafter\xdef
- \csname xskak@tag@#1@refpastmovenr\endcsname{\the\c@move}}
- \expandafter\xdef
- \csname xskak@tag@#1@refpastmoveid\endcsname{%
- \csname xskak@tag@#1@refpastmovenr\endcsname
- \csname xskak@tag@#1@refpastplayer\endcsname}%
- \fi
- }
-
-\define@key[UFXS]{set}{reftag}{%
- \UFXS@new@reftag{#1}}
-
-
-\define@key[UFXS]{set}{refid}{%
- \UFXS@new@refid{#1}}
-
-\define@key[UFXS]{set}{refpastmovenr}{%
- \UFXS@new@refpastmovenr{#1}}
-
-\define@key[UFXS]{set}{refnextmovenr}{%
- \UFXS@new@refnextmovenr{#1}}
-
-\define@key[UFXS]{set}{refpastplayer}{%
- \UFXS@new@refpastplayer{#1}}
-
-\define@key[UFXS]{set}{refnextplayer}{%
- \UFXS@new@refnextplayer{#1}}
-
-\define@key[UFXS]{set}{refpastmoveid}{%
- \UFXS@new@refpastmoveid{#1}}
-
-\define@key[UFXS]{set}{refnextmoveid}{%
- \UFXS@new@refnextmoveid{#1}}
-
-\define@key[UFXS]{set}{refpast}{%
- \UFXS@new@refpast{#1}}
-
-\define@key[UFXS]{set}{refnext}{%
- \UFXS@new@refnext{#1}}
-
-\define@key[UFXS]{set}{style}{%
- \ifcsname xskak@style@#1@1@item\endcsname
- \def\xskak@val@stylename{#1}%
- \def\mainlinestyle{%
- \xskak@use@varstyle{\xskak@val@curlevel}%
- \xskak@do@splitlevel{\xskak@val@curlevel}%
- \ifnum\xskak@temp@levelnumber=0\relax
- \else
- \csname xskak@style@#1@\xskak@temp@levelnumber @xfont\endcsname
- \fi
- \csname xskak@style@#1@\xskak@val@curlevel @font\endcsname}
- \let\variationstyle\mainlinestyle
- \else
- \PackageError{xskak}{Style #1 doesn't exist!}{}
- \fi}
-
-\define@key[UFXS]{set}{gstyle}{%
- \ifcsname xskak@style@#1@1@item\endcsname
- \xdef\xskak@val@stylename{#1}%
- \gdef\mainlinestyle{%
- \xskak@use@varstyle{\xskak@val@curlevel}%
- \xskak@do@splitlevel{\xskak@val@curlevel}%
- \ifnum\xskak@temp@levelnumber=0\relax
- \else
- \csname xskak@style@#1@\xskak@temp@levelnumber @xfont\endcsname
- \fi
- \csname xskak@style@#1@\xskak@val@curlevel @font\endcsname}
- \global\let\variationstyle\mainlinestyle
- \else
- \PackageError{xskak}{Style #1 doesn't exist!}{}
- \fi}
-
-
-\define@key[UFXS]{set}{level}{%
- \edef\xskak@val@curlevel{#1}}%
-
-\define@key[UFXS]{set}{glevel}{%
- \xdef\xskak@val@curlevel{#1}}%
-
-\define@key[UFXS]{set}{invar}[]{%
- \ifxskakpdfmatch
- \xskak@do@splitlevel{\xskak@val@curlevel}%
- \ifnum\xskak@temp@levelnumber=0\relax
- \PackageWarning{xskak}{key invar ignored}{}%
- \else
- \edef\xskak@val@curlevel{%
- \xskak@temp@levelprefix
- \the\numexpr\xskak@temp@levelnumber+1\relax
- \xskak@temp@levelpostfix}%
- \fi
- \else
- %% no pdfmatch. Will give an error if the level is not a number
- \edef\xskak@val@curlevel{%
- \the\numexpr\xskak@val@curlevel+1\relax}%
- \fi}
-
-\define@key[UFXS]{set}{ginvar}[]{%
- \ifxskakpdfmatch
- \xskak@do@splitlevel{\xskak@val@curlevel}%
- \ifnum\xskak@temp@levelnumber=0\relax
- \PackageWarning{xskak}{key ginvar ignored}{}%
- \else
- \xdef\xskak@val@curlevel{%
- \xskak@temp@levelprefix
- \the\numexpr\xskak@temp@levelnumber+1\relax
- \xskak@temp@levelpostfix}%
- \fi
- \else
- %% no pdfmatch. Will give an error if the level is not a number
- \xdef\xskak@val@curlevel{%
- \the\numexpr\xskak@val@curlevel+1\relax}%
- \fi}
-
-\define@key[UFXS]{set}{outvar}[]{%
- \ifxskakpdfmatch
- \xskak@do@splitlevel{\xskak@val@curlevel}%
- \ifnum\xskak@temp@levelnumber=0\relax
- \PackageWarning{xskak}{key outvar ignored}{}%
- \else
- \ifnum\xskak@temp@levelnumber=1\relax
- \PackageWarning{xskak}{Level has already value 1}{}%
- \else
- \edef\xskak@val@curlevel{%
- \xskak@temp@levelprefix
- \the\numexpr\xskak@temp@levelnumber-1\relax
- \xskak@temp@levelpostfix}%
- \fi
- \fi
- \else
- \ifnum\xskak@val@curlevel=1\relax
- \PackageWarning{xskak}{Level has already value 1}{}%
- \else
- \edef\xskak@val@curlevel{%
- \the\numexpr\xskak@val@curlevel-1}%
- \fi
- \fi}
-
-\define@key[UFXS]{set}{goutvar}[]{%
- \ifxskakpdfmatch
- \xskak@do@splitlevel{\xskak@val@curlevel}%
- \ifnum\xskak@temp@levelnumber=0\relax
- \PackageWarning{xskak}{key goutvar ignored}{}%
- \else
- \ifnum\xskak@temp@levelnumber=1\relax
- \PackageWarning{xskak}{Level has already value 1}{}%
- \else
- \xdef\xskak@val@curlevel{%
- \xskak@temp@levelprefix
- \the\numexpr\xskak@temp@levelnumber-1\relax
- \xskak@temp@levelpostfix}%
- \fi
- \fi
- \else
- \ifnum\xskak@val@curlevel=1\relax
- \PackageWarning{xskak}{Level has already value 1}{}%
- \else
- \xdef\xskak@val@curlevel{%
- \the\numexpr\xskak@val@curlevel-1}%
- \fi
- \fi}
-
-%% \resumechessgame: fam res
-\define@key[UFXS]{res}{id}{\UFXS@new@id{#1}}
-
-\define@key[UFXS]{res}{movenr}{\def\xskak@temp@movenr{#1}}
-
-\define@key[UFXS]{res}{player}{\def\xskak@temp@player{#1}}
-
-\define@key[UFXS]{res}{moveid}{\edef\@tempa{#1}\xskak@split@moveid{\@tempa}}
-
-\define@key[UFXS]{res}{newvar}[\xskak@val@gameid]{%
- \xdef\xskak@val@refgameid{#1}%
- \xdef\xskak@val@gameid{#1}%
- \def\xskak@temp@movenr{\csname Xskak\xskak@val@gameid lastmovenr\endcsname}%
- \def\xskak@temp@player{\csname Xskak\xskak@val@gameid lastplayer\endcsname}}%
-
-
-\define@key[UFXS]{res}{reftag}{%
- \UFXS@new@reftag{#1}}
-
-\define@key[UFXS]{res}{refid}{%
- \UFXS@new@refid{#1}}
-
-\define@key[UFXS]{res}{refpastmovenr}{%
- \UFXS@new@refpastmovenr{#1}}
-
-\define@key[UFXS]{res}{refnextmovenr}{%
- \UFXS@new@refnextmovenr{#1}}
-
-\define@key[UFXS]{res}{refpastplayer}{%
- \UFXS@new@refpastplayer{#1}}
-
-\define@key[UFXS]{res}{refnextplayer}{%
- \UFXS@new@refnextplayer{#1}}
-
-\define@key[UFXS]{res}{refpastmoveid}{%
- \UFXS@new@refpastmoveid{#1}}
-
-\define@key[UFXS]{res}{refnextmoveid}{%
- \UFXS@new@refnextmoveid{#1}}
-
-\define@key[UFXS]{res}{refpast}{%
- \UFXS@new@refpast{#1}}
-
-\define@key[UFXS]{res}{refnext}{%
- \UFXS@new@refnext{#1}}
-
-%% pgn-keys are defined during definition.
-
-%%% xskakexportgames
-\define@key[UFXS]{export}{file}{\edef\xskak@val@exportfile{#1.xsk}}
-\define@key[UFXS]{export}{games}{\edef\xskak@val@exportgames{#1}}
-
-%%% xskakloop
-\define@key[UFXS]{loop}{id}{\UFXS@new@id{#1}}
-
-\define@key[UFXS]{loop}{reftag}{%
- \UFXS@new@reftag{#1}}
-
-\define@key[UFXS]{loop}{refid}{%
- \UFXS@new@refid{#1}}
-
-\define@key[UFXS]{loop}{initmoveid}{%
- \xskak@split@moveid{#1}%
- \global\let\xskak@val@movenr\xskak@temp@movenr
- \global\let\xskak@val@player\xskak@temp@player
- }
-\define@key[UFXS]{loop}{initmovenr}{%
- \xdef\xskak@val@movenr{#1}}
-
-\define@key[UFXS]{loop}{initplayer}{%
- \xdef\xskak@val@player{#1}}
-
-\define@key[UFXS]{loop}{stopmoveid}{%
- \xskak@split@moveid{#1}%
- \global\let\xskak@val@stopmovenr\xskak@temp@movenr
- \global\let\xskak@val@stopplayer\xskak@temp@player
- }
-\define@key[UFXS]{loop}{stopmovenr}{%
- \xdef\xskak@val@stopmovenr{#1}}
-
-\define@key[UFXS]{loop}{stopplayer}{%
- \xdef\xskak@val@stopplayer{#1}}
-
-\define@key[UFXS]{loop}{step}{\xdef\xskak@val@loopstep{#1}}
-
-\define@boolkey[UFXS]{loop}{showlast}[true]{}
-
-%%
-%% style items.
-
-%% keys
-\define@key[UFXS]{styleitem}{whiteopen}{%
- \expandafter\gdef\csname\xskak@temp@name whiteopen\endcsname{#1}}
-\define@key[UFXS]{styleitem}{blackopen}{%
- \expandafter\gdef\csname\xskak@temp@name blackopen\endcsname{#1}}
-\define@key[UFXS]{styleitem}{opencommands}{%
- \expandafter\gdef\csname\xskak@temp@name opencommands\endcsname{#1}}
-\define@key[UFXS]{styleitem}{closecommands}{%
- \expandafter\gdef\csname\xskak@temp@name closecommands\endcsname{#1}}
-\define@key[UFXS]{styleitem}{beforenumber}{%
- \expandafter\gdef\csname\xskak@temp@name beforenumber\endcsname{#1}}
-\define@key[UFXS]{styleitem}{beforewhite}{%
- \expandafter\gdef\csname\xskak@temp@name beforewhite\endcsname{#1}}
-\define@key[UFXS]{styleitem}{afterwhite}{%
- \expandafter\gdef\csname\xskak@temp@name afterwhite\endcsname{#1}}
-\define@key[UFXS]{styleitem}{beforeblack}{%
- \expandafter\gdef\csname\xskak@temp@name beforeblack\endcsname{#1}}
-\define@key[UFXS]{styleitem}{afterblack}{%
- \expandafter\gdef\csname\xskak@temp@name afterblack\endcsname{#1}}
-\define@key[UFXS]{styleitem}{beforecomment}{%
- \expandafter\gdef\csname\xskak@temp@name xskak@beforecomment\endcsname{#1}}
-\define@key[UFXS]{styleitem}{beforeNAG}{%
- \expandafter\gdef\csname\xskak@temp@name xskak@beforeNAG\endcsname{#1}}
-
-\define@key[UFXS]{styleiteminit}{template}{% from #1 to current style. Make sure to have set temp@name correctly!
- \xskak@do@copystyleitem{xskak@styleitem@#1@}{\xskak@temp@name}}
-
-%% style
-
-\define@key[UFXS]{style}{level}[1]{%
- \def\xskak@val@curlevel{#1}}
-
-\define@key[UFXS]{style}{font}{%
- \expandafter\gdef\csname\xskak@temp@name\xskak@val@curlevel @font\endcsname{#1}}
-
-\define@key[UFXS]{style}{styleitem}{%
- \ifcsname xskak@styleitem@#1@whiteopen\endcsname
- \expandafter\xdef
- \csname\xskak@temp@name\xskak@val@curlevel @item\endcsname{#1}%
- \else
- \PackageError{xskak}{style item #1 doesn't exist!}{}%
- \fi}
-
-\define@key[UFXS]{style}{xfont}{%
- \xskak@do@splitlevel{\xskak@val@curlevel}%
- \ifnum\xskak@temp@levelnumber=0\relax
- \PackageWarning{xskak}{key xfont ignored (no number found)}{}%
- \else
- \expandafter\gdef\csname\xskak@temp@name\xskak@temp@levelnumber @xfont\endcsname{#1}%
- \fi}
-
-%% printing
-%% style and level for all printing commands
-
-\define@key[UFXS]{print}{style}{%
- \UFXS@set@style{#1}}
-
-\define@key[UFXS]{print}{gstyle}{%
- \UFXS@set@gstyle{#1}}
-
-\define@key[UFXS]{print}{level}{%
- \edef\xskak@val@curlevel{#1}}%
-
-\define@key[UFXS]{print}{glevel}{%
- \xdef\xskak@val@curlevel{#1}}%
-
-\define@key[UFXS]{print}{invar}[]{%
- \UFXS@set@invar{#1}}
-
-\define@key[UFXS]{print}{outvar}[]{%
- \UFXS@set@outvar{#1}}
-
-%% keys only for \printchessgame
-\define@key[UFXS]{xprint}{id}{\def\xskak@val@gameid{#1}}
-\define@key[UFXS]{xprint}{initmoveid}{%
- \xskak@split@moveid{#1}%
- \let\xskak@val@movenr\xskak@temp@movenr
- \let\xskak@val@player\xskak@temp@player
- }
-\define@key[UFXS]{xprint}{initmovenr}{%
- \def\xskak@val@movenr{#1}}
-
-\define@key[UFXS]{xprint}{initplayer}{%
- \def\xskak@val@player{#1}}
-
-\define@key[UFXS]{xprint}{stopmoveid}{%
- \xskak@split@moveid{#1}%
- \let\xskak@val@stopmovenr\xskak@temp@movenr
- \let\xskak@val@stopplayer\xskak@temp@player
- }
-\define@key[UFXS]{xprint}{stopmovenr}{%
- \def\xskak@val@stopmovenr{#1}}
-
-\define@key[UFXS]{xprint}{stopplayer}{%
- \def\xskak@val@stopplayer{#1}}
-
-\define@key[UFXS]{xprint}{reftag}{%
- \UFXS@new@reftag{#1}}
-
-\define@key[UFXS]{xprint}{refid}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFXS@print@id{\csname xskak@tag@#1@refid\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-%% new keys for chessboard. Move to chessboard.sty??
-%% empty keys to avoid errors:
-
-\define@key[UFCB]{locfill}{tag}{}%
-\define@key[UFCB]{locfill}{ref}{}%
-\define@key[UFCB]{locfill}{defaultid}{}%
-\define@key[UFCB]{locfill}{defaultmoveid}{}%
-\define@key[UFCB]{locfill}{defaultfen}{}%
-
-%% real keys (should also be defined in fam glofill):
-\define@key[UFCB]{locfill}{id}[\xskak@val@defaultid]{%
- \ifcsname Xskak#1initfen\endcsname
- \edef\xskak@val@gameid{#1}%
- \else
- \PackageError{xskak}{Game with the id #1 doesn't exist.}{}%
- \fi}%
-
-\define@key[UFCB]{glofill}{id}[\xskak@val@defaultid]{%
- \board@do@l@addto@macro\board@val@savedkeylist{,id=#1}}%
-
-\define@key[UFCB]{locfill}{moveid}{%
- \edef\@tempa{#1}\xskak@split@moveid{\@tempa}%
- \let\xskak@val@movenr\xskak@temp@movenr
- \let\xskak@val@player\xskak@temp@player}%
-
-\define@key[UFCB]{glofill}{moveid}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,moveid=#1}}%
-
-\define@key[UFCB]{locfill}{stepmoveid}[1]{%
- \count@=#1\relax
- \ifthenelse{\the\count@>0}
- {\whiledo{\the\count@>0}%
- {\xskak@do@getnextmoveid{\xskak@val@movenr}{\xskak@val@player}%
- \advance\count@ by -1%
- \let\xskak@val@movenr\xskak@temp@movenr
- \let\xskak@val@player\xskak@temp@player}%
- }%
- {\ifthenelse{\the\count@=0}%
- {}%
- {\whiledo{\the\count@<0}%
- {\xskak@do@getpreviousmoveid{\xskak@val@movenr}{\xskak@val@player}%
- \advance\count@ by 1%
- \let\xskak@val@movenr\xskak@temp@movenr
- \let\xskak@val@player\xskak@temp@player}%
- \ifthenelse{\the\count@<1}%
- {\PackageWarning{xskak}{Move number below 1!}{}}%
- {}}}}
-
-\define@key[UFCB]{glofill}{stepmoveid}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,stepmoveid=#1}}%
-
-\define@key[UFCB]{locfill}{player}{\def\xskak@val@player{#1}}%
-
-\define@key[UFCB]{glofill}{player}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,player=#1}}%
-
-\define@key[UFCB]{locfill}{movenr}{\def\xskak@val@movenr{#1}}%
-
-\define@key[UFCB]{glofill}{movenr}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,movenr=#1}}%
-
-\define@key[UFCB]{locfill}{newvar}[\xskak@val@refgameid]{%
- \UFCB@locfill@setfen{%
- \csname Xskak.#1.%
- \csname Xskak#1lastmovenr\endcsname.%
- \csname Xskak#1lastplayer\endcsname.%
- pastfen\endcsname}%
- }%
-
-\define@key[UFCB]{glofill}{newvar}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,newvar=#1}}%
-
-\define@key[UFCB]{locfill}{reftag}{%
- \edef\xskak@val@currenttag{#1}}
-
-\define@key[UFCB]{glofill}{reftag}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,reftag=#1}}%
-
-\define@key[UFCB]{locfill}{lastmoveid}[\xskak@val@gameid]{%
- \ifcsname Xskak#1initfen\endcsname
- \edef\xskak@val@gameid{#1}%
- \else
- \PackageError{xskak}{Game with the id #1 doesn't exist.}{}%
- \fi
- \edef\xskak@val@movenr{\csname Xskak#1lastmovenr\endcsname}%
- \edef\xskak@val@player{\csname Xskak#1lastplayer\endcsname}%
- }%
-
-\define@key[UFCB]{glofill}{lastmoveid}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,lastmoveid=#1}}%
-
-\define@key[UFCB]{locfill}{refid}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@id{\csname xskak@tag@#1@refid\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{refid}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refid=#1}}%
-
-\define@key[UFCB]{locfill}{refpastmovenr}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@movenr{\csname xskak@tag@#1@refpastmovenr\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{refpastmovenr}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refpastmovenr=#1}}%
-
-\define@key[UFCB]{locfill}{refnextmovenr}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi
- \UFCB@locfill@movenr{\csname xskak@tag@#1@refnextmovenr\endcsname}}
-
-\define@key[UFCB]{glofill}{refnextmovenr}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refnextmovenr=#1}}%
-
-\define@key[UFCB]{locfill}{refpastplayer}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@player{\csname xskak@tag@#1@refpastplayer\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{refpastplayer}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refpastplayer=#1}}%
-
-\define@key[UFCB]{locfill}{refnextplayer}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@player{\csname xskak@tag@#1@refnextplayer\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{refnextplayer}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refnextplayer=#1}}%
-
-\define@key[UFCB]{locfill}{refpastmoveid}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@moveid{\csname xskak@tag@#1@refpastmoveid\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{refpastmoveid}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refpastmoveid=#1}}%
-
-\define@key[UFCB]{locfill}{refnextmoveid}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@moveid{\csname xskak@tag@#1@refnextmoveid\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{refnextmoveid}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refnextmoveid=#1}}%
-
-\define@key[UFCB]{locfill}{refpast}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@movenr{\csname xskak@tag@#1@refpastmovenr\endcsname}%
- \UFCB@locfill@id{\csname xskak@tag@#1@refid\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{refpast}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refpast=#1}}%
-
-\define@key[UFCB]{locfill}{refnext}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@movenr{\csname xskak@tag@#1@refnextmovenr\endcsname}%
- \UFCB@locfill@id{\csname xskak@tag@#1@refid\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{refnext}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refnext=#1}}%
-
-\define@key[UFCB]{locfill}{refpast}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@movenr{\csname xskak@tag@#1@refpastmovenr\endcsname}%
- \UFCB@locfill@id{\csname xskak@tag@#1@refid\endcsname}%
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{refpast}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,refpast=#1}}%
-
-\define@key[UFCB]{locfill}{reffen}{%
- \ifcsname xskak@tag@#1@refid\endcsname
- \UFCB@locfill@addfen{%
- \csname
- Xskak.%
- \csname xskak@tag@#1@refid\endcsname.%
- \csname xskak@tag@#1@refnextmovenr\endcsname.%
- \csname xskak@tag@#1@refnextplayer\endcsname.%
- pastfen%
- \endcsname}
- \else
- \PackageError{xskak}{Unknown tag #1}{}%
- \fi}
-
-\define@key[UFCB]{glofill}{reffen}{%
- \board@do@l@addto@macro\board@val@savedkeylist{,reffen=#1}}%
-
-%% currently no described. Perhaps delete. Perhaps change name to adapt to ref-keys?
-\define@key[UFCB]{locfill}{setgame}[\xskak@val@gameid]{%
- \ifcsname Xskak#1initfen\endcsname
- \edef\xskak@val@gameid{#1}%
- \else
- \PackageError{xskak}{Game with the id #1 doesn't exist.}{}%
- \fi
- \edef\board@temp@curfen{\csname Xskak#1lastfen\endcsname}%
- \board@do@setsinglekeys*[UFCB]{locfill}{language=english, setfen=\board@temp@curfen, language=\board@val@savelang}}%
-
-\define@key[UFCB]{glofill}{setgame}[\xskak@val@gameid]{%
- \board@do@l@addto@macro\board@val@savedkeylist{,showgame=#1}}%
-
-%% currently no described. Perhaps delete. Perhaps change name to adapt to ref-keys?
-\define@key[UFCB]{locfill}{addgame}[\xskak@val@gameid]{%
- \ifcsname Xskak#1initfen\endcsname
- \edef\xskak@val@gameid{#1}%
- \else\PackageError{xskak}{Game with the id #1 doesn't exist.}{}%
- \fi
- \edef\board@temp@curfen{\csname Xskak#1lastfen\endcsname}%
- \board@do@setsinglekeys*[UFCB]{locfill}{language=english, addfen=\board@temp@curfen, language=\board@val@savelang}}%
-
-\define@key[UFCB]{glofill}{addgame}[\xskak@val@gameid]{%
- \board@do@l@addto@macro\board@val@savedkeylist{,showgame=#1}}%
\endinput
%%
%% End of file `xskak-keys.sty'.