diff options
author | Karl Berry <karl@freefriends.org> | 2019-06-24 21:06:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-06-24 21:06:01 +0000 |
commit | 8f126c2c31e11c3e30f040d836bde384dfe193be (patch) | |
tree | cf5bc85f42fb275f110e5f7d1f081191b0ec30b9 /Master/texmf-dist/tex/latex/chessboard/chessboard.sty | |
parent | 6df3fe57362cbe88636ba77df481c3329fcdd66f (diff) |
chessboard (24jun19)
git-svn-id: svn://tug.org/texlive/trunk@51445 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chessboard/chessboard.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/chessboard/chessboard.sty | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/chessboard/chessboard.sty b/Master/texmf-dist/tex/latex/chessboard/chessboard.sty index 5bd00fcdfb0..0c316d7d9ea 100644 --- a/Master/texmf-dist/tex/latex/chessboard/chessboard.sty +++ b/Master/texmf-dist/tex/latex/chessboard/chessboard.sty @@ -4,10 +4,10 @@ %% %% The original source files were: %% -%% chessboard-src.dtx (with options: `chessboard') +%% chessboard.dtx (with options: `chessboard') %% %% chessboard: a package to print chessboards -%% Copyright 2006-2014 Ulrike Fischer (chess@nililand.de) +%% Copyright 2006-2019 Ulrike Fischer (chess@nililand.de) %% ------------------------------------------- %% %% This file can be redistributed and/or modified under the terms of @@ -17,7 +17,7 @@ %% %% For error reports see documentation. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{chessboard}[2014/05/01 version v1.7 print chessboards] +\ProvidesPackage{chessboard}[2019/06/23 version v1.8 print chessboards] %%$Date: 2011/03/23 08:42:57 $$Version: 66142533647c $ \DeclareOption{skaknew}{}% @@ -46,7 +46,7 @@ \ifpdf\else \RequirePackage{pst-node}% \fi - +\RequirePackage{etoolbox} %%%%%%% %% naming conventions %%%%%%% @@ -304,13 +304,13 @@ {\isodd{\value{cnt@board}}} {\ifthenelse% {\equal{\board@val@whitefieldlist}{}}% - {\edef\board@val@whitefieldlist{\zeroalph{cnt@board@file}\arabic{cnt@board@rank}}}% - {\edef\board@temp@curfield{\zeroalph{cnt@board@file}\arabic{cnt@board@rank}}% + {\edef\board@val@whitefieldlist{\zeroalph{cnt@board@file}\number\value{cnt@board@rank}}}% + {\edef\board@temp@curfield{\zeroalph{cnt@board@file}\number\value{cnt@board@rank}}% \expandafter\board@do@l@addto@macro\expandafter\board@val@whitefieldlist\expandafter{\expandafter,\board@temp@curfield}}}% {\ifthenelse% {\equal{\board@val@blackfieldlist}{}}% - {\edef\board@val@blackfieldlist{\zeroalph{cnt@board@file}\arabic{cnt@board@rank}}}% - {\edef\board@temp@curfield{\zeroalph{cnt@board@file}\arabic{cnt@board@rank}}% + {\edef\board@val@blackfieldlist{\zeroalph{cnt@board@file}\number\value{cnt@board@rank}}}% + {\edef\board@temp@curfield{\zeroalph{cnt@board@file}\number\value{cnt@board@rank}}% \expandafter\board@do@l@addto@macro\expandafter\board@val@blackfieldlist\expandafter{\expandafter,\board@temp@curfield}}}% \addtocounter{cnt@board@rank}{1}}% \addtocounter{cnt@board@file}{1}}}% @@ -695,7 +695,7 @@ {\value{cnt@board}>0}% {\edef\board@temp@currankposition{% \board@temp@currankposition - \arabic{cnt@board}% + \number\value{cnt@board}% \csname board@val@f\the\c@cnt@board@file r\the\c@cnt@board@rank @piecechar\endcsname}% \setcounter{cnt@board}{0}}% {\edef\board@temp@currankposition{% @@ -706,7 +706,7 @@ {\value{cnt@board}>0}% {\edef\board@temp@currankposition{% \board@temp@currankposition - \arabic{cnt@board}}}% + \number\value{cnt@board}}}% {}}% %% stores the fen in chessgame.<name> (as in skak.sty the \storegame command @@ -1361,10 +1361,16 @@ \newcommand\board@skak@piececharlist{K,Q,R,B,N,P,k,q,r,b,n,p}% \newcommand\board@skak@whitepiececharlist{K,Q,R,B,N,P}% \newcommand\board@skak@blackpiececharlist{k,q,r,b,n,p}% - \AtBeginDocument{% \@ifpackageloaded{skak}% - {\def\board@skak@do@fencalculate{% + {%patch skak, see issue #1 + \patchcmd\Fen@handleA{\arabic}{\number\value}{}{}% + \patchcmd\Fen@handleA{\arabic}{\number\value}{}{}% + \patchcmd\Fen@handleA{\thehelpgobble}{\c@helpgobble}{}{}% + \patchcmd\Fen@handleA{\thehelpgobble}{\c@helpgobble}{}{}% + \patchcmd\Fen@calculate{\arabic}{\number\value}{}{}% + \patchcmd\Fen@calculate{\arabic}{\number\value}{}{}% + \def\board@skak@do@fencalculate{% \Fen@calculate \let\board@val@fencalculate\temp@board}% \def\board@skak@set@special@psmarkers#1#2{% @@ -1372,8 +1378,8 @@ \setcounter{fileFrom}{\value{fileTo}}% \setcounter{rankFrom}{\value{rankTo}}% \get@translation#2% - \rput(BM){\pnode(-\arabic{fileFrom},\arabic{rankFrom}){From}}% - \rput(BM){\pnode(-\arabic{fileTo},\arabic{rankTo}){To}}}}% + \rput(BM){\pnode(-\number\value{fileFrom},\number\value{rankFrom}){From}}% + \rput(BM){\pnode(-\number\value{fileTo},\number\value{rankTo}){To}}}}% {\def\board@skak@do@fencalculate{% \def\board@val@fencalculate{8/8/8/8/8/8/8/8}}}}% |