Creating diagrams for problems Version 1.5

Thomas Brand Stefan H¨oning Bornheim Neuss

2008/03/09

Abstract It have been more than ten years now, since we last published a docu- mented version of the diagram.sty, which is mainly intended to be used for typesetting chess problems. Since 1994 I (Stefan H”oning) made a couple of enhancements to the sourcecode of the style, without publish- ing and putting this into the documentation. We also needed to upgrade A to LTEX 2ε. The major change is the documentation language, which is english now. The style itself tries to collect very detailed information about a by providing a lot of commands, which you may use to specify the necessary information. There are different reasons for this. One idea was A to enable people to read LTEX-diagrams into databases with information as detailed as possible. Otherwise it should be easy to change the layout of a diagram by applying a changed style - not by changing the source.

1 Contents

1 Creating diagrams 3 1.1 Anintroductaryexample ...... 3 1.2 Elementsofadiagram ...... 4 1.2.1 Collecting the problem information ...... 4 1.2.2 Modifying the layout of the diagram (and the solution) . 6 1.2.3 Othercommands...... 7 1.3 Specialboards ...... 7 1.3.1 Changingtheboardsize ...... 7 1.3.2 Stereo-andSpace-Chess-Diagrams ...... 8 1.3.3 Cylindricboards/suppressingframes ...... 10 1.3.4 figurineNotation ...... 10 1.3.5 Changeswithintheboard ...... 10 1.4 Misc...... 11 1.4.1 Chesspieceswithinnormaltext...... 11 1.4.2 Otheroftenusedsymbols ...... 12 1.4.3 Internationalization ...... 12 1.4.4 Whenwritingbooks ...... 13

2 The documentation driver 13

3 The implementation of the style 14

2 1 Creating diagrams 1.1 An introductary example Let us first take a look at a simple example which should only show what you A have to type into your LTEX-code to get nice looking diagrams. 1 Thomas Brand 2 Problemkiste 1992 Thomas Brand

Elmar Bartel gew. Problemkiste 1992

à à à # à à à à

à à à à àà à à

à à à à à à à à

à à à à à¢à à à

¯à à¬à à ¥à à à 

à à à à à à à à¡

à à à à à à à à

à à¥à à à à à à h#7 C– (2+3) h#5 C– (3+2)

1) Thomas Brand: 1.Ta3 Kc2!, 2.Tf3 e×f3, 3.e3 f4, 4.e2 f5, 5.e1T f6, 6.Th1! (Te7?) f7, 7.Th7 f8D# 2) Thomas Brand: 1.Ka8 Sg1, 2.h3 Ka5, 3.h2 Kb6, 4.h×g1L+ Kc7, 5.La7 Lc6#

A To use the package you have to make it available to LTEX using \usepackage{diagram} inside the preamble of your document. Then you may use the diagram environment to create the diagrams. For the above example I had to type the following:

