A LaTEX style for management of correspondence chess games

Frank Hassel

Requirements

CHESS.STY 1.2 by Piet Tutelaers with PK-Fonts and font metric files: CHESSF10, CHESS10, CHESS20, CHESS30 (CHESS15 for typesetting postcard)

BABEL-PACKAGE by Johannes Braams for language support

A4WIDE.STY by Jean-François Lamy for large pages

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 Bund deutscher Fernschachfreunde to Deutscher Fernschachbund.

Additions to CHESS.STY which are not only usefull for postal chess players

8 ^{7} ^{6} ^{5} ^{4} ^{3} ^{2} ^{1} a b c d e f g h ^{1} ^{2} ^{3} ^{4} ^{5} ^{6} ^{7} ^{8} h g f e d c b a
\showinversboard  \showboardwithnotation  \showinversboardwithnotation

For typesetting the postcard I use four macros to save and restore chess positions

\savegameone \restoregameone \savegametwo \restoregametwo . You may use them to save a game, play a variation and restore the previous positions.

I have added a font named chess10f. It is the same font as chessf10 for tournament style, but the knight looks to the right side instead of left side. It is the recommondation of FIDE ^{1} that on chessboards the knight looks like and in the figurine Notation like . The elegant way to change the font is to write in the front of your document \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.

1Schubart, Nöttger, Turnierleiterhandbuch des Deutschen Schachbundes, Walter de Gruyter Verlag, Berlin 1987

Additions to CHESS.STY for postal chess players.

At first a short example.

\documentstyle[a4wide,11pt,chess,bdfchess]{article}
\pagestyle{empty}
\parindent 0mm
\parskip 0mm
%
\sender{\small sender:\\
         \large{\bf Frank Hassel}\\
         Im Kirschgarten 14\\
         6501 W\"orrstadt\\
         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}

Result :

Max Mustermann - Frank Hassel

Date  Date
Arrival Leaving ∑ White  Black  Arrival Leaving ∑
3.9.87 3.9.87  0  e2–e4  1.  d7–d6  11.9.87 11.9.87  0
12.9.87 14.9.87  2  d2–d4  2.  g8–f6 15.9.87 16.9.87  1
17.9.87 19.9.87  4  b1–c3 3.  g7–g6  21.9.87 22.9.87  2

1 ^{2} ^{3} ^{4} ^{5} ^{6} ^{7} ^{8} h g f e d c b a

Frank Hassel - Max Mustermann

Date  Date
Arrival Leaving ∑ White  Black  Arrival Leaving ∑
11.9.87 11.9.87  0  d2–d4  1.  g8–f6 12.9.87 14.9.87  2
15.9.87 16.9.87  1  c2–c4  2.  g7–g6  17.9.87 19.9.87  4
21.9.87 22.9.87  2  b1–c3 3.

8 ^{7} ^{6} ^{5} ^{4} ^{3} ^{2} ^{1} a b c d e f g h 8 ^{7} ^{6} ^{5} ^{4} ^{3} ^{2} ^{1} a b c d e f g h

Game 1

No. Your move No. My move
3  b1–c3 3  g7–g6

Received on 21.9.87 Replied on 22.9.87 My time taken 1 day(s) My total time 2 days

8 ^{7} ^{6} ^{5} ^{4} ^{3} ^{2} ^{1} a b c d e f g h

Game 2

No. Your move No. My move
2  g7–g6 3  b1–c3

Your postmark date 19.9.87 Your time taken 2 day(s) Your total time 4 days

Yours sincerly

sender:

Frank Hassel Im Kirschgarten 14 6501 Wörrstadt Germany

I take holidays from 30.09.87 to 14.10.87 postcard

DANTE

Postfach 10 18 40

D-69008 Heidelberg

Explanations :

\sender{...} It is an empty definition. You can fill in your own address in a way, which corresponds your taste.

\receiver{...} It is an empty definition. You can fill in the receiving address in a way, which corresponds your taste.

\cardmessage{...} It is an empty definition. You can fill in your messages.

See page 11 for the layout of postcard.

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 \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 \begin{gameone} the following actions happens \newgame \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 \global\considersumwhite=xxx \global

\considersumblack=xxx. Then you can use the macros \postmove \postply as de-

scriped below. With \end{gameone} all positions are stored with \savegameone and the dates and last move are stored in boxes, see page 11. 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.

\postmove For typesetting moves you can call \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 | R | B | 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 | R | B | N}comment} 5. arrivaldate of move player black

6. considertime player black The expansion of this macro gives one tabularline : see example page 3 TEX calculates the leavingdate by the macro \departure#1.#2.#3 #4 (dd.mm.yyyy condidertime) and the sums of considertimes in fields ∑.

