A L^{A}TEX Package for Typesetting Crossword Puzzles^{∗}

Gerd Neugebauer Mainzer Straße 8 56321 Rhens (Germany)

         Net: gerd@informatik.uni-koblenz.de

Documentation date: 1996/11/25

Abstract

cpwuzzle.dtx provides a package to typeset crossword puzzles. There is an graphical user interface written in Tcl/Tk which does most of the work in creating a file which is conform with this style. Thus it is clear that the macros provided are not tailored towards a human user.

The package can be used to produce several types of puzzles like the classical crossword puzzle, a number puzzle, and fill-in puzzles.

Contents

1 About Crossword Puzzles 2 1.1 Classical Crossword Puzzles . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Number Crossword Puzzles . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Fill-In Crossword Puzzles . . . . . . . . . . . . . . . . . . . . . . . 2 1.4 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Input of Crossword Puzzles 3

3 Parameters and Options 6

4 The Related Program 7

5 Further Plans 7

6 The Implementation 8 6.1 Basic Definitions and Parameters . . . . . . . . . . . . . . . . . . . 8 6.2 The Frame of the Crossword Puzzle . . . . . . . . . . . . . . . . . 8 6.3 Clues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 6.4 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

∗This file documents cwpuzzle.dtx version 1.4 as of 1996/11/25.

1 About Crossword Puzzles

Crossword puzzles are can be a an amusing but also a challenging hobby. Unfortunately at the time of this writing I am not aware of any good package to typeset crossword puzzles with L^{A}TEX. Thus I decided to make one which at least fits my needs.

There are several types of crossword puzzles aroung. This package can only be used to typeset several of them. The basic assumption in this package is that puzzles are rectangular arragnements of boxes. Some of these boxes are black and others are prepared to take single letters. Each word in the grid is enclosed in black boxes or the outside.

Optionally there may be rectangular regions left blank inside the puzzle. They can be used to place ads or other informative texts inside the puzzle.

1.1 Classical Crossword Puzzles

1^{2}  ^{3}  ^{4}^{5}  Across 1 unit of measure 2 ∗ 5 sectioning unit Down 1 η 3 unit of mea- sure 4 nonproportional font

The “classical” type of a crossword puzzle words are marked with numbers and each word is acomapanied with a clue which should help (or confuse) the reader. Those clues are listed after the frame of the puzzle.

1.2 Number Crossword Puzzles

6  1 5  2  7  7 4  5  3  7

The following letters are used: AEPRSTX

1  2  3  4  5  6  7

The “number puzzle” variant contains only numbers instead of letters. Different numbers denote different letters. There are no clues. The reader is assumed to find a complete list of letters by filling appropriate words into the grid. Sometimes a word is already entered into the grid to ease the start.

1.3 Fill-In Crossword Puzzles

Words of length 2: EX SP TT Words of length 3: AST ETA Words of length 4: PART

The “fill-in puzzle” variant consists of a frame containing only black and white boxes. Additionally a list of words is given which have to be put into the frame until none is left and the frame is completed.

1.4 Solutions

E X A S T  T P A R T

Often it is not only desirable to typeset the unsolved crossword puzzle but also the solution. This means that all the letters have to be filled in. This should be possible with the same source as the questions to avoid typos or redundancies leading to additional work.

Several variants of solutions come to mind. Primarily the solution should show the letters and suppress any clues. One major distinction is also wether or not the numbers of the words should be shown in the solution as well.

E^{1}  X A^{2}  S^{3}  T  T^{4} P^{5}  A R T

Finally there are the lists of letters in numbered puzzles. In the solution they will show the letters in them as well.

E X A S T  T P A R T

The following letters are used: AEPRSTX

X S R P A E T

2 Input of Crossword Puzzles

The basic idea behind this package is that a crossword puzzle is specified in a seperate file. The actual appearance of the puzzle is controlled by several options. Thus it should be possible to produce the unsolved and the solved puzzle from the same source. Before we describe the various options we will have a look at the basic environments and macros used to specified a crossword puzzle.

Puzzle This package provides the environment Puzzle which typesets the frame of a crossword puzzle. This environment takes two arguments. These arguments are the number of columns and the number of the rows of the puzzle. This means that essentially only rectangular puzzles can be typeset.