\begin{diagram} \author{Brand, Thomas} \source{Problemkiste} \year{1992} \dedic{Elmar Bartel gew.} \pieces[2+3]{wKd1, wBe2, sKh8, sBe4, sTa4} \stip{h\#7} \sol{1.Ta3 Kc2!, 2.Tf3 e\x f3, 3.e3 f4, 4.e2 f5, 5.e1T f6, 6.Th1! (Te7?) f7, 7.Th7 f8D\#} \end{diagram} % \hfill % \begin{diagram} \author{Brand, Thomas} \source{Problemkiste} \year{1992} \pieces[3+2]{wKa4, wLb5, wSh3, sKb7, sBh4} \stip{h\#5} \sol{1.Ka8 Sg1, 2.h3 Ka5, 3.h2 Kb6, 4.h\x g1L+ Kc7, 5.La7 Lc6\#} \end{diagram}

3 \putsol

diagram Any information which belongs to a problem should be put between \begin{diagram} and \end{diagram}. The above examples contains infor- mation for authors, source, year of publication, stipulation, solution and (in diagram 1) a dedication. This information is shown around a chessboard except the solution, which is collected and put into the output using the \putsol command.

1.2 Elements of a diagram This section describes the elements which may be used inside a diagram en- vironment. For most of these elements there is no sense using them between \begin{diagram} and \end{diagram}. Some of them will not work outside of the environment (like —). In case you use these switches anywhere outside you will specify the information for all problems in your surrounding environment (which may be the complete document).

1.2.1 Collecting the problem information The following information is typically given with a problem: \author • With the \author tag you specify one author or a list of authors. If you specify more than one author, you must separate them with ”; ”. Normally an author is given as ”sirname, givenname”. You may change A the way, how the name is interpreted by LTEX using \normalnames and \reversednames. This \author command does only overwrite the default behaviour when used inside a diagram environment. \pieces • With \pieces you specify the position to be displayed on the board. For each kind of piece you may specify a list of fields. Different lists of fields are separated by ”, ”. So the general syntax for specifying the position of a specific piece is: [color][piece]{rotation of piece}[list of squares]; e.g. wTa1h1 should be clear, nKa4 is a neutral king on a4 w s n may be used to specify the color of the piece. KDTLSB may be used to specify the piece. R U L may be used to specify an optional rotation: right, upside-down, left. So you may use sDUc7 for a grashopper on c7 — displayed as an upsidedown queen. The characters used to specify color, piece and rotation may be changed using the \DefinePieces command. You may also optionally specify the number of pieces in your diagram, which then will be used to control your input automatically. There is also support for an imitator, which is typically displayed as a black filled circle. So sCf4 will produce the symbol of an imitator. This is shown in diagram 3. \stipulation • is used to specify the stipulation of the problem, e. g. \stipulation{\#2} \stip may be used to specify a mate in two. There is also an abbreviation \stip for this macro.

4 \city • may be used to specify the city and country, where the author or the authors live. I use this inside the original section of Die Schwalbe. You should separate multiple cities (for multiple authors) with ”; ”.

\specialdiagnum • May be used to suppress the default diagram numbering (which uses a counter) and instead directly providing a diagram ”number” which may be an arbritary text.

\sourcenr • May be used to specify the number which was used for the problem inside an originals section.

\source • May be used to specify the book or magazine where the problem was issued first.

\issue • May be used to specify e. g. the issue of a magazine where the problem was issued.

\pages • May be used to specify the page (or pages) where the problem was issued.

\day • May be used to specify the different parts of the date of publication of \month the problem. (E. g. for problems issued in the german magazine Die \months Schwalbe you will typically only specify the \month and the \year. For \year problems issued in feenschach you may specify a period of months like \months{7-10}.)

\tournament • May be used to specify an award and a tournament for the problem. \award \dedication • May be used to specify a dedication which was given by the author of the \dedic problem. \condition • May be used to specify the fairy conditions of a problem. Different con- \cond ditions should be separated with ”; ”.

\twins • May be used to specify the different twins of a problem. Different twins should be separated with ”; ”.

\remark • May be used to specify remarks to the problem. I typically use this to \rem explain fairy pieces on the board. You may also use the abbreviation \rem.

\solution • \solution may be used to specify the solution of the problem. Normally \sol this information is not used while displaying the board but it is only collected and may be put into your text using \putsol. There is also an abbreviation \sol.

\judgement • May be used to describe the judgement given for a problem, e. g. when you are working on an award or when you are selecting problems for a ”best of ...” book.

\comment • May be used to specify some comment on the problem (e. g. the authors original comment.)

\themes • May be used to specify themes displayed in the problem. Different themes should be separated with ”; ”. When creating a theme index, the themes will automatically be used to create the register.

5 There are some commands which not only collect information but normally direct result in a change of the diagram. These are:

\verticalcylinder • does not display the outer vertical lines to symbolize a verticalcylindric board.

\horizontalcylinder • does not display the outer horizontal lines to symbolize a horizontalcylin- dric board.

\noframe • does completely suppress the outer frame e. g. to symbolize a thorus board.

\noinnerframe • sometimes you need to suppress the inner frame instead of the outer frame which is achieved by using \noinnerframe. You may not use this together with \noframe.

\gridchess • displays lines to seperates fieldsections for gridchess.

1.2.2 Modifying the layout of the diagram (and the solution) There are a couple of switches which control the layout of the diagrams. These are typically used more generally, so you may specify these switches outside the diagram environment or use them in your own style, which depends on cpd.sty. There are some switches which control the layout of the information which is displayed above a diagram:

\diagleft • displayes the information left aligned

\diagcenter • displayes the information centered

\diagright • displayes the information right aligned

\widedias • is like \diagcenter but the information shown above the diagram may A span the whole width of the page. So LTEX will not wrap long author names.

\dianamestyle Using \dianamestyle (or \solnamestyle) you may specify how author- \solnamestyle names are written above the boards (or before the solutions). You may use this only if you use \reversednames (which is the default). Otherwise it is not possible to distuingish between firstname and sirname. You must specify one of the following options as parameter to \dianamestyle (or \solnamestyle): fullname Writes the authorname as firstname sirname. This is the default. sirname Writes the sirname only. short Writes an abbreviation of the firstname and the sirname. The abbrevi- ation is calculated as follows: • The first letter of the firstname will be used. \author{Brand, Thomas} will be displayed as T. Brand • When there is a combined firstname separated with a hyphen, each first letter will be used. (see below) \author{Reich, Hans-Peter} will be displayed as H.-P. Reich

6 • When specifying the author name, you may provide the abbreviation for the firstname using the form sirname, firstname/abbreviation. \author{Brand, Thomas/Th.} will be displayed as Th. Brand noname displayes nothing

\diagnumbering The same way you may specify \pagenumbering you may specify the for- mat the diagrams are numbered using \diagnumbering and \pagenumbering you may specify arabic, Roman, roman, Alph or alph. The default used is arabic. This command also switches the display for diagram numbers on. \setmonthstyle You may also specify the way a month is displayed using \setmonthstyle. There are some boolean switches, which control whether a specific informa- tion is displayed. These are as follows:

A piececounter • This is a LTEX boolean, which is used to specify whether the number of pieces is displayed below the board. So you may change its value using \setboolean{piececounter}{true} or \setboolean{piececounter}{false}.

\nocomputer • is used to suppress the display whether a problem has been computer- proved or not.

\selectelchfont You may specify which font is used for the chesspieces. There are two possible fonts: pk for the font which was originally used in the german magazine Problemk-

iste Æ fs for the font which was first used (and was created for) the magazine feen-

schach

Æ

\diagramx In analogy to the defaults for fontsizes of a document you may specify sizes \diagramxi of the fonts used in a diagram. The default will be set according to the fontsize \diagramxii specified as the \documentclass option.

1.2.3 Other commands \label • This overrides the normal \label definition such that the diagram number is displayed when using \ref instead of the page number.

\diagnum • This macro expects a number as a parameter. The number will be used to (re-)initialize the diagram number counter. With this command the output of diagram numbers also is switched on. It must be used outside the diagram environment.

1.3 Special boards 1.3.1 Changing the boardsize diagram[] Instead of using a boardsize of 8 × 8 some fairy problems need smaller or larger boards. This can be achieved by specifying the rows and columns as an optional parameter to the \begin{diagram} environment. You first have to specify the lines and then the rows as the following examples shows.

7 3

is created by

à à à à ƒ à à à à

à à à à à à à à

\begin{diagram}[17x11]

à à à à àYà à à à

\label{bigdia}

à à à à à à à à

\pieces{wKUi{11}, sKRj9, sCc5b4}

à à à à à à à à

à \end{diagram}

à à à à à à à à

à ¯ à à à à à à à

¯ à à à à à à à

à à à à à à à à à

à à à à à à à à

à à à à à à à à à C– (1+1) As you can see in the example, pieces are set using the \pieces macro. When using boards with more than 8 lines you have to continue with charachters i, j, k, ... In a board with more than 9 rows you have to specify the rows in curly braces {} as shown in the example.

1.3.2 Stereo- and Space-Chess-Diagrams stereodiagram Other boards which are used from time to time are stereochess or spacechess spacediagram[] boards (although there are quite few people which really have such boards!). To create these boards you just have to use either the stereodiagram or spacediagram environment instead of the normal diagram environment. Here is an example:

8 5 4 T. R. Dawson Gerhard W. Jensch 6595. Fairy Chess 3104. feenschach 1980 Review 12/1945

Preis

à à à

à à à à

à à à à à

¯à à à à

à à à à

à D E

à à à à

à à à à à

à à à

à à à 

à C à

à D

à à

à à à à à

à à à à

à à à à

à B

à 

à à à à

à C

 à

à à  à¡

à à  à

à A

à 

 à à

à à à à

¬à à

à à à

à B

­à  à

à à à à à # à

à à à à à à

à à à à à ¥à

¬à à à à à à

#   à à à à A

#9 C– (5+6) #2 C– (2+8) These diagrams have been produced by the following code:

\begin{stereodiagram} \author{Jensch, Gerhard W.} \sourcenr{3104.} \source{feenschach} \year{1980} \award{Preis} \pieces{wKf3, wTf6d5A, wLe3, wSf4A, sKe5, sTc4D, sLc4C, sSc6, sBb6c4A} \stip{\#9} \end{stereodiagram} \hfill \begin{spacediagram} \author{Dawson, T. R.} \sourcenr{6595}.

9 \source{} \month{12} \year{1945} \pieces{wKc1A, wLe1A, sKa1A, sBa2Aa1Ba2Bd3Be4Bd2Ce2D} \stip{\#2} \end{spacediagram}

The main change is within the notation of the pieces, but people knowing space- or stereo-chess problems see that the notation is just one would expect. \spacelayout Sometimes one would like show the different planes of a space diagram from left to right. This may be switched using the \spacelayout command, which takes one parameter:

vertical for planes organized bottom up horizontal for planes organized left to right

6

à à à à à à

à à à à à à A B C Is produced by C– (0+0) \begin{spacediagram}[4x2x3] \spacelayout{horizontal} \end{spacediagram}

1.3.3 Cylindric boards / suppressing frames \horizontalcylinder To stylize a cylindric board one typically does not show parts of the frame. \verticalcylinder When using \verticalcylinder the horizontal lines of the outer frame will \noframe not be drawn. \horizontalcylinder suppresses the drawing of the verti- \noinnerframe cal lines of the outer frame. Using \noframe completely supresses the outer frame. \noinnerframe suppresses the innerframe. In case of stereo- or space- chess-diagrams \verticalcylinder, \horizontalcylinder and \noframe sup- presses the inner frame.

1.3.4 figurine Notation figurine Instead of using the diagram, stereodiagram or spacediagram environment one may use the figurine environment. This suppresses the diagram output and produces a figurine notation inside the current text.

1.3.5 Changes within the board \nofields You may remove single fields by using the \nofields or \nosquares command. \nosquares Using this command does make sense for empty black fields only. This command expects a list of squares separated by ”’, ”’. You may also use this command within a stereo- or space-diagram. In this case you must specify the fields the same way you do it inside the \pieces command.

10 \fieldframe You may specify single fields, which should be surrounded by a frame. This is possible using the \fieldframe command. You must specify the list of fields which should have frames the same way you specify fields within the \nofields command. \gridlines A more general form of lines within diagrams is possible by using the \gridlines command. You may specify a list of horizontal or vertical lines within the diagram. Different lines should be separated by ”’, ”’. A single line must be specified as: [plane](v or h)(x-coordinate)(y-coordinate)(length in squares) You must specify a plane in case of stereo- or space-chess only. For a vertical line starting at the lower left corner of ”’c2”’ ending at the upper left corner of ”’c8”’ the command to use is: \gridlines{v217}. Concerning the coordinates and length specifications you should pay attention to put values greater 9 in curly braces {}. \fieldtext Sometimes you need to show text on some squares. This is done using the \fieldtext command. The syntax for a single text is: {Text}(x-coordinate)(y- coordinate) Now an example how to use \gridlines, \nofields and \fieldtext to create some ”’Letter-Board”’ with text inside.

\begin{diagram}[9x7] \noinnerframe \nofields{a2, b2, c2, a3, b3, c3, % 7 b5, c5, d5, b6, c6, d6, %

e1, e2, e3, e4, e5, e6, e7, %

à à à g1, h1, h2, h2, g3, h3, g5, h5, g6, h6, g7, h7}

à \gridlines{h004, h013, h033, h143, h163, h074, %

It ... v001, v034, v142, v312, v404, v461, %

à à

h501, h571, h632, h642, h801, h871, %

à à à à

v507, v603, v643, v803, v843, v907} à

works \fieldtext{{It ...}c5, {works}b2} à

à \end{diagram}

à à à C– (0+0)

1.4 Misc 1.4.1 Chess pieces within normal text Sometimes you may need symbols of chess pieces within your normal text, e.g.

to show the Viele-V¨ater-Stellung c8, b6, a8, a7. This is possible by

{\wK}c8, {\wB}b6, {\sK}a8, {\sB}a7. Additionally you may use some of these symbols:

\swL a white bishop on a black square

\ssL a black bishop on a black square

\wNr a white

\sNr a black nightrider

\wGh a white grashopper

11

\sGh a black grashopper

\Imi an imitator

1.4.2 Other often used symbols The style also defines commands for other symbols, which are often used within the declaration of twins or when writing a solution:

\set * setplay

\ra → a left to right arrow

\lra ↔ a double ended arrow

\OO 0-0 king side castling

\OOO 0-0-0 queen side castling

\x × for ”’takes”’

\any ∼ for any move (you may not simply use a ∼ within your text because TEX handles this as a protected space)

1.4.3 Internationalization \DefinePieces This part is relevant for people who do not like the german notation for pieces and therefore want to change this within their sources. Using the german no- tation, you specify the color of a piece as w, s or n, the type of a piece as K, D, T, L, S, B and a possible rotation of a piece as L, R or U. To use another notation you may use the \DefinePieces command which takes 3 parameters. 1. the letters used to specify the colors of the pieces using the order white, black, neutral 2. the letters used to specify the type of a piece using the order king, queen, rook, bishop, , pawn. You may not use a capital C, because this is used for circles. 3. the letters used to specify an optional rotation using the order left-turned, right-turned, upside-down. You must use capital letters for this. When using a \DefinePieces command, the commands are changed to its next usage (or to the end of the document). The command not only changes the pieces you may use within the \pieces command but also defines commands to be used within normal text, as the following example shows: \DefinePieces{wbn}{KQRBNP}{LRU} \wDU\bKR\bwB

creates

12 1.4.4 When writing books \develop To simplify your writings you may use the macro \develop. This will create the following additional information during developement: • when you use \label in your diagrams the label will be shown at the left upper corner of the diagram. • The given label will also be shown inside the solution and also in any register entry. • when you have specified a \judgement this information will be put into the solution. Most books on chessproblems contain registers for authors, sometimes also on themes and sources. As you already collect all these information very detailed within the diagram environment the generation of registers is very simple. \makeaindex To create a registers of authors you need to put the \makeaindex command \authorindex inside the preamble of your document. This instructs latex to write an in- termediate file containing information about authors and the numbers of the 1 A diagrams. After a first LTEX run on your document, you need to convert the intermediate file. This may be done with the makeindex program, which will typically called like makeindex -o .and .adx The resulting register may be put into your document using the \authorindex command. \makesindex Like an index for authors you may also create indices for sources and/or \sourceindex themes. For an source register you need to put \makesindex into your document \maketindex preamble; for a theme register the command is \maketindex. The conversion \themeindex commands for the intermediate files are makeindex -o .snd .sdx for the source register and makeindex -o .tnd .tdx for the theme register. The source register is inserted into the text using \sourceindex and the theme register using \themeindex.

2 The documentation driver

The following code will generate the documentation. Since it is the first piece of code in the file, the documentation can be obtained by simply processing the A file with LTEX2ε. 1 h∗driveri 2 \documentclass[a4paper]{article} 3 \usepackage{doc} 4 \usepackage{diagram} 5 \EnableCrossrefs 6 \CodelineIndex 7 \RecordChanges

1Normally registers contain page numbers but with chess problems normally people refer to the diagram numbers.

13 8 \begin{document} 9 \DocInput{diagram.dtx} 10 \end{document} 11 h/driveri

3 The implementation of the style

Specifies the preamble of our style file. 12 h∗stylei 13 \ProvidesPackage{diagram}[2008/03/09] 14 \DeclareOption{10pt}{\AtBeginDocument{\diagramx}} 15 \DeclareOption{11pt}{\AtBeginDocument{\diagramxi}} 16 \DeclareOption{12pt}{\AtBeginDocument{\diagramxii}} 17 \ExecuteOptions{10pt} 18 \ProcessOptions 19 \RequirePackage{ifthen} 20 \RequirePackage{calc} Now we declare some constants to unify its usage within the style file. 21 \chardef\f@ur=4 22 \chardef\@ight=8 23 \newcount\elchfont 24 25 \chardef\@pkelch=0 26 \chardef\@fselch=1 27 28 \newcount\dia@type 29 30 \newif\if@textproblem\@textproblemfalse 31 \def\textproblem{\@textproblemtrue\let\@dia@stipulation=\relax} 32 33 \newif\if@solafterdiagram\@solafterdiagramfalse 34 \def\solafterdiagram{\@solafterdiagramtrue\ignorespaces} 35 36 \newif\if@vframe\@vframetrue 37 \newif\if@hframe\@hframetrue 38 \newif\if@leaveOuter\@leaveOutertrue 39 40 \newif\if@shortform 41 42 \newif\ifspace@vertical 43 \def\spacehorizontal{\space@verticalfalse} 44 45 \newif\ifdi@no 46 \newcounter{board@nr} 47 % \newif\iffigcnt 48 \newboolean{piececounter} 49 \newcount\r@w 50 \newcount\lin@ 51 \newcount\pl@ne 52 \newcount\current@plane 53 54 \newcount\w@cnt

14 55 \newcount\b@cnt 56 \newcount\n@cnt We have counters for each color to count the pieces on the board. 57 \newboolean{cpd@checkPieceCounts} 58 \newcounter{cpd@defWhitePieces} 59 \newcounter{cpd@defBlackPieces} 60 \newcounter{cpd@defNeutralPieces} 61 62 \newcounter{cpd@whitePieces} 63 \newcounter{cpd@blackPieces} 64 \newcounter{cpd@neutralPieces} 65 66 \newcommand{\cpd@stepcounterWhite}{\stepcounter{cpd@whitePieces}} 67 \newcommand{\cpd@stepcounterBlack}{\stepcounter{cpd@blackPieces}} 68 \newcommand{\cpd@stepcounterNeutral}{\stepcounter{cpd@neutralPieces}} 69 \global\let\cpd@stepcounterPieces\relax 70 71 \newcount\help@a 72 \newcount\help@b 73 74 \newbox\dia@box 75 \newbox\@cnt@box 76 \newdimen\@cnt@wd 77 \newbox\@stip@box 78 79 \newdimen\topdist\topdist\z@ 80 \newbox\@test@box 81 \newdimen\@test@dimen 82 \newif\if@left 83 84 \newcount\brd@ff 85 86 \newdimen\dia@lineskip 87 88 \newdimen\board@width 89 \newdimen\bd@width 90 \newdimen\head@width 91 \newdimen\sq@width 92 93 \newdimen\grid@width 94 \newdimen\inner@frame 95 \newdimen\outer@frame 96 \newdimen\space@frame 97 \newdimen\v@frame@dist 98 \newdimen\h@frame@dist 99 \newdimen\space@frame@dist 100 \newdimen\v@space@dist 101 \newdimen\h@space@dist 102 103 \newbox\sq@box 104 \newbox\plane@box We need a lot of token registers to register the information from within the diagram environment. These token registers are defined here. Initially each

15 token register is defined to contain \relax, which serves as an end-marker when parsing lists. 105 \newtoks\typis@tk\typis@tk={\relax} 106 \newtoks\label@tk\label@tk={\relax} 107 \newtoks\sol@tk\sol@tk={\relax} 108 \newtoks\number@tk\number@tk={\relax} 109 \newtoks\aut@tk\aut@tk={\relax} 110 \newtoks\city@tk\city@tk={\relax} 111 \newtoks\sourcenr@tk\sourcenr@tk={\relax} 112 \newtoks\source@tk\source@tk={\relax} 113 \newtoks\day@tk\day@tk={\relax} 114 \newcount\from@month\from@month=\z@ 115 \newcount\to@month\to@month=\z@ 116 \newtoks\year@tk\year@tk={\relax} 117 \newtoks\issue@tk\issue@tk={\relax} 118 \newtoks\pages@tk\pages@tk={\relax} 119 \newtoks\tournament@tk\tournament@tk={\relax} 120 \newtoks\award@tk\award@tk={\relax} 121 \newtoks\after@tk\after@tk={\relax} 122 \newtoks\version@tk\version@tk={\relax} 123 \newtoks\correction@tk\correction@tk={\relax} 124 \newtoks\dedic@tk\dedic@tk={\relax} 125 \newtoks\fidealbum@tk\fidealbum@tk={\relax} 126 \newtoks\theme@tk\theme@tk={\relax} 127 \newtoks\twins@tk\twins@tk={\relax} 128 \newtoks\judgement@tk\judgement@tk={\relax} 129 \newtoks\comment@tk\comment@tk={\relax} 130 \newtoks\computer@tk\computer@tk={-} 131 \newtoks\nofields@tk\nofields@tk={\relax} 132 \newtoks\fieldframe@tk\fieldframe@tk={\relax} 133 \newtoks\gridlines@tk\gridlines@tk={\relax} 134 \newtoks\pieces@tk\pieces@tk={\relax} 135 \newtoks\fieldtext@tk\fieldtext@tk={\relax} 136 \newtoks\text@tk\text@tk={\relax} 137 \newtoks\stipulation@tk\stipulation@tk={\relax} 138 \newtoks\condition@tk\condition@tk={\relax} 139 \newtoks\remark@tk\remark@tk={\relax} To remember, which information has been specified, we define TEX-booleans for each command. 140 \newif\if@label\@labelfalse 141 \newif\if@number\@numberfalse 142 \newif\if@special\@specialfalse 143 \newif\ifauth@r\auth@rfalse 144 \newif\if@city\@cityfalse 145 \newif\if@sourcenr\@sourcenrfalse 146 \newif\if@source\@sourcefalse 147 \newif\if@date\@datefalse 148 \newif\if@day\@dayfalse 149 \newif\if@year\@yearfalse 150 \newif\if@issue\@issuefalse 151 \newif\if@pages\@pagesfalse 152 \newif\if@tournament\@tournamentfalse 153 \newif\if@award\@awardfalse

16 154 \newif\if@after\@afterfalse 155 \newif\if@version\@versionfalse 156 \newif\if@correction\@correctionfalse 157 \newif\if@dedication\@dedicationfalse 158 \newif\if@fidealbum\@fidealbumfalse 159 \newif\if@twins\@twinsfalse 160 \newif\if@theme\@themefalse 161 \newif\if@computer\@computerfalse 162 \newif\if@judgement\@judgementfalse 163 \newif\if@comment\@commentfalse 164 \newif\if@pieces\@piecesfalse 165 \newif\if@fieldtext\@fieldtextfalse 166 \newif\if@nofields\@nofieldsfalse 167 \newif\if@gridlines\@gridlinesfalse 168 \newif\if@fieldframe\@fieldframefalse 169 \newif\if@stdgrid\@stdgridfalse 170 \newif\if@show@computer\@show@computertrue 171 \newif\if@stipulation\@stipulationfalse 172 \newif\if@condition\@conditionfalse 173 \newif\if@remark\@remarkfalse 174 \newif\if@typis\@typisfalse 175 \newif\if@widedias\@widediasfalse 176 \newif\ifx@twins\x@twinsfalse 177 \newif\ifx@cond\x@condfalse 178 \newif\ifimitator\imitatorfalse 179 \newif\ifnormal@names\normal@namesfalse 180 \newif\ifs@lu 181 \newif\if@develop\@developfalse 182 \newif\if@notfirst 183 \newif\if@first 184 \newwrite\s@lfd 185 \let\below@newline=\relax 186 % These are used by the "old" board creating mechanism 187 \newcount\@lines 188 \newcount\@rows 189 \newcount\lines@max 190 \newcount\rows@max 191 \newcount\planes@max The following counters are used when creating the diagram itself. 192 \newcounter{cpd@rowsmax} 193 \newcounter{cpd@linesmax} 194 \newcounter{cpd@current@row} 195 \newcounter{cpd@current@line} 196 \newcounter{cpd@maxsquare} 197 \newcounter{cpd@helper} 198 \newcounter{cpd@current@square@index} 199 \newcounter{cpd@current@square@value} Some boolean TEX-switches used whithin stereo- or spacechess diagrams. 200 \newif\if@stereo\@stereofalse 201 \newif\if@space\@spacefalse These boolean switches are used to control the output of registers. 202 \newif\if@aindex\@aindexfalse

17 203 \newif\if@sindex\@sindexfalse 204 \newif\if@tindex\@tindexfalse 205 \newif\ifds@label

\diagram Defines the code executed in \begin{diagram}. In case no optional size is given, \@diagram a normal 8×8 board is generated. 206 \def\diagram{% 207 \begingroup% 208 \@ifnextchar [{\@diagram}{\@diagram[\@ight x\@ight]}% 209 } 210 211 \def\@diagram[#1x#2]{% 212 \lines@max=#1% 213 \rows@max=#2% 214 \setcounter{cpd@linesmax}{#1}% 215 \setcounter{cpd@rowsmax}{#2}% 216 \setcounter{cpd@maxsquare}{\value{cpd@rowsmax}*\value{cpd@linesmax}}% 217 \pl@ne=\z@% 218 \current@plane=\z@% 219 \let\put@sqs=\put@sqs@normal% 220 \let\read@plane=\read@plane@normal% 221 \@start@diagram% 222 }

223 \def\stereodiagram{% 224 \begingroup% 225 \@stereotrue% 226 \let\put@sqs=\put@sqs@stereo% 227 \let\read@plane=\read@plane@stereo% 228 \@start@diagram% 229 } 230 \def\spacediagram{% 231 \begingroup% 232 \@spacetrue% 233 \@ifnextchar [{\@spacediagram}{\@spacediagram[5x5x5]}% 234 } 235 236 \def\@spacediagram[#1x#2x#3]{% 237 \lines@max=#1% 238 \rows@max=#2% 239 \planes@max=#3% 240 \let\put@sqs=\put@sqs@space% 241 \let\read@plane=\read@plane@space% 242 \@start@diagram% 243 } 244 \def\@start@diagram{% 245 \init@vars 246 \let\author=\ds@author 247 \let\day=\ds@day 248 \let\month=\ds@month 249 \let\year=\ds@year 250 \let\label=\ds@label 251 \ignorespaces% 252 }

18 253 254 \def\showtypis#1{% 255 \@typistrue% 256 \typis@tk={#1}% 257 \ignorespaces% 258 } 259 260 \def\enddiagram{% 261 \let\author=\orig@author 262 \let\day=\orig@day 263 \let\month=\orig@month 264 \let\year=\orig@year 265 \let\label=\orig@label 266 \if@number% 267 \else% 268 \refstepcounter{board@nr}% so \label and \ref work properly 269 \fi% 270 % 271 % Now \label@tk should be set, if wanted, so 272 % we can generate the index entries 273 % 274 \@aindex% 275 \@sindex% 276 \@tindex% 277 % 278 % Now \@currentlabel will be set right, so we can use 279 % the original label 280 \if@label% 281 \expandafter\@set@label\the\label@tk;% 282 \fi% 283 % 284 % Now we know, if we have frames so we can setup our dimensions 285 % 286 \global\sq@width=\fontdimen\tw@\chessfont% 287 \if@stereo% 288 \bd@width=\@ight\sq@width% 289 \board@width=\@ight\sq@width% 290 \ifdim\h@frame@dist<\sq@width% 291 \h@frame@dist=\sq@width% 292 \fi% 293 % We do already skip with \v@space@dist 294 % So we use the additional skip \space@frame@dist here 295 \v@frame@dist=\space@frame@dist% 296 \ifdim\space@frame>\outer@frame% 297 \outer@frame=\space@frame% 298 \fi% 299 \advance\bd@width\tw@\inner@frame 300 \advance\board@width\tw@\inner@frame 301 \advance\board@width\tw@\h@frame@dist% 302 \advance\board@width\tw@\outer@frame% 303 \else\if@space% 304 \ifdim\h@frame@dist<1.5\sq@width% 305 \h@frame@dist=1.5\sq@width% 306 \fi%

19 307 % We do already skip with \v@space@dist 308 % So we use the additional skip \space@frame@dist here 309 \v@frame@dist=\space@frame@dist% 310 \ifdim\space@frame>\outer@frame% 311 \outer@frame=\space@frame% 312 \fi% 313 \ifspace@vertical% 314 \bd@width=\lines@max\sq@width% 315 \board@width\bd@width% 316 \advance\bd@width\tw@\inner@frame 317 \advance\board@width\tw@\inner@frame 318 \advance\board@width\tw@\h@frame@dist% 319 \advance\board@width\tw@\outer@frame% 320 \else% 321 \bd@width=\lines@max\sq@width% 322 \advance\bd@width\tw@\inner@frame% 323 \ifdim\h@space@dist<1.5\sq@width% 324 \h@space@dist=1.5\sq@width% 325 \fi% 326 %\h@space@dist=0.7\sq@width% 327 % Now we can compute the width of the complete board 328 \board@width\bd@width% 329 \advance\board@width\h@space@dist% 330 \multiply\board@width\planes@max% 331 \advance\board@width\h@space@dist% 332 \advance\board@width\tw@\outer@frame% 333 \fi% 334 \else% 335 \bd@width=\lines@max\sq@width% 336 \ifnum\lines@max>\@ight% 337 % Make the board wider 338 \board@width=\lines@max\sq@width% 339 \else% 340 % Make a normal width 341 \board@width=\@ight\sq@width% 342 \fi% 343 \advance\bd@width\tw@\inner@frame% 344 \advance\board@width\tw@\inner@frame% 345 \advance\board@width\tw@\h@frame@dist% 346 \advance\board@width\tw@\outer@frame% 347 \fi\fi% 348 \if@widedias% 349 \head@width=\textwidth% 350 \else% 351 \head@width=\board@width% 352 \fi% 353 % 354 % Now we should build the diagram itself 355 % 356 \if@textproblem% 357 % Put the stipulation into the \sq@box 358 \setbox\sq@box=\hbox{\vbox to \board@width{\hsize\board@width% 359 \stipfont% 360 \raggedright%

20 361 \sloppy% 362 \the\stipulation@tk% 363 \vfil% 364 }}% 365 \else% 366 \put@sqs% This builds up the \sq@box 367 % Check, if the given number of pieces is reached 368 \ifthenelse{\boolean{cpd@checkPieceCounts}}{% 369 \ifthenelse{\value{cpd@defWhitePieces}=\value{cpd@whitePieces}}{}% 370 {\errmessage{Wrong number of white pieces}}% 371 \ifthenelse{\value{cpd@defBlackPieces}=\value{cpd@blackPieces}}{}% 372 {\errmessage{Wrong number of black pieces}}% 373 \ifthenelse{\value{cpd@defNeutralPieces}=\value{cpd@neutralPieces}}{}% 374 {\errmessage{Wrong number of neutral pieces}}% 375 }{}% 376 \fi% 377 % 378 \global\setbox\dia@box=\hbox{\vbox{% 379 \parindent\z@% 380 \parskip\z@% 381 \baselineskip11\p@\advance\baselineskip\dia@lineskip% 382 \hsize\head@width% 383 \centering% 384 % diagram header 385 \vskip\topdist% 386 \vbox{\hsize\board@width\hbox{% 387 \if@develop\if@label% 388 \noindent\raggedright\llap{\labelfont\the\label@tk\ }% 389 \fi\fi% 390 \vbox{% 391 \he@dpos\dia@above% 392 }% 393 }}% 394 \vskip\tw@\p@% 395 % diagram itself 396 \vtop{\hsize\board@width% 397 \hbox to \head@width{\hss\vbox{% 398 \hsize\board@width% 399 \if@textproblem% 400 \box\sq@box% 401 \else% 402 \outer@henbox{\box\sq@box}% 403 \fi% 404 }\hss}% 405 % diagram trailer 406 \hbox to \head@width{\hss\vtop{% 407 \hsize\board@width% 408 \parskip\z@% 409 \raggedright% 410 \put@count% 411 \dia@below% 412 }\hss}% 413 }% 414 }}% End of \dia@box

21 415 \do@dia@job% 416 \endgroup% 417 } 418 419 \def\put@count{% 420 % First we build the box with the figure count 421 \ifthenelse{\boolean{piececounter}}{% 422 \global\setbox\@cnt@box=\hbox{% 423 \if@show@computer% 424 \ \ C\if@computer +\else --\fi% 425 \fi% 426 \ \ (\arabic{cpd@whitePieces}+\arabic{cpd@blackPieces}% 427 \ifthenelse{\value{cpd@neutralPieces}>0}{+\arabic{cpd@neutralPieces}}{})% 428 }% 429 \@cnt@wd=\wd\@cnt@box% 430 \hangindent-\@cnt@wd% 431 \hangafter\m@ne% 432 \noindent% 433 \hbox to \z@{% 434 \hbox to \board@width{\hfil\unhbox\@cnt@box}\hskip -\board@width% 435 }% 436 }{}% 437 } 438 439 \let\endstereodiagram=\enddiagram 440 \let\endspacediagram=\enddiagram 441 \def\figurine{% 442 \begingroup 443 \init@vars 444 \let\author=\ds@author 445 \let\day=\ds@day 446 \let\month=\ds@month 447 \let\year=\ds@year 448 \let\label=\ds@label 449 } 450 451 \def\endfigurine{% 452 \let\author=\orig@author 453 \let\day=\orig@day 454 \let\month=\orig@month 455 \let\year=\orig@year 456 \let\label=\orig@label 457 \if@number% 458 \else% 459 \refstepcounter{board@nr}% so \label and \ref work properly 460 \fi% 461 % 462 % Now \label@tk should be set, if wanted, so 463 % we can generate the index entries 464 % 465 \@aindex% 466 \@sindex% 467 \@tindex% 468 %

22 469 % Now \@currentlabel will be set right, so we can use 470 % the original label 471 % 472 \if@label% 473 \expandafter\@set@label\the\label@tk;% 474 \fi% 475 % 476 \@show@figurine% 477 \endgroup% 478 } 479 % 480 \gdef\selectelchfont#1{% 481 \global\elchfont\csname @#1elch\endcsname\defaultelchfont% 482 } Here we define commands to change fonts used for text above and below the diagram. You may redefine to adjust the fonts to your needs.

\authorfont \cityfont 483 \newcommand*{\authorfont}{\bfseries} \sourcefont 484 \newcommand*{\cityfont}{\slshape} \awardfont 485 \newcommand*{\sourcefont}{\bfseries\itshape} \dedicfont 486 \newcommand*{\awardfont}{\itshape} \stipfont 487 \newcommand*{\dedicfont}{\itshape} \remfont 488 \newcommand*{\stipfont}{\rmfamily} 489 \labelfont \newcommand*{\remfont}{\rmfamily} 490 \newcommand*{\labelfont}{\rmfamily} \boardfont 491 \newcommand*{\boardfont}{\rmfamily} We have three different default sizes for diagrams. The following commands switch fontsizes used for the chessfonts to typeset the diagrams.

\diagramx \diagramxi 492 \newcommand*{\diagramx}{ \diagramxii 493 \ifcase\elchfont\relax% 494 \font\chessfont=pkelch12 495 \font\chtextfont=pkelch10 496 \else% 497 \font\chessfont=fselch12 498 \font\chtextfont=fselch10 499 \fi% 500 \dia@lineskip\z@ 501 \dia@type\z@ 502 } 503 504 \newcommand*{\diagramxi}{ 505 \ifcase\elchfont\relax% 506 \font\chessfont=pkelch14 507 \font\chtextfont=pkelch11 508 \else% 509 \font\chessfont=fselch14 510 \font\chtextfont=fselch11 511 \fi% 512 \dia@lineskip\@ne\p@ 513 \dia@type\@ne

23 514 } 515 516 \newcommand*{\diagramxii}{ 517 \ifcase\elchfont\relax% 518 \font\chessfont=pkelch16 519 \font\chtextfont=pkelch12 520 \else% 521 \font\chessfont=fselch16 522 \font\chtextfont=fselch12 523 \fi% 524 \dia@lineskip\tw@\p@ 525 \dia@type\tw@ 526 }

\defaultelchfont \defaultelchfont is used to define the fontsize used to typeset the diagrams depending on the documentsize. 527 \def\defaultelchfont{% 528 \ifcase\@ptsize\relax% 529 \diagramx\or% 530 \diagramxi\or% 531 \diagramxii% 532 \fi% 533 }

534 \def\dianamestyle#1{\def\@dianame{\csname @#1\endcsname}} 535 \def\solnamestyle#1{\def\@solname{\csname @#1\endcsname}} 536 \def\diagnum#1{\c@board@nr=#1\advance\c@board@nr\m@ne}

\ra Now we define a couple of abbreviations and special symbols often used when \lra setting problem chess documents. \rla 537 \def\ra{\mbox{$\rightarrow$}} \x 538 \def\lra{\mbox{$\leftrightarrow$}} \set 539 \let\rla=\lra \OO 540 \def\x{\mbox{\ifmmode\times\else$\times$\fi}} \OOO 541 \def\set{\kern -.05em\raise .1ex\hbox{*}} \any 542 \def\@O{0\raise.25ex\hbox{-}\kern -.1em\relax} 543 \further \def\OO{\@O0} 544 \def\OOO{\@O\@O0} 545 \def\any{\ifmmode\sim\else$\sim$\fi} 546 \def\further{\ifmmode\Rightarrow\else$\Rightarrow$\fi\ \ignorespaces}

547 \def\spacelayout#1{\csname space@#1\endcsname} 548 \def\nodiagnumbering{\global\di@nofalse} 549 \def\diagnumbering#1{% 550 \di@notrue\diagnum{\@ne}% 551 \gdef\thediag{\csname @#1\endcsname\c@board@nr}% 552 }

\diagcenter The macros \diagcenter, \diagleft and \diagright simply define the macro \diagleft \he@dpos to the corresponding paragraph alignment. \diagright 553 \def\diagcenter{\def\he@dpos{\centering}} 554 \def\diagleft{\def\he@dpos{\raggedright}} 555 \def\diagright{\def\he@dpos{\raggedleft}}

24 \setmonthstyle The implementation of \setmonthstyle does \diagnumbering define a com- mand which uses the given parameter as a part of the command name. 556 \def\setmonthstyle#1{\def\write@month{\csname @#1\endcsname}}

557 \def\specialdiagnum#1{% 558 \@specialtrue% 559 \number@tk={#1}\@numbertrue\def\thediag{#1}\def\@currentlabel{#1}% 560 \ignorespaces% 561 }

\ds@label The macros \ds@label and \ds@author are defined internally and are made \ds@author public within \begin{diagram}. This is because the macros \label and A \author are normal LTEX-macros and I want to avoid to redefine these globally. 562 \def\ds@label{% 563 \@ifstar{\ds@labelfalse\ds@xlabel}{\ds@labeltrue\ds@xlabel}% 564 } 565 \def\ds@author#1{% 566 \aut@tk={#1}\auth@rtrue% 567 \ignorespaces% 568 }

569 \def\city#1{% 570 \city@tk={#1}\@citytrue% 571 \ignorespaces% 572 } 573 \def\sourcenr#1{% 574 \sourcenr@tk={#1}\@sourcenrtrue% 575 \ignorespaces% 576 } 577 \def\source#1{% 578 \source@tk={#1}\@sourcetrue% 579 \ignorespaces% 580 } 581 \def\ds@day#1{% 582 \day@tk={#1}\@daytrue\@datetrue% 583 \ignorespaces% 584 } 585 \def\ds@month#1{% 586 \from@month=#1\@datetrue% 587 \ignorespaces% 588 } 589 \def\months#1{% 590 \@months#1;% 591 \ignorespaces% 592 } 593 \def\ds@year#1{% 594 \year@tk={#1}\@yeartrue\@datetrue% 595 \ignorespaces% 596 } 597 \def\issue#1{% 598 \issue@tk={#1}\@issuetrue% 599 \ignorespaces% 600 } 601 \def\pages#1{%

25 602 \pages@tk={#1}\@pagestrue% 603 \ignorespaces% 604 } 605 \def\tournament#1{% 606 \tournament@tk={#1}\@tournamenttrue% 607 \ignorespaces% 608 } 609 \def\award#1{% 610 \award@tk={#1}\@awardtrue% 611 \ignorespaces% 612 } 613 \def\version#1{% 614 \version@tk={#1}\@versiontrue% 615 \ignorespaces% 616 } 617 \def\after#1{% 618 \after@tk={#1}\@aftertrue% 619 \ignorespaces% 620 } 621 \def\correction#1{% 622 \correction@tk={#1}\@correctiontrue% 623 \ignorespaces% 624 } 625 \def\dedication#1{% 626 \dedic@tk={#1}\@dedicationtrue% 627 \ignorespaces% 628 } 629 \def\fidealbum#1{% 630 \fidealbum@tk={#1}\@fidealbumtrue% 631 \ignorespaces% 632 } 633 \def\pieces{% 634 \@ifnextchar[% 635 {\x@pieces}% 636 {\@pieces}% 637 } 638 \def\x@pieces[#1]{% 639 % We should parse the given piececounts 640 \setboolean{cpd@checkPieceCounts}{true}% 641 \@parseWhiteAndBlackCount#1+\e@list 642 \@pieces% 643 } 644 \def\@parseWhiteAndBlackCount#1+#2+{% 645 \setcounter{cpd@defWhitePieces}{#1}% 646 \setcounter{cpd@defBlackPieces}{#2}% 647 \futurelet\n@xt\cpd@checkNeutral% 648 } 649 \let\cpd@nextproc=\relax% 650 \def\cpd@checkNeutral{% 651 \if\n@xt\relax% 652 \let\cpd@nextproc=\relax% 653 \else% 654 \let\cpd@nextproc=\@parseNeutralCount% 655 \fi%

26 656 \cpd@nextproc% 657 } 658 \def\@parseNeutralCount#1+{% 659 \setcounter{cpd@defNeutralPieces}{#1}% 660 } 661 \def\@pieces#1{% 662 \pieces@tk={#1}\@piecestrue% 663 \ignorespaces% 664 } 665 \def\fieldtext#1{% 666 \fieldtext@tk={#1}\@fieldtexttrue% 667 \ignorespaces% 668 } 669 \def\nofields#1{% 670 \nofields@tk={#1}\@nofieldstrue% 671 \ignorespaces% 672 } 673 \let\nosquares\nofields 674 \def\gridlines#1{% 675 \gridlines@tk={#1}\@gridlinestrue% 676 \ignorespaces% 677 } 678 \def\fieldframe#1{% 679 \fieldframe@tk={#1}\@fieldframetrue% 680 \ignorespaces% 681 } 682 \def\stipulation#1{% 683 \stipulation@tk={#1}\@stipulationtrue% 684 \ignorespaces% 685 } 686 \def\condition{% 687 \@ifstar{\x@condtrue\@condition}{\@condition}% 688 } 689 \def\@condition#1{% 690 \condition@tk={#1}\@conditiontrue% 691 \ignorespaces% 692 } 693 \def\twins{% 694 \@ifstar{\x@twinstrue\@twins}{\@twins}% 695 } 696 \def\@twins#1{% 697 \twins@tk={#1}\@twinstrue% 698 \ignorespaces% 699 } 700 \def\remark#1{% 701 \remark@tk={#1}\@remarktrue% 702 \ignorespaces% 703 } 704 \def\Co#1{% 705 \ifx#1+\@computertrue\computer@tk={+}\fi% 706 \ignorespaces% 707 } 708 \long\def\solution#1{% 709 \sol@tk={#1}\global\s@lutrue%

27 710 \ignorespaces% 711 } 712 \def\themes#1{% 713 \theme@tk={#1}\@themetrue% 714 \ignorespaces% 715 } 716 \long\def\comment#1{% 717 \comment@tk={#1}\@commenttrue% 718 \ignorespaces% 719 } 720 \long\def\judgement#1{% 721 \judgement@tk={#1}\@judgementtrue% 722 \ignorespaces% 723 } 724 \def\noframe{% 725 \@vframefalse\@hframefalse% 726 \ignorespaces% 727 } 728 \def\noinnerframe{% 729 \@leaveOuterfalse\@vframefalse\@hframefalse% 730 \ignorespaces% 731 } 732 \def\verticalcylinder{% 733 \@vframefalse% 734 \ignorespaces% 735 } 736 \def\horizontalcylinder{% 737 \@hframefalse% 738 \ignorespaces% 739 } 740 \def\stdgrid{% 741 \@stdgridtrue% 742 \ignorespaces% 743 }

\gridchess Here we define some abbreviations and synonyms for other macros. \magic 744 \let\gridchess=\stdgrid \tourn 745 \let\magic=\fieldframe \dedic 746 \let\tourn=\tournament \stip 747 \let\dedic=\dedication \cond 748 \let\stip=\stipulation \rem 749 \let\cond=\condition 750 \sol \let\rem=\remark 751 \let\sol=\solution

752 \def\develop{% 753 \@developtrue% 754 \ignorespaces% 755 } 756 \def\showcomputer{% 757 \@show@computertrue% 758 \ignorespaces% 759 } 760 \def\nocomputer{%

28 761 \@show@computerfalse% 762 \ignorespaces% 763 } 764 \def\putsol{\immediate\closeout\s@lfd\input\jobname.sol\cl@arsol} 765 \def\widedias{\@widediastrue\diagcenter} 766 \def\nowidedias{\@widediasfalse} 767 \def\normalnames{\normal@namestrue} 768 \def\reversednames{\normal@namesfalse} 769 \def\makeaindex{% 770 \@dia@index% 771 \newindex[thediag]{author}{adx}{and}{Autorenverzeichnis}% 772 \@aindextrue\reversednames% 773 } 774 775 \def\makesindex{% 776 \@dia@index% 777 \newindex[thediag]{source}{sdx}{snd}{Quellenregister}% 778 \@sindextrue% 779 } 780 781 \def\maketindex{% 782 \@dia@index% 783 \newindex[thediag]{theme}{tdx}{tnd}{Themenregister}% 784 \@tindextrue% 785 } 786 787 \def\authorindex{{\let\@idxitem\@aidxitem\printindex[author]}} 788 \def\sourceindex{\printindex[source]} 789 \def\themeindex{\printindex[theme]} 790 \def\DefinePieces#1#2#3{% 791 \@setPieceColor#1\@setPieceSpec#2\@setPieceRotation#3% 792 \loop@rotation% 793 \expandafter\xdef\csname\ds@black\ds@white\ds@bishop\endcsname{% 794 \noexpand\ch@fig{20}% 795 }% 796 \expandafter\xdef\csname\ds@black\ds@black\ds@bishop\endcsname{% 797 \noexpand\ch@fig{32}% 798 }% 799 \expandafter\xdef\csname\ds@white F\endcsname{{\chessfont\ }} 800 \expandafter\xdef\csname\ds@black F\endcsname{{\chessfont\char144}} 801 \expandafter\xdef\csname\ds@white Nr\endcsname{% 802 \noexpand\ch@fig{109}% 803 }% 804 \expandafter\xdef\csname\ds@black Nr\endcsname{% 805 \noexpand\ch@fig{121}% 806 }% 807 \expandafter\xdef\csname\ds@white Gh\endcsname{% 808 \noexpand\ch@fig{112}% 809 }% 810 \expandafter\xdef\csname\ds@black Gh\endcsname{% 811 \noexpand\ch@fig{124}% 812 }% 813 } 814 \def\Imi{\ch@fig{157}}

29 \dia@above The content of the box above a diagram is controlled by the macro \dia@above. It just delegates the information to a couple of other macros, which then generate the displayed information above the diagram. 815 \def\dia@above{% 816 \@dia@number% 817 \@dia@authors% 818 \@dia@city% 819 \@dia@after% 820 \@dia@version% 821 \@dia@source% 822 \@dia@correction% 823 \@dia@tournament% 824 \@dia@award% 825 \@dia@dedic% 826 \@dia@fidealbum% 827 }

\dia@below As before, the macro \dia@below creates the displayed information below the chessboard - forwarding to a couple of other macros. 828 \def\dia@below{% 829 \bgroup% 830 \if@stipulation% 831 \@dia@stipulation% 832 \fi% 833 \ifx@cond\else% 834 \@dia@condition% 835 \fi% 836 \ifx@twins\else% 837 \@dia@twins% 838 \fi% 839 \@dia@remark% 840 \if@solafterdiagram% 841 \below@newline% 842 \the\sol@tk% 843 \fi% 844 \noindent\hbox{}\newline\hbox{}% 845 \egroup% 846 }

\@dia@number The \@dia@number macro simply creates the diagram number in a single para- graph. 847 \def\@dia@number{% 848 {\authorfont\thediag\par}% 849 }

\@dia@authors This macro is used to create the list of authors specified within the \author macro inside the diagram environment. Depending on the TEX-boolean normal@names we either simply display the registered author or parse the list of authors by using the generic \@parseTokenList macro. 850 \def\@dia@authors{% 851 \ifauth@r% 852 \bgroup% 853 \authorfont%

30 854 \ifnormal@names% 855 \the\aut@tk% 856 \else% 857 {\def\name@sep{\par}% 858 \@notfirstfalse% 859 \let\@action=\@writename% Parse the list of authors 860 \@parseTokenlist\aut@tk;} 861 \fi% 862 \egroup% 863 \fi% 864 }

865 \def\@show@city#1;{\if@notfirst\ \slash\ \else\@notfirsttrue\fi#1} 866 867 \def\p@rsecity#1; {\@show@city#1;\l@@klist} 868 869 \def\@dia@city{% 870 \if@city% 871 \bgroup% 872 \cityfont\@notfirstfalse% 873 \let\@action=\p@rsecity\@parseTokenlist\city@tk;% 874 \par% 875 \egroup% 876 \fi% 877 } 878 879 \def\@dia@after{% 880 \if@after% 881 \bgroup% 882 \dedicfont\the\after@tk\par% 883 \egroup% 884 \fi% 885 } 886 887 \def\@dia@version{% 888 \if@version% 889 \bgroup% 890 \dedicfont\the\version@tk\par% 891 \egroup% 892 \fi% 893 } 894 895 \def\@dia@date{% 896 \ifnum\from@month>\z@% 897 \if@day% 898 \the\day@tk.\write@month\from@month% 899 \else% 900 \write@month\from@month% 901 \fi% 902 \ifnum\to@month>\z@--\write@month\to@month\fi% 903 \if@day.\else/\fi% 904 \fi% 905 \if@year\the\year@tk\fi% 906 }

31 907 908 \def\@dia@source{% 909 \if@source% 910 \bgroup% 911 \sourcefont% 912 \if@sourcenr\the\sourcenr@tk\ \fi 913 \the\source@tk% 914 \if@date\ \ \fi\@dia@date% 915 \if@issue\ \ \the\issue@tk\fi% 916 \if@pages ,\ \the\pages@tk\fi% 917 \par% 918 \egroup% 919 \else% 920 \if@tournament\else\if@date% 921 \bgroup% 922 \sourcefont% 923 \@dia@date% 924 \par% 925 \egroup% 926 \fi\fi% 927 \fi% 928 } 929 930 \def\@dia@correction{% 931 \if@correction% 932 \bgroup% 933 \dedicfont\the\correction@tk% 934 \par% 935 \egroup% 936 \fi% 937 } 938 939 \def\@dia@tournament{% 940 \if@tournament 941 \bgroup% 942 \awardfont% 943 \the\tournament@tk 944 \if@source\else\if@date% 945 \ \ \@dia@date% 946 \fi\fi% 947 \par% 948 \egroup% 949 \fi% 950 } 951 952 \def\@dia@award{% 953 \if@award% 954 \bgroup% 955 \awardfont\the\award@tk% 956 \par% 957 \egroup% 958 \fi% 959 } 960

32 961 \def\@dia@dedic{% 962 \if@dedication% 963 \bgroup% 964 \dedicfont\the\dedic@tk% 965 \par% 966 \egroup% 967 \fi% 968 } 969 970 \def\@show@album#1/#2;{#1 FIDE-Album #2} 971 972 \def\@dia@fidealbum{% 973 \if@fidealbum{% 974 \expandafter\@show@album\the\fidealbum@tk;% 975 \par% 976 }\fi% 977 } 978 979 \def\@twinskip{\ \ } 980 981 \def\@dia@stipulation{% 982 \if@stipulation% 983 \bgroup% 984 \stipfont% 985 \the\stipulation@tk% 986 \ifx@twins% 987 \let\below@newline\@twinskip% 988 \@dia@twins% 989 \else\ifx@cond% 990 \let\below@newline\@twinskip% 991 \@dia@condition% 992 \fi\fi% 993 \egroup% 994 \let\below@newline\newline% 995 \else% 996 \x@twinsfalse% 997 \x@condfalse% 998 \let\below@newline\relax% 999 \fi% 1000 } 1001 1002 \def\x@write@twin#1; {% 1003 \hskip1em#1% 1004 \@lefttrue\let\below@newline\newline% 1005 \let\@action\write@twins% 1006 \l@@klist% 1007 } 1008 1009 \def\write@twins#1; {% 1010 \setbox\@test@box=\hbox{#1\if@left~~\fi}% 1011 \ifdim\wd\@test@box>4\sq@width% 1012 \below@newline% 1013 \@lefttrue% 1014 #1%

33 1015 \else% 1016 \if@left% 1017 \below@newline% 1018 \fi% 1019 \noindent\hbox to 4\sq@width{#1\hfil}% 1020 \if@left% 1021 \@leftfalse% 1022 \else% 1023 \@lefttrue% 1024 \fi% 1025 \fi% 1026 \let\below@newline\newline 1027 \l@@klist% 1028 } 1029 1030 \def\@dia@twins{% 1031 \if@twins% 1032 \bgroup% 1033 \@lefttrue% 1034 \remfont% 1035 \ifx@twins% 1036 \let\@action=\x@write@twin% 1037 \else% 1038 \let\@action=\write@twins% 1039 \fi% 1040 \@parseTokenlist\twins@tk;% 1041 \egroup% 1042 \let\below@newline\newline% 1043 \fi% 1044 } 1045 1046 \def\@dia@condition{% 1047 \if@condition% 1048 \bgroup% 1049 \@lefttrue% 1050 \remfont% 1051 \ifx@cond% 1052 \let\@action=\x@write@twin% 1053 \else% 1054 \let\@action=\write@twins% 1055 \fi% 1056 \@parseTokenlist\condition@tk;% 1057 \egroup% 1058 \let\below@newline\newline% 1059 \fi% 1060 } 1061 1062 \def\@dia@remark{% 1063 \if@remark% 1064 \bgroup% 1065 \@lefttrue% 1066 \remfont\let\@action=\write@twins% 1067 \@parseTokenlist\remark@tk;% 1068 \egroup%

34 1069 \let\below@newline\newline% 1070 \fi% 1071 } 1072 1073 \def\parse@params#1{% 1074 \ifcase\help@a\relax 1075 \label@tk={#1}\ifx\relax#1\else\@labeltrue\fi\or% 1076 \number@tk={#1}\ifx\relax#1\else\@numbertrue\fi\or% 1077 \aut@tk={#1}\ifx\relax#1\else\auth@rtrue\fi\or% 1078 \city@tk={#1}\ifx\relax#1\else\@citytrue\fi\or% 1079 \sourcenr@tk={#1}\ifx\relax#1\else\@sourcenrtrue\fi\or% 1080 \source@tk={#1}\ifx\relax#1\else\@sourcetrue\fi\or% 1081 \day@tk={#1}\ifx\relax#1\else\@daytrue\fi\or% 1082 \from@month=#1\or% 1083 \to@month=#1\or% 1084 \year@tk={#1}\ifx\relax#1\else\@yeartrue\fi\or% 1085 \issue@tk={#1}\ifx\relax#1\else\@issuetrue\fi\or% 1086 \pages@tk={#1}\ifx\relax#1\else\@pagestrue\fi\or% 1087 \tournament@tk={#1}\ifx\relax#1\else\@tournamenttrue\fi\or% 1088 \award@tk={#1}\ifx\relax#1\else\@awardtrue\fi\or% 1089 \after@tk={#1}\ifx\relax#1\else\@aftertrue\fi\or% 1090 \version@tk={#1}\ifx\relax#1\else\@versiontrue\fi\or% 1091 \correction@tk={#1}\ifx\relax#1\else\@correctiontrue\fi\or% 1092 \dedic@tk={#1}\ifx\relax#1\else\@dedicationtrue\fi\or% 1093 \theme@tk={#1}\ifx\relax#1\else\@themetrue\fi\or% 1094 \twins@tk={#1}\ifx\relax#1\else\@twinstrue\fi\or% 1095 \computer@tk={#1}\or% 1096 \comment@tk={#1}\ifx\relax#1\else\@commenttrue\fi\or% 1097 \judgement@tk={#1}\ifx\relax#1\else\@judgementtrue\fi\or% 1098 \sol@tk={#1}% 1099 \fi% 1100 \advance\help@a \@ne% 1101 \l@@klist% 1102 } 1103 1104 \def\split@param#1{% 1105 \@labelfalse\@numberfalse\auth@rfalse\@cityfalse% 1106 \@sourcenrfalse\@sourcefalse\@dayfalse\@yearfalse% 1107 \@issuefalse\@pagesfalse\@tournamentfalse\@awardfalse% 1108 \@afterfalse\@versionfalse\@correctionfalse\@dedicationfalse% 1109 \@themefalse\@twinsfalse\@commentfalse\@judgementfalse% 1110 \help@a=\z@% 1111 \let\@action=\parse@params\l@@klist#1\e@list% 1112 } 1113 \def\@dia@solution{% 1114 \bgroup% 1115 \parindent\z@% 1116 \parskip\tw@\p@% 1117 {\bf 1118 \noindent\if@label\showlabel{\the\label@tk}\fi% 1119 \the\number@tk) % 1120 \ifauth@r% 1121 \ifnormal@names% 1122 \the\aut@tk%

35 1123 \else% 1124 {\@notfirstfalse% We are the first one 1125 \def\name@sep{, }% 1126 \let\@action=\@writename% 1127 \@parseTokenlist\aut@tk;}:% 1128 \fi% 1129 \par% 1130 \fi% 1131 }% 1132 \if@develop\if@judgement\the\judgement@tk\par\fi\fi% 1133 \the\sol@tk\par% 1134 \if@comment\the\comment@tk\par\fi% 1135 \egroup% 1136 } 1137 \grid@width=0.6\p@ 1138 \inner@frame=0.6\p@ 1139 \outer@frame=1.2\p@ 1140 \space@frame=\outer@frame 1141 \v@frame@dist=\tw@\p@% 1142 \h@frame@dist=\tw@\p@% 1143 \space@frame@dist=\z@ 1144 \v@space@dist=1em 1145 \def\@show@figurine{% 1146 \noindent% 1147 \@figurine@number% 1148 \@figurine@author% 1149 \@figurine@city% 1150 \@figurine@after% 1151 \@figurine@correction% 1152 \@figurine@version% 1153 \@figurine@source% 1154 \@figurine@tournament% 1155 \@figurine@award% 1156 \@figurine@dedic% 1157 \@figurine@pieces% 1158 \@figurine@stip% 1159 \@figurine@twins% 1160 \@figurine@conditions% 1161 \@figurine@remarks% 1162 \@figurine@computer% 1163 } 1164 \def\@figurine@number{{\authorfont\thediag)}} 1165 1166 \def\p@rseauthor@figurine#1,#2; {% 1167 \if@notfirst, \else\@notfirsttrue\fi#2 #1% 1168 \l@@klist% 1169 } 1170 1171 \def\@figurine@author{% 1172 {\ifauth@r% 1173 \authorfont\@notfirstfalse% 1174 \let\@action=\p@rseauthor@figurine% 1175 \@parseTokenlist\aut@tk;% 1176 \ \ %

36 1177 \fi}% 1178 } 1179 1180 \def\@figurine@city{% 1181 {\if@city% 1182 \cityfont\@notfirstfalse% 1183 \let\@action=\p@rsecity\@parseTokenlist\city@tk;% 1184 \\\% 1185 \fi}% 1186 } 1187 1188 \def\@figurine@after{\if@after{\dedicfont\ \ \the\after@tk}\fi} 1189 1190 \def\@figurine@correction{% 1191 \if@correction{\dedicfont\ \ \the\correction@tk}\fi% 1192 } 1193 1194 \def\@figurine@version{% 1195 \if@version{\dedicfont\ \ \the\version@tk}\fi% 1196 } 1197 1198 \def\@figurine@source{% 1199 {\if@source% 1200 \sourcefont% 1201 \if@sourcenr\the\sourcenr@tk\ \fi% 1202 \the\source@tk% 1203 \if@year% 1204 \ \ % 1205 \if@day% 1206 \ifnum\from@month>\z@% 1207 \the\day@tk.% 1208 \write@month\from@month% 1209 \ifnum\to@month>\z@% 1210 -\write@month\to@month% 1211 \fi% 1212 .% 1213 \fi% 1214 \else% 1215 \write@month\the\from@month% 1216 \ifnum\to@month>\z@% 1217 -\write@month\the\to@month% 1218 \fi% 1219 /% 1220 \fi% 1221 \the\year@tk% 1222 \fi% 1223 \if@issue , \the\issue@tk\fi% 1224 \if@pages , \the\pages@tk\fi% 1225 \fi}% 1226 } 1227 1228 \def\@figurine@tournament{% 1229 \if@tournament{\awardfont\ \ \the\tournament@tk}\fi% 1230 }

37 1231 1232 \def\@figurine@award{% 1233 \if@award{\awardfont\ \ \the\award@tk}\fi% 1234 } 1235 1236 \def\@figurine@dedic{% 1237 \if@dedication{\awardfont\ \ \the\dedic@tk}\fi% 1238 } 1239 \def\show@squares#1\e@list{\ch@fig{\the\help@a}#1, } 1240 1241 \def\@figurine@pieces{% 1242 {\if@pieces% 1243 \let\@action=\p@rsepieces% 1244 \let\piece@job\show@squares% 1245 \@parseTokenlist\pieces@tk,% 1246 \fi}% 1247 } 1248 \def\@figurine@stip{% 1249 \if@stipulation{\stipfont\ \ \the\stipulation@tk}\fi% 1250 } 1251 1252 \def\@figurine@conditions{% 1253 \if@condition{\remfont\ \ \the\condition@tk}\fi% 1254 } 1255 1256 \def\@figurine@twins{% 1257 \if@twins{\remfont\ \ \the\twins@tk}\fi% 1258 } 1259 1260 \def\@figurine@computer{% 1261 \if@show@computer 1262 \if@computer\ (Co)\fi% 1263 \fi% 1264 } 1265 1266 \def\@figurine@remarks{% 1267 \if@remark{\stipfont\ \ \the\remark@tk}\fi% 1268 } 1269 \def\do@dia@job{\@write@sol\ifvmode\noindent\fi\unhbox\dia@box} 1270 \def\solhead#1{{\split@param{#1}\@dia@solution}} 1271 \def\@write@sol{% 1272 \ifs@lu% 1273 \immediate\write\s@lfd{% 1274 \noexpand\solhead{% 1275 {\the\label@tk}% 1276 {\thediag}% 1277 {\the\aut@tk}% 1278 {\the\city@tk}% 1279 {\the\sourcenr@tk}% 1280 {\the\source@tk}% 1281 {\the\day@tk}% 1282 {\the\from@month}% 1283 {\the\to@month}% 1284 {\the\year@tk}%

38 1285 {\the\issue@tk}% 1286 {\the\pages@tk}% 1287 {\the\tournament@tk}% 1288 {\the\award@tk}% 1289 {\the\after@tk}% 1290 {\the\version@tk}% 1291 {\the\correction@tk}% 1292 {\the\dedic@tk}% 1293 {\the\theme@tk}% 1294 {\the\twins@tk}% 1295 {\the\computer@tk}% 1296 {\the\comment@tk}% 1297 {\the\judgement@tk}% 1298 {\the\sol@tk}% 1299 } %end of \solhead 1300 }% 1301 \fi 1302 } 1303 \def\@months#1-#2;{\from@month=#1\to@month=#2\@datetrue} 1304 \def\@writename#1; {\sep@names\@dianame#1; \l@@klist} 1305 \def\name@sep{,\ } 1306 \def\sep@names{\if@notfirst\name@sep\else\@notfirsttrue\fi} 1307 \def\@checkshort#1/#2#3;{% 1308 \@shortformtrue% 1309 \ifx#2\e@list\relax% 1310 \@shortformfalse% 1311 \fi% 1312 } 1313 \def\short@christian#1#2-{% 1314 \if@notfirst -\else\@notfirsttrue\fi% 1315 #1.% 1316 \l@@klist% 1317 } 1318 1319 \def\@write@christian#1/#2;{#1} 1320 1321 \def\write@christian#1;{% 1322 \@checkshort#1/\e@list;% 1323 \if@shortform\@write@christian#1;\else#1\fi% 1324 } 1325 1326 \def\@write@short#1/#2;{#2} 1327 1328 \def\write@short#1;{% 1329 \@checkshort#1/\e@list;% 1330 \if@shortform% 1331 \@write@short#1;% 1332 \else% 1333 {\@notfirstfalse\let\@action\short@christian\l@@klist#1-\e@list}% 1334 \fi% 1335 } 1336 \def\@fullname#1, #2; {\hbox{\write@christian#2; #1}} 1337 \def\@sirname#1, #2; {#1} 1338 \def\@short#1, #2; {\write@short#2;\ #1}

