diff options
author | Karl Berry <karl@freefriends.org> | 2008-08-01 23:27:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-08-01 23:27:29 +0000 |
commit | 401d173110588e5748e0453f22e344d31192f7ca (patch) | |
tree | 03dc234bed63e8c63a776e33e66172960df75ec2 /Master/texmf-dist/tex | |
parent | 7a37c4adc360f4e2df37ac58a4838f6342480c10 (diff) |
xskak update (1aug08)
git-svn-id: svn://tug.org/texlive/trunk@9999 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/xskak/xskak-keys.sty | 758 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty | 81 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xskak/xskak.sty | 1 |
3 files changed, 840 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty b/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty index bb29aa17c2b..4b49015655f 100644 --- a/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty +++ b/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty @@ -16,6 +16,764 @@ %% License, or (at your option) any later version. %% %% For error reports see documentation. +\def\@rcs@ $#1Date: #2-#3-#4 #5$$#6Version: #7$ { + \ProvidesFile{xskak-keys}[#2/#3/#4 version #7 key definitions for xskak.sty #7]} +\@rcs@ $Date: 2008-07-29 16:45 +0200 $$Version: v1.1 $ + +%%%%%%%%%%%%%%%%%%%%% +%%%% 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 not 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 not 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'. diff --git a/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty b/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty index bc2e03da4ed..81109ae368e 100644 --- a/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty +++ b/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty @@ -16,6 +16,87 @@ %% License, or (at your option) any later version. %% %% For error reports see documentation. +\def\@rcs@ $#1Date: #2-#3-#4 #5$$#6Version: #7$ { + \ProvidesFile{xskak-nagdef}[#2/#3/#4 version #7 nag definitions for xskak.sty #7]} +\@rcs@ $Date: 2008-07-29 16:45 +0200 $$Version: v1.1 $ + +\expandafter\def\csname $1\endcsname{!} +\expandafter\def\csname $2\endcsname{?} +\expandafter\def\csname $3\endcsname{!!} +\expandafter\def\csname $4\endcsname{??} +\expandafter\def\csname $5\endcsname{!?} +\expandafter\def\csname $6\endcsname{?!} +\expandafter\def\csname $7\endcsname{\onlymove} +\expandafter\def\csname $8\endcsname{\onlymove} +\expandafter\def\csname $9\endcsname{} +\expandafter\def\csname $10\endcsname{\equal} +\expandafter\def\csname $11\endcsname{\equal} +\expandafter\def\csname $12\endcsname{\equal} +\expandafter\def\csname $13\endcsname{\unclear} +\expandafter\def\csname $14\endcsname{\wbetter} +\expandafter\def\csname $15\endcsname{\bbetter} +\expandafter\def\csname $16\endcsname{\wupperhand} +\expandafter\def\csname $17\endcsname{\bupperhand} +\expandafter\def\csname $18\endcsname{\wdecisive} +\expandafter\def\csname $19\endcsname{\bdecisive} +\expandafter\def\csname $20\endcsname{\wdecisive} +\expandafter\def\csname $21\endcsname{\bdecisive} +\expandafter\def\csname $22\endcsname{\zugzwang} +\expandafter\def\csname $23\endcsname{\zugzwang} +\expandafter\def\csname $24\endcsname{\moreroom} +\expandafter\def\csname $25\endcsname{\moreroom} +\expandafter\def\csname $26\endcsname{\moreroom} +\expandafter\def\csname $27\endcsname{\moreroom} +\expandafter\def\csname $28\endcsname{\moreroom} +\expandafter\def\csname $29\endcsname{\moreroom} +\expandafter\def\csname $30\endcsname{\devadvantage} +\expandafter\def\csname $31\endcsname{\devadvantage} +\expandafter\def\csname $32\endcsname{\devadvantage} +\expandafter\def\csname $33\endcsname{\devadvantage} +\expandafter\def\csname $34\endcsname{\devadvantage} +\expandafter\def\csname $35\endcsname{\devadvantage} +\expandafter\def\csname $36\endcsname{\withinit} +\expandafter\def\csname $37\endcsname{\withinit} +\expandafter\def\csname $38\endcsname{\withinit} +\expandafter\def\csname $39\endcsname{\withinit} +\expandafter\def\csname $40\endcsname{\withattack} +\expandafter\def\csname $41\endcsname{\withattack} +\expandafter\def\csname $42\endcsname{\without\compensation} +\expandafter\def\csname $43\endcsname{\without\compensation} +\expandafter\def\csname $44\endcsname{\compensation} +\expandafter\def\csname $45\endcsname{\compensation} +\expandafter\def\csname $46\endcsname{\compensation} +\expandafter\def\csname $47\endcsname{\compensation} +\expandafter\def\csname $70\endcsname{\weakpt\cfss@symking} +\expandafter\def\csname $71\endcsname{\weakpt\cfss@symking} +\expandafter\def\csname $74\endcsname{\weakpt\cfss@symking} +\expandafter\def\csname $75\endcsname{\weakpt\cfss@symking} +\expandafter\def\csname $86\endcsname{\weakpt\cfss@symknight} +\expandafter\def\csname $87\endcsname{\weakpt\cfss@symknight} +\expandafter\def\csname $90\endcsname{\weakpt\cfss@symbishop} +\expandafter\def\csname $91\endcsname{\weakpt\cfss@symbishop} +\expandafter\def\csname $94\endcsname{\weakpt\cfss@symbishop} +\expandafter\def\csname $95\endcsname{\weakpt\cfss@symbishop} +\expandafter\def\csname $98\endcsname{\weakpt\cfss@symqueen} +\expandafter\def\csname $99\endcsname{\weakpt\cfss@symqueen} +\expandafter\def\csname $130\endcsname{\counterplay} +\expandafter\def\csname $130\endcsname{\counterplay} +\expandafter\def\csname $131\endcsname{\counterplay} +\expandafter\def\csname $132\endcsname{\counterplay} +\expandafter\def\csname $133\endcsname{\counterplay} +\expandafter\def\csname $134\endcsname{\counterplay} +\expandafter\def\csname $135\endcsname{\counterplay} +\expandafter\def\csname $136\endcsname{\timelimit} +\expandafter\def\csname $137\endcsname{\timelimit} +\expandafter\def\csname $138\endcsname{\timelimit} +\expandafter\def\csname $139\endcsname{\timelimit} +\expandafter\def\csname $140\endcsname{\space\withidea} +\expandafter\def\csname $142\endcsname{\space\betteris} +\expandafter\def\csname $145\endcsname{\chesscomment} +\expandafter\def\csname $146\endcsname{\novelty} +\expandafter\def\csname $D\endcsname{\chessdiagramname} +\expandafter\def\csname $d\endcsname{} + \endinput %% %% End of file `xskak-nagdef.sty'. diff --git a/Master/texmf-dist/tex/latex/xskak/xskak.sty b/Master/texmf-dist/tex/latex/xskak/xskak.sty index 2fc95c40009..f59de481562 100644 --- a/Master/texmf-dist/tex/latex/xskak/xskak.sty +++ b/Master/texmf-dist/tex/latex/xskak/xskak.sty @@ -1466,6 +1466,7 @@ \def\shortmoves{% \let\printmove=\printmove@san \gdef\xskak@do@printmove{\xskakget{san}}} + \endinput %% %% End of file `xskak.sty'. |