The example from section 1.1 has been entered as follows:

    \begin{Puzzle}{5}{3}%
      |*   |*   |[1]E|X  |*   |.
      |[2]A|[3]S|T   |*  |[4]T|.
      |*   |[5]P|A   |R  |T   |.
    \end{Puzzle}

In this example we can see that inside the Puzzle environment there is one special character. This is the bar |. This bar is an activge character in TEX. Thus you can think of it like a macro.

The | macro takes two arguments. The first argument is optional, i.e. enclosed in brackets if present. This optional argument denotes the number for numbered boxes.

The second argument is either empty {} or it consists of a single character. This argument describes the action to be performed.

• If this argument is a letter then it is simply shown in the solution and suppressed in the unsolved crossword puzzle.

• If this argument is an asterisk * then a black box is produced.

• If this argument is a dot . then this marks the end of the current row. The next box is typeset at the beginning of the following row.

• If this argument is empty {} then a white box is typeset. This box does not contain a letter, nor does it have a frame. This macro can be used to leave room for larger boxed with ads. Alternatively this can be used to disable certain boxes to make a non-rectangular crossword puzzle.

    \begin{Puzzle}{5}{5}
      |{}  |{}  |[1]S|.
      |{}  |[2]M|I   |[3]D|.
      |[4]T|I   |M   |E   |S   |.
      |{}  |[5]N|E   |G   |.
      |{}  |{}  |Q   |.
    \end{Puzzle}

1^{2}  ^{3}^{4}  ^{5}  Across: 2 | 4 × 5 ¬  Down: 1 ≃ 2 loglike function 3 loglike func- tion

Note that whitespace is ignored after the arguments but not between the bar and the arguments.

\Frame The macro \Frame can be used to typeset ads or other text into larger boxes inside the frame of the crossword puzzle. For this purpose five arguments are required. The first two arguments are used to specify the leower left corner of the frame. The lower left corner has the coordinates 0,0 and the numbers increase upwards and to the right.

The third argument is the width of the frame and the fourth argument is the height of the frame measured in number of boxes. Finally, the fifth argument contains the text to be typeset. Per default it is typeset in a minipage of the appropriate width centered horizontally and vertically.

    \begin{Puzzle}{8}{6}
      \Frame{2}{2}{4}{2}{\sf Crossword\\Puzzle}
      |[1]E|*   |[2]N |U    |L   |[3]L |*   |[4]V|.
      |[5]T|[6]R|I    |A    |N   |G    |[7]L|E   |.
      |A   |U   |{}   |{}   |{}  |{}   |[8]C|C   |.
      |*   |L   |{}   |{}   |{}  |{}   |E   |*   |.
      |[9]B|E   |T    |[10]A|*   |[11]L|I   |M   |.
      |F   |*   |[12]L|A    |B   |E    |L   |*   |.
    \end{Puzzle}

Crossword Puzzle^{1}  ^{2}  ^{3}  ^{4}^{5}  ^{6}  ^{7}^{8}^{9}  ^{10}  ^{11}^{12}  Across: 2 empty 5 △ 8 carbon copy (letter.sty) 9 β 11 limes 12 mark it Down: 1 η 2 ∋ 3 logarithm 4 6 black rectangle 7 ⌈ 9 bold face 10 Å 11 ≤

PuzzleClues The clues in the classical crossword puzzle are typeset with the use of the environment PuzzleClues. This environment takes one argument which is typeset before the clues. The environment takes roughly the half of the textwidth and make a minipage with this width. Thus two invocations of this environment are typeset side by side.

Alternatively if the solution is typeset then the environment PuzzleClues has no effect.

    \begin{PuzzleClues}{\textbf{Across}}%
      \Clue{1}{EX}{unit of measure}%
      \Clue{2}{AST}{\(\ast\)}%
      \Clue{5}{PART}{sectioning unit}%
    \end{PuzzleClues}%
    \begin{PuzzleClues}{\textbf{Down}}%
      \Clue{1}{ETA}{\(\eta\)}%
      \Clue{3}{SP}{unit of measure}%
      \Clue{4}{TT}{nonproportional font}%
    \end{PuzzleClues}%

Clue The environment PuzzleClues defines one local macro. This macro is named \Clue and takes three arguments. The first argument is the number of the word. This should correspond to the number in the puzzle frame. The second argument is the word itself. Currently this not used at all. Finally the third argument is the clue for the word.