39 1339 \def\@noname#1, #2; {} 1340 \def\@normalname#1; {#1} 1341 \def\space@vertical{\space@verticaltrue} 1342 \def\space@horizontal{\space@verticalfalse} 1343 \def\cl@arsol{\immediate\openout\s@lfd=\jobname.sol} 1344 \def\getc@lor#1{% 1345 \if#1\ds@white% 1346 \help@a\z@\global% 1347 \let\cpd@stepcounterPieces\cpd@stepcounterWhite% 1348 \else\if#1\ds@neutral% 1349 \help@a=6\global% 1350 \let\cpd@stepcounterPieces\cpd@stepcounterNeutral% 1351 \else\if#1\ds@black% 1352 \help@a=12\global% 1353 \let\cpd@stepcounterPieces\cpd@stepcounterBlack% 1354 \else\errmessage{invalid color!}% 1355 \fi\fi\fi% 1356 \getpi@ce% 1357 } 1358 1359 \def\get@text#1{\text@tk={#1}\read@square} 1360 1361 \def\getpi@ce#1{\if#1B\relax\else 1362 \if#1\ds@knight\advance\help@a\@ne% 1363 \else\if#1\ds@bishop\advance\help@a\tw@% 1364 \else\if#1\ds@rook\advance\help@a\thr@@% 1365 \else\if#1\ds@queen\advance\help@a\f@ur% 1366 \else\if#1\ds@king\advance\help@a 5% 1367 \else\if#1C% 1368 % An imitator should not count for any color. 1369 \let\cpd@stepcounterPieces\relax 1370 \advance\help@a 145% 1371 \else% 1372 \errmessage{invalid piece!}% 1373 \fi\fi\fi\fi\fi\fi\fi% 1374 \futurelet\r@tate\chkr@tate% 1375 } 1376 1377 \def\chkr@tate{% 1378 \if\r@tate \ds@upsidedown\advance\help@a 108\let\nextpr@c=\skipr@t\else 1379 \if\r@tate \ds@left\advance\help@a 36\let\nextpr@c=\skipr@t\else 1380 \if\r@tate \ds@right\advance\help@a 72\let\nextpr@c=\skipr@t\else 1381 \let\nextpr@c\piece@job\fi\fi\fi\nextpr@c% 1382 } 1383 \def\skipr@t#1{\piece@job} 1384 \def\l@@k{\futurelet\whatsnext\parsefi@lds} 1385 \def\parsefi@lds{% 1386 \if\whatsnext\e@list% 1387 \let\nextpr@c\relax% 1388 \else 1389 \let\nextpr@c\read@square% 1390 \fi% 1391 \nextpr@c% 1392 }