\postply For typesetting halfmoves you can call \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 | R | B | N}comment}

\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.

\postcardaddress[tf](dim,dim) Macro for typesetting the front of the postcard. Options see \postcard[..](..,..). The optional parameter [t] divide the postcard with a vertical line and typeset the word postcard.

For the other macros of BdFCHESS.STY again a short example :

\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}

Result :

Date  Date
Arrival Leaving ∑ White  Black  Arrival Leaving ∑
24.2.90 26.2.90  2  c2–c4  1.  e7–e5  27.2.90 1.3.90  2

English system : other playable moves 1…., c7–c5 or 1…., g8–f6

2.3.90 3.3.90  3  b1–c3 2.  g8–f6 4.3.90 5.3.90  3
7.3.90 9.3.90  5  g1–f3 3.  b8–c6 11.3.90 12.3.90  4
14.3.90 23.3.90  7  d2–d4  4.  e5–e4  28.3.90 29.3.90  5

Movesuggestion

5  f3–g5 5  h7–h6

8 ^{7} ^{6} ^{5} ^{4} ^{3} ^{2} ^{1} a b c d e f g h

Partie 1

Nr. Ihr Zug Nr. Mein Zug
4  d2–d4 4  e5–e4
falls 5  f3–g5 5  h7–h6

Empfangen am 28.3.90 Beantwortet am 29.3.90 Meine Bedenkzeit 1 Tag(e) Meine Gesamtbedenkzeit 5 Tage

8 ^{7} ^{6} ^{5} ^{4} ^{3} ^{2} ^{1} a b c d e f g h

Ihr Poststempeldatum 23.3.90 Ihre Bedenkzeit 2 Tag(e) Ihre Gesamtbedenkzeit 7 Tage

Freundliche Grüße Explanations :

\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.

Analysis and Comments You can add comments and switch with | in the analysismode as descriped in CHESS.STY.

\holidaywhite num, \holidayblack num These macros correct the considertime, if you have taken holidays between arrival and leaving of a move.

\ifmoveone, \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 |...|. 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 : |Nf3-e5, Ke8*f8, Qd1-d8+,Bc1-g5| Result : f3–e5, e8×f8, d1–d8+, c1–g5 And don’t forget the space between last argument and |. If you call \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 \moveonebox, refer to chapter: if all else fails.

Remainding commands :

\acceptmoveone, \acceptmovetwo This commands are working as \ifmoveone. They typesets the move before the actual move. So if you accept a suggestionmove you can repeat it at the postcard.

\finishgameone, \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.

\tabularheader If the tabular continued on a new page, you can call \tabularheader.

Result :

Date  Date
Arrival Leaving ∑ White  Black  Arrival Leaving ∑

\storeboard{filename} This macro stores the momentary positions of all pieces in a ASCII-File. It saves it as \begin{position} \White(....) \Black(...) \global \movecount=num \global \Whitetrue or \Whitefalse \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 \storeboard{filename} as last command just before say \end{gameone or gametwo}. Then you can prepare an other document, for example to typeset 12 running games on one A4-page.

\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}

Chess Openings

English Opening A 27 (Dutch System) White, Move 4 Old Indian Defense A 55 Black, Move 5 Benoni Defence A 70 (Main Line) Black, Move 8

Alekhine’s Defence B 03 (Four Pawn’s Attack) Black, Move 4 Dutch Defence A 83 (Staunton Gambit) Black, Move 4 Pirc Defence B 08 Black, Move 4

Caro-Kann B 11 (Two Knight’s Variation) White, Move 4 Sicilian Defence B 45 (Classical System) White, Move 6 French Defence C 01 (Exchange Variation) Black, Move 3

Queen’s Gambit D 07 (Tschigorin Defence) White, Move 3 Vienna Game C 26 White, Move 4 Nimzo-Indian Defence E 23 White, Move 6 If all else fails, here is the layout of the postcard with it’s macros and boxes.

Board 1  Board 2 \moveonebox \acceptonebox  \movetwobox \accepttwobox \mydatebox  \yourdatebox  \cardmessage \sender  \receiver

\postcard(...) \postcardaddress(...)

If you don’t agree with an element of the postcard you can change it, just before you say \postcard[..] by the following way.

Change board 1

\board{.......} or \begin{position} ...... \end{position}
\savegameone

Change contents of boxes for example \moveonebox

\global\setbox\moveonebox=\vbox{..........}

Change definitions

\gdef\sender{.....}

But you can only change the contents not the position of an element !

Please contact me for bug reports and suggestions :

Frank Hassel Im Kirschgarten 14 55286 Wörrstadt Germany