diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:53:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:53:00 +0000 |
commit | 8d1fca7ebd497342658b1df326e930b14ec42864 (patch) | |
tree | 30abc621178710f96cb4b8a8c2f6a6fd6ea25a03 /Master/texmf-dist/tex/latex | |
parent | 43bd11e0e6d534e3bde778f6e02a1de5375dbcbc (diff) |
chess
git-svn-id: svn://tug.org/texlive/trunk@755 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/chess/bdfchess.sty | 815 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/chess/chess.sty | 566 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/chess/chessboa.sty | 157 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/chess/chesskey.sty | 1122 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/chess/chessmg.sty | 567 |
5 files changed, 3227 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/chess/bdfchess.sty b/Master/texmf-dist/tex/latex/chess/bdfchess.sty new file mode 100644 index 00000000000..a41a2a38401 --- /dev/null +++ b/Master/texmf-dist/tex/latex/chess/bdfchess.sty @@ -0,0 +1,815 @@ +% This is BdFCHESS.STY Version 1.2 +% New additions to Piet Tutelaers CHESS.STY 1.2 +% for correspondence chess players +% +% Documentation see BDFGERM.TEX or BDFENGL.TEX +% +% Author Frank Hassel +% February 1993 +% +% These macros are free software in the spirit of TeX. +% Anyone, who demands payment for the distribution of this +% material, must make clear that the charge is for distribution +% and is no sense a licence fee or purchase fee for BDFCHESS.STY. +% Each user uses these macros entirely at his own risk. +% +% +% To include other postcardlanguages search for xxxx +% +\typeout{with fixes for 2e} +%%% FMi fixing for 2e +\def\xiipt{\fontsize{12pt}{14pt}\rmfamily} +% +%------- Usefull definitions not only for postalchess --------- +% +% +% +% +%------- \showinversboard ------------------------------------- +\newcount\@t +\newcount\@w +\def\@showinversrow#1{ + \@r=#1 + \@c=8 + \@sum=\@r + \advance\@sum by\@c + \loop + \@showchar + \ifnum\@c>1 \advance\@c by-1\advance\@sum by-1 + \repeat +} + +\def\showinversboard{ +\@t=1 +\vbox{\offinterlineskip + \hrule height1pt + \hbox{\vrule width1pt\Chess + \vbox{\loop + \hbox{\@showinversrow\@t} + \ifnum\@t<8 \advance\@t by1 + \repeat}% + \vrule width1pt} + \hrule height1pt}} +%---- \showboardwithnotation and \showinversboardwithnotation -- +%----- for boardsizes 10,15,20 and 30 pt------------------------ +\newlength{\boardbreite} +\newlength{\rhoehe} +\newlength{\feldbreite} +% +\def\selectnotationsize{ +\settowidth{\boardbreite}{\vrule width 2pt \Chess\@showrow8} +\feldbreite=\boardbreite +\advance\feldbreite by -2pt +\divide\feldbreite8 +\rhoehe=\boardbreite +\divide\rhoehe24 +% +\ifdim\boardbreite>240pt\font\no=cmr12\else +\ifdim\boardbreite>160pt\font\no=cmr10\else +\ifdim\boardbreite>120pt\font\no=cmr8\else +\ifdim\boardbreite>80pt\font\no=cmr6\fi\fi\fi\fi} +% +\def\showboardwithnotation{\selectnotationsize +\@t=8 +\vbox{\offinterlineskip + \hrule height1pt width\boardbreite + \Chess +\loop + \hbox{\vrule width1pt\@showrow\@t\vrule width1pt + \raisebox{\rhoehe}{\no\ \the\@t}} + \ifnum\@t>1 \advance\@t by-1 +\repeat + \hrule height1pt width\boardbreite\smallskip +\hbox{ +\hbox to \feldbreite{\hfil\no a\hfil} +\hbox to \feldbreite{\hfil\no b\hfil} +\hbox to \feldbreite{\hfil\no c\hfil} +\hbox to \feldbreite{\hfil\no d\hfil} +\hbox to \feldbreite{\hfil\no e\hfil} +\hbox to \feldbreite{\hfil\no f\hfil} +\hbox to \feldbreite{\hfil\no g\hfil} +\hbox to \feldbreite{\hfil\no h\hfil} +}}} +% +\def\showinversboardwithnotation{\selectnotationsize +\@t=1 +\vbox{\offinterlineskip + \hrule height1pt width\boardbreite + \Chess +\loop + \hbox{\vrule width1pt\@showinversrow\@t\vrule width1pt + \raisebox{\rhoehe}{\no\ \the\@t}} + \ifnum\@t<8 \advance\@t by1 +\repeat + \hrule height1pt width\boardbreite\smallskip +\hbox{ +\hbox to \feldbreite{\hfil\no h\hfil} +\hbox to \feldbreite{\hfil\no g\hfil} +\hbox to \feldbreite{\hfil\no f\hfil} +\hbox to \feldbreite{\hfil\no e\hfil} +\hbox to \feldbreite{\hfil\no d\hfil} +\hbox to \feldbreite{\hfil\no c\hfil} +\hbox to \feldbreite{\hfil\no b\hfil} +\hbox to \feldbreite{\hfil\no a\hfil} +}}} +%------- \savegameone and \restoregameone --------------------- +\def\@colA{\ifcase\@c\or i\or j\or k\or l\or m\or n\or o\or p\fi} +% +\newif\ifWhiteone +\newif\ifcastlingone +\newif\ifKnotmovedone +\newif\ifknotmovedone +\newif\ifpromotionone +\newif\ifenpassantone +\newcount\movecountone +% +\def\savegameone{ +\global\let\Whiteone=\White +\global\let\castlingone=\castling +\global\let\Knotmovedone=\Knotmoved +\global\let\knotmovedone=\knotmoved +\global\let\promotionone=\promotion +\global\let\enpassantone=\enpassant +\global\movecountone=\movecount + + \@r=1 + \loop + {\@c=1 + \loop + \@get\piece[\@col\the\@r] + \@set[\@colA\the\@r](\piece) + \ifnum\@c<8 \advance\@c by1 + \repeat} + \ifnum\@r<8 \advance\@r by 1 + \repeat +} +% +\def\restoregameone{ +\global\let\White=\Whiteone +\global\let\castling=\castlingone +\global\let\Knotmoved=\Knotmovedone +\global\let\knotmoved=\knotmovedone +\global\let\promotion=\promotionone +\global\let\enpassant=\enpassantone +\global\movecount=\movecountone + \@r=1 + \loop + {\@c=1 + \loop + \@get\piece[\@colA\the\@r] + \@set[\@col\the\@r](\piece) + \ifnum\@c<8 \advance\@c by1 + \repeat} + \ifnum\@r<8 \advance\@r by 1 + \repeat +} +%------- \savegametwo and \restoregametwo --------------------- +\def\@colB{\ifcase\@c\or q\or r\or s\or t\or u\or v\or w\or x\fi} + +\newif\ifpostalWhitetwo +\newif\ifcastlingtwo +\newif\ifKnotmovedtwo +\newif\ifknotmovedtwo +\newif\ifpromotiontwo +\newif\ifenpassanttwo +\newcount\movecounttwo +% +\def\savegametwo{ +\global\let\Whitetwo=\White +\global\let\castlingtwo=\castling +\global\let\Knotmovedtwo=\Knotmoved +\global\let\knotmovedtwo=\knotmoved +\global\let\promotiontwo=\promotion +\global\let\enpassanttwo=\enpassant +\global\movecounttwo=\movecount + \@r=1 + \loop + {\@c=1 + \loop + \@get\piece[\@col\the\@r] + \@set[\@colB\the\@r](\piece) + \ifnum\@c<8 \advance\@c by1 + \repeat} + \ifnum\@r<8 \advance\@r by 1 + \repeat} +% +\def\restoregametwo{ +\global\let\White=\Whitetwo +\global\let\castling=\castlingtwo +\global\let\Knotmoved=\Knotmovedtwo +\global\let\knotmoved=\knotmovedtwo +\global\let\promotion=\promotiontwo +\global\let\enpassant=\enpassanttwo +\global\movecount=\movecounttwo + \@r=1 + \loop + {\@c=1 + \loop + \@get\piece[\@colB\the\@r] + \@set[\@col\the\@r](\piece) + \ifnum\@c<8 \advance\@c by1 + \repeat} + \ifnum\@r<8 \advance\@r by 1 + \repeat +} +%----------- \storeboard ------------------------------------ +\def\storeboard#1{ +\newwrite\bdf +\immediate\openout\bdf=#1 +\immediate\write\bdf{\string\begin{position}} +\immediate\write\bdf{\string\White(} +\@r=1 +\loop +\@c=1 +\@sum=\@r\advance \@sum by \@c +\loop + \@get\piece[\@col\the\@r] +\if\piece E +\else +% +% +\if\piece R \immediate\write\bdf{\uc@rook\@col\the\@r,}\fi +\if\piece N \immediate\write\bdf{\uc@knight\@col\the\@r,}\fi +\if\piece B \immediate\write\bdf{\uc@bishop\@col\the\@r,}\fi +\if\piece Q \immediate\write\bdf{\uc@queen\@col\the\@r,}\fi +\if\piece P \immediate\write\bdf{\@col\the\@r,}\fi +\if\piece K \@t=\@c \@w=\@r \fi +\fi + \ifnum\@c<8 \advance \@c by 1 \advance\@sum by 1 + \repeat + \ifnum\@r<8 \advance \@r by 1 +\@c=1 +\repeat +\@c=\@t +\immediate\write\bdf{\uc@king\@col\the\@w )} +% +\immediate\write\bdf{\string\Black(} +\@r=1 +\loop +\@c=1 +\@sum=\@r\advance \@sum by \@c +\loop + \@get\piece[\@col\the\@r] +\if\piece E +\else +\if\piece k \@t=\@c \@w=\@r\fi +% +% +\if\piece r \immediate\write\bdf{\uc@rook\@col\the\@r,}\fi +\if\piece n \immediate\write\bdf{\uc@knight\@col\the\@r,}\fi +\if\piece b \immediate\write\bdf{\uc@bishop\@col\the\@r,}\fi +\if\piece q \immediate\write\bdf{\uc@queen\@col\the\@r,}\fi +\if\piece p \immediate\write\bdf{\@col\the\@r,}\fi +\fi + \ifnum\@c<8 \advance \@c by 1 \advance\@sum by 1 + \repeat + \ifnum\@r<8 \advance \@r by 1 +\@c=1 +\repeat +\@c=\@t +\immediate\write\bdf{\uc@king\@col\the\@w )} +% +\immediate\write\bdf{\string\global\movecount=\the\movecount} +\ifWhite +\immediate\write\bdf{\string\global\string\Whitetrue} +\else +\immediate\write\bdf{\string\global\string\Whitefalse} +\fi +\immediate\write\bdf{\string\end{position}} +\immediate\closeout\bdf +} +% +%------- Here are the definitions for postal chessplayers ----- +% +%-------- boxes for postcard in several languages ------------- +\global\font\Fig=chessf10 +\newbox\yourdatebox +\newbox\mydatebox +\newbox\moveonebox +\newbox\movetwobox +\newbox\acceptonebox +\newbox\accepttwobox +% +\def\cardtabular[#1,#2,#3,#4]{ +\hbox{\hbox to 10mm{\hss #1\hss} + \hbox to 18mm{\hss #2\hss} + \hbox to 7mm{\hss #3\hss} + \hbox to 18mm{\hss #4\hss}}} +% +%%------------------- Definitions for english postcard --------- +\chardef \pc@english=0 +\gdef\tabularheader{\vbox{ + \hbox{\hbox to 30mm{\hss Date\hss} + \hbox to 70mm{\hss\ \hss} + \hbox to 30mm{\hss Date\hss}} +\movetabular[Arrival,Leaving,$\sum$,{\large\bf White}, ,{\large +\bf Black},Arrival,Leaving,$\sum$] +\vskip 1pt\hrule}} +% +\def\cardenglish{% +\gdef\postcardname{postcard} +%%%%FMi +\gdef\salutations{Yours sincerely} +\gdef\nameif{if } +\def\yourdate[##1][##2][##3]{\global\setbox\yourdatebox=\vbox{ +\hbox{Your postmark date ##1} +\hbox{Your time taken ##2 day(s)} +\hbox{Your total time ##3 days}}} +% +\def\mydate[##1][##2][##3][##4]{\global\setbox\mydatebox=\vbox{ +\hbox{Received on ##1} +\hbox{Replied on ##2} +\hbox{My time taken ##3 day(s)} +\hbox{My total time ##4 days}}} +% +\global\setbox\acceptonebox=\vbox{ +\hbox to 50mm{\hss Game 1\hss}\vskip 2mm +\cardtabular[No.,Your move,No.,My move] +\hrule\vskip 2pt} +% +\global\setbox\accepttwobox=\vbox{ +\hbox to 50mm{\hss Game 2\hss}\vskip 2mm +\cardtabular[No.,Your move,No.,My move] +\hrule\vskip 2pt} +% +}% +%------------------- Definitions for german postcard --------- +\chardef \pc@german=1 +\ifcurrentlanguage{germanb}{% +\gdef\tabularheader{\vbox{ + \hbox{\hbox to 30mm{\hss Datum\hss} + \hbox to 70mm{\hss\ \hss} + \hbox to 30mm{\hss Datum\hss}} +\movetabular[Ankunft,Abgang,$\sum$,{\large\bf Wei\ss}, ,{\large +\bf Schwarz},Ankunft,Abgang,$\sum$] +\vskip 1pt\hrule}}} +% +\def\cardgerman{% +\gdef\postcardname{Postkarte} +\gdef\salutations{Freundliche Gr\"u\ss e} +\gdef\nameif{falls } +\def\yourdate[##1][##2][##3]{\global\setbox\yourdatebox=\vbox{ +\hbox{Ihr Poststempeldatum ##1} +\hbox{Ihre Bedenkzeit ##2 Tag(e)} +\hbox{Ihre Gesamtbedenkzeit ##3 Tage}}} +% +\def\mydate[##1][##2][##3][##4]{\global\setbox\mydatebox=\vbox{ +\hbox{Empfangen am ##1} +\hbox{Beantwortet am ##2} +\hbox{Meine Bedenkzeit ##3 Tag(e)} +\hbox{Meine Gesamtbedenkzeit ##4 Tage}}} +% +\global\setbox\acceptonebox=\vbox{ +\hbox to 50mm{\hss Partie 1\hss}\vskip 2mm +\cardtabular[Nr.,Ihr Zug,Nr.,Mein Zug] +\hrule\vskip 2pt} +% +\global\setbox\accepttwobox=\vbox{ +\hbox to 50mm{\hss Partie 2\hss}\vskip 2mm +\cardtabular[Nr.,Ihr Zug,Nr.,Mein Zug] +\hrule\vskip 2pt} +% +}% +%------------------- Definitions for french postcard --------- +\chardef \pc@french=2 +\ifcurrentlanguage{french}{% +\gdef\tabularheader{\vbox{ + \hbox{\hbox to 30mm{\hss Date\hss} + \hbox to 70mm{\hss\ \hss} + \hbox to 30mm{\hss Date\hss}} +\movetabular[Arriv\'ee,D\'epart,$\sum$,{\large\bf Blanc}, ,{\large +\bf Noir},Arriv\'ee,D\'epart,$\sum$] +\vskip 1pt\hrule}}} +% +\def\cardfrench{% +\gdef\postcardname{carte postale} +\gdef\salutations{Salutations} +\gdef\nameif{que } +\def\yourdate[##1][##2][##3]{\global\setbox\yourdatebox=\vbox{ +\hbox{Votre date de la poste ##1} +\hbox{Votre temps ##2 jour(s)} +\hbox{Votre temps total ##3 jours}}} +% +\def\mydate[##1][##2][##3][##4]{\global\setbox\mydatebox=\vbox{ +\hbox{Arriv\'ee ##1} +\hbox{D\'epart ##2} +\hbox{Mon temps ##3 jour(s)} +\hbox{Mon temps total ##4 jours}}} +% +\global\setbox\acceptonebox=\vbox{ +\hbox to 50mm{\hss Partie 1\hss}\vskip 2mm +\cardtabular[No.,Votre coup,No.,Mon coup] +\hrule\vskip 2pt} +% +\global\setbox\accepttwobox=\vbox{ +\hbox to 50mm{\hss Partie 2\hss}\vskip 2mm +\cardtabular[No.,Votre coup,No.,Mon coup] +\hrule\vskip 2pt} +% +} +%------------------- Definitions for xxxx postcard --------- +\chardef \pc@xxxx=3 +\ifcurrentlanguage{xxxx}{% +\gdef\tabularheader{\vbox{ + \hbox{\hbox to 30mm{\hss xxxx\hss} + \hbox to 70mm{\hss\ \hss} + \hbox to 30mm{\hss xxxx\hss}} +\movetabular[xxxx,xxxx,$\sum$,{\large\bf xxxx}, ,{\large \bf + xxxx},xxxx,xxxx,$\sum$] +\vskip 1pt\hrule}}} +% +\def\cardxxxx{% +\gdef\postcardname{xxxx} +\gdef\salutations{xxxx} +\gdef\nameif{xxxx } +\def\yourdate[##1][##2][##3]{\global\setbox\yourdatebox=\vbox{ +\hbox{xxxx ##1} +\hbox{xxxx ##2 xxxx} +\hbox{xxxx ##3 xxxx}}} +% +\def\mydate[##1][##2][##3][##4]{\global\setbox\mydatebox=\vbox{ +\hbox{xxxx ##1} +\hbox{xxxx ##2} +\hbox{xxxx ##3 xxxx} +\hbox{xxxx ##4 xxxx}}} +% +\global\setbox\acceptonebox=\vbox{ +\hbox to 50mm{\hss xxxx 1\hss}\vskip 2mm +\cardtabular[xxxx,xxxx,xxxx,xxxx] +\hrule\vskip 2pt} +% +\global\setbox\accepttwobox=\vbox{ +\hbox to 50mm{\hss xxxx 2\hss}\vskip 2mm +\cardtabular[xxxx,xxxx,xxxx,xxxx] +\hrule\vskip 2pt} +} +%--------------- Selection of language ------------------------- +\def\p@postcardlanguage#1{\expandafter\ifx\csname pc@#1\endcsname\relax +\errhelp{Your command will be ignored, type <return> to proceed}% +\errmessage{You haven't defined the language #1 yet}% + \else +\csname card#1\endcsname + \fi} + +\def\postcardlanguage#1{\protect\p@postcardlanguage{% + \ifnum\escapechar=\expandafter`\string#1\empty + \else \string#1\empty\fi}} +%----------------- Init ------------------------------ +\postcardlanguage{english}% Default language +\ifcurrentlanguage{germanb}{\postcardlanguage{german}} +\ifcurrentlanguage{french}{\postcardlanguage{french}} +\ifcurrentlanguage{xxxx}{\postcardlanguage{xxxx}} +\newgame +\newif\iffinishgameone\finishgameonetrue +\newif\iffinishgametwo\finishgametwotrue +\savegameone +\savegametwo +% +% different cardmoves +% +\def\acceptmoveone#1 #2 #3 #4 { +\global\setbox\acceptonebox= \vbox{\unvbox\acceptonebox +\vskip 2pt\cardtabular[#1,#2,#3,#4]}} +% +\def\acceptmovetwo#1 #2 #3 #4 { +\global\setbox\accepttwobox= \vbox{\unvbox\accepttwobox +\vskip 2pt\cardtabular[#1,#2,#3,#4]}} +% +\def\ifmoveone#1 #2 #3 #4 { +\movetabular[\ ,\ ,#1,#2,#3,#4,\ ,\ ,\ ] +\global\setbox\moveonebox= \vbox{\unvbox\moveonebox +\vskip 1.5pt\cardtabular[\nameif #1,#2,#3,#4]}} +% +\def\ifmovetwo#1 #2 #3 #4 { +\movetabular[\ ,\ ,#1,#2,#3,#4,\ ,\ ,\ ] +\global\setbox\movetwobox= \vbox{\unvbox\movetwobox +\vskip 1.5pt\cardtabular[\nameif #1,#2,#3,#4]}} +% +\def\moveone[#1][#2][#3][#4]{% +\global\setbox\moveonebox=\vbox{\cardtabular[#1,#2,#3,#4 ]}} +% +\def\movetwo[#1][#2][#3][#4]{% +\global\setbox\movetwobox=\vbox{\cardtabular[#1,#2,#3,#4 ]}} +% +% +%---\postmove and \postply same as \move and \ply in CHESS.STY- +%---but with calculation of consider- and departuretime ------- +% +\def\movetabular[#1,#2,#3,#4,#5,#6,#7,#8,#9]{\par + \hbox{\strut\hskip 1mm + \hbox to 15mm{\hfill #1\hfill} + \hbox to 15mm{\hfill #2\hfill} + \hbox to 8mm{\hfill #3} + \hbox to 24mm{\hfill #4\hfill} + \hbox to 8mm{\hfill #5} + \hbox to 24mm{\hfill #6\hfill} + \hbox to 15mm{\hfill #7\hfill} + \hbox to 15mm{\hfill #8\hfill} + \hbox to 8mm{\hfill #9}}\par} +% +\newcount\considerwhite +\newcount\considersumwhite +\newcount\considerblack +\newcount\considersumblack +\newcount\movecountwhite +\newcount\movecountblack + +\newbox\arrivalwhite +\newbox\leavingwhite +\newbox\arrivalblack +\newbox\leavingblack + +\newbox\plywhite +\newbox\plyblack + +\def\postmove #1 #2 #3 #4 #5 #6 {\frenchspacing +\advance\movecount by 1 +% +\considerwhite=#2 +\advance\considersumwhite by #2 +\@departure#1 #2 {} +\setbox\arrivalwhite=\copy\arrival +\setbox\leavingwhite=\copy\leaving +\setbox\plywhite=\hbox{\@ply#3 } +% +\considerblack=#6 +\advance\considersumblack by #6 +\@departure#5 #6 {} +\setbox\arrivalblack=\copy\arrival +\setbox\leavingblack=\copy\leaving +\setbox\plyblack=\hbox{\@ply#4 } +% +% Typesetting +% +\movetabular[\copy\arrivalwhite,\copy\leavingwhite, + \the\considersumwhite,\copy\plywhite, + \the\movecount.,\copy\plyblack,\copy\arrivalblack, + \copy\leavingblack,\the\considersumblack] +%Holiday +\global\advance\considerwhite by -\hw +\global\advance\considerblack by -\hb +\global\hw=0 +\global\hb=0 +% +\message{\the\movecount }} +% +% +\def\postply#1 #2 #3 {\frenchspacing + \ifWhite\advance\movecount by 1 +\considerwhite=#2 + \advance\considersumwhite by #2 + \else +\considerblack=#2 + \advance\considersumblack by #2 + \fi +\@departure#1 #2 {} +\ifWhite +\setbox\arrivalwhite=\copy\arrival +\setbox\leavingwhite=\copy\leaving +\setbox\plywhite=\hbox{\@ply#3 } +\movetabular[\copy\arrivalwhite,\copy\leavingwhite, + \the\considersumwhite,\copy\plywhite, + \the\movecount.,\ ,\ ,\ ,\ ] +\else +\setbox\arrivalblack=\copy\arrival +\setbox\leavingblack=\copy\leaving +\setbox\plyblack=\hbox{\@ply#3 } +\movetabular[\ ,\ ,\ ,...,\the\movecount., +\copy\plyblack,\copy\arrivalblack, +\copy\leavingblack,\the\considersumblack] +\fi +%Holiday +\global\advance\considerwhite by -\hw +\global\advance\considerblack by -\hb +\global\hw=0 +\global\hb=0 +% +\message{(\the\movecount )} + \par}% +% +%------------- Game 1 -------------------------------- +% +\newenvironment{gameone}{% +\tabularheader + \newgame +\considersumwhite=0 +\considersumblack=0 +\global\finishgameonefalse +% +\typeout{Game 1} +\message{Move : }}{% +\savegameone +% +\ifWhite +% +\moveone[\the\movecount][\copy\plywhite][\the\movecount][\copy\plyblack] +\yourdate[\copy\leavingwhite][\the\considerwhite][\the\considersumwhite] +\mydate[\copy\arrivalblack][\copy\leavingblack][\the\considerblack][\the\considersumblack] +\else +\movecountblack=\movecount +\advance\movecountblack by -1 +% First ply for white ? +\ifnum\movecountblack=0 +\moveone[\,][\copy\plyblack][\the\movecount][\copy\plywhite] +\setbox\arrivalwhite=\hbox{} %delete arrival +\else +\moveone[\the\movecountblack][\copy\plyblack][\the\movecount][\copy\plywhite] +\fi +\mydate[\copy\arrivalwhite][\copy\leavingwhite][\the\considerwhite][\the\considersumwhite] +\yourdate[\copy\leavingblack][\the\considerblack][\the\considersumblack] +\fi}% + +\def\finishgameone{ + \newgame +\savegameone +\global\finishgameonetrue} +%------------------ Game 2 ------------------------------------- +% +\newenvironment{gametwo}{% +\tabularheader + \newgame +\considersumwhite=0 +\considersumblack=0 +\global\finishgametwofalse +% +\typeout{Game 2} +\message{Move : }}{% end of begin gametwo +\savegametwo +% +\ifWhite +\movetwo[\the\movecount][\copy\plywhite][\the\movecount][\copy\plyblack] +\iffinishgameone +\yourdate[\copy\leavingwhite][\the\considerwhite][\the\considersumwhite] +\mydate[\copy\arrivalblack][\copy\leavingblack][\the\considerblack][\the\considersumblack] +\fi +\else +\movecountblack=\movecount +\advance\movecountblack by -1 +\ifnum\movecountblack=0 +\movetwo[\,][\copy\plyblack][\the\movecount][\copy\plywhite] +\setbox\arrivalwhite=\hbox{} %delete arrival +\else +\movetwo[\the\movecountblack][\copy\plyblack][\the\movecount][\copy\plywhite] +\fi +\iffinishgameone +\yourdate[\copy\leavingblack][\the\considerblack][\the\considersumblack] +\mydate[\copy\arrivalwhite][\copy\leavingwhite][\the\considerwhite][\the\considersumwhite]\fi +\fi}% +% +\def\finishgametwo{ + \newgame +\savegametwo +\global\finishgametwotrue} +%----------------- Holiday -------------------------------- +\newcount\hw \hw=0 +\newcount\hb \hb=0 +\gdef\holidaywhite#1 {\global\hw=#1 \global\advance\considersumwhite by-\hw} +\gdef\holidayblack#1 {\global\hb=#1 \global\advance\considersumblack by-\hb} +% +%-----------------Create the postcard---------------------- +% +\def\sender#1{\gdef\sender{#1}} +\def\receiver#1{\gdef\receiver{#1}} +\def\cardmessage#1{\gdef\cardmessage{#1}} +% +\gdef\postcard{\@ifnextchar [{\@ipostcard}{\@ipostcard[e]}} +\long\def\@ipostcard[#1](#2,#3){% +\vbox{\vskip #3\fboxsep 0pt\rlap{\kern#2 +\if #1f \fboxrule0.5pt \else \fboxrule0pt \fi +\fbox{\vbox to 97mm{\font\Chess=chess15 +\restoregameone +\vskip 2mm +\hbox to 69mm{\hskip 10mm\showboardwithnotation\hss}\vskip 2mm +\iffinishgameone \else +\hbox to 69mm{\hss\copy\acceptonebox\hss} +\hbox to 69mm{\hss\copy\moveonebox\hss} +\fi +\vss +\hbox to 69mm{\hskip 10mm\copy\mydatebox\hss} +\vskip 4mm} +% +\vbox to 97mm{\font\Chess=chess15 +\restoregametwo +\vskip 2mm +\hbox to 69mm{\hskip 10mm\showboardwithnotation\hss}\vskip 2mm +\iffinishgametwo \else +\hbox to 69mm{\hss\copy\accepttwobox\hss} +\hbox to 69mm{\hss\copy\movetwobox\hss} +\fi +\vss +\hbox to 69mm{\hskip 10mm\copy\yourdatebox\hss} +\vskip 2mm +\hbox{\salutations\hss} +\vskip 2mm +}}}}} +% +\gdef\postcardaddress{ +\@ifnextchar [{\@ipostcardaddress}{\@ipostcardaddress[ee]}} +\long\def\@ipostcardaddress[#1#2](#3,#4){% +\vbox{\vskip #4 +\fboxsep 4mm\rlap{\kern#3\hbox{ +\if #1f \fboxrule0.5pt \else +\if #2f \fboxrule0.5pt \else +\fboxrule0pt \fi\fi +\fbox{\vbox to 89mm{\hsize 60mm +\sender\\\vss +\cardmessage\vss\vss} +\hskip 4.5mm +\if #1t \vrule \else \if #2t \vrule\fi\fi +\hskip 5.5mm +\vbox to 89mm{\hsize 60mm\fboxrule0.5pt +\hskip 35mm\fbox{\rule{0cm}{16mm}\hskip 12mm}\\[8mm] +\if #1t {\xiipt \bf \postcardname} \else +\if #2t {\xiipt \bf \postcardname} \fi\fi +\vss\vss\vss +\receiver +\vss}}}}}} +% +%-----------------Calculation of departure date------------ +% +% Call \departure day.month.year time ==> in box \arrival +% result : in box \leaving +\newbox\arrival +\newbox\leaving +% +\newcount\posty +\newcount\postm +\newcount\postd +\newcount\posttemp +\newcount\postp +\newcount\posts +% date time +\gdef\@departure#1.#2.#3 #4#5{% +\posty=#3\relax\postm=#2\relax\postd=#1\relax\postp=#4#5\relax +% +% It works only up to 2099 but I think it doesn't matter +% +\advance\posty by -1900 +% +\posts=\posty +\ifnum\posts>99\advance\posts by -100 \fi +\setbox\arrival=\hbox{\the\postd .\the\postm .\the\posts } +% +\ifnum\postm<3\advance\postm12\advance\posty by -1\else \fi +% +\posts=\posty +\multiply\posts36525\relax +\divide\posts100\relax +% +\posttemp=\postm +\advance\posttemp1 +\multiply\posttemp306\relax +\divide\posttemp10\relax +\advance\posts\posttemp +\advance\posts by -122 +\advance\posts\postd +% +% Advance daycount by considertime +% +\advance\posts\postp +% +% year +% +\posty=\posts +\multiply\posty by 100 +\divide\posty36525 +\posttemp=\posty +% +\multiply\posttemp36525 +\divide\posttemp100\relax +\advance\posts by -\posttemp +% +% month +\advance\posts by 122 +\postm=\posts +\multiply\postm10\relax +\divide\postm306\relax +\advance\postm by -1 +% day +\posttemp=\postm +\advance\posttemp by 1 +\multiply\posttemp306\relax +\divide\posttemp10\relax +\advance\posts by -\posttemp +\postd=\posts +% +% I think there is a little mistake in my formular +% Correction at leapyear : 29.2 instead of 31.2 +% +\ifnum\postm=2 \ifnum\postd=31 \advance\postd by -2\fi\fi +% +\ifnum\postm>12\advance\postm by -12 \advance\posty by 1\else \fi +\ifnum\posty>99\advance\posty by -100 \fi +% +% Other faults 00.04 instead of 31.03 +% Other faults 00.09 instead of 31.08 +% +\ifnum\postm=4 \ifnum\postd=0 \postd=31 \postm=3 \fi\fi +\ifnum\postm=9 \ifnum\postd=0 \postd=31 \postm=8 \fi\fi +% +\setbox\leaving=\hbox{\the\postd .\the\postm .\the\posty } +} + +\def\departure#1.#2.#3 #4{% day, month, year , considertime +\@departure} +% diff --git a/Master/texmf-dist/tex/latex/chess/chess.sty b/Master/texmf-dist/tex/latex/chess/chess.sty new file mode 100644 index 00000000000..b584d4469bc --- /dev/null +++ b/Master/texmf-dist/tex/latex/chess/chess.sty @@ -0,0 +1,566 @@ +% - removed spaces inside macros that might show up in output + +% replaced +% width by \@width +% height by \@height +% depth by \@depth +% "by 1" by \@ne + +% added: +% +% dimen \boardrule holding the width of the rule around the board + +% put \global into \Whitetrue and \Whitefalse + + + +\message{FMi updated chess version 96/07/21!!!} +% +% chess.sty +% --------- +% Style file for writing about chess games +% Author : Piet Tutelaers (internet: rcpt@urc.tue.nl) +% Version: 1.2 (Febr. 1992) +% Improvements over version 1.1 +% - added `\v{S}ahovski Informator' symbols +% -`en passant capture' bug fixed (reported by Jonathan Mestel) +% -change {--} into \hbox{--} to prevent hyphenation within move +% -\move's lined up on last row (or digit in case of castling) +% -handling of promotion improved +% * Black promotion problem solved (plain TeX) +% * comment allowed also with promotion +% * if no promotion piece is provided a default Q(ueen) is supposed +% Thanks to: Jan Jaap Spreij (puls@cs.rug.nl) +% -improved interface to plain TeX +% -language support using the babel package from Johannes Braams +% (currently support for english, dutch, german and french but you +% can add an extra language `foreign' by: +% 1. creating `foreign.sty' for cooperating with `babel' +% 2. search for FOREIGN and follow the instructions in the comments) +% - \begin{nochess} ... \end{nochess} +% -chessfig10 renamed to chessf10 (service to MSDOS users) +% Version: 1.1 (17 Nov 1990) +% Improvements over version 1.0: +% -TeX code cleaned up (thanks to TeX-wizzard Victor Eijkhout) +% -moving a King does not generate a castling move when this +% King already moved +% -renamed internal macro `\\' because LaTeX uses that +% -better hooks for foreign languages (look for lines marked with +% %%FOREIGN%%) +% Torture test: +% If you change something in the chess.sty style check if everything +% else is still working with torture-test.ltx (LaTeX) or +% torture-test.tex (plain TeX). +% Known problems: +% -The analysis mode can not be used within arguments of macros +% not: \centerline{|21.N5*f3|} but: |\centerline{21.N5*f3}| +% Version: 1.0 (5 Jan 1990) +% + + +% +% Do we have language support? Otherwise take default language! +% +%\ifx\undefined\babel@core@loaded\input english.sty\fi + + + +\def\@set[#1#2](#3){%arguments: [a-h1-8](<letter>) + \expandafter\xdef\csname#1#2\endcsname{#3}} + +\def\@get#1[#2#3]{%arguments:\cs[a-h1-8] + \edef#1{\csname#2#3\endcsname}} + +\font\Chess=chess20 + +\newcount\@c % column +\newcount\@r % row +\newcount\@sum % row+column + +\def\@col{\ifcase\@c\or a\or b\or c\or d\or e\or f\or g\or h\fi} + +\def\@showchar{% + \@get\piece[\@col\the\@r]% + \if\piece E\ifodd\@sum 0\else Z\fi\else + \if\piece P\ifodd\@sum P\else O\fi\else + \if\piece p\ifodd\@sum p\else o\fi\else + \if\piece R\ifodd\@sum R\else S\fi\else + \if\piece B\ifodd\@sum B\else A\fi\else + \if\piece N\ifodd\@sum N\else M\fi\else + \if\piece r\ifodd\@sum r\else s\fi\else + \if\piece b\ifodd\@sum b\else a\fi\else + \if\piece n\ifodd\@sum n\else m\fi\else + \if\piece K\ifodd\@sum K\else J\fi\else + \if\piece Q\ifodd\@sum Q\else L\fi\else + \if\piece k\ifodd\@sum k\else j\fi\else + \if\piece q\ifodd\@sum q\else l\fi\else + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +\def\@showrow#1{% + \@r=#1\@c=1 + \@sum=\@r\advance\@sum by\@c + \loop + \@showchar + \ifnum\@c<8 \advance\@c \@ne\advance\@sum \@ne + \repeat +} + +\newdimen\boardrule +\setlength\boardrule{1pt} + +\def\showboard{% +\vbox{\offinterlineskip + \hrule \@height \boardrule + \hbox{\vrule \@width \boardrule\Chess + \vbox{\hbox{\@showrow8}% + \hbox{\@showrow7}% + \hbox{\@showrow6}% + \hbox{\@showrow5}% + \hbox{\@showrow4}% + \hbox{\@showrow3}% + \hbox{\@showrow2}% + \hbox{\@showrow1}}% + \vrule \@width \boardrule}% + \hrule \@height \boardrule}% +} + +% inner loop needs extra { ... } + +\def\@emptyboard{% + \@r\@ne + \loop + {\@c\@ne + \loop + \@set[\@col\the\@r](E)% + \ifnum\@c<8 \advance\@c \@ne + \repeat}% + \ifnum\@r<8 \advance\@r \@ne + \repeat +} + +\def\@initboard{% +% empty squares + \@r\thr@@ + \loop + {\@c\@ne + \loop + \@set[\@col\the\@r](E)% + \ifnum\@c<8 \advance\@c \@ne + \repeat}% + \ifnum\@r<6 \advance\@r \@ne + \repeat +% pawns + \@c\@ne + \loop + \@set[\@col2](P)\@set[\@col7](p)% + \ifnum\@c<8 \advance\@c \@ne + \repeat +% pieces + \@set[a1](R)\@set[h1](R)% + \@set[a8](r)\@set[h8](r)% + \@set[b1](N)\@set[g1](N)% + \@set[b8](n)\@set[g8](n)% + \@set[c1](B)\@set[f1](B)% + \@set[c8](b)\@set[f8](b)% + \@set[d1](Q)\@set[e1](K)% + \@set[d8](q)\@set[e8](k)% +} + +% +% The next part defines a user friendly notation for chess moves. +% Some examples: |21. Nf3-e5, Ke8*f8 22. 0-0-0+, Bh8*a1| +% : |21.: Ke8*f8 22. Bh8*a1, 0-0| +% : |21 Nfe5 K*f8 22 0-0-0! B*a1| +% : |21: K*f8 22 B*a1 0-0| +% + +\font\Fig=chessf10 + +\gdef\@king{{\Fig K}} +\gdef\@queen{{\Fig Q}} +\gdef\@rook{{\Fig R}} +\gdef\@bishop{{\Fig B}} +\gdef\@knight{{\Fig N}} +\gdef\@dash{\hbox{--}} +\gdef\@capt{$\times$} +\gdef\@dots{~$\ldots$,} +\gdef\@dot{\char46 } + +% +% Make character codes for pieces depending on current language. +% (I cann't derive the Black values from the White using `\lowercase'!) +% + +\def\define@White@pieces#1#2#3#4#5#6{% define character codes for White pieces + \chardef\king@=`#1 \def\uc@king{#1} + \chardef\queen@=`#2 \def\uc@queen{#2} + \chardef\rook@=`#3 \def\uc@rook{#3} + \chardef\bishop@=`#4\def\uc@bishop{#4} + \chardef\knight@=`#5\def\uc@knight{#5} + \chardef\pawn@=`#6 \def\uc@pawn{#6}} +\def\define@Black@pieces#1#2#3#4#5#6{% and now the Black pieces + \def\lc@king{#1}\def\lc@queen{#2}\def\lc@rook{#3} + \def\lc@bishop{#4}\def\lc@knight{#5}\def\lc@pawn{#6}} +\def\activate@pieces{% make them active + \catcode\king@=\active\catcode\queen@=\active\catcode\rook@=\active% + \catcode\bishop@=\active\catcode\knight@=\active} +\def\deactivate@pieces{% make them inactive + \catcode\king@=11\catcode\queen@=11\catcode\rook@=11% + \catcode\bishop@=11\catcode\knight@=11} +\def\ifcurrentlanguage#1#2{%if language defined then compare with \language + \expandafter\ifx\csname l@#1\endcsname\relax% + \else\ifnum\language=\expandafter\csname l@#1\endcsname\relax#2\fi\fi} +\def\select@pieces{% select pieces depending on language + \define@White@pieces{K}{Q}{R}{B}{N}{P} + \define@Black@pieces{k}{q}{r}{b}{n}{p} + } +\def\let@pieces#1#2#3#4#5{% let character codes be macros + \let#1=\@king\let#2=\@queen\let#3=\@rook% + \let#4=\@bishop\let#5=\@knight} + +\catcode`|=\active\select@pieces +{\catcode`:=\active\catcode`.=\active\catcode`*=\active\catcode`-=\active + \activate@pieces + \gdef\trigger@pieces{ + \catcode`:=\active\catcode`.=\active\catcode`*=\active\catcode`-=\active + \activate@pieces + % I would like to say ``\let\king@=\@king'' but how? + \let@pieces{K}{Q}{R}{B}{N}% + \let-=\@dash\let*=\@capt\let:=\@dots\let.=\@dot}% + \gdef\@notation{\begingroup\let|=\endgroup\trigger@pieces}% +% +% Provide a `nochess' environment in which the `|' character becomes +% inactive for situations where the `|' is already in use (like in +% the LaTeX `tabular' environment for example). +% + \gdef\nochess{\begingroup\let|=\relax\catcode`\|=12\relax + \catcode`:=12 \catcode`.=12 \catcode`*=12 \catcode`-=12 + \deactivate@pieces\let\endnochess=\endgroup} + \gdef\chess{\begingroup\let\endchess=\endgroup\trigger@pieces} +} +\let|=\@notation + +% +% Next part provides a ply (half move) generator +% + +\newif\ifWhite \newif\ifFigure \newif\ifcapture + +%FMi +\def\Whitetrue{\global\let\ifWhite\iftrue} +\def\Whitefalse{\global\let\ifWhite\iffalse} + +% +% next newif's needed for castling +% +\newif\ifKnotmoved \newif\ifknotmoved +\newif\ifcastling \newif\ifoo + +% +% Globals for special pawn moves (en passant capture and promotion) +% + +\newif\ifenpassant \newif\ifpromotion + +\def\@color#1{% Color of a piece 0: none, -1: black, 1: white + \if #1E0\else + \ifnum`#1=\uccode`#11\else-1\fi\fi} + +% +% No checking is done for validity of moves, only legal moves behave well!! +% + +\def\@ply#1#2#3#4#5 {% Syntax: [a-h][1-8][a-h][1-8]{Q|R|B|N}{Comment} + \@get\piece[#1#2]\@get\capture[#3#4]\Figuretrue + \if\capture E\capturefalse\else\capturetrue\fi + \ifWhite + \if\piece P\Figurefalse + \if#46 + \if\eprow#3\capturetrue\enpassanttrue\fi + \xdef\eprow{x}% + \else + \xdef\eprow{x}% + \if#22 + \if#44\xdef\eprow{#3}\fi + \else + \if#48\promotiontrue\fi + \fi + \fi + \else\xdef\eprow{x} + \if\piece K% check for possible castling + \ifKnotmoved + \if#3g\if#41\castlingtrue\ootrue\fi + \else\if#3c\if#41\castlingtrue\oofalse\fi\fi + \fi + \global\Knotmovedfalse + \fi + \fi + \fi + \ifcastling + \@set[#1#2](E)\@set[#3#4](K)% + \ifoo 0\@dash0\rlap{#5}\@set[f1](R)\@set[h1](E)% + \else 0\@dash0\@dash0\rlap{#5}\@set[d1](R)\@set[a1](E)\fi + \castlingfalse + \else + \ifFigure{\Fig\piece}\fi + #1#2\ifcapture\@capt\else\@dash\fi#3#4% + \rlap{\ifpromotion\expandafter\promovendus#5XYZ\else#5\fi}% + \@set[#1#2](E)% + \ifpromotion\@set[#3#4](\PROM)\else\@set[#3#4](\piece)\fi + \ifenpassant\@set[#3#2](E)\enpassantfalse\fi + \fi + \Whitefalse + \else % ``same'' for Black + \if\piece p\Figurefalse + \if#43 + \if\eprow#3\capturetrue\enpassanttrue\fi + \xdef\eprow{x}% + \else + \xdef\eprow{x}% + \if#27 + \if#45\xdef\eprow{#3}\fi + \else + \if#41\promotiontrue\fi + \fi + \fi + \else\xdef\eprow{x} + \if\piece k + \ifknotmoved + \if#3g\if#48\castlingtrue\ootrue\fi + \else\if#3c\if#48\castlingtrue\oofalse\fi\fi + \fi + \global\knotmovedfalse + \fi + \fi + \fi + \ifcastling + \@set[#1#2](E)\@set[#3#4](k)% + \ifoo 0\@dash0\rlap{#5}\@set[f8](r)\@set[h8](E)% + \else 0\@dash0\@dash0\rlap{#5}\@set[d8](r)\@set[a8](E)\fi% + \castlingfalse + \else + \ifFigure{\Fig\if\piece rR\else\if\piece bB\else\if\piece nN\else + \if\piece qQ\else K\fi\fi\fi\fi}\fi + #1#2\ifcapture\@capt\else\@dash\fi#3#4% + \rlap{\ifpromotion\expandafter\promovendus#5XYZ\else#5\fi}% + \@set[#1#2](E)% + \ifpromotion\@set[#3#4](\prom)\else\@set[#3#4](\piece)\fi + \ifenpassant\@set[#3#2](E)\enpassantfalse\fi + \fi + \Whitetrue + \fi} + +% +% Promovendus: treat first char of argument as promotion piece if queen, +% rook, knight or bishop; otherwise consider it as comment and take queen +% as default promotion. Leave in \PROM White promoting piece (Q|R|B|N) +% and in \prom Black's version (q|r|b|n). +% + +\def\promovendus#1#2Z{% + \if#1X\def\C{}\gdef\PROM{Q}\gdef\prom{q}% + \else + \ifnum`#1=\queen@ \gdef\PROM{Q}\gdef\prom{q}\def\C{\@comment#2}\else + \ifnum`#1=\rook@ \gdef\PROM{R}\gdef\prom{r}\def\C{\@comment#2}\else + \ifnum`#1=\bishop@\gdef\PROM{B}\gdef\prom{b}\def\C{\@comment#2}\else + \ifnum`#1=\knight@\gdef\PROM{N}\gdef\prom{n}\def\C{\@comment#2}\else + \gdef\PROM{Q}\gdef\prom{q}\def\C{\comment#1#2}% + \fi\fi\fi\fi\fi% + {\Fig\PROM}{\C}} +\def\@comment#1XY{#1} + +\newcount\movecount \movecount=0 + +%FMi LaTeX name: allows \setcounter.... +\let\c@movecount\movecount + +%FMi LaTeX name \@@line not \line +\def\showmove#1#2{\par + \@@line{\strut\hbox to1cm{\hfil\the\movecount.}% + \hbox to2.8cm{\hfil#1}\hbox to2.8cm{\hfil#2}\hfil}\par} + +\def\move#1 #2 { + \advance\movecount \@ne + \showmove{\@ply#1 }{\@ply#2 }} + +\def\ply#1 { + \ifWhite + \advance\movecount \@ne + \showmove{\@ply#1 }{} + \else + \showmove{$\ldots$}{\@ply#1 } + \fi} + +\def\newgame{\vskip0pt\movecount=0 \@initboard + \Whitetrue\castlingfalse\xdef\eprow{x} + \Knotmovedtrue\knotmovedtrue + \promotionfalse\enpassantfalse} + +\def\@dolist{\afterassignment\@dodolist\let\@@next= } % Answer 11.5 TeXbook +\def\@dodolist{\ifx\@@next\@endlist \let\@@next\relax % adapted to generate + \else \@nextitem\let\@@next\@dolist \fi % chess diagrams + \@@next} + +\def\@endlist{\@endlist} + +\def\@nextitem{% + \if\@@next\space \@set[\@col\the\@r](E)\else + \if\@@next * \@set[\@col\the\@r](E)\else + \if\@@next\uc@pawn \@set[\@col\the\@r](P)\else + \if\@@next\lc@pawn \@set[\@col\the\@r](p)\else + \if\@@next\uc@rook \@set[\@col\the\@r](R)\else + \if\@@next\lc@rook \@set[\@col\the\@r](r)\else + \if\@@next\uc@bishop \@set[\@col\the\@r](B)\else + \if\@@next\lc@bishop \@set[\@col\the\@r](b)\else + \if\@@next\uc@knight \@set[\@col\the\@r](N)\else + \if\@@next\lc@knight \@set[\@col\the\@r](n)\else + \if\@@next\uc@queen \@set[\@col\the\@r](Q)\else + \if\@@next\lc@queen \@set[\@col\the\@r](q)\else + \if\@@next\uc@king \@set[\@col\the\@r](K)\else + \if\@@next\lc@king \@set[\@col\the\@r](k)\else + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \advance\@c \@ne} + +\def\@initrow#1#2{\@r=#1\@c=1\@dolist#2\@endlist} + +% +% For setting up a position +% +\def\board#1#2#3#4#5#6#7#8{ + \@initrow8{#1} + \@initrow7{#2} + \@initrow6{#3} + \@initrow5{#4} + \@initrow4{#5} + \@initrow3{#6} + \@initrow2{#7} + \@initrow1{#8}} + +% +% Next macros for defining chess position (thanks to Victor Eijkhout) +% +\def\White(#1){\def\match{xxx}\xWhite#1,xxx,} +\def\xWhite#1,{\def\temp{#1} + \ifx\temp\match \else \WhitePieceOrPawn#1XY \expandafter\xWhite \fi} +\def\WhitePieceOrPawn#1#2#3#4Y{% + \if#3X \@set[#1#2](P) + \else\ifnum`#1=\king@ \@set[#2#3](K)\else % King + \ifnum`#1=\queen@ \@set[#2#3](Q)\else % Queen + \ifnum`#1=\rook@ \@set[#2#3](R)\else % Rook + \ifnum`#1=\bishop@\@set[#2#3](B)\else % Bishop + \ifnum`#1=\knight@\@set[#2#3](N)\else % kNight + \fi\fi\fi\fi\fi + \fi} + +\def\Black(#1){\def\match{xxx}\xBlack#1,xxx,} +\def\xBlack#1,{\def\temp{#1} + \ifx\temp\match \else \BlackPieceOrPawn#1XY \expandafter\xBlack \fi} +\def\BlackPieceOrPawn#1#2#3#4Y{ + \if#3X\@set[#1#2](p) + \else\ifnum`#1=\king@ \@set[#2#3](k)\else % King + \ifnum`#1=\queen@ \@set[#2#3](q)\else % Queen + \ifnum`#1=\rook@ \@set[#2#3](r)\else % Rook + \ifnum`#1=\bishop@\@set[#2#3](b)\else % Bishop + \ifnum`#1=\knight@\@set[#2#3](n)\else % kNight + \fi\fi\fi\fi\fi + \fi} + +\def\position{\begingroup% + \@emptyboard\movecount=0\xdef\eprow{x} + \Whitetrue\global\castlingfalse + \global\Knotmovedtrue\global\knotmovedtrue + \global\promotionfalse\global\enpassantfalse} +\def\endposition{\endgroup} + +% And now we define most symbols that are used in `\v{S}ahovski Informator' +% (Chess Informant). For a complete list see Informant#51 (1991) pp 10-12. +% If you add symbols realize that the macros should be usable by plain TeX +% and LaTeX and that the (La)TeX names should be suggestive and clear! +% But don't use uppercase letters or existing names (center)! +% Thanks go to John Saba (saba@ccit.arizona.edu) and Henry Thomas +% (hthomas@irisa.fr) for their help in defining next symbols. +\font\symbolten=cmsy10 \font\smrm=cmr6 \font\symbolsix=cmsy6 +\def\wbetter{\mbox{\baselineskip0pt$\vcenter{\vbox{\hbox{+}\hbox{=}}}$}} +\def\bbetter{\mbox{\baselineskip0pt + $\vcenter{\vbox{\hbox{=}\kern-.3ex\hbox{+}}}$}} +\def\wupperhand{\mbox{$\pm$}} +\def\bupperhand{\mbox{$\mp$}} +\def\wdecisive{\mbox{$+\hbox{}-$}} +\def\bdecisive{\mbox{$-\hbox{}+$}} +\def\equal{=} +\def\unclear{\mbox{$\infty$}} +\def\compensation{\mbox{\baselineskip0pt$\vcenter{\vbox{% + \hbox{\kern.056em\vbox{\hrule \@width 0.89em\kern0.35ex\hrule \@width 0.89em}} + \kern.2ex\hbox{$\infty$}}}$}} +% next symbol should be build using METAFONT +\def\devadvantage{{\symbolten\char'015}\kern-4.8pt + \vrule \@width 2.4pt \@height 6pt \@depth -5.6pt + \vrule \@width .4pt \@height 8pt \@depth -5.6pt\kern2.4pt} +\def\moreroom{{\symbolten\char'015}} +\def\withattack{$\rightarrow$} +\def\withinit{$\uparrow$} +\def\counterplay{\hbox{\baselineskip0pt% + $\vcenter{\vbox{\hbox{$\leftarrow$}\hbox{$\rightarrow$}}}$}} +\def\zugzwang{$\odot$} +\def\mate{\kern.4pt\mbox{% + \vrule \@width 2ex \@height 1.18ex \@depth -1.1ex\kern-2ex + \vrule \@width 2ex \@height .52ex \@depth -.44ex\kern-1.381ex + \vrule \@width .08ex \@height 1.8ex \@depth .2ex\kern0.615ex + \vrule \@width .08ex \@height 1.8ex \@depth .2ex\kern0.406ex}\kern.4pt} +\def\withidea{$\triangle$} +\def\onlymove{$\Box$} +\def\betteris{\mbox{\baselineskip0pt + $\vcenter{\vbox{\hbox{$\frown$}\kern-0.35ex\hrule \@width 0.95em}}$}} +\def\file{$\Leftrightarrow$} +% next symbol should be build using METAFONT +\def\diagonal{$\nearrow$} +\def\centre{$\Box$\kern-.6em\raise.54ex\hbox{\smrm\char'053}} +\def\kside{$\gg$} +\def\qside{$\ll$} +\def\weakpt{$\times$} +\def\ending{$\perp$} +% John Saba's method: +\def\blackbox{\vrule \@height .8ex \@width 1.2ex \@depth 0ex} +\def\whitebox{\vbox{\hrule \@height .1pt\hbox{\vrule \@width .1pt\kern.6ex + \vbox{\kern.8ex}\kern.6ex\vrule \@width .1pt}\hrule \@height .1pt}} +\def\bishoppair{\whitebox\kern-2pt\raise1.8pt\hbox{\whitebox}} +\def\opposbishops{\whitebox\kern-2pt\raise1.8pt\hbox{\blackbox}} +\def\samebishops{\blackbox\kern-2pt\raise1.8pt\hbox{\blackbox}} +% My method +%\def\bishoppair{\setbox0=\hbox{% +% \vrule \@width 1.4ex \@height 1ex \@depth -.92ex\kern-1.4ex +% \vrule \@width 1.4ex \@height .08ex \@depth 0pt\kern-1.4ex +% \vrule \@width .08ex \@height 1ex \@depth 0ex\kern1.24ex +% \vrule \@width .08ex \@height 1ex \@depth 0ex}% +% \kern.4pt\mbox{\copy0\kern-.6ex\raise0.56ex\box0}\kern.4pt} +%\def\opposbishops{\kern.4pt\mbox{% +% \vrule \@width 1.4ex \@height 1ex \@depth -.92ex\kern-1.4ex +% \vrule \@width 1.4ex \@height .08ex \@depth 0pt\kern-1.4ex +% \vrule \@width .08ex \@height 1ex \@depth 0ex\kern1.24ex +% \vrule \@width .08ex \@height 1ex \@depth 0ex\kern-.6ex +% \vrule \@width 1.4ex \@height 1.56ex \@depth -0.56ex}\kern.4pt } +%\def\samebishops{\kern.4pt\mbox{% +% \vrule \@width 1.4ex \@height 1ex \@depth 0ex\kern-.6ex +% \vrule \@width 1.4ex \@height 1.56ex \@depth -0.56ex}\kern.4pt} +\def\unitedpawns{$\circ\kern-.05em\circ$} +\def\seppawns{$\circ\kern-.3em\cdot\kern-.35em\cdot\kern-.1em\circ$} +\def\doublepawns{\mbox{\baselineskip0pt + $\vcenter{\vbox{\hbox{$\circ$}\vskip.8pt\hbox{$\circ$}}}$}} +% Next symbol still not perfect ... +\def\passedpawn{\mbox{\baselineskip0pt + $\vcenter{\vbox{\hbox{\kern0.14em\symbolsix\char'042}\hbox{$\circ$}}}$}} +\def\morepawns{$>$} +\def\timelimit{$\oplus$} +\def\novelty{{\sc N}} +\def\comment{{\sc RR}} +\def\various{{\sc R}} +\def\without{\kern.4pt\mbox{% + \vrule \@width 1ex \@height .08ex \@depth 0ex\kern-0.08ex + \vrule \@width 0.08ex \@height 1.5ex \@depth 0ex}\kern.4pt} +\def\with{\kern.4pt\mbox{% + \vrule \@width 0.08ex \@height 1.5ex \@depth 0ex\kern-0.08ex + \vrule \@width 1ex \@height .08ex \@depth 0ex}\kern.4pt} +\def\etc{$\parallel$} +\def\see{\kern.4pt\mbox{\vrule \@width 1em \@height .54ex \@depth -.46ex}\kern.4pt} + + diff --git a/Master/texmf-dist/tex/latex/chess/chessboa.sty b/Master/texmf-dist/tex/latex/chess/chessboa.sty new file mode 100644 index 00000000000..5e55b3d49d8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/chess/chessboa.sty @@ -0,0 +1,157 @@ +% chessboard.sty +% sebastian rahtz august 29th 1989 +% +% from Clark's cheq.sty, and article by W. Appelt in Tugboat 9.2, +% 284--287, 1988 +%--------------- +% fonts +% Derived from cheq.pl by Adrian F. Clark, 11th July 1989. +% Can be used by LaTeX or by plain TeX. +\newcounter{chessmove} +\setcounter{chessmove}{0} +\font\Cheq=cheq at 18pt % design size is 1pt; characters just legible at this size + +\def\CheqBBOnBlack{\Cheq\char 241 } +\def\CheqBB{\Cheq\char 76 } +\def\CheqBXOnBlack{\Cheq\char 240 } +\def\CheqBX{\Cheq\char 75 } +\def\CheqBKOnBlack{\Cheq\char 234 } +\def\CheqBK{\Cheq\char 83 } +\def\CheqBPOnBlack{\Cheq\char 184 } +\def\CheqBP{\Cheq\char 80 } +\def\CheqBQOnBlack{\Cheq\char 206 } +\def\CheqBQ{\Cheq\char 81 } +\def\CheqBROnBlack{\Cheq\char 229 } +\def\CheqBR{\Cheq\char 84 } +\def\CheqBSquare{\Cheq\char 120 } +\def\CheqWBOnBlack{\Cheq\char 186 } +\def\CheqWB{\Cheq\char 98 } +\def\CheqWXOnBlack{\Cheq\char 251 } +\def\CheqWX{\Cheq\char 107 } +\def\CheqWKOnBlack{\Cheq\char 167 } +\def\CheqWK{\Cheq\char 115 } +\def\CheqWPOnBlack{\Cheq\char 185 } +\def\CheqWP{\Cheq\char 112 } +\def\CheqWQOnBlack{\Cheq\char 182 } +\def\CheqWQ{\Cheq\char 113 } +\def\CheqWROnBlack{\Cheq\char 160 } +\def\CheqWR{\Cheq\char 116 } +%-------------- +\newif\ifblackchess +\newif\ifblackplaying +\def\BB{\ifblackchess\CheqBBOnBlack\else\CheqBB\fi} +\def\BX{\ifblackchess\CheqBXOnBlack\else\CheqBX\fi} +\def\BK{\ifblackchess\CheqBKOnBlack\else\CheqBK\fi} +\def\BP{\ifblackchess\CheqBPOnBlack\else\CheqBP\fi} +\def\BQ{\ifblackchess\CheqBQOnBlack\else\CheqBQ\fi} +\def\BR{\ifblackchess\CheqBROnBlack\else\CheqBR\fi} +\def\WB{\ifblackchess\CheqWBOnBlack\else\CheqWB\fi} +\def\WX{\ifblackchess\CheqWXOnBlack\else\CheqWX\fi} +\def\WK{\ifblackchess\CheqWKOnBlack\else\CheqWK\fi} +\def\WP{\ifblackchess\CheqWPOnBlack\else\CheqWP\fi} +\def\WQ{\ifblackchess\CheqWQOnBlack\else\CheqWQ\fi} +\def\WR{\ifblackchess\CheqWROnBlack\else\CheqWR\fi} +% +% Appelt's move macros, amended +% +\def\Move#1#2#3#4#5#6{ +% [XQKBRP][a-h][1-9][-x][a-h][1-8] +\def\hashthree{\ifcase#3\relax\or A\or B\or C\or D\or E\or F\or G\or H\fi} +\def\hashsix{\ifcase#6\relax\or A\or B\or C\or D\or E\or F\or G\or H\fi} +\ifblackplaying\relax\else\addtocounter{chessmove}{1}\par\thechessmove.\fi +#1#2#3#4#5#6 +\typeout{#1 #2#3 #4 #5#6} +\expandafter% +\def\csname #2@\hashthree\endcsname{\void}% +\ifblackplaying\expandafter% +\def\csname #5@\hashsix\endcsname{\csname B#1\endcsname}% +\else\expandafter% +\def\csname #5@\hashsix\endcsname{\csname W#1\endcsname}% +\fi +} +% +\def\move#1#2#3#4#5#6 { +% [XQKBRP][a-h][1-8][-x][a-h][1-8] +\if#3- +\Move P#1#2#3#4#5 +\else\if#3x +\Move P#1#2#3#4#5% +\else +\Move #1#2#3#4#5#6 +\fi\fi +\ifblackplaying\blackplayingfalse\else\blackplayingtrue\fi +} +%------------------- +\def\void{\ifblackchess\CheqBSquare\else\hfill\fi} +%------ Initial settings of board ------------- +\def\a@H{\BR} +\def\b@H{\BK}\def\c@H{\BB}\def\d@H{\BQ} +\def\e@H{\BX}\def\f@H{\BK}\def\g@H{\BB} +\def\h@H{\BR} +% ps +\def\a@G{\BP}\def\b@G{\BP}\def\c@G{\BP} +\def\d@G{\BP}\def\e@G{\BP}\def\f@G{\BP} +\def\g@G{\BP}\def\h@G{\BP} +% blank squares +% +\def\a@F{\void}\def\b@F{\void}\def\c@F{\void}\def\d@F{\void} +\def\e@F{\void}\def\f@F{\void}\def\g@F{\void}\def\h@F{\void} +\def\a@E{\void}\def\b@E{\void}\def\c@E{\void}\def\d@E{\void} +\def\e@E{\void}\def\f@E{\void}\def\g@E{\void}\def\h@E{\void} +\def\a@D{\void}\def\b@D{\void}\def\c@D{\void}\def\d@D{\void} +\def\e@D{\void}\def\f@D{\void}\def\g@D{\void}\def\h@D{\void} +\def\a@C{\void}\def\b@C{\void}\def\c@C{\void}\def\d@C{\void} +\def\e@C{\void}\def\f@C{\void}\def\g@C{\void}\def\h@C{\void} +% +\def\a@B{\WP}\def\b@B{\WP}\def\c@B{\WP}\def\d@B{\WP}\def\e@B{\WP}\def\f@B{\WP} +\def\g@B{\WP}\def\h@B{\WP} +% +\def\a@A{\WR}\def\b@A{\WK}\def\c@A{\WB}\def\d@A{\WX} +\def\e@A{\WQ}\def\f@A{\WB}\def\g@A{\WK}\def\h@A{\WR} +%--------------------------------------------------- +% +\def\BlackSquare#1{\blackchesstrue#1\blackchessfalse} +% +\def\showboard{ +\par\vspace{1cm} +\centerline{Board after move \thechessmove\ of \ifblackplaying White +\else Black \fi player} +\par\vspace{1cm} +\tabcolsep=0pt +\centerline{\begin{tabular}{lcccccccc} +\cline{2-9} +8 \vline& \a@H\vline&\BlackSquare{\b@H}\vline&\c@H\vline&\BlackSquare{\d@H}\vline&\e@H\vline&\BlackSquare{\f@H}\vline& +\g@H\vline&\BlackSquare{\h@H}\vline\\ +\cline{2-9} +7 \vline& \BlackSquare{\a@G}\vline&\b@G\vline&\BlackSquare{\c@G}\vline&\d@G\vline&\BlackSquare{\e@G}\vline&\f@G\vline&\BlackSquare{\g@G}\vline&\h@G\vline\\ +\cline{2-9} +6 \vline& \a@F\vline&\BlackSquare{\b@F}\vline&\c@F\vline&\BlackSquare{\d@F}\vline&\e@F\vline&\BlackSquare{\f@F}\vline& +\g@F\vline&\BlackSquare{\h@F}\vline\\ +\cline{2-9} +5 \vline& \BlackSquare{\a@E}\vline&\b@E\vline&\BlackSquare{\c@E}\vline&\d@E\vline&\BlackSquare{\e@E}\vline&\f@E\vline&\BlackSquare{\g@E}\vline&\h@E\vline\\ +\cline{2-9} +4 \vline& \a@D\vline&\BlackSquare{\b@D}\vline&\c@D\vline&\BlackSquare{\d@D}\vline&\e@D\vline&\BlackSquare{\f@D}\vline& +\g@D\vline&\BlackSquare{\h@D}\vline\\ +\cline{2-9} +3 \vline& \BlackSquare{\a@C}\vline&\b@C\vline&\BlackSquare{\c@C}\vline&\d@C\vline&\BlackSquare{\e@C}\vline&\f@C\vline&\BlackSquare{\g@C}\vline&\h@C\vline\\ +\cline{2-9} +2 \vline& \a@B\vline&\BlackSquare{\b@B}\vline&\c@B\vline&\BlackSquare{\d@B}\vline&\e@B\vline&\BlackSquare{\f@B}\vline& +\g@B\vline&\BlackSquare{\h@B}\vline\\ +\cline{2-9} +1 \vline& \BlackSquare{\a@A}\vline&\b@A\vline&\BlackSquare{\c@A}\vline&\d@A\vline&\BlackSquare{\e@A}\vline&\f@A\vline&\BlackSquare{\g@A}\vline&\h@A\vline\\ +\cline{2-9} +&a&b&c&d&e&f&g&h\\ +\end{tabular}} +\par +} + +% examples +%\showboard +% +%\move e2-e4 \move c7-c6 \move c2-c4 +%\move d7-d5 +%\move Kb1-d2 \move d5xe4 \move Kd2xe4 \move Kb8-d7 +%\move Kg1-f3 +% +%\showboard +% diff --git a/Master/texmf-dist/tex/latex/chess/chesskey.sty b/Master/texmf-dist/tex/latex/chess/chesskey.sty new file mode 100644 index 00000000000..2454c6f6929 --- /dev/null +++ b/Master/texmf-dist/tex/latex/chess/chesskey.sty @@ -0,0 +1,1122 @@ +% CHESSKEY.STY Version 1.2 +% +% Dokumentation in KEYDOC.TEX and TESTKEY.TEX +% +% Author Frank Hassel +% DEZEMBER 1993 +% +% Eintragungen aus Sergiu Samarian, +% Internationales Schl\"usselbuch der Schacher\"offnungen, +% Schachverlag Rudi Schmaus, +% Rohrbacher Stra\ss e 27, +% D-69115 Heidelberg +% +\input makeidx.sty +\makeindex +% +\newcount\keynum +% +\def\@@key#1#2{#1 (#2)\index{#1!#2}} +% +\def\@key#1#2#3#4 {% +% +\let\last=#4\relax +\if#1A +\keynum=#2#3\relax +\ifcase\keynum +% +% A00 +\if#4a \@@key{Unregelm\"a\ss ige Er\"offnungen}{A00} +\else +\if#4b \@@key{Sokolski Er\"offnung}{A00} +\else +\if#4c \@@key{K\"onigsfianchetto}{A00}\\ ohne \"Ubergang in andere Er\"offnungen +\else +unvollst\"andige Definition +\typeout{A00 a Unregelm\"a\ss ige Eroeffnungen} +\typeout{A00 b Sokolski Eroeffnung} +\typeout{A00 c Koenigsfianchetto} +\fi\fi\fi +\or % A01 +\@@key{Larsen Er\"offnung}{A01} +\or % A02 +\if#4a \@@key{Froms Gambit}{A02} +\else +\if#4b \@@key{Bird Er\"offnung}{A02} +\else +unvollst\"andige Definition +\typeout{A02a Froms Gambit} +\typeout{A02b Bird Eroeffnung} +\fi\fi +\or % A03 +\@@key{Bird Er\"offnung}{A03} +\or % A04 +\@@key{Holl\"andisches System}{A04}\\ohne \"Ubergang in andere Systeme +\or % A05 +\@@key{\"Uberg\"ange in verschiedene Er\"offnungen}{A05} +\or % A06 +\@@key{Zuckertort Er\"offnung}{A06} +\or % A07 +\@@key{Barcza-System}{A07}\\mit m\"oglichen \"Uberg\"angen zu anderen Systemen +\or % A08 +\@@key{K\"onigsindisch im Anzug}{A08} +\or % A09 +\@@key{Reti Er\"offnung}{A09} +\or % A10 +\@@key{Abarten von Holl\"andisch, Damenindisch, K\"onigsindisch}{A10}\\ohne d2-d4 +\or % A11 +\@@key{Reti Er\"offnung}{A11} +\or % A12 +\@@key{Reti Er\"offnung}{A12}\\New Yorker System +\or % A13 +\@@key{Reti Er\"offnung}{A13} +\or % A14 +\@@key{Reti Er\"offnung}{A14} +\or % A15 +\@@key{Englische Er\"offnung}{A15}\\gegen K\"onigsfianchetto\\ohne d2-d4 +\or % A16 +\@@key{Englische Er\"offnung}{A16} +\or % A17 +\@@key{Englische Er\"offnung}{A17} +\or % A18 +\@@key{Englische Er\"offnung}{A18} +\or % A19 +\@@key{Englische Er\"offnung}{A19} +\or % A20 +\@@key{Englische Er\"offnung}{A20} +\or % A21 +\@@key{Englische Er\"offnung}{A21} +\or % A22 +\@@key{Englische Er\"offnung}{A22} +\or % A23 +\@@key{Englische Er\"offnung}{A23} +\or % A24 +\@@key{Englische Er\"offnung}{A24} +\or % A25 +\@@key{Englische Er\"offnung}{A25}\\Sizilianisch im Anzug +\or % A26 +\@@key{Englische Er\"offnung}{A26}\\Sizilianisch im Anzug +\or % A27 +\@@key{Englische Er\"offnung}{A27}\\Holl\"andische Struktur +\or % A28 +\@@key{Englische Er\"offnung}{A28}\\Vierspringer Variante +\or % A29 +\@@key{Englische Er\"offnung}{A29}\\Vierspringer Variante +\or % A30 +\@@key{Englische Er\"offnung}{A30}\\Symmetrische Variante +\or % A31 +\@@key{Englische Er\"offnung}{A31}\\Symmetrische Variante +\or % A32 +\@@key{Englische Er\"offnung}{A32}\\Symmetrische Variante +\or % A33 +\@@key{Englische Er\"offnung}{A33}\\Symmetrische Variante +\or % A34 +\@@key{Englische Er\"offnung}{A34}\\Symmetrische Variante +\or % A35 +\@@key{Englische Er\"offnung}{A35}\\Symmetrische Variante +\or % A36 +\@@key{Englische Er\"offnung}{A36}\\Botwinnik Variante +\or % A37 +\@@key{Englische Er\"offnung}{A37}\\Symmetrische Variante +\or % A38 +\@@key{Englische Er\"offnung}{A38}\\Symmetrische Variante +\or % A39 +\@@key{Englische Er\"offnung}{A39}\\Symmetrische Variante +\or % A40 +\if#4a \@@key{Englund Gambit}{A40} +\else +\if#4b \@@key{Verschiedene Antworten auf 1.~d4}{A40} +\else +unvollst\"andige Definition +\typeout{A40a Englund Gambit} +\typeout{A40b Verschiedene Antworten auf 1. d4} +\fi\fi +\or % A41 +\@@key{Moderne Verteidigung}{A41}\\gegen d4 mit oder ohne sp\"aterem e2-e4 und {\Fig N}f6 +\or % A42 +\@@key{Moderne Verteidigung}{A42}\\mit c2-c4 ohne {\Fig N}f6 +\or % A43 +\@@key{Alt Benoni}{A43} +\or % A44 +\@@key{Alt Benoni}{A44} +\or % A45 +\@@key{Damenbauernspiel}{A45}\\Trompowski Angriff +\or % A46 +\@@key{Damenbauernspiel}{A46} +\or % A47 +\@@key{Damenindisch}{A47}\\ohne c2-c4 +\or % A48 +\@@key{K\"onigsindisch}{A48}\\ohne c2-c4 +\or % A49 +\@@key{K\"onigsindisch}{A49}\\ohne c2-c4 +\or % A50 +\@@key{Damenindisch}{A50}\\ohne e7-e6 +\or % A51 +\@@key{Budapester Gambit}{A51}\\Fajarowicz Variante +\or % A52 +\@@key{Budapester Gambit}{A52}\\Hauptvariante +\or % A53 +\@@key{Alt-Indisch}{A53} +\or % A54 +\@@key{Alt-Indisch}{A54} +\or % A55 +\@@key{Alt-Indisch}{A55} +\or % A56 +\@@key{Alt-Indisch}{A56} +\or % A57 +\@@key{Wolga/Benk\"o-Gambit}{A57} +\or % A58 +\@@key{Wolga/Benk\"o-Gambit}{A58} +\or % A59 +\@@key{Wolga/Benk\"o-Gambit}{A59} +\or % A60 +\@@key{Benoni Verteidigung}{A60} +\or % A61 +\@@key{Benoni Verteidigung}{A61} +\or % A62 +\@@key{Benoni Verteidigung}{A62}\\7. g3 +\or % A63 +\@@key{Benoni Verteidigung}{A63}\\7. g3 +\or % A64 +\@@key{Benoni Verteidigung}{A64}\\7. g3 +\or % A65 +\@@key{Benoni Verteidigung}{A65} +\or % A66 +\@@key{Benoni Verteidigung}{A66}\\Der zentrale Angriff +\or % A67 +\@@key{Benoni Verteidigung}{A67}\\Dreibauern-System +\or % A68 +\@@key{Benoni Verteidigung}{A68}\\Dreibauern-System +\or % A69 +\@@key{Benoni Verteidigung}{A69}\\Dreibauern-System +\or % A70 +\@@key{Benoni Verteidigung}{A70}\\Hauptsystem +\or % A71 +\@@key{Benoni Verteidigung}{A71}\\Hauptsystem mit 8. {\Fig B}g5 +\or % A72 +\@@key{Benoni Verteidigung}{A72}\\Hauptsystem mit 9. {\Fig B}g5 +\or % A73 +\@@key{Benoni Verteidigung}{A73}\\Hauptsystem +\or % A74 +\@@key{Benoni Verteidigung}{A74}\\Hauptsystem +\or % A75 +\@@key{Benoni Verteidigung}{A75}\\Hauptsystem +\or % A76 +\@@key{Benoni Verteidigung}{A76}\\Hauptsystem +\or % A77 +\@@key{Benoni Verteidigung}{A77}\\Hauptsystem +\or % A78 +\@@key{Benoni Verteidigung}{A78}\\Hauptsystem +\or % A79 +\@@key{Benoni Verteidigung}{A79}\\Hauptsystem +\or % A80 +\@@key{Holl\"andische Verteidigung}{A80} +\or % A81 +\@@key{Holl\"andische Verteidigung}{A81}\\Leningrader Variante +\or % A82 +\@@key{Holl\"andische Verteidigung}{A82}\\Staunton Gambit +\or % A83 +\@@key{Holl\"andische Verteidigung}{A83}\\Staunton Gambit +\or % A84 +\@@key{Holl\"andische Verteidigung}{A84} +\or % A85 +\@@key{Holl\"andische Verteidigung}{A85} +\or % A86 +\@@key{Holl\"andische Verteidigung}{A86}\\Leningrader Variante mit {\Fig N}h3 +\or % A87 +\@@key{Holl\"andische Verteidigung}{A87}\\Leningrader Variante +\or % A88 +\@@key{Holl\"andische Verteidigung}{A88}\\Leningrader Variante +\or % A89 +\@@key{Holl\"andische Verteidigung}{A89}\\Leningrader Variante +\or % A90 +\@@key{Holl\"andische Verteidigung}{A90}\\Klassisches System, Stonewall und Varianten mit {\Fig L}b4 +\or % A91 +\@@key{Holl\"andische Verteidigung}{A91}\\Klassisches System, Abweichungen +\or % A92 +\@@key{Holl\"andische Verteidigung}{A92}\\Stonewall +\or % A93 +\@@key{Holl\"andische Verteidigung}{A93}\\Stonewall +\or % A94 +\@@key{Holl\"andische Verteidigung}{A94}\\Stonewall +\or % A95 +\@@key{Holl\"andische Verteidigung}{A95}\\Stonewall +\or % A96 +\@@key{Holl\"andische Verteidigung}{A96}\\Hauptvariante +\or % A97 +\@@key{Holl\"andische Verteidigung}{A97}\\Hauptvariante +\or % A98 +\@@key{Holl\"andische Verteidigung}{A98}\\Hauptvariante +\or % A99 +\@@key{Holl\"andische Verteidigung}{A99}\\Hauptvariante +\fi %\ifcase +\fi %\if A +% +% +% +\if#1B +\keynum=#2#3\relax +\ifcase\keynum +% +% B00 +\if#4a \@@key{Damenfianchetto}{B00} +\else +\if#4b \@@key{Nimzowitsch Verteidigung}{B00} +\else +Unvollst\"andige Definition +\typeout{B00a Damenfianchetto} +\typeout{B00b Nimzowitsch Verteidigung} +\fi\fi +\or % B01 +\@@key{Skandinavische Verteidigung}{B01} +\or % B02 +\@@key{Aljechin Verteidigung}{B02}\\Jagdvariante +\or % B03 +\@@key{Aljechin Verteidigung}{B03}\\Vierbauernattacke +\or % B04 +\@@key{Aljechin Verteidigung}{B04}\\Moderne Variante +\or % B05 +\@@key{Aljechin Verteidigung}{B05}\\Moderne Variante +\or % B06 +\@@key{Moderne Verteidigung}{B06} +\or % B07 +\@@key{Pirc-Ufimzew Verteidigung}{B07} +\or % B08 +\@@key{Pirc-Ufimzew Verteidigung}{B08} +\or % B09 +\@@key{Pirc-Ufimzew Verteidigung}{B09}\\Dreibauernangriff +\or % B10 +\@@key{Caro-Kann Verteidigung}{B10} +\or % B11 +\@@key{Caro-Kann Verteidigung}{B11}\\Zweispringer Variante +\or % B12 +\@@key{Caro-Kann Verteidigung}{B12}\\Vorsto\ss\ Variante +\or % B13 +\@@key{Caro-Kann Verteidigung}{B13}\\Abtausch Variante; 4.~c4 +\or % B14 +\@@key{Caro-Kann Verteidigung}{B14}\\Panow Angriff +\or % B15 +\@@key{Caro-Kann Verteidigung}{B15}\\Flohr Variante +\or % B16 +\@@key{Caro-Kann Verteidigung}{B16}\\Nimzowitsch Variante +\or % B17 +\@@key{Caro-Kann Verteidigung}{B17} +\or % B18 +\@@key{Caro-Kann Verteidigung}{B18}\\Hauptvariante +\or % B19 +\@@key{Caro-Kann Verteidigung}{B19}\\Hauptvariante +\or % B20 +\if#4a \@@key{Sizilianisch}{B20}\\Fl\"ugelgambit +\else +\if#4b \@@key{Sizilianisch}{B20}\\Seltene Z\"uge +\else +Unvollst\"andige Definition +\typeout{B20a Sizilianisch Fluegelgambit} +\typeout{B20b Sizilianisch Seltene Zuege} +\fi\fi +\or % B21 +\if#4a \@@key{Sizilianisch}{B21} +\else +\if#4b \@@key{Morra Gambit}{B21} +\else +Unvollst\"andige Definition +\typeout{B21a Sizilianisch} +\typeout{B21b Morra Gambit} +\fi\fi +\or % B22 +\@@key{Sizilianisch}{B22}\\Alapin Variante +\or % B23 +\@@key{Sizilianisch}{B23}\\Geschlossenes System +\or % B24 +\@@key{Sizilianisch}{B24}\\Geschlossenes System +\or % B25 +\@@key{Sizilianisch}{B25}\\Geschlossenes System +\or % B26 +\@@key{Sizilianisch}{B26}\\Geschlossenes System +\or % B27 +\@@key{Sizilianisch}{B27}\\Fr\"uhes Fianchetto +\or % B28 +\@@key{Sizilianisch}{B28}\\Fr\"uhes a7-a6 +\or % B29 +\@@key{Sizilianisch}{B29}\\Rubinstein Variante +\or % B30 +\@@key{Sizilianisch}{B30}\\Rossolimo Variante +\or % B31 +\@@key{Sizilianisch}{B31}\\Rossolimo Variante +\or % B32 +\@@key{Sizilianisch}{B32}\\L\"owenthal Variante +\or % B33 +\@@key{Sizilianisch}{B33}\\Lasker/Pelikan/Sweschnikow Variante +\or % B34 +\@@key{Sizilianisch}{B34}\\Beschleunigtes Fianchetto +\or % B35 +\@@key{Sizilianisch}{B35}\\Beschleunigtes Fianchetto +\or % B36 +\@@key{Sizilianisch}{B36}\\Maroczy Aufbau +\or % B37 +\@@key{Sizilianisch}{B37}\\Maroczy Aufbau +\or % B38 +\@@key{Sizilianisch}{B38}\\Maroczy Aufbau +\or % B39 +\@@key{Sizilianisch}{B39}\\Maroczy Aufbau +\or % B40 +\@@key{Sizilianisch}{B40}\\Klassisches System mit e7-e6 +\or % B41 +\@@key{Sizilianisch}{B41}\\Paulsen Variante +\or % B42 +\@@key{Sizilianisch}{B42}\\Paulsen Variante +\or % B43 +\@@key{Sizilianisch}{B43}\\Paulsen Variante +\or % B44 +\@@key{Sizilianisch}{B44}\\Paulsen/Taimanow Variante +\or % B45 +\@@key{Sizilianisch}{B45}\\Klassisches System +\or % B46 +\@@key{Sizilianisch}{B46}\\Paulsen/Taimanow Variante +\or % B47 +\@@key{Sizilianisch}{B47}\\Paulsen/Taimanow Variante +\or % B48 +\@@key{Sizilianisch}{B48}\\Paulsen Variante +\or % B49 +\@@key{Sizilianisch}{B49}\\Paulsen Variante +\or % B50 +\@@key{Sizilianisch}{B50}\\Verschiedenes mit 2. $\ldots$,d6 +\or % B51 +\@@key{Sizilianisch}{B51}\\Rossolimo Variante +\or % B52 +\@@key{Sizilianisch}{B52}\\Rossolimo Variante +\or % B53 +\@@key{Sizilianisch}{B53}\\Ungarische Variante +\or % B54 +\@@key{Sizilianisch}{B54}\\Rauser Anti-Drachen Variante +\or % B55 +\@@key{Sizilianisch}{B55}\\Rauser Anti-Drachen Variante +\or % B56 +\@@key{Sizilianisch}{B56}\\Abweichungen von Sosin- und Richter/Rauser Variante +\or % B57 +\@@key{Sizilianisch}{B57}\\Sosin Variante +\or % B58 +\@@key{Sizilianisch}{B58}\\Boleslawski Variante +\or % B59 +\@@key{Sizilianisch}{B59}\\Boleslawski Variante +\or % B60 +\@@key{Sizilianisch}{B60}\\Richter/Rauser Angriff +\or % B61 +\@@key{Sizilianisch}{B61}\\Richter/Rauser Angriff +\or % B62 +\@@key{Sizilianisch}{B62}\\Richter/Rauser Angriff +\or % B63 +\@@key{Sizilianisch}{B63}\\Richter/Rauser Angriff +\or % B64 +\@@key{Sizilianisch}{B64}\\Richter/Rauser Angriff +\or % B65 +\@@key{Sizilianisch}{B65}\\Richter/Rauser Angriff +\or % B66 +\@@key{Sizilianisch}{B66}\\Richter/Rauser Angriff +\or % B67 +\@@key{Sizilianisch}{B67}\\Richter/Rauser Angriff +\or % B68 +\@@key{Sizilianisch}{B68}\\Richter/Rauser Angriff +\or % B69 +\@@key{Sizilianisch}{B69}\\Richter/Rauser Angriff +\or % B70 +\@@key{Sizilianisch}{B70}\\Drachen Variante +\or % B71 +\@@key{Sizilianisch}{B71}\\Drachen Variante +\or % B72 +\@@key{Sizilianisch}{B72}\\Drachen Variante +\or % B73 +\@@key{Sizilianisch}{B73}\\Drachen Variante +\or % B74 +\@@key{Sizilianisch}{B74}\\Drachen Variante +\or % B75 +\@@key{Sizilianisch}{B75}\\Moderne Drachen Variante +\or % B76 +\@@key{Sizilianisch}{B76}\\Moderne Drachen Variante +\or % B77 +\@@key{Sizilianisch}{B77}\\Moderne Drachen Variante +\or % B78 +\@@key{Sizilianisch}{B78}\\Moderne Drachen Variante +\or % B79 +\@@key{Sizilianisch}{B79}\\Moderne Drachen Variante +\or % B80 +\@@key{Sizilianisch}{B80}\\Scheveninger System +\or % B81 +\@@key{Sizilianisch}{B81}\\Keres Angriff +\or % B82 +\@@key{Sizilianisch}{B82}\\Scheveninger System +\or % B83 +\@@key{Sizilianisch}{B83}\\Scheveninger System +\or % B84 +\@@key{Sizilianisch}{B84}\\Scheveninger System +\or % B85 +\@@key{Sizilianisch}{B85}\\Scheveninger System +\or % B86 +\@@key{Sizilianisch}{B86}\\Sosin Angriff +\or % B87 +\@@key{Sizilianisch}{B87}\\Sosin Angriff +\or % B88 +\@@key{Sizilianisch}{B88}\\Sosin Angriff +\or % B89 +\@@key{Sizilianisch}{B89}\\Sosin Angriff +\or % B90 +\@@key{Sizilianisch}{B90}\\Najdorf Variante, Abweichungen +\or % B91 +\@@key{Sizilianisch}{B91}\\Najdorf Variante mit 6.~g3 +\or % B92 +\@@key{Sizilianisch}{B92}\\Najdorf Variante mit 6.~{\Fig B}e2 +\or % B93 +\@@key{Sizilianisch}{B93}\\Najdorf Variante mit 6.~f4 +\or % B94 +\@@key{Sizilianisch}{B94}\\Najdorf Variante mit 6.~{\Fig B}g5 +\or % B95 +\@@key{Sizilianisch}{B95}\\Najdorf Variante mit 6.~{\Fig B}g5 +\or % B96 +\@@key{Sizilianisch}{B96}\\Najdorf Variante +\or % B97 +\@@key{Sizilianisch}{B97}\\Najdorf Variante +\or % B98 +\@@key{Sizilianisch}{B98}\\Najdorf Variante +\or % B99 +\@@key{Sizilianisch}{B99}\\Najdorf Variante +\fi %\ifcase +\fi %\if B +% +% +% +\if#1C +\keynum=#2#3\relax +\ifcase\keynum +% +% C00 +\@@key{Franz\"osische Verteidigung}{C00}\\Seltene Z\"uge +\or % C01 +\@@key{Franz\"osische Verteidigung}{C01}\\Abtauschvariante +\or % C02 +\@@key{Franz\"osische Verteidigung}{C02}\\Tarrasch Variante +\or % C03 +\@@key{Franz\"osische Verteidigung}{C03}\\Tarrasch Variante +\or % C04 +\@@key{Franz\"osische Verteidigung}{C04}\\Tarrasch Variante +\or % C05 +\@@key{Franz\"osische Verteidigung}{C05}\\Tarrasch Variante +\or % C06 +\@@key{Franz\"osische Verteidigung}{C06}\\Tarrasch Variante +\or % C07 +\@@key{Franz\"osische Verteidigung}{C07}\\Tarrasch Variante +\or % C08 +\@@key{Franz\"osische Verteidigung}{C08}\\Tarrasch Variante +\or % C09 +\@@key{Franz\"osische Verteidigung}{C09}\\Tarrasch Variante +\or % C10 +\@@key{Franz\"osische Verteidigung}{C10}\\Rubinstein Variante +\or % C11 +\@@key{Franz\"osische Verteidigung}{C11} +\or % C12 +\@@key{Franz\"osische Verteidigung}{C12}\\MacCutcheon Variante +\or % C13 +\@@key{Franz\"osische Verteidigung}{C13}\\Klassisches System +\or % C14 +\@@key{Franz\"osische Verteidigung}{C14}\\Klassische Hauptvariante +\or % C15 +\@@key{Franz\"osische Verteidigung}{C15}\\Nimzowitsch Variante +\or % C16 +\@@key{Franz\"osische Verteidigung}{C16}\\Nimzowitsch Variante +\or % C17 +\@@key{Franz\"osische Verteidigung}{C17}\\Nimzowitsch Variante +\or % C18 +\@@key{Franz\"osische Verteidigung}{C18}\\Nimzowitsch Variante +\or % C19 +\@@key{Franz\"osische Verteidigung}{C19}\\Nimzowitsch Variante +\or % C20 +\@@key{Seltene Z\"uge}{C20} +\or % C21 +\@@key{Nordisches Gambit}{C21} +\or % C22 +\@@key{Mittelgambit}{C22} +\or % C23 +\@@key{L\"auferspiel}{C23} +\or % C24 +\@@key{L\"auferspiel}{C24} +\or % C25 +\@@key{Wiener Partie}{C25} +\or % C26 +\@@key{Wiener Partie}{C26} +\or % C27 +\@@key{Wiener Partie}{C27} +\or % C28 +\@@key{Wiener Partie}{C28} +\or % C29 +\@@key{Wiener Partie}{C29} +\or % C30 +\@@key{K\"onigsgambit}{C30}\\Abgelehntes +\or % C31 +\@@key{Falkbeer Gegengambit}{C31} +\or % C32 +\@@key{Falkbeer Gegengambit}{C32} +\or % C33 +\@@key{K\"onigsl\"aufer Gambit}{C33} +\or % C34 +\@@key{K\"onigsspringer Gambit}{C34} +\or % C35 +\@@key{Cunningham Gambit}{C35} +\or % C36 +\@@key{K\"onigsgambit}{C36}\\Moderne Variante +\or % C37 +\@@key{K\"onigsspringer Gambit}{C37}\\Muzio +\or % C38 +\@@key{K\"onigsspringer Gambit}{C38}\\Greco und Philidor +\or % C39 +\@@key{K\"onigsspringer Gambit}{C39}\\Allgaier, Kieseritzky +\or % C40 +\@@key{Lettisches Gambit}{C40} +\or % C41 +\@@key{Philidor Verteidigung}{C41} +\or % C42 +\@@key{Russische Verteidigung}{C42}\\Petrow +\or % C43 +\@@key{Russische Verteidigung}{C43}\\Petrow +\or % C44 +\@@key{Schottisches Gambit}{C44} +\or % C45 +\@@key{Schottische Partie}{C45} +\or % C46 +\@@key{Vierspringerspiel}{C46}\\Seltene Z\"uge +\or % C47 +\@@key{Schottisches Vierspringerspiel}{C47} +\or % C48 +\@@key{Vierspringerspiel}{C48}\\Rubinstein Variante +\or % C49 +\@@key{Vierspringerspiel}{C49}\\Symmetrische Variante +\or % C50 +\@@key{Italienische Partie}{C50} +\or % C51 +\@@key{Evans Gambit}{C51} +\or % C52 +\@@key{Evans Gambit}{C52}\\Hauptvariante +\or % C53 +\@@key{Italienische Partie}{C53} +\or % C54 +\@@key{Italienische Partie}{C54}\\Hauptvariante +\or % C55 +\@@key{Zweispringerspiel}{C55} +\or % C56 +\@@key{Zweispringerspiel}{C56} +\or % C57 +\@@key{Zweispringerspiel}{C57}\\Fritz Variante +\or % C58 +\@@key{Zweispringerspiel}{C58}\\Klassisches System +\or % C59 +\@@key{Zweispringerspiel}{C59}\\Klassisches System +\or % C60 +\@@key{Spanische Partie}{C60} +\or % C61 +\@@key{Spanische Partie}{C61}\\Bird Verteidigung +\or % C62 +\@@key{Spanische Partie}{C62}\\Steinitz Verteidigung +\or % C63 +\@@key{Spanische Partie}{C63}\\J\"anisch Gambit +\or % C64 +\@@key{Spanische Partie}{C64}\\Cordel Verteidigung +\or % C65 +\@@key{Spanische Partie}{C65}\\Berliner Verteidigung +\or % C66 +\@@key{Spanische Partie}{C66}\\Verbesserte Steinitz Verteidigung +\or % C67 +\@@key{Spanische Partie}{C67}\\Rio de Janeiro Variante +\or % C68 +\@@key{Spanische Partie}{C68}\\Abtauschvariante +\or % C69 +\@@key{Spanische Partie}{C69}\\Abtauschvariante +\or % C70 +\@@key{Spanische Partie}{C70}\\Abweichungen im 4.~Zug +\or % C71 +\@@key{Spanische Partie}{C71}\\Moderne Steinitz Variante +\or % C72 +\@@key{Spanische Partie}{C72}\\Moderne Steinitz Variante +\or % C73 +\@@key{Spanische Partie}{C73}\\Moderne Steinitz Variante +\or % C74 +\@@key{Spanische Partie}{C74}\\Moderne Steinitz Variante +\or % C75 +\@@key{Spanische Partie}{C75}\\Moderne Steinitz Variante +\or % C76 +\@@key{Spanische Partie}{C76}\\Moderne Steinitz Variante +\or % C77 +\@@key{Spanische Partie}{C77}\\Anderssen Variante +\or % C78 +\@@key{Spanische Partie}{C78}\\Archanglesk und M\"oller Variante +\or % C79 +\@@key{Spanische Partie}{C79}\\Russische Variante +\or % C80 +\@@key{Spanische Partie}{C80}\\Offene Verteidigung +\or % C81 +\@@key{Spanische Partie}{C81}\\Offene Verteidigung\\Keres System +\or % C82 +\@@key{Spanische Partie}{C82}\\Offene Verteidigung\\Italienische Variante +\or % C83 +\@@key{Spanische Partie}{C83}\\Offene Verteidigung\\Hauptvariante +\or % C84 +\@@key{Spanische Partie}{C84}\\Mittelgambit +\or % C85 +\@@key{Spanische Partie}{C85}\\Steenwijker Variante +\or % C86 +\@@key{Spanische Partie}{C86}\\Englischer Angriff +\or % C87 +\@@key{Spanische Partie}{C87}\\Russische Variante mit Zugumstellung +\or % C88 +\@@key{Spanische Partie}{C88}\\Geschlossenes System +\or % C89 +\@@key{Spanische Partie}{C89}\\Marshall Angriff +\or % C90 +\@@key{Spanische Partie}{C90}\\Abweichungen von der Hauptvariante +\or % C91 +\@@key{Spanische Partie}{C91}\\Abweichungen von der Hauptvariante +\or % C92 +\@@key{Spanische Partie}{C92}\\Tschigorin Variante +\or % C93 +\@@key{Spanische Partie}{C93}\\Smyslow Variante +\or % C94 +\@@key{Spanische Partie}{C94}\\Breyer Variante +\or % C95 +\@@key{Spanische Partie}{C95}\\Breyer Variante +\or % C96 +\if#4a \@@key{Spanische Partie}{C96}\\Abweichungen vom Tschigorin System +\else +\if#4b \@@key{Spanische Partie}{C96}\\Panow Variante +\else +unvollst\"andige Definition +\typeout{C96a Spanische Partie Abw. vom Tschigorin System} +\typeout{C96b Spanische Partie Panow Variante} +\fi\fi +\or % C97 +\@@key{Spanische Partie}{C97}\\Tschigorin System +\or % C98 +\@@key{Spanische Partie}{C98}\\Tschigorin System +\or % C99 +\@@key{Spanische Partie}{C99}\\Tschigorin System +\fi %\ifcase +\fi %\if C +% +% +% +\if#1D +\keynum=#2#3\relax +\ifcase\keynum +% +% D00 +\@@key{Damenbauernspiel}{D00} +\or % D01 +\@@key{Damenbauernspiel}{D01}\\Richter-Weressow +\or % D02 +\@@key{Damenbauernspiel}{D02} +\or % D03 +\@@key{Damenbauernspiel}{D03} +\or % D04 +\@@key{Damenbauernspiel}{D04} +\or % D05 +\@@key{Damenbauernspiel}{D05}\\Colle Aufbau +\or % D06 +\@@key{Damengambit}{D06}\\Seltene Z\"uge +\or % D07 +\@@key{Damengambit}{D07}\\Tschigorin Verteidigung +\or % D08 +\@@key{Albins Gegengambit}{D08} +\or % D09 +\@@key{Albins Gegengambit}{D09} +\or % D10 +\@@key{Damengambit}{D10}\\Slawische Verteidigung +\or % D11 +\@@key{Damengambit}{D11}\\Slawische Verteidigung +\or % D12 +\@@key{Damengambit}{D12}\\Slawische Verteidigung +\or % D13 +\@@key{Damengambit}{D13}\\Slawische Verteidigung\\Abtauschvariante +\or % D14 +\@@key{Damengambit}{D14}\\Slawische Verteidigung\\Abtauschvariante +\or % D15 +\@@key{Damengambit}{D15}\\Slawische Verteidigung +\or % D16 +\@@key{Damengambit}{D16}\\Slawische Verteidigung\\Lasker/Smyslow Variante +\or % D17 +\@@key{Damengambit}{D17}\\Slawische Verteidigung +\or % D18 +\@@key{Damengambit}{D18}\\Slawische Verteidigung\\Hauptvariante +\or % D19 +\@@key{Damengambit}{D19}\\Slawische Verteidigung\\Hauptvariante +\or % D20 +\@@key{Angenommenes Damengambit}{D20} +\or % D21 +\@@key{Angenommenes Damengambit}{D21} +\or % D22 +\@@key{Angenommenes Damengambit}{D22} +\or % D23 +\@@key{Angenommenes Damengambit}{D23} +\or % D24 +\@@key{Angenommenes Damengambit}{D24} +\or % D25 +\@@key{Angenommenes Damengambit}{D25} +\or % D26 +\@@key{Angenommenes Damengambit}{D26} +\or % D27 +\@@key{Angenommenes Damengambit}{D27} +\or % D28 +\@@key{Angenommenes Damengambit}{D28} +\or % D29 +\@@key{Angenommenes Damengambit}{D29} +\or % D30 +\@@key{Damengambit}{D30}\\ohne {\Fig N}c3 +\or % D31 +\@@key{Damengambit}{D31}\\Halbslawisch +\or % D32 +\@@key{Damengambit}{D32}\\Tarrasch Verteidigung +\or % D33 +\@@key{Damengambit}{D33}\\Tarrasch Verteidigung +\or % D34 +\@@key{Damengambit}{D34}\\Tarrasch Verteidigung\\Hauptvariante +\or % D35 +\@@key{Damengambit}{D35}\\Abtauschvariante +\or % D36 +\@@key{Damengambit}{D36}\\Abtauschvariante +\or % D37 +\@@key{Damengambit}{D37}\\5.~{\Fig B}f4 +\or % D38 +\@@key{Damengambit}{D38}\\Ragosin Verteidigung +\or % D39 +\@@key{Damengambit}{D39}\\Ragosin Verteidigung +\or % D40 +\@@key{Damengambit}{D40}\\Verbesserte Tarrasch Verteidigung +\or % D41 +\@@key{Damengambit}{D41}Verbesserte Tarrasch Verteidigung +\or % D42 +\@@key{Damengambit}{D42}Verbesserte Tarrasch Verteidigung +\or % D43 +\@@key{Damengambit}{D43}\\Botwinnik Variante +\or % D44 +\@@key{Damengambit}{D44}\\Botwinnik Variante +\or % D45 +\@@key{Damengambit}{D45}\\Anti Meraner Varianten +\or % D46 +\@@key{Damengambit}{D46}\\Halbslawisch +\or % D47 +\@@key{Damengambit}{D47}\\Meraner Variante +\or % D48 +\@@key{Damengambit}{D48}\\Meraner Variante +\or % D49 +\@@key{Damengambit}{D49}\\Meraner Variante +\or % D50 +\@@key{Damengambit}{D50}\\Canal/Prins Gambit +\or % D51 +\@@key{Damengambit}{D51}\\Cambridge-Springs Variante +\or % D52 +\@@key{Damengambit}{D52}\\Cambridge-Springs Variante +\or % D53 +\@@key{Damengambit}{D53}\\Hauptvariante - Abweichungen +\or % D54 +\@@key{Damengambit}{D54}\\Hauptvariante - Abweichungen +\or % D55 +\@@key{Damengambit}{D55}\\Hauptvariante - Abweichungen +\or % D56 +\@@key{Damengambit}{D56}\\Moderne Lasker Verteidigung +\or % D57 +\@@key{Damengambit}{D57}\\Moderne Lasker Verteidigung +\or % D58 +\@@key{Damengambit}{D58}\\Tartakower Variante +\or % D59 +\@@key{Damengambit}{D59}\\Tartakower Variante +\or % D60 +\@@key{Damengambit}{D60}\\Hauptvariante +\or % D61 +\@@key{Damengambit}{D61}\\Hauptvariante mit 7.~{\Fig Q}c2 +\or % D62 +\@@key{Damengambit}{D62}\\Hauptvariante mit 7.~{\Fig Q}c2 +\or % D63 +\@@key{Damengambit}{D63}\\Hauptvariante mit 7.~{\Fig R}c1 +\or % D64 +\@@key{Damengambit}{D64}\\Tempokampf Variante +\or % D65 +\@@key{Damengambit}{D65}\\Tempokampf Variante +\or % D66 +\@@key{Damengambit}{D66}Hauptvariante\\Erweitertes Fianchetto +\or % D67 +\@@key{Damengambit}{D67}Hauptvariante\\Capablancas Entlastungsman\"over +\or % D68 +\@@key{Damengambit}{D68}Hauptvariante\\Capablancas Entlastungsman\"over +\or % D69 +\@@key{Damengambit}{D69}Hauptvariante\\Capablancas Entlastungsman\"over +\or % D70 +\@@key{Gr\"unfeld Verteidigung}{D70}\\Abweichungen im 3.~Zug +\or % D71 +\@@key{Gr\"unfeld Verteidigung}{D71}\\3.~g3 +\or % D72 +\@@key{Gr\"unfeld Verteidigung}{D72}\\3.~g3 +\or % D73 +\@@key{Gr\"unfeld Verteidigung}{D73}\\3.~g3 +\or % D74 +\@@key{Gr\"unfeld Verteidigung}{D74}\\3.~g3 +\or % D75 +\@@key{Gr\"unfeld Verteidigung}{D75}\\3.~g3 +\or % D76 +\@@key{Gr\"unfeld Verteidigung}{D76}\\3.~g3 +\or % D77 +\@@key{Gr\"unfeld Verteidigung}{D77}\\3.~g3 +\or % D78 +\@@key{Gr\"unfeld Verteidigung}{D78}\\3.~g3 +\or % D79 +\@@key{Gr\"unfeld Verteidigung}{D79}\\3.~g3 +\or % D80 +\@@key{Gr\"unfeld Verteidigung}{D80}\\4.~{\Fig B}g5 +\or % D81 +\@@key{Gr\"unfeld Verteidigung}{D81}\\Botwinnik Variante +\or % D82 +\@@key{Gr\"unfeld Verteidigung}{D82}\\4.~{\Fig B}f4 +\or % D83 +\@@key{Gr\"unfeld Verteidigung}{D83}\\4.~{\Fig B}f4 +\or % D84 +\@@key{Gr\"unfeld Verteidigung}{D84}\\4.~{\Fig B}f4 +\or % D85 +\@@key{Gr\"unfeld Verteidigung}{D85}\\Hauptfortsetzung +\or % D86 +\@@key{Gr\"unfeld Verteidigung}{D86}\\Hauptfortsetzung\\Simagin Variante +\or % D87 +\@@key{Gr\"unfeld Verteidigung}{D87}\\Hauptfortsetzung\\Botwinnik Variante +\or % D88 +\@@key{Gr\"unfeld Verteidigung}{D88}\\Hauptfortsetzung\\Aljechin Variante +\or % D89 +\@@key{Gr\"unfeld Verteidigung}{D89}\\Hauptfortsetzung\\Aljechin Variante +\or % D90 +\@@key{Gr\"unfeld Verteidigung}{D90}\\Flohr Variante +\or % D91 +\@@key{Gr\"unfeld Verteidigung}{D91}\\5.~{\Fig B}g5 +\or % D92 +\@@key{Gr\"unfeld Verteidigung}{D92}\\5.~{\Fig B}f4 +\or % D93 +\@@key{Gr\"unfeld Verteidigung}{D93}\\5.~{\Fig B}f4 +\or % D94 +\@@key{Gr\"unfeld Verteidigung}{D94}\\Geschlossenes System +\or % D95 +\@@key{Gr\"unfeld Verteidigung}{D95}\\Geschlossenes System +\or % D96 +\@@key{Gr\"unfeld Verteidigung}{D96}\\Russisches System +\or % D97 +\@@key{Gr\"unfeld Verteidigung}{D97}\\Russisches System +\or % D98 +\@@key{Gr\"unfeld Verteidigung}{D98}\\Smyslow Variante +\or % D99 +\@@key{Gr\"unfeld Verteidigung}{D99}\\Smyslow Variante +\fi %\ifcase +\fi %\if D +% +% +% +\if#1E +\keynum=#2#3\relax +\ifcase\keynum +% +% E00 +% +\@@key{Katalanisch}{E00} +\or % E01 +\@@key{Katalanisch}{E01} +\or % E02 +\@@key{Katalanisch}{E02} +\or % E03 +\@@key{Katalanisch}{E03} +\or % E04 +\@@key{Katalanisch}{E04} +\or % E05 +\@@key{Katalanisch}{E05} +\or % E06 +\@@key{Katalanisch}{E06} +\or % E07 +\@@key{Katalanisch}{E07} +\or % E08 +\@@key{Katalanisch}{E08} +\or % E09 +\@@key{Katalanisch}{E09} +\or % E10 +\@@key{Blumenfeld Gambit}{E10} +\or % E11 +\@@key{Damenindisch}{E11}\\Bogoljubow Variante +\or % E12 +\@@key{Damenindisch}{E12}\\Petrosian System und\\4. oder 5.~{\Fig B}g5 +\or % E13 +\@@key{Damenindisch}{E13}\\5.~{\Fig B}g5 +\or % E14 +\@@key{Damenindisch}{E14}\\Zentralsystem +\or % E15 +\@@key{Damenindisch}{E15}\\Hauptfortsetzung\\Abweichungen +\or % E16 +\@@key{Damenindisch}{E16}\\Hauptfortsetzung mit {\Fig B}b4 +\or % E17 +\@@key{Damenindisch}{E17}\\Hauptfortsetzung +\or % E18 +\@@key{Damenindisch}{E18}\\Hauptfortsetzung +\or % E19 +\@@key{Damenindisch}{E19}\\Hauptfortsetzung +\or % E20 +\@@key{Nimzowitschindisch}{E20}\\Seltene Z\"uge +\or % E21 +\@@key{Nimzowitschindisch}{E21}\\4.~{\Fig N}f3 +\or % E22 +\@@key{Nimzowitschindisch}{E22}\\4.~{\Fig Q}b3 +\or % E23 +\@@key{Nimzowitschindisch}{E23}\\4.~{\Fig Q}b3 +\or % E24 +\@@key{Nimzowitschindisch}{E24}\\S\"amisch Variante +\or % E25 +\@@key{Nimzowitschindisch}{E25}\\S\"amisch Variante +\or % E26 +\@@key{Nimzowitschindisch}{E26}\\S\"amisch Variante +\or % E27 +\@@key{Nimzowitschindisch}{E27}\\S\"amisch Variante +\or % E28 +\@@key{Nimzowitschindisch}{E28}\\S\"amisch Variante +\or % E29 +\@@key{Nimzowitschindisch}{E29}\\S\"amisch Variante +\or % E30 +\@@key{Nimzowitschindisch}{E30}\\4.~{\Fig L}g5 +\or % E31 +\@@key{Nimzowitschindisch}{E31}\\4.~{\Fig L}g5 +\or % E32 +\@@key{Nimzowitschindisch}{E32}\\4.~{\Fig Q}c2 +\or % E33 +\@@key{Nimzowitschindisch}{E33}\\4.~{\Fig Q}c2 +\or % E34 +\@@key{Nimzowitschindisch}{E34}\\4.~{\Fig Q}c2 +\or % E35 +\@@key{Nimzowitschindisch}{E35}\\4.~{\Fig Q}c2 +\or % E36 +\@@key{Nimzowitschindisch}{E36}\\4.~{\Fig Q}c2 +\or % E37 +\@@key{Nimzowitschindisch}{E37}\\4.~{\Fig Q}c2 +\or % E38 +\@@key{Nimzowitschindisch}{E38}\\4.~{\Fig Q}c2 +\or % E39 +\@@key{Nimzowitschindisch}{E39}\\4.~{\Fig Q}c2 +\or % E40 +\@@key{Nimzowitschindisch}{E40}\\Rubinstein System +\or % E41 +\@@key{Nimzowitschindisch}{E41}\\Rubinstein System +\or % E42 +\@@key{Nimzowitschindisch}{E42}\\Rubinstein System +\or % E43 +\@@key{Nimzowitschindisch}{E43}\\Rubinstein System +\or % E44 +\@@key{Nimzowitschindisch}{E44}\\Rubinstein System +\or % E45 +\@@key{Nimzowitschindisch}{E45}\\Rubinstein System +\or % E46 +\@@key{Nimzowitschindisch}{E46}\\Rubinstein System +\or % E47 +\@@key{Nimzowitschindisch}{E47}\\Moderne Variante +\or % E48 +\@@key{Nimzowitschindisch}{E48}\\Moderne Variante +\or % E49 +\@@key{Nimzowitschindisch}{E49}\\Moderne Variante +\or % E50 +\@@key{Nimzowitschindisch}{E50}\\Moderne Variante +\or % E51 +\@@key{Nimzowitschindisch}{E51}\\Moderne Variante +\or % E52 +\@@key{Nimzowitschindisch}{E52}\\Moderne Variante +\or % E53 +\@@key{Nimzowitschindisch}{E53}\\Moderne Variante +\or % E54 +\@@key{Nimzowitschindisch}{E54}\\Moderne Variante +\or % E55 +\@@key{Nimzowitschindisch}{E55}\\Moderne Variante +\or % E56 +\@@key{Nimzowitschindisch}{E56}\\Moderne Variante +\or % E57 +\@@key{Nimzowitschindisch}{E57}\\Moderne Variante +\or % E58 +\@@key{Nimzowitschindisch}{E58}\\Moderne Variante +\or % E59 +\@@key{Nimzowitschindisch}{E59}\\Moderne Variante +\or % E60 +\@@key{K\"onigsindisch}{E60}\\ohne {\Fig N}c3 +\or % E61 +\@@key{K\"onigsindisch}{E61}\\Abweichungen der Hauptvariante +\or % E62 +\@@key{K\"onigsindisch}{E62}\\6.~$\ldots$,{\Fig N}c6 +\or % E63 +\@@key{K\"onigsindisch}{E63}\\6.~$\ldots$,{\Fig N}c6 +\or % E64 +\@@key{K\"onigsindisch}{E64}\\Jugoslawische Variante +\or % E65 +\@@key{K\"onigsindisch}{E65}\\Jugoslawische Variante +\or % E66 +\@@key{K\"onigsindisch}{E66}\\Jugoslawische Variante +\or % E67 +\@@key{K\"onigsindisch}{E67}\\Hauptvariante des g3~Systems ohne e2-e4 +\or % E68 +\@@key{K\"onigsindisch}{E68}\\Hauptvariante des g3~Systems mit e2-e4 +\or % E69 +\@@key{K\"onigsindisch}{E69}\\Hauptvariante des g3~Systems mit e2-e4 und h2-h3 +\or % E70 +\@@key{K\"onigsindisch}{E70}\\fr\"uhes e2-e4 +\or % E71 +\@@key{K\"onigsindisch}{E71}\\5.~h3 +\or % E72 +\@@key{K\"onigsindisch}{E72}\\Varianten mit g2-g3 und {\Fig N}ge2 +\or % E73 +\@@key{K\"onigsindisch}{E73}\\Awerbach Angriff +\or % E74 +\@@key{K\"onigsindisch}{E74}\\Awerbach Angriff +\or % E75 +\@@key{K\"onigsindisch}{E75}\\Awerbach Angriff +\or % E76 +\@@key{K\"onigsindisch}{E76}\\Vierbauernvariante +\or % E77 +\@@key{K\"onigsindisch}{E77}\\Vierbauernvariante +\or % E78 +\@@key{K\"onigsindisch}{E78}\\Vierbauernvariante +\or % E79 +\@@key{K\"onigsindisch}{E79}\\Vierbauernvariante +\or % E80 +\@@key{K\"onigsindisch}{E80}\\S\"amisch Angriff +\or % E81 +\@@key{K\"onigsindisch}{E81}\\S\"amisch Angriff +\or % E82 +\@@key{K\"onigsindisch}{E82}\\S\"amisch Angriff +\or % E83 +\@@key{K\"onigsindisch}{E83}\\S\"amisch Angriff +\or % E84 +\@@key{K\"onigsindisch}{E84}\\S\"amisch Angriff +\or % E85 +\@@key{K\"onigsindisch}{E85}\\S\"amisch Angriff +\or % E86 +\@@key{K\"onigsindisch}{E86}\\S\"amisch Angriff +\or % E87 +\@@key{K\"onigsindisch}{E87}\\S\"amisch Angriff +\or % E88 +\@@key{K\"onigsindisch}{E88}\\S\"amisch Angriff +\or % E89 +\@@key{K\"onigsindisch}{E89}\\S\"amisch Angriff +\or % E90 +\@@key{K\"onigsindisch}{E90}\\Klassisches System +\or % E91 +\@@key{K\"onigsindisch}{E91}\\Klassisches System +\or % E92 +\@@key{K\"onigsindisch}{E92}\\Klassisches System +\or % E93 +\@@key{K\"onigsindisch}{E93}\\Klassisches System +\or % E94 +\@@key{K\"onigsindisch}{E94}\\Klassisches System +\or % E95 +\@@key{K\"onigsindisch}{E95}\\Klassisches System +\or % E96 +\@@key{K\"onigsindisch}{E96}\\Klassisches System +\or % E97 +\@@key{K\"onigsindisch}{E97}\\Klassisches System +\or % E98 +\@@key{K\"onigsindisch}{E98}\\Klassisches System +\or % E99 +\@@key{K\"onigsindisch}{E99}\\Klassisches System +\fi %\ifcase +\fi %\if E +} +\gdef\key #1{\@key#1 } +% +% diff --git a/Master/texmf-dist/tex/latex/chess/chessmg.sty b/Master/texmf-dist/tex/latex/chess/chessmg.sty new file mode 100644 index 00000000000..a7e53edea26 --- /dev/null +++ b/Master/texmf-dist/tex/latex/chess/chessmg.sty @@ -0,0 +1,567 @@ +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{chessmg} + [1995/08/23 v1.3 Version only for LaTeX2e (MG)] +\RequirePackage{ifthen} +% +% chess.sty +% --------- +% Style file for writing about chess games +% Author : Piet Tutelaers (internet: rcpt@urc.tue.nl) +% Version: 1.3 (Aug. 1995) M. Goossens (goossens@cern.ch) +% - Declare languages via LaTeX2e options +% - Style will now only work with LaTeX2e +% Version: 1.2 (Febr. 1992) +% Improvements over version 1.1 +% - added `\v{S}ahovski Informator' symbols +% -`en passant capture' bug fixed (reported by Jonathan Mestel) +% -change {--} into \hbox{--} to prevent hyphenation within move +% -\move's lined up on last row (or digit in case of castling) +% -handling of promotion improved +% * Black promotion problem solved (plain TeX) +% * comment allowed also with promotion +% * if no promotion piece is provided a default Q(ueen) is supposed +% Thanks to: Jan Jaap Spreij (puls@cs.rug.nl) +% -improved interface to plain TeX +% -language support using the babel package from Johannes Braams +% (currently support for english, dutch, german and french but you +% can add an extra language `foreign' by: +% 1. creating `foreign.sty' for cooperating with `babel' +% 2. search for FOREIGN and follow the instructions in the comments) +% - \begin{nochess} ... \end{nochess} +% -chessfig10 renamed to chessf10 (service to MSDOS users) +% Version: 1.1 (17 Nov 1990) +% Improvements over version 1.0: +% -TeX code cleaned up (thanks to TeX-wizzard Victor Eijkhout) +% -moving a King does not generate a castling move when this +% King already moved +% -renamed internal macro `\\' because LaTeX uses that +% -better hooks for foreign languages (look for lines marked with +% %%FOREIGN%%) +% Torture test: +% If you change something in the chess.sty style check if everything +% else is still working with torture-test.ltx (LaTeX) or +% torture-test.tex (plain TeX). +% Known problems: +% -The analysis mode can not be used within arguments of macros +% not: \centerline{|21.N5*f3|} but: |\centerline{21.N5*f3}| +% Version: 1.0 (5 Jan 1990) +% + +% +% Macro specific initialisations +% +\gdef\line#1{\hbox to \textwidth{#1}} + +% +% Default language is English +% + +\def\DWP{\define@White@pieces{K}{Q}{R}{B}{N}{P}} +\def\DBP{\define@Black@pieces{k}{q}{r}{b}{n}{p}} +\def\LPC{\let@pieces{K}{Q}{R}{B}{N}} +\DeclareOption{dutch}{\def\DWP{\define@White@pieces{K}{D}{T}{L}{P}{I}} + \def\DBP{\define@Black@pieces{k}{d}{t}{l}{p}{i}} + \def\LPC{\let@pieces{K}{D}{T}{L}{P}}} +\DeclareOption{german}{\def\DWP{\define@White@pieces{K}{D}{T}{L}{S}{B}} + \def\DBP{\define@Black@pieces{k}{d}{t}{l}{s}{b}} + \def\LPC{\let@pieces{K}{D}{T}{L}{S}}} +\DeclareOption{french}{\def\DWP{\define@White@pieces{R}{D}{T}{F}{C}{P}} + \def\DBP{\define@Black@pieces{r}{d}{t}{f}{c}{p}} + \def\LPC{\let@pieces{R}{D}{T}{F}{C}}} +% Fill in your language and the uppercase letters for KING, QUEEN, etc. +% \ifcurrentlanguage{FOREIGN}{\let@pieces{KING}{QUEEN}{ROOK}{BISHOP}{KNIGHT}}% +% Your language will be activated by FOREIGN.sty. +\ProcessOptions + +\def\@set[#1#2](#3){%arguments: [a-h1-8](<letter>) + \expandafter\xdef\csname#1#2\endcsname{#3}} + +\def\@get#1[#2#3]{%arguments:\cs[a-h1-8] + \edef#1{\csname#2#3\endcsname}} + +\font\Chess=chess20 + +\newcount\@c % column +\newcount\@r % row +\newcount\@sum % row+column + +\def\@col{\ifcase\@c\or a\or b\or c\or d\or e\or f\or g\or h\fi} + +\def\@showchar{ + \@get\piece[\@col\the\@r] + \if\piece E \ifodd\@sum 0\else Z\fi\else + \if\piece P \ifodd\@sum P\else O\fi\else + \if\piece p \ifodd\@sum p\else o\fi\else + \if\piece R \ifodd\@sum R\else S\fi\else + \if\piece B \ifodd\@sum B\else A\fi\else + \if\piece N \ifodd\@sum N\else M\fi\else + \if\piece r \ifodd\@sum r\else s\fi\else + \if\piece b \ifodd\@sum b\else a\fi\else + \if\piece n \ifodd\@sum n\else m\fi\else + \if\piece K \ifodd\@sum K\else J\fi\else + \if\piece Q \ifodd\@sum Q\else L\fi\else + \if\piece k \ifodd\@sum k\else j\fi\else + \if\piece q \ifodd\@sum q\else l\fi\else + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +\def\@showrow#1{ + \@r=#1\@c=1 + \@sum=\@r\advance\@sum by\@c + \loop + \@showchar + \ifnum\@c<8 \advance\@c by1\advance\@sum by1 + \repeat +} + +\def\showboard{ +\vbox{\offinterlineskip + \hrule height1pt + \hbox{\vrule width1pt\Chess + \vbox{\hbox{\@showrow8} + \hbox{\@showrow7} + \hbox{\@showrow6} + \hbox{\@showrow5} + \hbox{\@showrow4} + \hbox{\@showrow3} + \hbox{\@showrow2} + \hbox{\@showrow1}}% + \vrule width1pt} + \hrule height1pt} +} + +% inner loop needs extra { ... } + +\def\@emptyboard{ + \@r=1 + \loop + {\@c=1 + \loop + \@set[\@col\the\@r](E) + \ifnum\@c<8 \advance\@c by1 + \repeat} + \ifnum\@r<8 \advance\@r by 1 + \repeat +} + +\def\@initboard{ +% empty squares + \@r=3 + \loop + {\@c=1 + \loop + \@set[\@col\the\@r](E) + \ifnum\@c<8 \advance\@c by1 + \repeat} + \ifnum\@r<6 \advance\@r by 1 + \repeat +% pawns + \@c=1 + \loop + \@set[\@col2](P)\@set[\@col7](p) + \ifnum\@c<8 \advance\@c by1 + \repeat +% pieces + \@set[a1](R)\@set[h1](R) + \@set[a8](r)\@set[h8](r) + \@set[b1](N)\@set[g1](N) + \@set[b8](n)\@set[g8](n) + \@set[c1](B)\@set[f1](B) + \@set[c8](b)\@set[f8](b) + \@set[d1](Q)\@set[e1](K) + \@set[d8](q)\@set[e8](k) +} + +% +% The next part defines a user friendly notation for chess moves. +% Some examples: |21. Nf3-e5, Ke8*f8 22. 0-0-0+, Bh8*a1| +% : |21.: Ke8*f8 22. Bh8*a1, 0-0| +% : |21 Nfe5 K*f8 22 0-0-0! B*a1| +% : |21: K*f8 22 B*a1 0-0| +% + +\font\Fig=chessf10 + +\gdef\@king{{\Fig K}} +\gdef\@queen{{\Fig Q}} +\gdef\@rook{{\Fig R}} +\gdef\@bishop{{\Fig B}} +\gdef\@knight{{\Fig N}} +\gdef\@dash{\hbox{--}} +\gdef\@capt{$\times$} +\gdef\@dots{~$\ldots$,} +\gdef\@dot{\char46 } + +% +% Make character codes for pieces depending on current language. +% (I cann't derive the Black values from the White using `\lowercase'!) +% + +\def\define@White@pieces#1#2#3#4#5#6{% define character codes for White pieces + \chardef\king@=`#1 \def\uc@king{#1} + \chardef\queen@=`#2 \def\uc@queen{#2} + \chardef\rook@=`#3 \def\uc@rook{#3} + \chardef\bishop@=`#4\def\uc@bishop{#4} + \chardef\knight@=`#5\def\uc@knight{#5} + \chardef\pawn@=`#6 \def\uc@pawn{#6}} +\def\define@Black@pieces#1#2#3#4#5#6{% and now the Black pieces + \def\lc@king{#1}\def\lc@queen{#2}\def\lc@rook{#3} + \def\lc@bishop{#4}\def\lc@knight{#5}\def\lc@pawn{#6}} +\def\activate@pieces{% make them active + \catcode\king@=\active\catcode\queen@=\active\catcode\rook@=\active% + \catcode\bishop@=\active\catcode\knight@=\active} +\def\deactivate@pieces{% make them inactive + \catcode\king@=11\catcode\queen@=11\catcode\rook@=11% + \catcode\bishop@=11\catcode\knight@=11} +\def\ifcurrentlanguage#1#2{%if language defined then compare with \language + \expandafter\ifx\csname l@#1\endcsname\relax% + \else\ifnum\language=\expandafter\csname l@#1\endcsname\relax#2\fi\fi} +\def\select@pieces{% select pieces depending on language + \DWP\DBP +% Define here your language and choose an unique set of uppercase letters +% for the White pieces (KING, QUEEN, etc.) and the corresponding lowercase +% letters for the Black pieces (king, queen, etc.). +% \ifcurrentlanguage{FOREIGN}{% +% \define@White@pieces{KING}{QUEEN}{ROOK}{BISHOP}{KNIGHT}{PAWN} +% \define@Black@pieces{king}{queen}{rook}{bishop}{knight}{pawn}} + } +\def\let@pieces#1#2#3#4#5{% let character codes be macros + \let#1=\@king\let#2=\@queen\let#3=\@rook% + \let#4=\@bishop\let#5=\@knight} + +\catcode`|=\active\select@pieces +{\catcode`:=\active\catcode`.=\active\catcode`*=\active\catcode`-=\active + \activate@pieces + \gdef\trigger@pieces{ + \catcode`:=\active\catcode`.=\active\catcode`*=\active\catcode`-=\active + \activate@pieces\LPC + % I would like to say ``\let\king@=\@king'' but how? + \let-=\@dash\let*=\@capt\let:=\@dots\let.=\@dot}% + \gdef\@notation{\begingroup\let|=\endgroup\trigger@pieces}% +% +% Provide a `nochess' environment in which the `|' character becomes +% inactive for situations where the `|' is already in use (like in +% the LaTeX `tabular' environment for example). +% + \gdef\nochess{\begingroup\let|=\relax\catcode`\|=12\relax + \catcode`:=12 \catcode`.=12 \catcode`*=12 \catcode`-=12 + \deactivate@pieces\let\endnochess=\endgroup} + \gdef\chess{\begingroup\let\endchess=\endgroup\trigger@pieces} +} +\let|=\@notation + +% +% Next part provides a ply (half move) generator +% + +\newif\ifWhite \newif\ifFigure \newif\ifcapture + +% +% next newif's needed for castling +% +\newif\ifKnotmoved \newif\ifknotmoved +\newif\ifcastling \newif\ifoo + +% +% Globals for special pawn moves (en passant capture and promotion) +% + +\newif\ifenpassant \newif\ifpromotion + +\def\@color#1{ % Color of a piece 0: none, -1: black, 1: white + \if #1E0\else + \ifnum`#1=\uccode`#11\else-1\fi\fi} + +% +% No checking is done for validity of moves, only legal moves behave well!! +% + +\def\@ply#1#2#3#4#5 {% Syntax: [a-h][1-8][a-h][1-8]{Q|R|B|N}{Comment} + \@get\piece[#1#2]\@get\capture[#3#4]\Figuretrue + \if\capture E\capturefalse\else\capturetrue\fi + \ifWhite + \if\piece P\Figurefalse + \if#46 + \if\eprow#3\capturetrue\enpassanttrue\fi + \xdef\eprow{x}% + \else + \xdef\eprow{x}% + \if#22 + \if#44\xdef\eprow{#3}\fi + \else + \if#48\promotiontrue\fi + \fi + \fi + \else\xdef\eprow{x} + \if\piece K% check for possible castling + \ifKnotmoved + \if#3g\if#41\castlingtrue\ootrue\fi + \else\if#3c\if#41\castlingtrue\oofalse\fi\fi + \fi + \global\Knotmovedfalse + \fi + \fi + \fi + \ifcastling + \@set[#1#2](E)\@set[#3#4](K)% + \ifoo 0\@dash0\rlap{#5}\@set[f1](R)\@set[h1](E)% + \else 0\@dash0\@dash0\rlap{#5}\@set[d1](R)\@set[a1](E)\fi + \castlingfalse + \else + \ifFigure{\Fig\piece}\fi + #1#2\ifcapture\@capt\else\@dash\fi#3#4% + \rlap{\ifpromotion\expandafter\promovendus#5XYZ\else#5\fi}% + \@set[#1#2](E)% + \ifpromotion\@set[#3#4](\PROM)\else\@set[#3#4](\piece)\fi + \ifenpassant\@set[#3#2](E)\enpassantfalse\fi + \fi + \global\Whitefalse + \else % ``same'' for Black + \if\piece p\Figurefalse + \if#43 + \if\eprow#3\capturetrue\enpassanttrue\fi + \xdef\eprow{x}% + \else + \xdef\eprow{x}% + \if#27 + \if#45\xdef\eprow{#3}\fi + \else + \if#41\promotiontrue\fi + \fi + \fi + \else\xdef\eprow{x} + \if\piece k + \ifknotmoved + \if#3g\if#48\castlingtrue\ootrue\fi + \else\if#3c\if#48\castlingtrue\oofalse\fi\fi + \fi + \global\knotmovedfalse + \fi + \fi + \fi + \ifcastling + \@set[#1#2](E)\@set[#3#4](k)% + \ifoo 0\@dash0\rlap{#5}\@set[f8](r)\@set[h8](E)% + \else 0\@dash0\@dash0\rlap{#5}\@set[d8](r)\@set[a8](E)\fi% + \castlingfalse + \else + \ifFigure{\Fig\if\piece rR\else\if\piece bB\else\if\piece nN\else + \if\piece qQ\else K\fi\fi\fi\fi}\fi + #1#2\ifcapture\@capt\else\@dash\fi#3#4% + \rlap{\ifpromotion\expandafter\promovendus#5XYZ\else#5\fi}% + \@set[#1#2](E)% + \ifpromotion\@set[#3#4](\prom)\else\@set[#3#4](\piece)\fi + \ifenpassant\@set[#3#2](E)\enpassantfalse\fi + \fi + \global\Whitetrue + \fi} + +% +% Promovendus: treat first char of argument as promotion piece if queen, +% rook, knight or bishop; otherwise consider it as comment and take queen +% as default promotion. Leave in \PROM White promoting piece (Q|R|B|N) +% and in \prom Black's version (q|r|b|n). +% + +\def\promovendus#1#2Z{% + \if#1X\def\C{}\gdef\PROM{Q}\gdef\prom{q}% + \else + \ifnum`#1=\queen@ \gdef\PROM{Q}\gdef\prom{q}\def\C{\@comment#2}\else + \ifnum`#1=\rook@ \gdef\PROM{R}\gdef\prom{r}\def\C{\@comment#2}\else + \ifnum`#1=\bishop@\gdef\PROM{B}\gdef\prom{b}\def\C{\@comment#2}\else + \ifnum`#1=\knight@\gdef\PROM{N}\gdef\prom{n}\def\C{\@comment#2}\else + \gdef\PROM{Q}\gdef\prom{q}\def\C{\comment#1#2}% + \fi\fi\fi\fi\fi% + {\Fig\PROM}{\C}} +\def\@comment#1XY{#1} + +\newcount\movecount \movecount=0 + +\def\showmove#1#2{\par + \line{\strut\hbox to1cm{\hfil\the\movecount.}% + \hbox to2.8cm{\hfil#1}\hbox to2.8cm{\hfil#2}\hfil}\par} + +\def\move#1 #2 { + \advance\movecount by 1 + \showmove{\@ply#1 }{\@ply#2 }} + +\def\ply#1 { + \ifWhite + \advance\movecount by 1 + \showmove{\@ply#1 }{} + \else + \showmove{$\ldots$}{\@ply#1 } + \fi} + +\def\newgame{\vskip0pt\movecount=0 \@initboard + \Whitetrue\castlingfalse\xdef\eprow{x} + \Knotmovedtrue\knotmovedtrue + \promotionfalse\enpassantfalse} + +\def\@dolist{\afterassignment\@dodolist\let\@@next= } % Answer 11.5 TeXbook +\def\@dodolist{\ifx\@@next\@endlist \let\@@next\relax % adapted to generate + \else \@nextitem\let\@@next\@dolist \fi % chess diagrams + \@@next} + +\def\@endlist{\@endlist} + +\def\@nextitem{% + \if\@@next\space \@set[\@col\the\@r](E)\else + \if\@@next * \@set[\@col\the\@r](E)\else + \if\@@next\uc@pawn \@set[\@col\the\@r](P)\else + \if\@@next\lc@pawn \@set[\@col\the\@r](p)\else + \if\@@next\uc@rook \@set[\@col\the\@r](R)\else + \if\@@next\lc@rook \@set[\@col\the\@r](r)\else + \if\@@next\uc@bishop \@set[\@col\the\@r](B)\else + \if\@@next\lc@bishop \@set[\@col\the\@r](b)\else + \if\@@next\uc@knight \@set[\@col\the\@r](N)\else + \if\@@next\lc@knight \@set[\@col\the\@r](n)\else + \if\@@next\uc@queen \@set[\@col\the\@r](Q)\else + \if\@@next\lc@queen \@set[\@col\the\@r](q)\else + \if\@@next\uc@king \@set[\@col\the\@r](K)\else + \if\@@next\lc@king \@set[\@col\the\@r](k)\else + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \advance\@c by1} + +\def\@initrow#1#2{\@r=#1\@c=1\@dolist#2\@endlist} + +% +% For setting up a position +% +\def\board#1#2#3#4#5#6#7#8{ + \@initrow8{#1} + \@initrow7{#2} + \@initrow6{#3} + \@initrow5{#4} + \@initrow4{#5} + \@initrow3{#6} + \@initrow2{#7} + \@initrow1{#8}} + +% +% Next macros for defining chess position (thanks to Victor Eijkhout) +% +\def\White(#1){\def\match{xxx}\xWhite#1,xxx,} +\def\xWhite#1,{\def\temp{#1} + \ifx\temp\match \else \WhitePieceOrPawn#1XY \expandafter\xWhite \fi} +\def\WhitePieceOrPawn#1#2#3#4Y{% + \if#3X \@set[#1#2](P) + \else\ifnum`#1=\king@ \@set[#2#3](K)\else % King + \ifnum`#1=\queen@ \@set[#2#3](Q)\else % Queen + \ifnum`#1=\rook@ \@set[#2#3](R)\else % Rook + \ifnum`#1=\bishop@\@set[#2#3](B)\else % Bishop + \ifnum`#1=\knight@\@set[#2#3](N)\else % kNight + \fi\fi\fi\fi\fi + \fi} + +\def\Black(#1){\def\match{xxx}\xBlack#1,xxx,} +\def\xBlack#1,{\def\temp{#1} + \ifx\temp\match \else \BlackPieceOrPawn#1XY \expandafter\xBlack \fi} +\def\BlackPieceOrPawn#1#2#3#4Y{ + \if#3X\@set[#1#2](p) + \else\ifnum`#1=\king@ \@set[#2#3](k)\else % King + \ifnum`#1=\queen@ \@set[#2#3](q)\else % Queen + \ifnum`#1=\rook@ \@set[#2#3](r)\else % Rook + \ifnum`#1=\bishop@\@set[#2#3](b)\else % Bishop + \ifnum`#1=\knight@\@set[#2#3](n)\else % kNight + \fi\fi\fi\fi\fi + \fi} + +\def\position{\begingroup% + \@emptyboard\movecount=0\xdef\eprow{x} + \global\Whitetrue\global\castlingfalse + \global\Knotmovedtrue\global\knotmovedtrue + \global\promotionfalse\global\enpassantfalse} +\def\endposition{\endgroup} + +% And now we define most symbols that are used in `\v{S}ahovski Informator' +% (Chess Informant). For a complete list see Informant#51 (1991) pp 10-12. +% If you add symbols realize that the macros should be usable by plain TeX +% and LaTeX and that the (La)TeX names should be suggestive and clear! +% But don't use uppercase letters or existing names (center)! +% Thanks go to John Saba (saba@ccit.arizona.edu) and Henry Thomas +% (hthomas@irisa.fr) for their help in defining next symbols. +\font\symbolten=cmsy10 \font\smrm=cmr6 \font\symbolsix=cmsy6 +\def\wbetter{\mbox{\baselineskip0pt$\vcenter{\vbox{\hbox{+}\hbox{=}}}$}} +\def\bbetter{\mbox{\baselineskip0pt + $\vcenter{\vbox{\hbox{=}\kern-.3ex\hbox{+}}}$}} +\def\wupperhand{\mbox{$\pm$}} +\def\bupperhand{\mbox{$\mp$}} +\def\wdecisive{\mbox{$+\hbox{}-$}} +\def\bdecisive{\mbox{$-\hbox{}+$}} +\def\equal{=} +\def\unclear{\mbox{$\infty$}} +\def\compensation{\mbox{\baselineskip0pt$\vcenter{\vbox{% + \hbox{\kern.056em\vbox{\hrule width0.89em\kern0.35ex\hrule width0.89em}} + \kern.2ex\hbox{$\infty$}}}$}} +% next symbol should be build using METAFONT +\def\devadvantage{{\symbolten\char'015}\kern-4.8pt + \vrule width 2.4pt height6pt depth-5.6pt + \vrule width .4pt height8pt depth-5.6pt\kern2.4pt} +\def\moreroom{{\symbolten\char'015}} +\def\withattack{$\rightarrow$} +\def\withinit{$\uparrow$} +\def\counterplay{\hbox{\baselineskip0pt% + $\vcenter{\vbox{\hbox{$\leftarrow$}\hbox{$\rightarrow$}}}$}} +\def\zugzwang{$\odot$} +\def\mate{\kern.4pt\mbox{% + \vrule width2ex height1.18ex depth-1.1ex\kern-2ex + \vrule width2ex height.52ex depth-.44ex\kern-1.381ex + \vrule width.08ex height1.8ex depth.2ex\kern0.615ex + \vrule width.08ex height1.8ex depth.2ex\kern0.406ex}\kern.4pt} +\def\withidea{$\triangle$} +\def\onlymove{$\Box$} +\def\betteris{\mbox{\baselineskip0pt + $\vcenter{\vbox{\hbox{$\frown$}\kern-0.35ex\hrule width0.95em}}$}} +\def\file{$\Leftrightarrow$} +% next symbol should be build using METAFONT +\def\diagonal{$\nearrow$} +\def\centre{$\Box$\kern-.6em\raise.54ex\hbox{\smrm\char'053}} +\def\kside{$\gg$} +\def\qside{$\ll$} +\def\weakpt{$\times$} +\def\ending{$\perp$} +% John Saba's method: +\def\blackbox{\vrule height .8ex width 1.2ex depth 0ex} +\def\whitebox{\vbox{\hrule height .1pt\hbox{\vrule width .1pt\kern.6ex + \vbox{\kern.8ex}\kern.6ex\vrule width .1pt}\hrule height .1pt}} +\def\bishoppair{\whitebox\kern-2pt\raise1.8pt\hbox{\whitebox}} +\def\opposbishops{\whitebox\kern-2pt\raise1.8pt\hbox{\blackbox}} +\def\samebishops{\blackbox\kern-2pt\raise1.8pt\hbox{\blackbox}} +% My method +%\def\bishoppair{\setbox0=\hbox{% +% \vrule width1.4ex height1ex depth-.92ex\kern-1.4ex +% \vrule width1.4ex height.08ex depth0pt\kern-1.4ex +% \vrule width.08ex height1ex depth0ex\kern1.24ex +% \vrule width.08ex height1ex depth0ex}% +% \kern.4pt\mbox{\copy0\kern-.6ex\raise0.56ex\box0}\kern.4pt} +%\def\opposbishops{\kern.4pt\mbox{% +% \vrule width1.4ex height1ex depth-.92ex\kern-1.4ex +% \vrule width1.4ex height.08ex depth0pt\kern-1.4ex +% \vrule width.08ex height1ex depth0ex\kern1.24ex +% \vrule width.08ex height1ex depth0ex\kern-.6ex +% \vrule width1.4ex height1.56ex depth-0.56ex}\kern.4pt } +%\def\samebishops{\kern.4pt\mbox{% +% \vrule width1.4ex height1ex depth0ex\kern-.6ex +% \vrule width1.4ex height1.56ex depth-0.56ex}\kern.4pt} +\def\unitedpawns{$\circ\kern-.05em\circ$} +\def\seppawns{$\circ\kern-.3em\cdot\kern-.35em\cdot\kern-.1em\circ$} +\def\doublepawns{\mbox{\baselineskip0pt + $\vcenter{\vbox{\hbox{$\circ$}\vskip.8pt\hbox{$\circ$}}}$}} +% Next symbol still not perfect ... +\def\passedpawn{\mbox{\baselineskip0pt + $\vcenter{\vbox{\hbox{\kern0.14em\symbolsix\char'042}\hbox{$\circ$}}}$}} +\def\morepawns{$>$} +\def\timelimit{$\oplus$} +\def\novelty{{\sc N}} +\def\comment{{\sc RR}} +\def\various{{\sc R}} +\def\without{\kern.4pt\mbox{% + \vrule width 1ex height.08ex depth0ex\kern-0.08ex + \vrule width0.08ex height1.5ex depth0ex}\kern.4pt} +\def\with{\kern.4pt\mbox{% + \vrule width 0.08ex height1.5ex depth0ex\kern-0.08ex + \vrule width 1ex height.08ex depth0ex}\kern.4pt} +\def\etc{$\parallel$} +\def\see{\kern.4pt\mbox{\vrule width 1em height.54ex depth-.46ex}\kern.4pt} + +\endinput
\ No newline at end of file |