40 1393 1394 \def\set@current@square@index#1#2{% 1395 \setcounter{cpd@current@square@index}{#1+\value{cpd@linesmax}*#2}% 1396 } 1397 \def\set@current@square@value#1{% 1398 \expandafter% 1399 \xdef\csname cpd@square@\roman{cpd@current@square@index}\endcsname{#1}% 1400 } 1401 \def\get@current@square@value{% 1402 \setcounter{cpd@current@square@value}% 1403 {\csname cpd@square@\roman{cpd@current@square@index}\endcsname}% 1404 } 1405 \def\set@piece{% 1406 \ifnum\pl@ne=\current@plane% 1407 \cpd@stepcounterPieces% 1408 \set@current@square@index\lin@\r@w% 1409 \get@current@square@value% 1410 \ifthenelse{\value{cpd@current@square@value}=\m@ne} 1411 {\set@current@square@value{\the\help@a}}% 1412 {\ifthenelse{\value{cpd@current@square@value}=144}% 1413 {\set@current@square@value{\the\help@a+18}}% 1414 {\errmessage{Trying to set a piece to an occupied square}}}% 1415 \fi% 1416 \l@@k% 1417 } 1418 \def\set@nofield, {% 1419 \ifnum\pl@ne=\current@plane% 1420 \set@current@square@index\lin@\r@w% 1421 \get@current@square@value% 1422 \ifthenelse{\value{cpd@current@square@value}=\m@ne}% 1423 {}% This is an empty white square, nothing to do 1424 {\ifthenelse{\value{cpd@current@square@value}=144}% 1425 {\set@current@square@value{\m@ne}}% 1426 {\errmessage{Trying to set a piece to an occupied square}}}% 1427 \fi% 1428 \l@@klist% 1429 } 1430 \def\set@frame, {% 1431 \ifnum\pl@ne=\current@plane% 1432 \@vGrid{\the\lin@}{\the\r@w}\@ne% 1433 \@hGrid{\the\lin@}{\the\r@w}\@ne% 1434 \advance\lin@\@ne% 1435 \@vGrid{\the\lin@}{\the\r@w}\@ne% 1436 \advance\lin@\m@ne\advance\r@w\@ne% 1437 \@hGrid{\the\lin@}{\the\r@w}\@ne% 1438 \fi% 1439 \l@@klist% 1440 } 1441 \def\e@list{\relax} 1442 \def\l@@klist{\futurelet\nextlist\ch@cklst} 1443 \def\ch@cklst{% 1444 \ifx\nextlist\e@list% 1445 \let\nextpr@c=\relax% 1446 \else%

