summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/gene/crossword/README.md
blob: df4d3a67b17f4041c0ee0d073690b7b34097c082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

#  cwpuzzle.sty
---
a LaTeX package for typesetting crossword puzzles and more

Gerd Neugebauer


## Crossword Puzzles

Since I know only of  one additional package for typesetting crossword
puzzles on CTAN -- named `crosswrd.sty` --  I will compare  it against
this  package  to  show  the  advantages  and  disadvantages  of  both
packages.

I  have developed  `cwpuzzle.sty` because I needed to typeset a puzzle
which required   more features than those provided by `crosswrd`.  The
feature I was missing was the inclusion of  rectangular regions in the
puzzles  containing  ads or  other  texts not  directly related to the
characters to be filled in.

I have generalized this  requirement by allowing  arbitrary rectangles
to be left free. Thus it is possible to typeset  puzzles which have no
rectangular border (See the documentation for examples).

Another idea was to have different types of puzzles generated from the
same source:

- The  classical puzzle contains numbers for  the  words and clues for
  the words to be filled in.

- The numbered  puzzle contains numbers  in each  cell where identical
  numbers represent  identical letters. The goal is  to find out which
  number corresponds to which letter.

- The fill-in type of  puzzle consists of a grid  and a list of words.
  The goal is to place all words in the grid.

`crosswrd` supports the first type of puzzle only.  c wpuzzle supports
all of them.

The input for both packages is  completely different. crosswrd assumes
that a user uses this package to develop a puzzle. Thus it is tailored
towards a human   user.    It checks  for  consistency and    requires
non-redundant input.  (As a unpleasant side effect fragile macros used
in clues have to be protected)

`cwpuzzle`  needs  some redundancy  in  the   input  for the   sake of
flexibility. But  it seems quite natural to  specify  the frame of the
puzzle  and the clues separately. Especially  for those types where no
clues are needed at all.

cwpuzzle currently assumes that words  are terminated by a black block
(or the border of the puzzle). crosswrd also supports also the variant
where words are terminated  by a thicker   border. This might also  be
incorporated into a future release of cwpuzzle.

In `cwpuzzle` it  is also  possible  to specify whether the  crossword
puzzle     or it's   solution should   be   produced   (from the  same
source). Thus it  is possible to include the  puzzle in one issue of a
journal  and  the solution  into another,  or to  typeset the solution
several pages after the puzzle.

`cwpuzzle` provides a larger number of options and  hooks which can be
used to customize the result. E.g it is possible to modify the size of
the boxes or the  fonts used as  well  as the appearance of  graphical
elements like the black blocks.


## More Cell-based Puzzles

In  addition  to  crossword  puzzles  **Sudoku**  and  **Kakuro**  are
supported. They  are also grid-based.  Thus it was easy  to facilityte
the infrastructure already in place for them.

There  is a  package  for sudoku  on  CTAN. But  it  does not  support
solutions yet.


## Location

cwpuzzle is located in the CTAN directory

   https://ctan.org/tex-archive/macros/latex/contrib/gene/crossword

The source repository can be found under

   https://sourceforge.net/p/gene-tex-lib/svn/HEAD/tree/cwpuzzle


## Installation

### ... in TeX distributions

If  you are  lucky  then cwpuzzle  is already  installed  in your  TeX
distribution or available via the package manager:

- in TeX Live as `crossword`
- in MiKTeX as `crossword`


### ... manually

Run  tex  on `cwpuzzle.ins`  to  produce  the  package and  latex  and
makeindex on `cwpuzzle.dtx` to get the documentation

```
  tex cwpuzzle.ins
  lualatex cwpuzzle.dtx
  lualatex cwpuzzle.dtx
  makeindex -s gind.ist cwpuzzle
  makeindex -s gglo.ist -o cwpuzzle.gls cwpuzzle.glo
  lualatex cwpuzzle.dtx

```

Or use the `Makefile` to do both.
Per default the `Makefile` produces the documentation as PDF.

```
  make -f Makefile
```

Finally move the  file `cwpuzzle.sty` into a directory  where your TeX
distribution searches for style files.


## Version and copyright

The relevant information about version  and copyright are contained in
the file `cwpuzzle.dtx`.