summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xskak
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/xskak')
-rw-r--r--Master/texmf-dist/tex/latex/xskak/xskak-keys.sty9
-rw-r--r--Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty9
-rw-r--r--Master/texmf-dist/tex/latex/xskak/xskak.sty75
3 files changed, 63 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty b/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
index db377569809..d8705c05e31 100644
--- a/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
+++ b/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
@@ -6,8 +6,8 @@
%%
%% xskak-src.dtx (with options: `xskak-keys')
%%
-%% xskak: an extension to the package skak for chess typesetting
-%% Copyright 2007 Ulrike Fischer (skak@nililand.de)
+%% xskak: a package to parse and print chess games
+%% Copyright 2006-2014 Ulrike Fischer (chess@nililand.de)
%% -------------------------------------------
%%
%% This file can be redistributed and/or modified under the terms of
@@ -16,9 +16,8 @@
%% 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.sty}[#2/#3/#4 version #7 key definitions for xskak.sty #7]}
-\@rcs@ $Date: 2008-10-20 19:58 +0200 $$Version: v1.2 $
+\ProvidesFile{xskak-keys.sty}[2014/04/19 version v1.3 key definitions for xskak.sty]
+%%$Date: 2011/03/17 16:54:07 $$Version: 041ab49ae0e2 $
%%%%%%%%%%%%%%%%%%%%%
%%%% Keys
diff --git a/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty b/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty
index 49b4fb28298..2ed9d0b7512 100644
--- a/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty
+++ b/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty
@@ -6,8 +6,8 @@
%%
%% xskak-src.dtx (with options: `xskak-nagdef')
%%
-%% xskak: an extension to the package skak for chess typesetting
-%% Copyright 2007 Ulrike Fischer (skak@nililand.de)
+%% xskak: a package to parse and print chess games
+%% Copyright 2006-2014 Ulrike Fischer (chess@nililand.de)
%% -------------------------------------------
%%
%% This file can be redistributed and/or modified under the terms of
@@ -16,9 +16,8 @@
%% 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.sty}[#2/#3/#4 version #7 nag definitions for xskak.sty #7]}
-\@rcs@ $Date: 2008-10-20 19:58 +0200 $$Version: v1.2 $
+\ProvidesFile{xskak-nagdef.sty}[2014/04/19 version v1.3 nag definitions for xskak.sty]
+%%$Date: 2011/03/17 16:54:07 $$Version: 041ab49ae0e2 $
\expandafter\def\csname $1\endcsname{!}
\expandafter\def\csname $2\endcsname{?}
diff --git a/Master/texmf-dist/tex/latex/xskak/xskak.sty b/Master/texmf-dist/tex/latex/xskak/xskak.sty
index cedd6715609..a6dade3461a 100644
--- a/Master/texmf-dist/tex/latex/xskak/xskak.sty
+++ b/Master/texmf-dist/tex/latex/xskak/xskak.sty
@@ -6,8 +6,8 @@
%%
%% xskak-src.dtx (with options: `xskak')
%%
-%% xskak: an extension to the package skak for chess typesetting
-%% Copyright 2007 Ulrike Fischer (skak@nililand.de)
+%% xskak: a package to parse and print chess games
+%% Copyright 2006-2014 Ulrike Fischer (chess@nililand.de)
%% -------------------------------------------
%%
%% This file can be redistributed and/or modified under the terms of
@@ -17,9 +17,8 @@
%%
%% For error reports see documentation.
\NeedsTeXFormat{LaTeX2e}
-\def\@rcs@ $#1Date: #2-#3-#4 #5$$#6Version: #7$ {
- \ProvidesPackage{xskak}[#2/#3/#4 version #7 extended Chess typesetting and parsing]}
-\@rcs@ $Date: 2008-10-20 19:58 +0200 $$Version: v1.2 $
+\ProvidesPackage{xskak}[2014/04/19 version v1.3 extended chess typesetting and parsing]
+%%$Date: 2014/04/19 13:39:37 $$Version: 7992681de4b7 $
\newif\ifxskakpdfmatch
@@ -79,7 +78,9 @@
nextmovenr,%
nextmoveid,%
diagramlist,%
- gameid}
+ gameid,%
+ parentid%NEW records game id of parent if the game is a variation, the last move of the parent=initmoveid
+ }
\newcommand\xskak@list@movetypes{%
movenr,%
@@ -113,7 +114,9 @@
nag,%
san,%
lan,%
- opennr%%
+ opennr,%
+ vars,% NEW, records game id of child variations
+ varnum% NEW, records number of child variations
}
%% setting pgn infos
@@ -162,6 +165,7 @@
\newboolean{xskakboolpromotion}
\newboolean{xskakboolcomment}
\newboolean{xskakboolnag}
+\newboolean{xskakboolvar}
%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
@@ -267,7 +271,11 @@
\expandafter\xdef
\csname Xskak\xskak@val@gameid nextmovenr\endcsname{\the\c@move}%
\expandafter\xdef
- \csname Xskak\xskak@val@gameid nextmoveid\endcsname{\the\c@move\WhiteToMove{w}{b}}}
+ \csname Xskak\xskak@val@gameid nextmoveid\endcsname{\the\c@move\WhiteToMove{w}{b}}%
+ \expandafter\xdef\csname %new 1.6. Initialization of nag
+ Xskak.\xskak@val@gameid.%
+ \csname Xskak\xskak@val@gameid lastmovenr\endcsname.%
+ \csname Xskak\xskak@val@gameid lastplayer\endcsname.nag\endcsname{}}
%% continuing a game
\newcommand\resumechessgame[1][]{%
@@ -525,6 +533,9 @@
%%% move related informations
%%%% <type> <value>
+%%%% vars list of game id of variations. Is set to empty by \xskak@do@dothemove. Can be
+%%%% change by variation games to notify the "parent" about its "child"
+%%%% varnum record the number of variations of the move. Set to 0 by \xskak@do@dothemove.
%%%% pgnpiece K,Q,R,B or N (independent from language). Is empty for Pawn and Castling moves
%%%% piece K,Q,R,B,N or P or k,q,r,b,n or p (for black). Is empty for Castling
%%%% piecechar K,Q,R,B,N or p. Is empty for Castling
@@ -560,7 +571,7 @@
%%%% \castlingchar\castlinghyphen\castlingchar
%%%% lan long algebraic notation of the move.
%%%% opennr The number representation for an open move e.g. 2...
-%%% Game related informations. Don't use @ or "." to simply use by the user
+%%% Game related informations. Don't use @ or "." to simplify use by the user
%%%% gameid stores the gameid (for easier retrieving)
%%%% initfen The fen before the first move. Set by \newchessgame
%%%% initplayer w or b, The color of the next (first) player.
@@ -591,6 +602,14 @@
\setkeys[UFCB]{locfill}{setfen=\temp@board}%
%\expandafter\show\csname board@val@f4r4@piecechar\endcsname
%===========%
+ %% vars + varnum
+ \expandafter\xdef
+ \csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.vars\endcsname{}%
+ %\expandafter\show\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.vars\endcsname
+ \expandafter\xdef
+ \csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.varnum\endcsname{0}%
+ %\expandafter\show\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.varnum\endcsname
+ %===========%
%% pgnpiece
\expandafter\xdef
\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.pgnpiece\endcsname{%
@@ -763,7 +782,10 @@
%% new naming, changed to boolean
\begingroup
\WhiteToMove%
- {\ifthenelse%white enpassant
+ {\ifthenelse%
+ {\equal{\csname Xskak.\xskak@val@gameid.\the\c@move.w.piecechar\endcsname}{p}}
+ {% pawn move:
+ \ifthenelse%white enpassant
{\equal
{\csname Xskak.\xskak@val@gameid.\the\c@move.w.moveto\endcsname}%
{\csname Xskak.\xskak@val@gameid.\the\numexpr\the\c@move-1\relax.b.enpassantsquare\endcsname}}%
@@ -775,7 +797,14 @@
{\expandafter\xdef
\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.enpassant\endcsname
{\noexpand\setboolean{xskakboolenpassant}{false}}}}%
- {\ifthenelse%black enpassant
+ {\expandafter\xdef
+ \csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.enpassant\endcsname
+ {\noexpand\setboolean{xskakboolenpassant}{false}}}%
+ }%
+ {\ifthenelse
+ {\equal{\csname Xskak.\xskak@val@gameid.\the\c@move.b.moveto\endcsname}{p}}
+ {%pawn move:
+ \ifthenelse%black enpassant
{\equal
{\csname Xskak.\xskak@val@gameid.\the\c@move.b.moveto\endcsname}%
{\csname Xskak.\xskak@val@gameid.\the\c@move.w.enpassantsquare\endcsname}}%
@@ -786,8 +815,11 @@
\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.lostpiece\endcsname{P}}%
{\expandafter\xdef
\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.enpassant\endcsname
- {\noexpand\setboolean{xskakboolenpassant}{false}}}%
- }%
+ {\noexpand\setboolean{xskakboolenpassant}{false}}}}%
+ {\expandafter\xdef
+ \csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.enpassant\endcsname
+ {\noexpand\setboolean{xskakboolenpassant}{false}}}}
+ %
\endgroup
%\expandafter\show\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.enpassant\endcsname
%\expandafter\show\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.lostpiece\endcsname
@@ -992,7 +1024,7 @@
%% tests if the argument is \xskakcomment{...}
\def\xskak@test@comment#1=\xskakcomment#2=={%
\def\@tempa{#1}%
- \ifx\@tempa\empty%#1 beginnt mit \chesscomment
+ \ifx\@tempa\empty%#1 beginnt mit \xskakcomment
\setboolean{xskakboolcomment}{true}%
\else
\setboolean{xskakboolcomment}{false}%
@@ -1027,7 +1059,7 @@
}}%
{}%variation
\PrintMoves{{\xskak@beforecomment{#1}}}{}%
- \Mainline(#2)%
+ \xskak@do@parsemainline(#2)%
\else
\xskak@test@nag#1YXX%
\ifthenelse%
@@ -1072,10 +1104,11 @@
{{\xskak@beforeNAG{\csname#1\endcsname}}}}%
%\expandafter\show\csname Xskak.\xskak@val@gameid.\the\c@move.w.nag\endcsname
}}%
+ {}%variation
\PrintMoves{{\xskak@beforeNAG{\csname#1\endcsname}}}{}%
- \Mainline(#2)}%
+ \xskak@do@parsemainline(#2)}%
{\EqStr{ }{#1}%
- {\Mainline(#2)}%
+ {\xskak@do@parsemainline(#2)}%
{%
\EqStr{Z}{#1}%
{}%
@@ -1085,14 +1118,15 @@
% number with a space, eg, 1.e4
%{\gdef\NumberNext{\False}\Mainline(#2)}%
%\gdef\NumberNext{\False}%
- \Mainline(#2)}%
+ \xskak@do@parsemainline(#2)}%
{\Fen@calculate% 16.10.2008 skak1.5
\expandafter\xdef\csname chessgame.skak.temp.previous\endcsname{\temp@board}%16.10.2008 skak1.5
\MakeMoveMainline{#1}%
- \Mainline(#2)}}}}%
+ \xskak@do@parsemainline(#2)}}}}%
\fi}
%% overwrite the skak version:
+%% currently needed as \runmoves use \Mainline
\let\Mainline\xskak@do@parsemainline
%% Printing
@@ -1317,6 +1351,7 @@
\newcommand\printchessgame[1][]{%
\setkeys*[UFXS]{print}{#1}%set style and level
+ \leavevmode%UF 2012-09-10 to allow wrapping around wrapfigure
\begingroup
\setkeys*[UFXS]{xprint}{#1}%% getting the id
\xdef\xskak@val@movenr{%
@@ -1428,7 +1463,7 @@
\gdef\StoreLastMove{\False}%
{\variationstyle\opencommands%
\variationmovemode
- \Mainline(#1 Z )%
+ \xskak@do@parsemainline(#1 Z )%
\closecommands}}
%%% Read/store commands