summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-26 15:44:52 +0000
committerKarl Berry <karl@freefriends.org>2008-10-26 15:44:52 +0000
commit1180c59ebc2d9e5ff537a1ede08d40a25fb48dc2 (patch)
treed05d3e1e836289cb9d085b8864846f39e95068d8 /Master/texmf-dist/tex/latex
parentaced7a98520cf24b6426d023b1e06088eee0e155 (diff)
xskak 1.2 (20oct08)
git-svn-id: svn://tug.org/texlive/trunk@11065 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/xskak/xskak-keys.sty4
-rw-r--r--Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty4
-rw-r--r--Master/texmf-dist/tex/latex/xskak/xskak.sty65
3 files changed, 61 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty b/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
index 4b49015655f..db377569809 100644
--- a/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
+++ b/Master/texmf-dist/tex/latex/xskak/xskak-keys.sty
@@ -17,8 +17,8 @@
%%
%% 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 $
+ \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 $
%%%%%%%%%%%%%%%%%%%%%
%%%% Keys
diff --git a/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty b/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty
index 81109ae368e..49b4fb28298 100644
--- a/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty
+++ b/Master/texmf-dist/tex/latex/xskak/xskak-nagdef.sty
@@ -17,8 +17,8 @@
%%
%% 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 $
+ \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 $
\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 f59de481562..cedd6715609 100644
--- a/Master/texmf-dist/tex/latex/xskak/xskak.sty
+++ b/Master/texmf-dist/tex/latex/xskak/xskak.sty
@@ -19,7 +19,7 @@
\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-07-29 17:33 +0200 $$Version: v1.1 $
+\@rcs@ $Date: 2008-10-20 19:58 +0200 $$Version: v1.2 $
\newif\ifxskakpdfmatch
@@ -30,9 +30,15 @@
\fi
\DeclareOption{nopdfmatch}{\xskakpdfmatchfalse}
+\providecommand\xskak@val@skakversion{skak}
+\DeclareOption{skak14}{\def\xskak@val@skakversion{skak14}}
+\DeclareOption{skak15}{\def\xskak@val@skakversion{skak15}}
+\DeclareOption{small}{\AtEndOfClass{\smallboard}}
\ProcessOptions
-\RequirePackage{skak}[2005/06/29]
+\RequirePackage{\xskak@val@skakversion}[2005/06/29]
+\expandafter\edef\csname ver@skak.sty\endcsname{\csname ver@\xskak@val@skakversion.sty\endcsname}
+
\RequirePackage{xifthen}
\RequirePackage{chessboard}[2007/12/20]
\RequirePackage{xskak-keys}
@@ -230,7 +236,10 @@
mover=\xskak@val@player,
fullmove=\xskak@val@movenr,
storefen=@tempgame]%
- \restoregame{@tempgame}%
+ \edef\temp{\csname chessgame.@tempgame\endcsname}%16.10.2008 for skak1.5
+ \expandafter\fenboard\expandafter{\temp}%16.10.2008 for skak1.5
+ \storegame{@tempgame}%16.10.2008 for skak1.5
+ \restoregame{@tempgame}%16.10.2008 for skak1.5
\edef\@tempa{\csname chessgame.@tempgame\endcsname}%
\expandafter\fenposition\expandafter{\@tempa}% for texmate
\expandafter\xdef
@@ -841,14 +850,14 @@
\fi
\ifxskakboolenpassant
\noexpand\xskakenpassanttext
- \fi
+ \fi}%move from below 2008-10-10
\ifxskakboolcheck
\noexpand\checksymbol
\fi
\ifxskakboolmate
\noexpand\mate
\fi
- }}%
+ }%
%\expandafter\show\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.san\endcsname
%=============%
%% lan
@@ -873,14 +882,14 @@
\fi
\ifxskakboolenpassant
\noexpand\xskakenpassanttext
- \fi
+ \fi}%move from below 2008-10-10
\ifxskakboolcheck
\noexpand\checksymbol
\fi
\ifxskakboolmate
\noexpand\mate
\fi
- }}%
+ }%
%\expandafter\show\csname Xskak.\xskak@val@gameid.\the\c@move.\WhiteToMove{w}{b}.lan\endcsname
%===========%
%% addpieces
@@ -1077,7 +1086,9 @@
%{\gdef\NumberNext{\False}\Mainline(#2)}%
%\gdef\NumberNext{\False}%
\Mainline(#2)}%
- {\MakeMoveMainline{#1}%
+ {\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)}}}}%
\fi}
@@ -1408,6 +1419,18 @@
\setkeys[UFXS]{print}{#1}%
\begingroup\catcode`\#=12 \@variation}
+\newcommand\variationmovemode{\shortmoves}
+
+\def\@variation#1{\endgroup\gdef\NumberNext{\True}%
+ \gdef\AfterBlack{\False}%
+ \gdef\PrintMoves{\True}%
+ \gdef\ExecuteMoves{\False}%
+ \gdef\StoreLastMove{\False}%
+ {\variationstyle\opencommands%
+ \variationmovemode
+ \Mainline(#1 Z )%
+ \closecommands}}
+
%%% Read/store commands
%% changed to avoid the use of to much write/read registers
%% ?? What did I mean? changed \FenBoard to \fenboard in \loadgame/restoregame
@@ -1426,6 +1449,30 @@
\closein0%
\expandafter\fenboard\expandafter{\load@read}}
+%%% ParseCastlingA changed so that comments are no longer lost:
+%%% -> bug report 2008-10-10
+
+\def\@setmoverestcastling(#1ZVW){\gdef\MoveRest{#1}}
+
+\def\ParseCastlingA(#1#2#3){%
+ \MyEqualB{#1#2}{-O}%
+ {\gdef\LongCastling{\True}%
+ \ParseCastlingAA(#3)}%
+ {\ParseCastlingAA(#1#2#3)}}
+
+\newcommand\ParseCastlingAA{}
+
+\def\ParseCastlingAA(#1#2#3){%
+ \EqStr{Z}{#1}%
+ {}% we are done!
+ {\EqStr{#1}{+}% chess ?
+ {\protected@xdef\CheckTest{\checksymbol}%
+ \ParseCastlingAA(#2#3)}%
+ {\EqStr{#1}{##}% mate?
+ {\protected@xdef\MateTest{\mate}%
+ \ParseCastlingAA(#2#3)}%
+ {\@setmoverestcastling(#1#2#3)}}}}
+
%%%% ExecutePawnMove changed:
%%%% moved \xdef of EnPassantSquare before DoTheMove
%%%% I hope it doesn't break something
@@ -1459,6 +1506,8 @@
\WhiteToMove{\the\numexpr\the\c@move-1\relax}{\the\c@move}.%
\WhiteToMove{b}{w}.comments\endcsname{}}
+\let\skaklongmoves\longmoves %added 16.10.2008
+
\def\longmoves{%
\let\printmove=\xskak@do@printmove@algebraic
\gdef\xskak@do@printmove{\xskakget{lan}}}