41 1447 \let\nextpr@c=\@action% 1448 \fi% 1449 \nextpr@c% 1450 } 1451 \def\p@rsepieces#1, {\getc@lor#1\e@list\l@@klist} 1452 \def\p@rsetext#1, {\get@text#1\e@list\l@@klist} 1453 \def\set@text{% 1454 \ifnum\pl@ne=\current@plane% 1455 \raise\r@w\sq@width\hbox to \z@{% 1456 \hskip\lin@\sq@width% 1457 \vbox to \sq@width{\vss% 1458 \hbox to \sq@width{% 1459 \hss% 1460 {\the\text@tk}% 1461 \hss% 1462 }\vss}% 1463 \hss% 1464 }% 1465 \fi% 1466 \l@@klist% 1467 } 1468 \def\p@rseauthor#1; {\sh@wauthor#1;\l@@klist} 1469 \def\read@square#1#2{% 1470 \lin@=‘#1\advance\lin@ by -‘a\relax% 1471 \r@w=#2\advance\r@w by \m@ne% 1472 \read@plane% 1473 } 1474 \def\read@plane@normal{\plane@job} 1475 1476 \def\read@plane@stereo{\futurelet\plane@char\get@plane@stereo} 1477 1478 \def\get@plane@stereo{% 1479 \if\plane@char A% 1480 \pl@ne=\@ne\advance\r@w-\tw@\advance\lin@-\tw@% 1481 \let\@plane@job=\skip@plane% 1482 \else\if\plane@char B% 1483 \pl@ne=\tw@\advance\r@w-\tw@\advance\lin@-\tw@% 1484 \let\@plane@job=\skip@plane% 1485 \else\if\plane@char C% 1486 \pl@ne=\thr@@\advance\r@w-\tw@\advance\lin@-\tw@% 1487 \let\@plane@job=\skip@plane% 1488 \else\if\plane@char D% 1489 \pl@ne=\f@ur\advance\r@w-\tw@\advance\lin@-\tw@% 1490 \let\@plane@job=\skip@plane% 1491 \else% 1492 \pl@ne=\z@\let\@plane@job=\plane@job% 1493 \fi\fi\fi\fi% 1494 \@plane@job% 1495 } 1496 1497 \def\skip@plane#1{\plane@job} 1498 1499 \def\read@plane@space#1{\pl@ne=‘#1\advance\pl@ne by -‘A\relax\plane@job} 1500 \def\@vGrid#1#2#3{%

42 1501 \raise#2\sq@width\hbox to \z@{% 1502 \hskip#1\sq@width\hskip-.5\grid@width% 1503 \vrule height#3\sq@width width\grid@width\hss% 1504 }% 1505 } 1506 1507 \def\@hGrid#1#2#3{% 1508 \raise#2\sq@width\hbox to \z@{% 1509 \hskip#1\sq@width% 1510 \vrule width#3\sq@width height .5\grid@width depth% 1511 .5\grid@width\hss% 1512 }% 1513 } 1514 \def\@selGrid#1#2, {% 1515 \ifnum\pl@ne=\current@plane% 1516 \if#1h% 1517 \@hGrid#2% 1518 \else\if#1v% 1519 \@vGrid#2% 1520 \else% 1521 \errmessage{Wrong GridSelector #1}% 1522 \fi\fi% 1523 \fi% 1524 \l@@klist% 1525 } 1526 \def\@stdgrid{% 1527 \setbox\plane@box=\vbox{\hbox{% 1528 \help@a=\tw@% 1529 \loop% 1530 \ifnum\help@a<\lines@max% 1531 \@vGrid{\the\help@a}{0}{\the\rows@max}% 1532 \advance\help@a\tw@% 1533 \repeat% 1534 \help@a=\tw@% 1535 \loop% 1536 \ifnum\help@a<\rows@max% 1537 \@hGrid{0}{\the\help@a}{\the\lines@max}% 1538 \advance\help@a\tw@% 1539 \repeat% 1540 \box\plane@box 1541 }}% 1542 } 1543 \def\ds@xlabel#1{% 1544 \label@tk={#1}\@labeltrue% 1545 } 1546 1547 \def\@set@label#1;{\ifds@label\label{#1}\fi} 1548 \def\init@vars{% 1549 \global\s@lufalse 1550 \setboolean{cpd@checkPieceCounts}{false}% 1551 \setcounter{cpd@defWhitePieces}{\z@}% 1552 \setcounter{cpd@defBlackPieces}{\z@}% 1553 \setcounter{cpd@defNeutralPieces}{\z@}% 1554 \setcounter{cpd@whitePieces}{\z@}%

43 1555 \setcounter{cpd@blackPieces}{\z@}% 1556 \setcounter{cpd@neutralPieces}{\z@}% 1557 \lin@\z@ 1558 } 1559 1560 \def\clear@board{% 1561 % Now the new style 1562 \setcounter{cpd@current@row}{0}% 1563 \whiledo{\value{cpd@current@row}<\value{cpd@rowsmax}}{% 1564 \setcounter{cpd@current@line}{0}% 1565 \whiledo{\value{cpd@current@line}<\value{cpd@linesmax}}{% 1566 \set@current@square@index{\value{cpd@current@line}}{\value{cpd@current@row}}% 1567 \setcounter{cpd@helper}{\the\current@plane+\value{cpd@current@line}+\value{cpd@current@row}} 1568 \ifthenelse{\isodd{\value{cpd@helper}}}% 1569 {\set@current@square@value{-1}}% 1570 {\set@current@square@value{144}}% 1571 \addtocounter{cpd@current@line}{\@ne}% 1572 }% 1573 \addtocounter{cpd@current@row}{\@ne}% 1574 }% 1575 } 1576 1577 \def\put@row#1{% 1578 \lin@\z@% 1579 \help@b=#1% 1580 \advance\help@b\brd@ff% 1581 \hbox{% 1582 \if@stereo% 1583 \ifnum\current@plane>\z@% 1584 \ifnum\@rows=12% 1585 \llap{\raise .5\sq@width\hbox{\boardfont c6\ }}% 1586 \fi% 1587 \fi% 1588 \fi% 1589 \hbox to \z@{\vbox to \sq@width{}}% 1590 \set@current@square@index{\lin@}{#1}% 1591 \loop% 1592 \get@current@square@value% 1593 \ifthenelse{\value{cpd@current@square@value}=\m@ne}% 1594 {\wF}% 1595 {\char\value{cpd@current@square@value}}% 1596 % \ifnum\count\help@b=\m@ne\wF% 1597 % \else\char\count\help@b\fi% 1598 \advance\lin@\@ne% 1599 \addtocounter{cpd@current@square@index}{1}% 1600 % \advance\help@b\@ne% 1601 \ifnum\lin@<\lines@max\repeat% 1602 }% 1603 } 1604 \def\put@line#1{% 1605 \lin@\z@% 1606 \help@b=#1% 1607 \advance\help@b\brd@ff% 1608 \hbox{%

