% Dokumentation for BDFCHESS.STY 1.2 % For printing this documentation you need the following styles: % ART11.STY % A4.STY % from CHESS12 distribution : % A4WIDE.STY % CHESS.STY % from Babel-Sytem : % ENGLISH.STY % BABEL.STY % BABEL.SWI % and of course BDFCHESS.STY % % FONTS : % Magnification 1000 : chess15,chessf10,chess10f,chess20,cmex10, % cmbx12,cmi12,cmsy10,cmr10,cmr12,cmsy9,cmr9,cmr8 % Magnification 1095 : cmtt10,cmbx10,cmsy10,cmmi10,cmr10,cmcsc10 % Magnification 1440 : cmbx10,cmr10,cmcsc10 % Magnification 1728 : cmbx10 % \documentstyle[a4wide,11pt,chess,bdfchess]{article} \parindent 0pt \parskip 3mm \topmargin -1cm \newfont{\fig}{chess10f scaled 1000} % % turn of those nasty overfull and underfull hboxes % \hbadness=10000 \hfuzz=50pt % \newcommand{\bs}{$\backslash$} % \def\TeX{\rm T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX} % \def\LaTeX{\rm L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX} % \newcommand{\boardwithtext}[2]{% \parbox[t]{55mm} {\input #1 \showboard #2\\ \ifWhite \advance\movecount by 1 White, Move \the\movecount \else Black, Move \the\movecount \fi \vskip 3mm}} % \begin{document} \centerline{\Large A \LaTeX\ style for management of correspondence chess games}\vskip 4mm \centerline{Frank Hassel}\vskip 5mm {\Large Requirements}\\[5mm] {\bf CHESS.STY 1.2} by Piet Tutelaers\\ with PK-Fonts and font metric files: CHESSF10, CHESS10, CHESS20, CHESS30 (CHESS15 for typesetting postcard)\par {\bf BABEL-PACKAGE} by Johannes Braams for language support\par {\bf A4WIDE.STY} by Jean-Fran\c{c}ois Lamy for large pages\par Notice : You can only use this style with \LaTeX .\\ The name BdFCHESS.STY is a rememberance on the old name of the german chess correspondence federation which was renamed from {\bf B}und {\bf d}eutscher {\bf F}ernschachfreunde to Deutscher Fernschachbund.\\[5mm] {\Large Additions to CHESS.STY which are not only usefull for postal chess players}\\[5mm] {\font\Chess=chess15\footnotesize \begin{tabular}{ccc} \showinversboard&\showboardwithnotation& \showinversboardwithnotation\\ \bs showinversboard&\bs showboardwithnotation& \bs showinversboardwithnotation\\ \end{tabular}}\par\vskip 5mm For typesetting the postcard I use four macros to save and restore chess positions\\ \centerline{\bf \bs savegameone \bs restoregameone \bs savegametwo \bs restoregametwo .} You may use them to save a game, play a variation and restore the previous positions.\par I have added a font named chess10f. It is the same font as chessf10 for tournament style, but the knight {\fig N} looks to the right side instead {\Fig N} of left side.\\ It is the recommondation of FIDE \footnote{Schubart, N”ttger, Turnierleiterhandbuch des Deutschen Schachbundes, Walter de Gruyter Verlag, Berlin 1987} that on chessboards the knight looks like {\Fig N} and in the figurine Notation like {\fig N}. The elegant way to change the font is to write in the front of your document \verb+\font\Fig=chess10f+. The awful way is to rename chess10f.pk to chessf10.pk. But please restore the old state to avoid confusion, if you give the packages to other people. \newpage {\Large Additions to CHESS.STY for postal chess players.}\\[5mm] At first a short example. \begin{verbatim} \documentstyle[a4wide,11pt,chess,bdfchess]{article} \pagestyle{empty} \parindent 0mm \parskip 0mm % \sender{\small sender:\\ \large{\bf Frank Hassel}\\ Im Kirschgarten 14\\ 6501 W”rrstadt\\ Germany} \receiver{\parskip 5mm\LARGE \bf DANTE \vskip 2pt\hrule \LARGE Postfach 10 18 40\vskip 2pt\hrule \LARGE \bf D-69008 Heidelberg\vskip 2pt\hrule} % \begin{document} % \centerline{\large \bf Max Mustermann - Frank Hassel} \begin{gameone} \postmove 03.09.1987 0 e2e4 d7d6 11.09.1987 0 \postmove 12.09.1987 2 d2d4 g8f6 15.09.1987 1 \postmove 17.09.1987 2 b1c3 g7g6 21.09.1987 1 $$\showinversboardwithnotation$$ \end{gameone}\par % \centerline{\large \bf Frank Hassel - Max Mustermann} \begin{gametwo} \postmove 11.09.1987 0 d2d4 g8f6 12.09.1987 2 \postmove 15.09.1987 1 c2c4 g7g6 17.09.1987 2 \postply 21.09.1987 1 b1c3 $$\showboardwithnotation$$ \end{gametwo}\newpage % \cardmessage{I take holidays from \\30.09.87 to 14.10.87} % \postcard[f](0mm,0mm)\par \postcardaddress[tf](-1mm,20mm) % \end{document} \end{verbatim} \newpage \label{exone} Result :\\[5mm] \centerline{\large \bf Max Mustermann - Frank Hassel} \begin{gameone} \postmove 03.09.1987 0 e2e4 d7d6 11.09.1987 0 \postmove 12.09.1987 2 d2d4 g8f6 15.09.1987 1 \postmove 17.09.1987 2 b1c3 g7g6 21.09.1987 1 $$\showinversboardwithnotation$$ \end{gameone}\par \centerline{\large \bf Frank Hassel - Max Mustermann} \begin{gametwo} \postmove 11.09.1987 0 d2d4 g8f6 12.09.1987 2 \postmove 15.09.1987 1 c2c4 g7g6 17.09.1987 2 \postply 21.09.1987 1 b1c3 $$\showboardwithnotation$$ \end{gametwo}\newpage \sender{\small sender:\\ \large{\bf Frank Hassel}\\ Im Kirschgarten 14\\ 6501 W”rrstadt\\ Germany} \receiver{\parskip 5mm\LARGE \bf DANTE \vskip 2pt\hrule \LARGE Postfach 10 18 40\vskip 2pt\hrule \LARGE \bf D-69008 Heidelberg\vskip 2pt\hrule} \cardmessage{I take holidays from \\30.09.87 to 14.10.87} \postcard[f](0mm,0mm)\par \postcardaddress[tf](-1mm,20mm)\newpage Explanations : \begin{description} \item[\bs sender\{...\}] It is an empty definition. You can fill in your own address in a way, which corresponds your taste. \item[\bs receiver\{...\}] It is an empty definition. You can fill in the receiving address in a way, which corresponds your taste. \item[\bs cardmessage\{...\}] It is an empty definition. You can fill in your messages. \\ See page \pageref{layout} for the layout of postcard. \item[Environment gameone and gametwo] In a normal postal chess match each participant plays two games, one game as white player and one game as black player. Therefore this style manages two games, but you are also able to play one game. The initalisation starts with \verb+\newgame \savegameone \savegametwo+ which starts a new game and stores it. If you play only one game, the postcard show us this game and a new board.\\ If you start a new game with \verb+\begin{gameone}+ the following actions happens \verb+\newgame+ \verb+\finishgameonefalse+ and the tabularheader is typesetted. If you want to continue a running game, you can use the position-environment as described in CHESS.STY. In addition you must set the considertimes by \verb+\global\considersumwhite=xxx+ \verb+\global+ \verb+\considersumblack=xxx+. Then you can use the macros \verb+\postmove \postply+ as de\-scriped below. With \verb+\end{gameone}+ all positions are stored with \verb+\savegameone+ and the dates and last move are stored in boxes, see page \pageref{layout}. This style assumes that the last half move is your move ! If you want to set for example good moves to be played latter, which should not appears on the postcard, you must set them outside the environment gameone. \item[\bs postmove] For typesetting moves you can call \bs postmove with 6 arguments\\ 1. arrivaldate of move player white in the notation day.month.year (dd.mm.yyyy)\\ 2. considertime of player white\\ 3. move of player white in the notation [a-h][1-8][a-h] [1-8]\{\{$Q\mid R\mid B\mid N$\}comment\}.\\ Description see documentation of CHESS.STY\\ 4. move of player black in the notation [a-h][1-8][a-h] [1-8]\{\{$Q\mid R\mid B\mid N$\}comment\}\\ 5. arrivaldate of move player black\\ 6. considertime player black\\ The expansion of this macro gives one tabularline : see example page \pageref{exone}\\ \TeX\ calculates the leavingdate by the macro \verb+\departure#1.#2.#3 #4+ (dd.mm.yyyy condidertime) and the sums of considertimes in fields $\sum$. \item[\bs postply] For typesetting halfmoves you can call \bs postply with 3 arguments\\ 1. arrivaldate in the notation day.month.year (dd.mm.yyyy)\\ 2. considertime \\ 3. halfmove in the notation [a-h][1-8][a-h][1-8]\{\{$Q\mid R\mid B\mid N$\}comment\} \item[{\bs postcard[f](dim,dim)}] This is the macro for typesetting the postcardside with moves and dates. I have added tree parameters. Optional [f] which creates a frame around the card. And two dimension parameters for positioning the card, first for a horizontal offset, second for vertical offset. Both can be postiv and negativ. But of course you can also use the options of your printerdriver for positioning the postcard. So good luck to find the best way for your printer. \item[{\bs postcardaddress[tf](dim,dim)}] Macro for typesetting the front of the postcard. Options see \verb+\postcard[..](..,..)+. The optional parameter [t] divide the postcard with a vertical line and typeset the word postcard. \end{description} For the other macros of BdFCHESS.STY again a short example : \begin{nochess} \begin{verbatim} \documentstyle[a4wide,11pt,chess,bdfchess]{article} \pagestyle{empty} \parindent 0mm \parskip 0mm \postcardlanguage{german} % \begin{document} % \begin{gameone} \postmove 24.02.1990 2 c2c4 e7e5 27.02.1990 2 English system : other playable moves |1. : c7-c5 or 1. : Ng8-f6| \postmove 02.03.1990 1 b1c3 g8f6 04.03.1990 1 \postmove 07.03.1990 2 g1f3 b8c6 11.03.1990 1 \holidaywhite 7 \postmove 14.03.1990 9 d2d4 e5e4 28.03.1990 1 \end{gameone}\par % \centerline{\bf Movesuggestion} | \ifmoveone 5 Nf3-g5 5 h7-h6 | % \postcard(0mm,30mm) % \end{document} \end{verbatim} \end{nochess} % \postcardlanguage{german} \finishgametwo \par\parskip 0mm \newpage Result :\\[5mm] \begin{gameone} \postmove 24.02.1990 2 c2c4 e7e5 27.02.1990 2 English system : other playable moves |1. : c7-c5 or 1. : Ng8-f6| \postmove 02.03.1990 1 b1c3 g8f6 04.03.1990 1 \postmove 07.03.1990 2 g1f3 b8c6 11.03.1990 1 \holidaywhite 7 \postmove 14.03.1990 9 d2d4 e5e4 28.03.1990 1 \end{gameone}\par % \centerline{\bf Movesuggestion} | \ifmoveone 5 Nf3-g5 5 h7-h6 | % \postcard(0mm,30mm)\par\parskip 3mm\newpage % Explanations : \begin{description} \item[\bs postcardlanguage\{....\} ] These macros offers the possibility to typeset the postcard in an other language. There are still definitions for english, german and french, but you can add your language to BdFCHESS.STY. In the example above the notation-language is english (defined by the BABEL-System and CHESS.STY) and the postcard-language is german. \item[Analysis and Comments] You can add comments and switch with $\mid$ in the analysismode as descriped in CHESS.STY. \item[\bs holidaywhite num, \bs holidayblack num] These macros correct the considertime, if you have taken holidays between arrival and leaving of a move. \item[\bs ifmoveone, \bs ifmovetwo] If you want to offer an suggestionmove to your chessfriend these macros may be usefull for you. It uses the analysis mode of CHESS.STY, so you must set the command inside the switch $\mid$...$\mid$. The four arguments are - movecount halfmove movecount halfmove - , because the macro only sort the arguments in the correct fields, you must set the moves completly. For example : $\mid$Nf3-e5, Ke8*f8, Qd1-d8+,Bc1-g5$\mid$ \\ Result : |Nf3-e5, Ke8*f8, Qd1-d8+, Bc1-g5|\\ And don't forget the space between last argument and $\mid$.\\ If you call \bs ifmoveone twice, two suggestionmoves appears on the postcard. If you call it for a third time, there is not enough room and the result collide with the dates, so you have to design a new \bs moveonebox, refer to chapter: if all else fails. \end{description} Remainding commands : \postcardlanguage{english} \begin{description} \item[\bs acceptmoveone, \bs acceptmovetwo] This commands are working as \bs ifmoveone. They typesets the move before the actual move. So if you accept a suggestionmove you can repeat it at the postcard. \item[\bs finishgameone, \bs finishgametwo] You have to call these macros, if you finished a game, so that the moves and dates of this game don't appear on the postcard. \item[\bs tabularheader] If the tabular continued on a new page, you can call \bs tabularheader.\\ Result :\\[3mm] \tabularheader \item[\bs storeboard\{filename\}] This macro stores the momentary positions of all pieces in a ASCII-File. It saves it as \bs begin\{position\} \bs White(....) \bs Black(...) \bs global \bs movecount=num \bs global \bs Whitetrue or \bs Whitefalse \bs end\{position\}. But be careful, this macro has two disadvantages. With BdFCHESS it works only correct inside environments gameone or gametwo (else movecount=0, Whitetrue). It stores the positions only in the notation language which was defined by babel system. So if you want to use the stored positions in an other document, you have to use the same language (Styles: english, french, germanb, dutch).\\ I use this macro for becoming a survey of all my running games. Use \bs storeboard\{filename\} as last command just before say \bs end\{gameone or gametwo\}. Then you can prepare an other document, for example to typeset 12 running games on one A4-page.\\ \begin{verbatim} \documentstyle[a4wide,chess]{article} \textheight 280mm \textwidth 167mm \parindent 0pt \topmargin -1cm \pagestyle{empty} % % macro \boardwithtext{filename}{text} % \newcommand{\boardwithtext}[2]{% \parbox[t]{55mm} {\input #1 \showboard #2\\ \ifWhite \advance\movecount by 1 White, Move no. \the\movecount \else Black, Move no. \the\movecount \fi \vskip 3mm}} % \begin{document} \font\Chess=chess15 \centerline{\Large Chess Openings} % % game 1 - 12 % \boardwithtext{game1.brd}{English Opening {\bf A 27}\\(Dutch System)} \boardwithtext{game2.brd}{Old Indian Defense {\bf A 55}} \boardwithtext{game3.brd}{Benoni Defence {\bf A 70}\\(Main Line)}\\ % \boardwithtext{game4.brd}{Alekhine's Defence{\bf B 03}\\(Four Pawn's Attack)} \boardwithtext{game5.brd}{Dutch Defence {\bf A 83}\\ (Staunton Gambit)} \boardwithtext{game6.brd}{Pirc Defence {\bf B 08}}\\ % \boardwithtext{game7.brd}{Caro-Kann {\bf B 11}\\(Two Knight's Variation)} \boardwithtext{game8.brd}{Sicilian Defence {\bf B 45}\\(Classical System)} \boardwithtext{game9.brd}{French Defence{\bf C 01}\\ (Exchange Variation)}\\ % \boardwithtext{game10.brd}{Queen's Gambit {\bf D 07}\\(Tschigorin Defence)} \boardwithtext{game11.brd}{Vienna Game {\bf C 26}} \boardwithtext{game12.brd}{Nimzo-Indian Defence {\bf E 23}} % \end{document} \end{verbatim} \end{description} \textheight 280mm \textwidth 175mm \newpage % \typeout{Sorry for the pain of your harddisk} \typeout{Storing game1.brd - game12.brd as example for macro storeboard...} %English \begin{position} \White(Ra1,Nc3,Bc2,Qd1,Ke1,Bf1,Nf3,Rh1,a2,b2,c4,d2,e2,f2,g2,h2) \Black(Ra8,Nc6,Bc8,Qd8,Ke8,Bf8,Ng8,Rh8,a7,b7,c7,d7,e5,f5,g7,h7) \end{position} \global\Whitetrue\global\movecount=3 \storeboard{game1.brd} %Old Indian Defence \begin{position} \White(Ra1,Nc3,Bc1,Qd1,Ke1,Bf1,Nf3,Rh1,a2,b2,c4,d4,e4,f2,g2,h2) \Black(Ra8,Nd7,Bc8,Qd8,Ke8,Bf8,Nf6,Rh8,a7,b7,c7,d6,e5,f7,g7,h7) \end{position} \global\Whitefalse\global\movecount=5 \storeboard{game2.brd} %Benoni Defence \begin{position} \White(Ra1,Nc3,Bc1,Qa4,Ke1,Bf1,Nf3,Rh1,a2,b2,d5,e4,f2,g2,h2) \Black(Ra8,Nb8,Bb8,Qd8,Ke8,Bg7,Nf6,Rh8,a7,b7,c5,d6,f7,g6,h7) \end{position} \global\Whitefalse\global\movecount=8 \storeboard{game3.brd} %Aljechin \begin{position} \White(Ra1,Nb1,Bc1,Qd1,Ke1,Bf1,Ng1,Rh1,a2,b2,c4,d4,e5,f2,g2,h2) \Black(Ra8,Nb8,Bb8,Qd8,Ke8,Bf8,Nd5,Rh8,a7,b7,c7,d6,e7,f7,g7,h7) \end{position} \global\Whitefalse\global\movecount=4 \storeboard{game4.brd} %Staunton \begin{position} \White(Ra1,Nc3,Bg5,Qd1,Ke1,Bf1,Ng1,Rh1,a2,b2,c2,d4,f2,g2,h2) \Black(Ra8,Nb8,Bb8,Qd8,Ke8,Bf8,Nf6,Rh8,a7,b7,c7,d7,e7,e4,g7,h7) \end{position} \global\Whitefalse\global\movecount=4 \storeboard{game5.brd} %Pirc \begin{position} \White(Ra1,Nc3,Bc1,Qd1,Ke1,Bf1,Nf3,Rh1,a2,b2,c2,d4,e4,f2,g2,h2) \Black(Ra8,Nb8,Bb8,Qd8,Ke8,Bf8,Nf6,Rh8,a7,b7,c7,d6,e7,f7,g6,h7) \end{position} \global\Whitefalse\global\movecount=4 \storeboard{game6.brd} %Caro-Kann \begin{position} \White(Ra1,Nc3,Bc1,Qd1,Ke1,Bf1,Nf3,Rh1,a2,b2,c2,d2,e4,f2,g2,h2) \Black(Ra8,Nb8,Bg4,Qd8,Ke8,Bf8,Ng8,Rh8,a7,b7,c6,d5,e7,f7,g7,h7) \end{position} \global\Whitetrue\global\movecount=3 \storeboard{game7.brd} %Sicilian \begin{position} \White(Ra1,Nc3,Bc1,Qd1,Ke1,Bf1,Nd4,Rh1,a2,b2,c2,e4,f2,g2,h2) \Black(Ra8,Nc6,Bb8,Qd8,Ke8,Bf8,Nf6,Rh8,a7,b7,d7,e6,f7,g7,h7) \end{position} \global\Whitetrue\global\movecount=5 \storeboard{game8.brd} %French \begin{position} \White(Ra1,Nb1,Bc1,Qd1,Ke1,Bf1,Ng1,Rh1,a2,b2,c2,d4,d5,f2,g2,h2) \Black(Ra8,Nb8,Bb8,Qd8,Ke8,Bf8,Ng8,Rh8,a7,b7,c7,e6,f7,g7,h7) \end{position} \global\Whitefalse\global\movecount=3 \storeboard{game9.brd} %Quenn's Gambit \begin{position} \White(Ra1,Nb1,Bc1,Qd1,Ke1,Bf1,Ng1,Rh1,a2,b2,c4,d4,e2,f2,g2,h2) \Black(Ra8,Nc6,Bc8,Qd8,Ke8,Bf8,Ng8,Rh8,a7,b7,c7,d5,e7,f7,g7,h7) \end{position} \global\Whitetrue\global\movecount=2 \storeboard{game10.brd} %Vienna \begin{position} \White(Ra1,Nc3,Bc1,Qd1,Ke1,Bc4,Ng1,Rh1,a2,b2,c2,d2,e4,f2,g2,h2) \Black(Ra8,Nb8,Bb8,Qd8,Ke8,Bb4,Nf6,Rh8,a7,b7,c7,d7,e5,f7,g7,h7) \end{position} \global\Whitetrue\global\movecount=3 \storeboard{game11.brd} %Nimzo-Indian \begin{position} \White(Ra1,Nc3,Bc1,Qb3,Ke1,Bf1,Ng1,Rh1,a2,b2,c4,c5,e2,f2,g2,h2) \Black(Ra8,Nc6,Bb8,Qd8,Ke8,Bb4,Nf6,Rh8,a7,b7,d7,e6,f7,g7,h7) \end{position} \global\Whitetrue\global\movecount=5 \storeboard{game12.brd} % % % \typeout{And reading them again} \centerline{\Large Chess Openings} \font\Chess=chess15 \boardwithtext{game1.brd}{English Opening {\bf A 27}\\(Dutch System)} \boardwithtext{game2.brd}{Old Indian Defense {\bf A 55}} \boardwithtext{game3.brd}{Benoni Defence {\bf A 70}\\(Main Line)}\\ % \boardwithtext{game4.brd}{Alekhine's Defence {\bf B 03}\\(Four Pawn's Attack)} \boardwithtext{game5.brd}{Dutch Defence {\bf A 83}\\ (Staunton Gambit)} \boardwithtext{game6.brd}{Pirc Defence {\bf B 08}}\\ % \boardwithtext{game7.brd}{Caro-Kann {\bf B 11}\\(Two Knight's Variation)} \boardwithtext{game8.brd}{Sicilian Defence {\bf B 45}\\(Classical System)} \boardwithtext{game9.brd}{French Defence {\bf C 01}\\ (Exchange Variation)}\\ % \boardwithtext{game10.brd}{Queen's Gambit {\bf D 07}\\(Tschigorin Defence)} \boardwithtext{game11.brd}{Vienna Game {\bf C 26}} \boardwithtext{game12.brd}{Nimzo-Indian Defence {\bf E 23}} % \font\Chess=chess20 \textheight 235mm \textwidth 150mm \newpage % If all else fails, here is the layout of the postcard with it's macros and boxes.\\[5mm] \small \setlength{\unitlength}{1mm} \begin{picture}(150,50)\label{layout} \put(0,0){\framebox(70,48.5){}} \put(6,24){\dashbox(23,23){Board 1}} \put(41,24){\dashbox(23,23){Board 2}} \put(3,12){\dashbox(28,5){\bs moveonebox}} \put(3,17){\dashbox(28,5){\bs acceptonebox}} \put(38,12){\dashbox(28,5){\bs movetwobox}} \put(38,17){\dashbox(28,5){\bs accepttwobox}} \put(5,2){\dashbox(23,9){\bs mydatebox}} \put(41,4){\dashbox(23,7){\bs yourdatebox}} \put(35,1){\dashbox(20,2){}} \put(80,0){\framebox(70,48.5){}} \put(136,36){\framebox(9,11){}} \put(81,1){\dashbox(30,32.5){\bs cardmessage}} \put(81,33.5){\dashbox(30,14){\bs sender}} \put(116,1){\dashbox(32,32.5){\bs receiver}} \end{picture}\par \normalsize \hskip 2cm \bs postcard(...) \hskip 5cm \bs postcardaddress(...) \\[5mm] If you don't agree with an element of the postcard you can change it, just before you say \verb+\postcard[..]+ by the following way.\\[2mm] Change board 1\\ \verb+\board{.......} or \begin{position} ...... \end{position}+\\ \verb+\savegameone+\\[2mm] Change contents of boxes for example \bs moveonebox\\ \verb+\global\setbox\moveonebox=\vbox{..........}+\\[2mm] Change definitions\\ \verb+\gdef\sender{.....}+\\[2mm] But you can only change the contents not the position of an element ! \\[1cm] Please contact me for bug reports and suggestions :\\[1cm] Frank Hassel\\ Im Kirschgarten 14\\ 55286 W\"orrstadt\\ Germany\\ \end{document}