If the unsolved puzzle is typeset then the first and the third argument are used. Otherwise all arguments are silently absorbed.

\PuzzleLetters The macro \PuzzleLetters can be used to typeset the list of used letters in numbered crossword puzzles. It has one argument which are the used letters (preferably in alphabethical order.

\PuzzleNumbers The macro \PuzzleNumbers can be used to generate a numbered list of boxes for the numbered crossword puzzles. The user is supposed to collect the found letters here.

PuzzleWords The environment PuzzleWords can be sued to typeset the list of words for a fill-in puzzle. It takes one argument. This is the length of the words listed. For each length there should be an invocation of this environment. The words in this environment are supposed to be ordered alphabetically.

\Word The macro \Word is defined inside the environment PuzzleWords. It takes one argument which is the word itself.

    \begin{PuzzleWords}{2}
      \Word{EX}%
      \Word{SP}%
      \Word{TT}%
    \end{PuzzleWords}%
    \begin{PuzzleWords}{3}
      \Word{AST}%
      \Word{ETA}%
    \end{PuzzleWords}%
    \begin{PuzzleWords}{4}
      \Word{PART}%
    \end{PuzzleWords}%

3 Parameters and Options

\PuzzleUnitlength The length \PuzzleUnitlength deternimes the width and height of each single

box in the frame of a crossword puzzle. The default value is 20pt.

\PuzzleBlackBox The macro \PuzzleBlackBox contains the commands to produce the black boxes. It has to produce at most of width and height of \PuzzleUnitlength. Per default it just produces a black rectangle of this size.

The following list shows some variants which can be achieved by redefining the

macro \PuzzleBlackBox.
            \renewcommand{\PuzzleBlackBox}{\rule{.75\PuzzleUnitlength}%
                                                {.75\PuzzleUnitlength}}
            \renewcommand{\PuzzleBlackBox}{\framebox(.75,.75){%
                                             \framebox(.5,.5){}}}

Additional effects can be achieved by using shades of gray (with the graphics package).

\PuzzleFont The macro \PuzzleFont contains the font changing command issued before

the frame of the crosword puzzle.

\PuzzleNumberFont The macro \PuzzleNumberFont contains the font changing command issued

before a number in the frame of the crosword puzzle is typeset.

\PuzzleClueFont The macro \PuzzleClueFont contains the font changing command issued be-

fore the clues are typeset.

\PuzzleWordsText The macro \PuzzleWordsText contains the text which is typeset at the beginning of the environment PuzzleWords. It has one argument which contains the length of the words listed.

\PuzzleLettersText The macro \PuzzleLettersText contains the text which is typeset at the beginning of the macro PuzzleLetters.

\PuzzleSolution The macro \PuzzleSolution arranges everything that the following puzzles are typeset in the “solution” mode, i.e. the letters are shown and the clues are suppressed.

This macros has one optional argument which has to be true or false. This argument determines whether or not the numbers should also be shown in the solution. The default is false which means that the numbers are suppressed in the solution.

\PuzzleUnsolved The macro \PuzzleUnsolved arranges everything that the following puzzles are typeset in the “unsolved” mode, i.e. the letters are suppressed and the clues are shown.

\PuzzleHook The macro \PuzzleHook is called at the end of the Puzzle environment. It

can be used to place additional graphical elements in the puzzle frame.

The following example shows a crossword puzzle which we have seen before and the definition for the \PuzzleHook.

[figure: 1; 2; 3; 4; 5]

                                  \newcommand\PuzzleHook{
                                    \put(0,2){\line(1,-1){2}}
                                    \put(0,3){\line(1,1){2}}
                                    \put(5,2){\line(-1,-1){2}}
                                    \put(5,3){\line(-1,1){2}}
                                  }

4 The Related Program

There is a related program written in Tcl/Tk. This program can be used to manually construct crosswrod puzzles and save them in a format suitable for this package. Alternativly it can also store the crossword puzzle prepared for

crosswrd.sty.

Other features include the creation of a proper frame and filling with words. Right now I have not prepared a distribution of this program yet since this

program requires dictionaries which I can not distribute legally.

The examples in this documentation have been computed with the help of the cwp program.

5 Further Plans

Maybe I will add a mode for further variants of crossword puzzles sometimes.

6 The Implementation

The crossword puzzle is basically implemented with the L^{A}TEX picture environment. This gives us enough flexibility and provides an high enough abraction such that we do not have to fiddle around with to many low level details.

The natural unit in a crossword puzzle is a box which is empty or black. Thus the unitlength is set to the width (and height) of such a box.

6.1 Basic Definitions and Parameters

First we identify this package.

 1 \ProvidesPackage{cwpuzzle}[\filedate gene]

The dimen register \PuzzleUnitlength stores the height and width of a box of the puzzle. The default is 20pt which is also shown in this documentation.

 2 \newdimen\PuzzleUnitlength
 3 \PuzzleUnitlength=20pt

\PuzzleClueFont The macro \PuzzleClueFont contains font changings commands issued before the clues are typeset.

 4 \newcommand\PuzzleClueFont{\footnotesize}

\PuzzleFont The macro \PuzzleFont contains font changings commands issued before the puzzle is typeset.

 5 \newcommand\PuzzleFont{\rm\normalsize}

\PuzzleNumberFont The macro \PuzzleNumberFont contains font changings commands issued before the numbers in a puzzle are typeset.

 6 \newcommand\PuzzleNumberFont{\sf\scriptsize}

\PuzzleHook Puzzles are typeset with the L^{A}TEX picture environment. At the end of this environment the macro \PuzzleHook is called. The package prodised an empty default. Users may want to use this place to typeset additional elements on top of the puzzle.

The puzzle uses a \unitlength of \PuzzleUnitlength. Thus it is rather easy to adress the boxes in the puzzle.

 7 \let\PuzzleHook=\relax

6.2 The Frame of the Crossword Puzzle

To describe the coordinates where the next box should be typeset we need two counters for the coordinates. These counters are now allocated (even though we could use temporary counters from L^{A}TEX).

 8 \newcount\Puzzle@X
 9 \newcount\Puzzle@Y
10 \begingroup
11 \catcode`\|=13
12 \gdef\Puzzle@@solution{
13 \let|=\Puzzle@Box@@solution
14 \let\Frame=\Puzzle@Frame@@solution

15 }

16 \gdef\Puzzle@@normal{
17 \let|=\Puzzle@Box@@normal
18 \let\Frame=\Puzzle@Frame@@normal

19 }

20 \endgroup

Puzzle The environment Puzzle typesets the frame of a crossword puzzle. It is implemented utilizing a picture environment. The unilength is set to the \PuzzleUnitlength. Thus the navigation is faily easy. The basic unit is width and height of a single box.

The macros which are local to the environment are activated. Thus we avoid collisions with other packages where the same macro names might be used.

Finally the counter which contain the x and the y coordinate have to be initialized.

The last action in the picture environment is the expansion of the macro \PuzzleHook. This can be used to include additional material in the picture environment. Primarily I have use this to include the ads. But now there is the macro \Frame for this purpose.

21 \newenvironment{Puzzle}[2]{\par\noindent\mbox{}\hfill
22 \catcode`\|=13
23 \@nameuse{Puzzle@@\Puzzle@TYPE}%
24 \unitlength=\PuzzleUnitlength
25 \Puzzle@Y=#2
26 \begin{picture}(#1,#2)
27  \Puzzle@Box@@normal.
28 }{%
29  \PuzzleHook
30 \end{picture}\hfill\null\par\noindent

31 }

\Puzzle@Frame@@normal The macro Puzzle@Frame is used to place additional rectangular regions into the puzzle frame. This frame can contain arbitrary text which is typeset in a centered environment.

This macro takes five arguments. The first two arguments are the coordinates of the upper left corner of the frame. The coordinates are logical coordinates starting from the lower left corner of the puzzle. The next two arguments are the width and the height of the frame given in the number of boxes covered. Finally the fifth argument contains the text which should apear in this frame.

32 \newcommand\Puzzle@Frame@@normal[5]{\put(#1,#2){\framebox(#3,#4){%
33  \begin{minipage}{#3\unitlength}\begin{center} #5
34  \end{center}\end{minipage}}}}

\Puzzle@Frame@@solution For the solution the framed ads are simply ignored.

35 \newcommand\Puzzle@Frame@@solution[5]{}

\PuzzleBlackBox The macro \PuzzleBlackBox is called to typeset the black boxes. It should produce a box of at most width and height of \PuzzleUnitlength.

36 \newcommand\PuzzleBlackBox{\rule{\PuzzleUnitlength}{\PuzzleUnitlength}}

\Puzzle@Box@@normal The macro \Puzzle@Box@@normal performs all tasks when a box should be typeset in “normal” mode. The arguments are evaluated and the appropriate tpye of box typeset or other actions performed.

37 \newcommand\Puzzle@Box@@normal[2][]{%
38 \def\Puzzle@tmp{#2}%
39 \if\Puzzle@tmp.
40  \Puzzle@X=0\relax \advance\Puzzle@Y-1
41 \else
42  \ifx\@empty\Puzzle@tmp
43  \else
44  \if\Puzzle@tmp*
45  \put(\Puzzle@X,\Puzzle@Y){\framebox(1,1){\PuzzleBlackBox}}
46  \else
47  \put(\Puzzle@X,\Puzzle@Y){\framebox(1,1){}}
48  \fi
49  \fi
50  \def\Puzzle@tmp{#1}%
51  \ifx\@empty\Puzzle@tmp\else
52  \put(\Puzzle@X,\Puzzle@Y){%
53  \makebox(1,.95)[tl]{\PuzzleNumberFont\,#1}}%
54  \fi
55  \advance\Puzzle@X 1
56 \fi

57 }

\Puzzle@Box@@solution The macro \Puzzle@Box@@solution performs all tasks when a box should be

typeset in “solution” mode. The arguments are evaluated and the appropriate tpye of box typeset or other actions performed.

58 \newcommand\Puzzle@Box@@solution[2][]{%
59 \def\Puzzle@tmp{#2}%
60 \if\Puzzle@tmp.
61  \Puzzle@X=0\relax \advance\Puzzle@Y-1
62 \else
63  \ifx\Puzzle@tmp\@empty
64  \else\if\Puzzle@tmp*
65  \put(\Puzzle@X,\Puzzle@Y){\framebox(1,1){\PuzzleBlackBox}}
66  \else
67  \put(\Puzzle@X,\Puzzle@Y){\framebox(1,1){\uppercase{#2}}}%
68  \fi
69  \fi
70  \def\Puzzle@tmp{#1}%
71  \ifx\Puzzle@tmp\@empty\else
72  \ifPuzzle@SolutionNumbered
73  \put(\Puzzle@X,\Puzzle@Y){%
74  \makebox(1,.95)[tl]{\PuzzleNumberFont\,#1}}%
75  \fi
76  \fi
77  \advance\Puzzle@X 1
78 \fi

79 }

6.3 Clues

\Puzzle@Clue@@normal The first and the third argument are shown as clue. This macro is used for unsolved puzzles.

80 \newcommand\Puzzle@Clue@@normal[3]{\textsf{#1} #3 }

\Puzzle@Clue@@solution In solutions clues are simply suppressed. Thus all three arguments are discarted.

81 \newcommand\Puzzle@Clue@@solution[3]{}
Puzzle@Clues@@normal The environment Puzzle@Clues@@normal is mapped to PuzzleClues in “normal”

mode. It typesets its contents in a minipage of appropriate half textwidth.

82 \newenvironment{Puzzle@Clues@@normal}[1]{%
83 \null\hfill
84 \let\Clue\Puzzle@Clue@@normal
85 \begin{minipage}[t]{.45\textwidth}%
86  \PuzzleClueFont{#1}%
87 }{\end{minipage}\hfill\null }
Puzzle@Clues@@solution The environment Puzzle@Clues@@solution is mapped to PuzzleClues in “solu-

tion” mode. It just suppressed any output.

88 \newenvironment{Puzzle@Clues@@solution}[1]{%
89 \let\Clue\Puzzle@Clue@@solution
90 }{}

\PuzzleWordsText The macro \PuzzleWordsText is the text typeset at the beginning of the environment PuzzleWords. It takes one argument which is the length of the words listed.

91 \newcommand\PuzzleWordsText[1]{Words of length #1: }

Puzzle@Words@@normal The environment Puzzle@Words@@normal will be mapped to the environment PuzzleWords in “normal” mode. It just arranges that words are typeset after the \PuzzleWordsText has shown the length of the words. Finally a new paragraph is started.

92 \newenvironment{Puzzle@Words@@normal}[1]{%
93 \PuzzleWordsText{#1}%
94 \let\Word\relax
95 }{\par}
Puzzle@Words@@solution The environment Puzzle@Words@@solution will be mapped to the environment

PuzzleWords in “solution” mode. It arranges things that the contents is silently ignored.

96 \newenvironment{Puzzle@Words@@solution}[1]{%
97 \newcommand\Word[1]{}%
98 }{}

6.4 Numbers

\PuzzleNumbers The macro \PuzzleNumbers will produce a list of boxes with numbers for letters. It is intended for numbered crossword puzzles.

99 \newcommand\PuzzleNumbers[1]{\begingroup
100 \@nameuse{Puzzle@@\Puzzle@TYPE}%
101 \Puzzle@Y=0
102 \Puzzle@X=1
103 \unitlength=\PuzzleUnitlength
104 \Puzzle@Numbers#1.\endgroup}

\Puzzle@Numbers The macro \Puzzle@Numbers loops through the arguments until it finds a dot. For each argument it produces a box, either with the numbers or with the letters or both, depending on the current settings.

The loop is implemented via recursion. The box is tyepset by the | macro which takes care of the current settings. For this purpose this characterhas to be made active temporarily.

105 \begingroup
106 \catcode`\|=13
107 \gdef\Puzzle@Numbers#1{%
108 \if#1.
109  \let\next\relax
110 \else
111  \begin{picture}(1,1)
112  \xdef\X{\the\Puzzle@X}%
113  \Puzzle@X=0
114  |[\X]{#1}%
115  \end{picture}%
116  \let\next\Puzzle@Numbers
117  \advance\Puzzle@X 1
118 \fi
119 \next

120 }

121 \endgroup

\PuzzleLettersText The macro \PuzzleLettersText contains the text typeset at the beginning of the

\PuzzleLetters environment.
122 \newcommand\PuzzleLettersText{The following letters are used: }

\PuzzleLetters The macro \PuzzleLetters is intended to show the letters used in a numbered crossword puzzle. The argument is the (sorted) list of characters used.

123 \newcommand\PuzzleLetters[1]{\PuzzleLettersText #1\par}

\Puzzle@TYPE The macro \Puzzle@TYPE contains the type of the puzzle. It is used find the appropriate initialization macro.

124 \newcommand\Puzzle@TYPE{normal}

\PuzzleSolution The macro \PuzzleSolution arranges everything that the following puzzles are typeset in the “solution” mode, i.e. the letters are shown and the clues are suppressed.

This macros has one optional argument which has to be true or false. This argument determines whether or not the numbers should also be shown in the solution. The default is false which means that the numbers are suppressed in the solution.

125 \newcommand\PuzzleSolution[1][false]{%
126 \@nameuse{Puzzle@SolutionNumbered#1}%
127 \let\PuzzleClues\Puzzle@Clues@@solution
128 \let\endPuzzleClues\endPuzzle@Clues@@solution
129 \let\PuzzleWords\Puzzle@Words@@solution
130 \let\endPuzzleWords\endPuzzle@Words@@solution
131 \xdef\Puzzle@TYPE{solution}}

\PuzzleUnsolved The macro \PuzzleUnsolved arranges everything that the following puzzles are typeset in the “unsolved” mode, i.e. the letters are suppressed and the clues are shown.

132 \newcommand\PuzzleUnsolved{%
133 \let\PuzzleClues\Puzzle@Clues@@normal
134 \let\endPuzzleClues\endPuzzle@Clues@@normal
135 \let\PuzzleWords\Puzzle@Words@@normal
136 \let\endPuzzleWords\endPuzzle@Words@@normal
137 \xdef\Puzzle@TYPE{normal}}

The boolean Puzzle@SolutionNumbered deternimes whether or not the solution should contain numbers. Initially it is set to “false”.

138 \newif\ifPuzzle@SolutionNumbered
139 \Puzzle@SolutionNumberedfalse

Finally we arrange that the default behaviour is to typeset an unsolved crossword puzzle.

140 \PuzzleUnsolved

That’s all.