44 1609 \if@stereo% 1610 \ifnum\current@plane>\z@% 1611 \ifnum\@rows=12% 1612 \llap{\raise .5\sq@width\hbox{\boardfont c6\ }}% 1613 \fi% 1614 \fi% 1615 \fi% 1616 \hbox to \z@{\vbox to \sq@width{}}% 1617 \loop% 1618 \ifnum\count\help@b=\m@ne\wF% 1619 \else\char\count\help@b\fi% 1620 \advance\lin@\@ne\advance\help@b\@ne% 1621 \ifnum\lin@<\lines@max\repeat% 1622 }% 1623 } 1624 \def\@parseTokenlist#1#2{\expandafter\l@@klist\the#1#2 \e@list} 1625 \def\@addToPlane#1{% 1626 \setbox\plane@box=\vbox{\hbox{% 1627 \@parseTokenlist#1,% 1628 \box\plane@box% 1629 }}% 1630 } 1631 \def\put@plane{% 1632 % We might want gridchess 1633 \if@stdgrid% 1634 \@stdgrid% 1635 \fi% 1636 % Let us first set the fieldframes 1637 \if@fieldframe% 1638 \let\@action\read@square% 1639 \let\plane@job\set@frame% 1640 \@addToPlane\fieldframe@tk% 1641 \fi% 1642 % Now we set text to all squares which are given using \fieldtext 1643 \if@fieldtext% 1644 \let\@action\p@rsetext% 1645 \let\plane@job\set@text% 1646 \@addToPlane\fieldtext@tk% 1647 \fi% 1648 % Then we should add the gridlines 1649 \if@gridlines% 1650 \let\@action\read@plane% 1651 \let\plane@job\@selGrid% 1652 \@addToPlane\gridlines@tk% 1653 \else% 1654 \if@stereo% 1655 \stereo@center% 1656 \fi% 1657 \fi% 1658 % Now we should clear the board 1659 \clear@board% 1660 % Let us now parse the list of pieces 1661 \if@pieces% 1662 \let\@action\p@rsepieces%

45 1663 \let\piece@job\l@@k\let\plane@job\set@piece% 1664 \@parseTokenlist\pieces@tk,% 1665 \fi% 1666 % Now we clear all fields, which are given using \nofields 1667 \if@nofields% 1668 \let\@action\read@square% 1669 \let\plane@job\set@nofield% 1670 \@parseTokenlist\nofields@tk,% 1671 \fi% 1672 % Now we can put the pieces to the board 1673 \global\setbox\plane@box=\hbox{% 1674 \vbox{\rlap{\box\plane@box}}% 1675 \vbox{% 1676 \chessfont% 1677 \baselineskip=\z@\lineskip=\z@% 1678 \@rows=\rows@max% 1679 % \multiply\@rows by \lines@max% 1680 \loop% 1681 % \advance\@rows -\lines@max% 1682 % \put@line\@rows% 1683 % Remove \put@line in future versions 1684 \advance\@rows \m@ne% 1685 \put@row\@rows% 1686 \ifnum\@rows>\z@\repeat% 1687 }% 1688 }% 1689 } 1690 \def\put@sqs@normal{% 1691 \put@plane% 1692 \setbox\sq@box=\hbox{% 1693 \inner@henbox{\box\plane@box}% 1694 }% 1695 } 1696 \def\put@sqs@stereo{% 1697 \setbox\sq@box=\hbox{\hfil\vbox{% 1698 \current@plane=5% 1699 \vskip\v@space@dist% 1700 \loop% 1701 \advance\current@plane\m@ne% 1702 \ifnum\current@plane=\z@% 1703 \lines@max=\@ight% 1704 \rows@max=\@ight% 1705 \else% 1706 \lines@max=\f@ur% 1707 \rows@max=\f@ur% 1708 \fi% 1709 % Now we should clear the board 1710 \begingroup% We need this for inner loops! 1711 \clear@board% 1712 \put@plane% 1713 \endgroup% 1714 \hbox to \bd@width{% 1715 \hfil% 1716 \inner@henbox{\box\plane@box}%

46 1717 \ifcase\current@plane\or% 1718 \rlap{{\boardfont\ A}}\or% 1719 \rlap{{\boardfont\ B}}\or% 1720 \rlap{{\boardfont\ C}}\or% 1721 \rlap{{\boardfont\ D}}% 1722 \fi% 1723 \hfil% 1724 }% 1725 \vskip\v@space@dist% 1726 \ifnum\z@<\current@plane\repeat% 1727 }\hfil}% 1728 } 1729 1730 \def\stereo@center{% 1731 \ifnum\current@plane=\z@% 1732 \setbox\plane@box=\vbox{\hbox{% 1733 \@hGrid\tw@\tw@\f@ur\@hGrid\tw@ 6\f@ur% 1734 \@vGrid\tw@\tw@\f@ur\@vGrid6\tw@\f@ur% 1735 \box\plane@box% 1736 }}% 1737 \fi% 1738 } 1739 \def\put@sqs@space@vertical{% 1740 \setbox\sq@box=\hbox{\hfil\vbox{% 1741 \current@plane=\planes@max% 1742 \vskip\v@space@dist% 1743 \loop% 1744 \advance\current@plane\m@ne% 1745 % Now we should clear the board 1746 \begingroup% We use inner loops! 1747 \clear@board% 1748 \put@plane% 1749 \hbox to \bd@width{% 1750 \inner@henbox{\box\plane@box}% 1751 \advance\current@plane‘A% 1752 \rlap{{\boardfont\ \char\current@plane}}% 1753 }% 1754 \endgroup% 1755 \vskip\v@space@dist% 1756 \ifnum\z@<\current@plane\repeat% 1757 }\hfil}% 1758 } 1759 1760 \def\put@sqs@space@horizontal{% 1761 \setbox\sq@box=\hbox{% 1762 \current@plane=\z@% 1763 \hskip\h@space@dist% 1764 \loop% 1765 % Now we should clear the board 1766 \begingroup% We use inner loops! 1767 \clear@board% 1768 \put@plane% 1769 \hbox to \bd@width{% 1770 \inner@henbox{\box\plane@box}%

47 1771 \advance\current@plane‘A% 1772 \rlap{{\boardfont\ \char\current@plane}}% 1773 }% 1774 \endgroup% 1775 \hskip\h@space@dist% 1776 \advance\current@plane\@ne% 1777 \ifnum\planes@max>\current@plane% 1778 \repeat% 1779 }% 1780 } 1781 1782 \def\put@sqs@space{% 1783 \ifspace@vertical% 1784 \put@sqs@space@vertical% 1785 \else% 1786 \put@sqs@space@horizontal% 1787 \fi% 1788 } 1789 \def\@inner@vframe{% 1790 \if@vframe% 1791 \vrule width \inner@frame% 1792 \else% 1793 \hskip\inner@frame% 1794 \fi% 1795 } 1796 1797 \def\@inner@hframe{% 1798 \if@hframe% 1799 \hrule height \inner@frame% 1800 \else% 1801 \vskip\inner@frame% 1802 \fi% 1803 } 1804 \def\inner@v@frame@rule{% 1805 \if@stereo% 1806 \@inner@vframe% 1807 \else\if@space% 1808 \@inner@vframe% 1809 \else\if@leaveOuter% 1810 \vrule width \inner@frame% 1811 \else% 1812 \@inner@vframe% 1813 \fi\fi\fi% 1814 } 1815 1816 \def\inner@h@frame@rule{% 1817 \if@stereo% 1818 \@inner@hframe% 1819 \else\if@space% 1820 \@inner@hframe% 1821 \else\if@leaveOuter% 1822 \hrule height \inner@frame% 1823 \else% 1824 \@inner@hframe%

48 1825 \fi\fi\fi% 1826 } 1827 1828 \def\inner@henbox#1{% 1829 \hbox{% 1830 \inner@v@frame@rule% 1831 \vbox{\inner@h@frame@rule#1\inner@h@frame@rule}% 1832 \inner@v@frame@rule% 1833 }% 1834 } 1835 \def\@outer@vrule{\vrule width \outer@frame} 1836 1837 \def\@outer@hrule{\hrule height \outer@frame} 1838 \def\outer@v@frame@rule{% 1839 \if@stereo% 1840 \@outer@vrule% 1841 \else\if@space% 1842 \@outer@vrule% 1843 \else\if@leaveOuter% 1844 \if@vframe\@outer@vrule\else\hskip\outer@frame\fi% 1845 \else% 1846 \@outer@vrule% 1847 \fi\fi\fi% 1848 } 1849 1850 \def\outer@h@frame@rule{% 1851 \if@stereo% 1852 \@outer@hrule% 1853 \else\if@space% 1854 \@outer@hrule% 1855 \else\if@leaveOuter% 1856 \if@hframe\@outer@hrule\else\vskip\outer@frame\fi% 1857 \else% 1858 \@outer@hrule% 1859 \fi\fi\fi% 1860 } 1861 1862 \def\outer@henbox#1{% 1863 \outer@h@frame@rule% 1864 \hbox{% 1865 \outer@v@frame@rule% 1866 \ifspace@vertical% 1867 \hskip\h@frame@dist% 1868 \fi% 1869 \vbox{% 1870 \ifspace@vertical% 1871 \vskip\v@frame@dist% 1872 \else% 1873 \vskip\v@space@dist% 1874 \fi% 1875 #1% 1876 \ifspace@vertical% 1877 \vskip\v@frame@dist% 1878 \else%

49 1879 \vskip\v@space@dist% 1880 \fi% 1881 }% 1882 \ifspace@vertical% 1883 \hskip\h@frame@dist% 1884 \fi% 1885 \outer@v@frame@rule% 1886 }% 1887 \outer@h@frame@rule% 1888 } 1889 \def\ch@fig#1{% 1890 \ifvmode\noindent\fi% 1891 \hbox{\chtextfont\lower.3\fontdimen\tw@\chtextfont\hbox{\char#1}}% 1892 } 1893 \def\@dia@index{% 1894 \@ifundefined{newindex}% 1895 {\errmessage{You should add documentstyle-option ’index’}}{}% 1896 } 1897 1898 \def\showlabel#1{% 1899 \if@develop% 1900 \raise1ex\hbox{\labelfont#1}\penalty\exhyphenpenalty% 1901 \fi% 1902 } 1903 1904 \def\@aidxitem#1, #2, #3{% 1905 \par\medskip#1, \write@christian#2; \dotfill #3% 1906 } 1907 1908 \def\dia@index#1\@sep#2[#3]{\index[#3]{#2|showlabel{#1}}} 1909 1910 \def\parse@aindex#1; {% 1911 \expandafter\dia@index\the\label@tk\@sep#1[author]\l@@klist% 1912 } 1913 1914 \def\@aindex{% 1915 \if@aindex% 1916 \ifnormal@names% 1917 \errmessage{Cannot create index entries with normalnames}% 1918 \else\ifauth@r% 1919 \let\@action=\parse@aindex\@parseTokenlist\aut@tk;% 1920 \fi\fi% 1921 \fi% 1922 } 1923 1924 \def\x@sindex#1\@sep{\expandafter\dia@index\the\label@tk\@sep#1[source]} 1925 1926 \def\@sindex{% 1927 \if@sindex\if@source% 1928 \expandafter\x@sindex\the\source@tk\@sep% 1929 \fi\fi% 1930 } 1931 1932 \def\parse@tindex#1, {%

50 1933 \expandafter\dia@index\the\label@tk\@sep#1[theme]\l@@klist% 1934 } 1935 1936 \def\@tindex{% 1937 \if@tindex\if@theme% 1938 \let\@action=\parse@tindex\@parseTokenlist\theme@tk,% 1939 \fi\fi% 1940 } 1941 \def\@setPieceColor#1#2#3{% 1942 \gdef\ds@white{#1}\gdef\ds@black{#2}\gdef\ds@neutral{#3}% 1943 } 1944 1945 \def\@setPieceSpec#1#2#3#4#5#6{% 1946 \gdef\ds@king{#1}\gdef\ds@queen{#2}\gdef\ds@rook{#3}% 1947 \gdef\ds@bishop{#4}\gdef\ds@knight{#5}\gdef\ds@pawn{#6}% 1948 } 1949 1950 \def\@setPieceRotation#1#2#3{% 1951 \gdef\ds@left{#1}\gdef\ds@right{#2}\gdef\ds@upsidedown{#3}% 1952 } 1953 \def\loop@rotation{% 1954 \bgroup% 1955 \n@cnt\z@% 1956 \help@a\z@% 1957 \loop% 1958 \ifcase\n@cnt% 1959 \def\@theRotation{}% 1960 \or% 1961 \def\@theRotation{\ds@left}% 1962 \or% 1963 \def\@theRotation{\ds@right}% 1964 \or% 1965 \def\@theRotation{\ds@upsidedown}% 1966 \fi% 1967 \loop@color% 1968 \advance\n@cnt\@ne% 1969 \advance\help@a by 36\relax% 1970 \ifnum\n@cnt<\f@ur\repeat% 1971 \egroup% 1972 } 1973 1974 \def\loop@color{% 1975 \bgroup% 1976 \w@cnt\z@% 1977 \loop% 1978 \ifcase\w@cnt% 1979 \def\@theColor{\ds@white}% 1980 \or% 1981 \def\@theColor{\ds@neutral}% 1982 \or% 1983 \def\@theColor{\ds@black}% 1984 \fi% 1985 \loop@piece% 1986 \advance\w@cnt\@ne%

51 1987 \advance\help@a by 6% 1988 \ifnum\w@cnt<\thr@@\repeat% 1989 \egroup% 1990 } 1991 1992 \def\loop@piece{% 1993 \bgroup% 1994 \b@cnt\z@% 1995 \loop% 1996 \ifcase\b@cnt% 1997 \def\@thePiece{\ds@pawn}% 1998 \or% 1999 \def\@thePiece{\ds@knight}% 2000 \or% 2001 \def\@thePiece{\ds@bishop}% 2002 \or% 2003 \def\@thePiece{\ds@rook}% 2004 \or% 2005 \def\@thePiece{\ds@queen}% 2006 \or% 2007 \def\@thePiece{\ds@king}% 2008 \fi% 2009 \expandafter\xdef\csname 2010 \@theColor\@thePiece\@theRotation\endcsname{% 2011 \noexpand\ch@fig{\the\help@a}% 2012 } 2013 \advance\b@cnt\@ne% 2014 \advance\help@a by \@ne% 2015 \ifnum\b@cnt<6\repeat% 2016 \egroup% 2017 } 2018 \elchfont\@fselch 2019 2020 \defaultelchfont% 2021 \diagnum{\@ne} 2022 %% \figcnttrue 2023 \setboolean{piececounter}{true} 2024 \def\@dianame{\@fullname} 2025 \def\@solname{\@fullname} 2026 \space@verticaltrue 2027 \diagnumbering{arabic} 2028 \def\write@month{\@arabic}% 2029 \diagleft 2030 \cl@arsol 2031 \let\orig@author=\author 2032 \let\orig@day=\day 2033 \let\orig@month=\month 2034 \let\orig@year=\year 2035 \let\orig@label=\label 2036 \DefinePieces{wsn}{KDTLSB}{LRU} 2037 \newdimen\normalboardwidth 2038 \def\setboardwidth{% 2039 \normalboardwidth=\@ight\fontdimen\tw@\chessfont% 2040 \advance\normalboardwidth\tw@\inner@frame

52 2041 \advance\normalboardwidth\tw@\h@frame@dist 2042 \advance\normalboardwidth\tw@\outer@frame 2043 } 2044 2045 \setboardwidth 2046 2047 h/stylei

Index

Numbers written in italic refer to the page where the corresponding entry is described; numbers underlined refer to the code line of the definition; numbers in roman refer to the code lines where the entry is used.

Symbols \@correctiontrue . \@dia@twins ...... \@O ...... 542–544 ...... 622, 1091 . . . 837, 988, 1030 \@action . . . . . 859, \@currentlabel . . . \@dia@version 820, 887 873, 1005, . . . . 278, 469, 559 \@diagram ...... 206 1036, 1038, \@datefalse ...... 147 \@dianame 534, 1304, 2024 1052, 1054, \@datetrue ...... \@fidealbumfalse . 158 1066, 1111, 582, 586, 594, 1303 \@fidealbumtrue . . 630 1126, 1174, \@dayfalse . . 148, 1106 \@fieldframefalse 168 1183, 1243, \@daytrue . . . 582, 1081 \@fieldframetrue . 679 1333, 1447, \@dedicationfalse \@fieldtextfalse . 165 1638, 1644, ...... 157, 1108 \@fieldtexttrue . . 666 1650, 1662, \@dedicationtrue . \@figurine@after . 1668, 1919, 1938 ...... 626, 1092 . . . . . 1150, 1188 \@addToPlane . 1625, \@developfalse . . . 181 \@figurine@author 1640, 1646, 1652 \@developtrue . . . . 753 . . . . . 1148, 1171 \@afterfalse . 154, 1108 \@figurine@award \@dia@after . . 819, 879 . \@aftertrue . . 618, 1089 . . . . . 1155, 1232 \@dia@authors 817, 850 \@aidxitem . . 787, 1904 \@figurine@city . . \@dia@award . . 824, 952 \@aindex 274, 465, 1914 . . . . . 1149, 1180 \@dia@city . . 818, 869 \@aindexfalse . . . . 202 \@figurine@computer \@dia@condition . . \@aindextrue . . . . . 772 . . . . . 1162, 1260 . . . 834, 991, 1046 \@awardfalse . 153, 1107 \@figurine@conditions \@dia@correction \@awardtrue . . 610, 1088 ...... 1160, 1252 \@checkshort ...... 822, 930 \@figurine@correction . 1307, 1322, 1329 \@dia@date ...... 1151, 1190 \@cityfalse . . 144, 1105 895, 914, 923, 945 \@figurine@dedic . \@citytrue . . 570, 1078 \@dia@dedic . . 825, 961 . . . . . 1156, 1236 \@cnt@box ...... \@dia@fidealbum 826, 972 \@figurine@number . 75, 422, 429, 434 \@dia@index ...... 1147, 1164 \@cnt@wd . . 76, 429, 430 770, 776, 782, 1893 \@figurine@pieces \@commentfalse 163, 1109 \@dia@number . 816, 847 . . . . . 1157, 1241 \@commenttrue 717, 1096 \@dia@remark . 839, 1062 \@figurine@remarks \@computerfalse . . 161 \@dia@solution ...... 1161, 1266 \@computertrue . . . 705 . . . . . 1113, 1270 \@figurine@source \@condition . . 687, 689 \@dia@source . 821, 908 . . . . . 1153, 1198 \@conditionfalse . 172 \@dia@stipulation \@figurine@stip . . \@conditiontrue . . 690 . . . . 31, 831, 981 . . . . . 1158, 1248 \@correctionfalse \@dia@tournament . \@figurine@tournament ...... 156, 1108 ...... 823, 939 . . . . . 1154, 1228

53 \@figurine@twins . \@outer@vrule .... \@sirname ...... 1337 . . . . . 1159, 1256 . . 1835, 1840, \@solafterdiagramfalse \@figurine@version 1842, 1844, 1846 ...... 33 . . . . . 1152, 1194 \@pagesfalse . 151, 1107 \@solafterdiagramtrue \@fselch . . . . 26, 2018 \@pagestrue . . 602, 1086 ...... 34 \@fullname ...... \@parseNeutralCount \@solname . . . 535, 2025 . 1336, 2024, 2025 ...... 654, 658 \@sourcefalse 146, 1106 \@gridlinesfalse . 167 \@parseTokenlist . \@sourcenrfalse . . \@gridlinestrue . . 675 ...... 860, ...... 145, 1106 \@hGrid . . . . . 1433, 873, 1040, 1056, \@sourcenrtrue 574, 1079 1437, 1507, 1067, 1127, \@sourcetrue . 578, 1080 1517, 1537, 1733 1175, 1183, \@spacediagram 233, 236 \@hframefalse .... 1245, 1624, \@spacefalse . . . . . 201 . . . . 725, 729, 737 1627, 1664, \@spacetrue ...... 232 \@hframetrue ...... 37 1670, 1919, 1938 \@specialfalse . . . 142 \@ifundefined . . . 1894 \@parseWhiteAndBlackCount\@specialtrue . . . . 558 \@ight . 22, 208, 288, ...... 641, 644 \@start@diagram . . 289, 336, 341, \@pieces . 636, 642, 661 221, 228, 242, 244 1703, 1704, 2039 \@piecesfalse . . . . 164 \@stdgrid . . 1526, 1634 \@inner@hframe 1797, \@piecestrue . . . . . 662 \@stdgridfalse . . . 169 1818, 1820, 1824 \@pkelch ...... 25 \@stdgridtrue . . . . 741 \@inner@vframe 1789, \@plane@job . . 1481, \@stereofalse . . . . 200 1806, 1808, 1812 1484, 1487, \@stereotrue . . . . . 225 1490, 1492, 1494 \@issuefalse . 150, 1107 \@stip@box ...... 77 \@remarkfalse . . . . 173 \@stipulationfalse \@issuetrue . . 598, 1085 171 \@remarktrue . . . . . 701 \@stipulationtrue 683 \@judgementfalse . \@rows . . 188, 1584, \@test@box 80, 1010, 1011 ...... 162, 1109 1611, 1678, \@test@dimen ...... 81 \@judgementtrue . . 1679, 1681, \@textproblemfalse . 30 ...... 721, 1097 1682, 1684–1686 \@textproblemtrue . 31 \@labelfalse . 140, 1105 \@selGrid . . 1514, 1651 \@theColor . . 1979, \@labeltrue . 1075, 1544 \@sep . . . 1908, 1911, 1981, 1983, 2010 \@leaveOuterfalse 729 1924, 1928, 1933 \@thePiece ...... \@leaveOutertrue . . 38 \@set@label ...... 1997, 1999, \@leftfalse . . . . . 1021 . . . 281, 473, 1547 2001, 2003, \@lefttrue . . 1004, \@setPieceColor . . 2005, 2007, 2010 1013, 1023, ...... 791, 1941 \@theRotation .... 1033, 1049, 1065 \@setPieceRotation . . 1959, 1961, \@lines ...... 187 ...... 791, 1950 1963, 1965, 2010 \@months . . . . 590, 1303 \@setPieceSpec 791, 1945 \@themefalse . 160, 1109 \@nofieldsfalse . . 166 \@short ...... 1338 \@themetrue . . 713, 1093 \@nofieldstrue . . . 670 \@shortformfalse 1310 \@tindex 276, 467, 1936 \@noname ...... 1339 \@shortformtrue . 1308 \@tindexfalse . . . . 204 \@normalname . . . . 1340 \@show@album . 970, 974 \@tindextrue . . . . . 784 \@notfirstfalse . . \@show@city . . 865, 867 \@tournamentfalse 858, 872, 1124, \@show@computerfalse ...... 152, 1107 1173, 1182, 1333 ...... 761 \@tournamenttrue . \@notfirsttrue 865, \@show@computertrue ...... 606, 1087 1167, 1306, 1314 ...... 170, 757 \@twins . . . . . 694, 696 \@numberfalse 141, 1105 \@show@figurine . . \@twinsfalse . 159, 1109 \@numbertrue . 559, 1076 ...... 476, 1145 \@twinskip 979, 987, 990 \@outer@hrule .... \@sindex 275, 466, 1926 \@twinstrue . . 697, 1094 . . 1837, 1852, \@sindexfalse . . . . 203 \@typisfalse . . . . . 174 1854, 1856, 1858 \@sindextrue . . . . . 778 \@typistrue ...... 255

54 \@vGrid . . . . . 1432, \authorfont 483, 848, \city ...... 5, 569 1435, 1500, 853, 1164, 1173 \city@tk ...... 1519, 1531, 1734 \authorindex . . 13, 787 110, 570, 873, \@versionfalse 155, 1108 \award ...... 5, 609 1078, 1183, 1278 \@versiontrue 614, 1090 \award@tk ...... \cityfont 483, 872, 1182 \@vframefalse .... 120, 610, 955, \cl@arsol 764, 1343, 2030 . . . . 725, 729, 733 1088, 1233, 1288 \clear@board ..... \@vframetrue ...... 36 \awardfont ...... 1560, 1659, \@widediasfalse 175, 766 483, 942, 955, 1711, 1747, 1767 \@widediastrue . . . 765 1229, 1233, 1237 \Co ...... 704 \@write@christian \CodelineIndex ..... 6 B . . . . . 1319, 1323 \comment ...... 5, 716 \b@cnt . . . 55, 1994, \@write@short 1326, 1331 \comment@tk 129, 717, 1996, 2013, 2015 \@write@sol . 1269, 1271 1096, 1134, 1296 \baselineskip 381, 1677 \@writename ...... \computer@tk . . 130, \bd@width . . . . . 89, . . 859, 1126, 1304 705, 1095, 1295 288, 299, 314– \@yearfalse . . 149, 1106 \cond ...... 5, 744 316, 321, 322, \@yeartrue . . 594, 1084 \condition . 5, 686, 749 328, 335, 343, \condition@tk . 138, 1714, 1749, 1769 690, 1056, 1253 \below@newline . . . \ 388, 424, 426, 546, \correction ...... 621 . . . . 185, 841, 799, 865, 912, \correction@tk . . . 987, 990, 994, 914–916, 945, 123, 622, 933, 998, 1004, 1012, 979, 1176, 1184, 1091, 1191, 1291 1017, 1026, 1188, 1191, \cpd@checkNeutral 1042, 1058, 1069 1195, 1201, \bf ...... 1117 ...... 647, 650 1204, 1229, \board@width . . . 88, \cpd@nextproc .... 1233, 1237, 289, 300–302, 649, 652, 654, 656 1249, 1253, 315, 317–319, \cpd@stepcounterBlack 1257, 1262, 328–332, 338, ...... 67, 1353 1267, 1305, 341, 344–346, \cpd@stepcounterNeutral 1338, 1585, 351, 358, 386, ...... 68, 1350 1612, 1718– 396, 398, 407, 434 \cpd@stepcounterPieces 1721, 1752, 1772 \boardfont 483, 1585, 69, 1347, 1350, 1612, 1718– 1353, 1369, 1407 A 1721, 1752, 1772 \cpd@stepcounterWhite \addtocounter .... \brd@ff . 84, 1580, 1607 ...... 66, 1347 . 1571, 1573, 1599 \current@plane . 52, \after ...... 617 C 218, 1406, \after@tk ...... \c@board@nr . . 536, 551 1419, 1431, 121, 618, 882, \centering . . 383, 553 1454, 1515, 1089, 1188, 1289 \ch@cklst . . 1442, 1443 1567, 1583, \any ...... 12, 537 \ch@fig ...... 794, 1610, 1698, \arabic . . . . . 426, 427 797, 802, 805, 1701, 1702, \AtBeginDocument . 808, 811, 814, 1717, 1726, ...... 14–16 1239, 1889, 2011 1731, 1741, \aut@tk . . 109, 566, \chessfont 286, 494, 1744, 1751, 855, 860, 1077, 497, 506, 509, 1752, 1756, 1122, 1127, 518, 521, 799, 1762, 1771, 1175, 1277, 1919 800, 1676, 2039 1772, 1776, 1777 \auth@rfalse . 143, 1105 \chkr@tate . 1374, 1377 \auth@rtrue . . 566, 1077 \chtextfont ...... D \author .... 4, 246, 495, 498, 507, \day ...... 5, 247, 261, 444, 452, 2031 510, 519, 522, 1891 262, 445, 453, 2032

55 \day@tk 113, 582, 898, \ds@knight ...... \fieldframe@tk . . . 1081, 1207, 1281 . 1362, 1947, 1999 . . . 132, 679, 1640 \dedic ...... 5, 744 \ds@label 250, 448, 562 \fieldtext 11, 665, 1642 \dedic@tk ...... \ds@labelfalse . . . 563 \fieldtext@tk .... 124, 626, 964, \ds@labeltrue . . . . 563 . . . 135, 666, 1646 1092, 1237, 1292 \ds@left 1379, 1951, 1961 \figcnttrue . . . . . 2022 \dedication . 5, 625, 747 \ds@month 248, 446, 585 \figurine ...... 441 \dedicfont 483, 882, \ds@neutral ...... figurine (environ- 890, 933, 964, . 1348, 1942, 1981 ment) ...... 10 1188, 1191, 1195 \ds@pawn . . . 1947, 1997 \fontdimen ...... \defaultelchfont . \ds@queen ...... 286, 1891, 2039 . . . 481, 527, 2020 . 1365, 1946, 2005 \from@month . . . 114, \DefinePieces .... \ds@right ...... 586, 896, 898, . . . 12, 790, 2036 . 1380, 1951, 1963 900, 1082, \develop ..... 13, 752 \ds@rook 1364, 1946, 2003 1206, 1208, \di@nofalse ...... 548 \ds@upsidedown . . . 1215, 1282, 1303 \di@notrue ...... 550 . 1378, 1951, 1965 \further ...... 537 \dia@above . . 391, 815 \ds@white . . . . 793, \futurelet 647, 1374, \dia@below . . 411, 828 799, 801, 807, 1384, 1442, 1476 \dia@box ...... 1345, 1942, 1979 G 74, 378, 414, 1269 \ds@xlabel . . 563, 1543 \get@current@square@value \dia@index . . 1908, \ds@year . 249, 447, 593 1911, 1924, 1933 ...... 1401, \dia@lineskip . . 86, E 1409, 1421, 1592 \get@plane@stereo 381, 500, 512, 524 \e@list . 641, 1111, . . . . . 1476, 1478 \dia@type ...... 1239, 1309, \get@text . . 1359, 1452 . 28, 501, 513, 525 1322, 1329, \getc@lor . . 1344, 1451 \diagcenter . 6, 553, 765 1333, 1386, \getpi@ce . . 1356, 1361 \diagleft . 6, 553, 2029 1441, 1444, \grid@width ...... \diagnum 7, 536, 550, 2021 1451, 1452, 1624 93, 1137, 1502, \diagnumbering . . . \elchfont . 23, 481, 1503, 1510, 1511 .... 7, 549, 2027 493, 505, 517, 2018 \gridchess .... 6, 744 \diagram ...... 206 \EnableCrossrefs ... 5 \gridlines . . . 11, 674 diagram (environ- \enddiagram 260, 439, 440 \gridlines@tk .... ment) ...... 4 \endfigurine . . . . . 451 . . . 133, 675, 1652 diagram[] (environ- \endspacediagram . 440 ment) ...... 7 \endstereodiagram 439 H 7 \diagramx , 14, 492, 529 environments: \h@frame@dist .... \diagramxi 7, 15, 492, 530 diagram ...... 4 . 98, 290, 291, \diagramxii ...... diagram[] ...... 7 301, 304, 305, . . 7, 16, 492, 531 figurine ...... 10 318, 345, 1142, \diagright .... 6, 553 spacediagram[] . 8 1867, 1883, 2041 \dianamestyle . . 6, 534 stereodiagram . . 8 \h@space@dist .... \do@dia@job . . 415, 1269 \ExecuteOptions . . . 17 . . . . 101, 323, \dotfill ...... 1905 324, 326, 329, \ds@author 246, 444, 562 F 331, 1763, 1775 \ds@bishop 793, 796, \f@ur 21, 1365, 1489, \he@dpos . 391, 553–555 1363, 1947, 2001 1706, 1707, \head@width 90, 349, \ds@black 793, 796, 1733, 1734, 1970 351, 382, 397, 406 800, 804, 810, \fidealbum ...... 629 \help@a ...... 71, 1351, 1942, 1983 \fidealbum@tk .... 1074, 1100, \ds@day . . 247, 445, 581 . . . . 125, 630, 974 1110, 1239, \ds@king 1366, 1946, 2007 \fieldframe 11, 678, 745 1346, 1349,

56 1352, 1362– \if@left ...... 82, \ifnormal@names 179, 1366, 1370, 1010, 1016, 1020 854, 1121, 1916 1378–1380, \if@nofields . 166, 1667 \ifs@lu . . . . . 180, 1272 1411, 1413, \if@notfirst ..... \ifspace@vertical 1528, 1530– . . . . 182, 865, ...... 42, 1532, 1534, 1167, 1306, 1314 313, 1783, 1866, 1536–1538, \if@number 141, 266, 457 1870, 1876, 1882 1956, 1969, \if@pages 151, 916, 1224 \ifx@cond ...... 1987, 2011, 2014 \if@pieces ...... 177, 833, 989, 1051 \help@b ...... 72, . . 164, 1242, 1661 \ifx@twins ...... 1579, 1580, \if@remark ...... 176, 836, 986, 1035 1596, 1597, . . 173, 1063, 1267 \ignorespaces . . 34, 1600, 1606, \if@shortform .... 251, 257, 546, 1607, 1618–1620 . . . 40, 1323, 1330 560, 567, 571, \hfil 434, 1019, 1697, \if@show@computer 575, 579, 583, 1715, 1723, . . . 170, 423, 1261 587, 591, 595, 1727, 1740, 1757 \if@sindex . . 203, 1927 599, 603, 607, \horizontalcylinder \if@solafterdiagram 611, 615, 619, ...... 6, 10, 736 ...... 33, 840 623, 627, 631, \if@source 146, 909, 663, 667, 671, I 944, 1199, 1927 676, 680, 684, 691, 698, 702, \if@after 154, 880, 1188 \if@sourcenr ..... 706, 710, 714, \if@aindex . . 202, 1915 . . . 145, 912, 1201 718, 722, 726, \if@award 153, 953, 1233 \if@space ...... 730, 734, 738, \if@city 144, 870, 1181 201, 303, 1807, 742, 754, 758, 762 \if@comment . . 163, 1134 1819, 1841, 1853 \Imi ...... 12, 814 \if@computer ..... \if@special ...... 142 \imitatorfalse . . . 178 . . . 161, 424, 1262 \if@stdgrid . . 169, 1633 \init@vars 245, 443, 1548 \if@condition .... \if@stereo . . . 200, \inner@frame . . . 94, . . 172, 1047, 1253 287, 1582, 1609, 299, 300, 316, \if@correction . . . 1654, 1805, 317, 322, 343, . . . 156, 931, 1191 1817, 1839, 1851 344, 1138, \if@date ...... \if@stipulation . . 1791, 1793, 147, 914, 920, 944 171, 830, 982, 1249 1799, 1801, \if@day ...... \if@textproblem . . 1810, 1822, 2040 148, 897, 903, 1205 . . . . 30, 356, 399 \inner@h@frame@rule \if@dedication . . . \if@theme . . . 160, 1937 . . . . . 1816, 1831 . . . 157, 962, 1237 \if@tindex . . 204, 1937 \inner@henbox .... \if@develop . . . 181, \if@tournament . . . . . 1693, 1716, 387, 1132, 1899 152, 920, 940, 1229 1750, 1770, 1828 \if@fidealbum 158, 973 \if@twins 159, 1031, 1257 \inner@v@frame@rule \if@fieldframe 168, 1637 \if@typis ...... 174 . 1804, 1830, 1832 \if@fieldtext 165, 1643 \if@version ...... \isodd ...... 1568 \if@first ...... 183 . . . 155, 888, 1195 \issue ...... 5, 597 \if@gridlines 167, 1649 \if@vframe 36, 1790, 1844 \issue@tk ...... \if@hframe 37, 1798, 1856 \if@widedias . 175, 348 117, 598, 915, \if@issue 150, 915, 1223 \if@year 149, 905, 1203 1085, 1223, 1285 \if@judgement 162, 1132 \ifauth@r 143, 851, \if@label . . . . 140, 1120, 1172, 1918 J 280, 387, 472, 1118 \ifdi@no ...... 45 \jobname . . . . 764, 1343 \if@leaveOuter . . . \ifds@label . . 205, 1547 \judgement .... 5, 720 . . . . 38, 1809, \iffigcnt ...... 47 \judgement@tk .... 1821, 1843, 1855 \ifimitator ...... 178 . . . . 128, 721,

57 1097, 1132, 1297 \maketindex . . . 13, 781 \outer@h@frame@rule \month ..... 5, 248, . 1850, 1863, 1887 L 263, 446, 454, 2033 \outer@henbox 402, 1862 \l@@k . 1384, 1416, 1663 \months ...... 5, 589 \outer@v@frame@rule \l@@klist . . . . 867, . 1838, 1865, 1885 1006, 1027, N 1101, 1111, \n@cnt . . . 56, 1955, P 1168, 1304, 1958, 1968, 1970 \p@rseauthor . . . . 1468 1316, 1333, \n@xt ...... 647, 651 \p@rseauthor@figurine 1428, 1439, \name@sep . . . . 857, . . . . . 1166, 1174 1442, 1451, 1125, 1305, 1306 \p@rsecity 867, 873, 1183 1452, 1466, \newcommand . 66–68, \p@rsepieces ..... 1468, 1524, 483–492, 504, 516 . 1243, 1451, 1662 1624, 1911, 1933 \nextlist . . 1442, 1444 \p@rsetext . 1452, 1644 \label ...... 7 \nextpr@c . . . 1378– \pages ...... 5, 601 \label@tk 106, 271, 1381, 1387, \pages@tk ...... 281, 388, 462, 1389, 1391, 118, 602, 916, 473, 1075, 1118, 1445, 1447, 1449 1086, 1224, 1286 1275, 1544, \nocomputer .... 7, 760 \parse@aindex 1910, 1919 1911, 1924, 1933 \nodiagnumbering . 548 \parse@params 1073, 1111 \labelfont 388, 483, 1900 \nofields ...... \parse@tindex \leftrightarrow . . 538 10, 669, 673, 1666 1932, 1938 \lin@ . . . . 50, 1408, \nofields@tk ..... \parsefi@lds 1384, 1385 1420, 1432– . . . 131, 670, 1670 \piece@job . . 1244, 1437, 1456, \noframe . . . 6, 10, 724 1381, 1383, 1663 1470, 1480, \noinnerframe 6, 10, 728 \piececounter ..... 7 1483, 1486, \normal@namesfalse \pieces ...... 4, 633 1489, 1557, ...... 179, 768 \pieces@tk . . . 134, 1578, 1590, \normal@namestrue 767 662, 1245, 1664 1598, 1601, \normalboardwidth \pl@ne ...... 51, 1605, 1620, 1621 . 2037, 2039–2042 217, 1406, 1419, \lines@max . . . 189, \normalnames . . . . . 767 1431, 1454, 212, 237, 314, \nosquares . . . 10, 673 1480, 1483, 321, 335, 336, \nowidedias ...... 766 1486, 1489, 338, 1530, \number@tk . . . 108, 1492, 1499, 1515 1537, 1601, 559, 1076, 1119 \plane@box 104, 1527, 1621, 1679, 1540, 1626, 1681, 1703, 1706 O 1628, 1673, \lineskip ...... 1677 \OO ...... 12, 537 1674, 1693, \loop@color . 1967, 1974 \OOO ...... 12, 537 1716, 1732, \loop@piece . 1985, 1992 \orig@author ..... 1735, 1750, 1770 \loop@rotation 792, 1953 . . . 261, 452, 2031 \plane@char ...... \lra ...... 12, 537 \orig@day 262, 453, 2032 . . 1476, 1479, \orig@label ...... 1482, 1485, 1488 M . . . 265, 456, 2035 \plane@job ...... \m@ne ...... 431, \orig@month ...... 1474, 1492, 536, 1410, 1422, . . . 263, 454, 2033 1497, 1499, 1425, 1436, \orig@year 264, 455, 2034 1639, 1645, 1471, 1593, \outer@frame 95, 296, 1651, 1663, 1669 1596, 1618, 297, 302, 310, \planes@max 191, 239, 1684, 1701, 1744 311, 319, 332, 330, 1741, 1777 \magic ...... 744 346, 1139, 1140, \put@count . . 410, 419 \makeaindex . . . 13, 769 1835, 1837, \put@line ...... \makesindex . . . 13, 775 1844, 1856, 2042 . 1604, 1682, 1683

58 \put@plane ...... \rows@max 190, 213, \solution . . 5, 708, 751 . . 1631, 1691, 238, 1531, 1536, \source ...... 5, 577 1712, 1748, 1768 1678, 1704, 1707 \source@tk . . . 112, \put@row . . . 1577, 1685 578, 913, 1080, \put@sqs ...... S 1202, 1280, 1928 219, 226, 240, 366 \s@lfd ...... 184, \sourcefont ...... \put@sqs@normal . . 764, 1273, 1343 483, 911, 922, 1200 ...... 219, 1690 \s@lufalse . . . . . 1549 \sourceindex . . 13, 788 \put@sqs@space 240, 1782 \s@lutrue ...... 709 \sourcenr ..... 5, 573 \put@sqs@space@horizontal\selectelchfont 7, 480 \sourcenr@tk ...... 1760, 1786 \sep@names . 1304, 1306 111, 574, 912, \put@sqs@space@vertical \set ...... 12, 537 1079, 1201, 1279 . . . . . 1739, 1784 \set@current@square@index\space@frame 96, 296, \put@sqs@stereo . . . . 1394, 1408, 297, 310, 311, 1140 ...... 226, 1696 1420, 1566, 1590 \space@frame@dist \putsol ...... 764 \set@current@square@value . . . . . 99, 294, ...... 1397, 295, 308, 309, 1143 R 1411, 1413, \space@horizontal 1342 \r@tate 1374, 1378–1380 1425, 1569, 1570 \space@vertical . 1341 \r@w . . . . . 49, 1408, \set@frame . 1430, 1639 \space@verticalfalse 1420, 1432, \set@nofield 1418, 1669 ...... 43, 1342 1433, 1435– \set@piece . 1405, 1663 \space@verticaltrue 1437, 1455, \set@text . . 1453, 1645 . . . . . 1341, 2026 1471, 1480, \setboardwidth . . . \spacediagram . . . . 230 1483, 1486, 1489 . . . . . 2038, 2045 spacediagram[] (envi- \ra ...... 12, 537 \setcounter . . 214– ronment) . . . . 8 \raggedleft ...... 555 216, 645, 646, \spacehorizontal . . 43 \raggedright ..... 659, 1395, 1402, \spacelayout . . 10, 547 360, 388, 409, 554 1551–1556, \specialdiagnum 5, 557 \read@plane 220, 227, 1562, 1564, 1567 \split@param 1104, 1270 241, 1472, 1650 \setmonthstyle . 7, 556 \sq@box ...... 103, \read@plane@normal \sGh ...... 12 357, 358, 366, ...... 220, 1474 \sh@wauthor . . . . . 1468 400, 402, 1692, \read@plane@space \short@christian . 1697, 1740, 1761 ...... 241, 1499 . . . . . 1313, 1333 \sq@width . . . . . 91, \read@plane@stereo \show@squares 1239, 1244 286, 288–291, ...... 227, 1476 \showcomputer . . . . 756 304, 305, 314, \read@square ..... \showlabel . 1118, 1898 321, 323, 324, . . 1359, 1389, \showtypis ...... 254 326, 335, 338, 1469, 1638, 1668 \sim ...... 545 341, 1011, \rem ...... 5, 744 \skip@plane ...... 1019, 1455– \remark .... 5, 700, 750 . . 1481, 1484, 1458, 1501– \remark@tk . . . 139, 1487, 1490, 1497 1503, 1508– 701, 1067, 1267 \skipr@t 1378–1380, 1383 1510, 1585, \remfont . . . . . 483, \slash ...... 865 1589, 1612, 1616 1034, 1050, \sloppy ...... 361 \ssL ...... 11 1066, 1253, 1257 \slshape ...... 484 \stdgrid . . . . 740, 744 \reversednames 768, 772 \sNr ...... 11 \stepcounter . . . 66–68 \Rightarrow ...... 546 \sol ...... 5, 744 \stereo@center . . . \rightarrow ...... 537 \sol@tk 107, 709, 842, . . . . . 1655, 1730 \rla ...... 537 1098, 1133, 1298 \stereodiagram . . . 223 \rlap . . 1674, 1718– \solafterdiagram . . 34 stereodiagram (envi- 1721, 1752, 1772 \solhead 1270, 1274, 1299 ronment) . . . . 8 \roman . . . . . 1399, 1403 \solnamestyle . . 6, 535 \stip ...... 4, 744

59 \stipfont 359, 483, 1486, 1489, 1978, 1986, 1988 984, 1249, 1267 1528, 1532, \wF . . 1594, 1596, 1618 \stipulation 4, 682, 748 1534, 1538, \wGh ...... 11 \stipulation@tk 137, 1733, 1734, \whatsnext . 1384, 1386 362, 683, 985, 1249 1891, 2039–2042 \whiledo . . . 1563, 1565 \swL ...... 11 \twins ...... 5, 693 \widedias ..... 6, 765 \twins@tk ...... \wNr ...... 11 T 127, 697, 1040, \write@christian . \text@tk 136, 1359, 1460 1094, 1257, 1294 . 1321, 1336, 1905 \textproblem ...... 31 \typis@tk . . . 105, 256 \write@month ..... \thediag . 551, 559, 556, 898, 900, 848, 1164, 1276 V 902, 1208, 1210, \theme@tk 126, 713, \v@frame@dist .... 1215, 1217, 2028 1093, 1293, 1938 . 97, 295, 309, \write@short 1328, 1338 \themeindex . . . 13, 789 1141, 1871, 1877 \write@twins ..... \themes ...... 5, 712 \v@space@dist ...... 1005, 1009, \thr@@ 1364, 1486, 1988 . . . . 100, 293, 1038, 1054, 1066 \times ...... 540 307, 1144, 1699, \to@month . . . . 115, 1725, 1742, X 902, 1083, 1209, 1755, 1873, 1879 \x ...... 12, 537 1210, 1216, \value 216, 369, 371, \x@condfalse . 177, 997 1217, 1283, 1303 373, 427, 1395, \x@condtrue ...... 687 \topdist . . . . . 79, 385 1410, 1412, \x@pieces . . . 635, 638 \tourn ...... 744 1422, 1424, \x@sindex . . 1924, 1928 \tournament . 5, 605, 746 1563, 1565– \x@twinsfalse 176, 996 \tournament@tk . . . 1568, 1593, 1595 \x@twinstrue . . . . . 694 119, 606, 943, \version ...... 613 \x@write@twin .... 1087, 1229, 1287 \version@tk ...... 1002, 1036, 1052 \tw@ . . . . . 286, 299– 122, 614, 890, 302, 316–319, 1090, 1195, 1290 Y 322, 332, 343– \verticalcylinder \year ...... 5, 249, 346, 394, 524, ...... 6, 10, 732 264, 447, 455, 2034 525, 1116, 1141, \year@tk ...... 1142, 1363, W 116, 594, 905, 1480, 1483, \w@cnt . . . 54, 1976, 1084, 1221, 1284

Change History v0.1 documentation...... 1 General: First Version ...... 1 v0.5 v0.2 General: Fixed wrong piece count General: Added the documenta- when using imitators ...... 1 tion for the information col- v0.6 lecting macros which may be used inside a environment. . . . 1 General: Changed errneous code v0.3 to parse given piececount. . . . 1 General: Added list of commands v1.5 which should not be indexed. . 1 General: Added license meta- v0.4 comment to publish package General: Added most missing user onctan...... 1

60