summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/gene/crossword
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/gene/crossword')
-rw-r--r--macros/latex/contrib/gene/crossword/LICENSE9
-rw-r--r--macros/latex/contrib/gene/crossword/README.md (renamed from macros/latex/contrib/gene/crossword/README)87
-rw-r--r--macros/latex/contrib/gene/crossword/cwpuzzle.dtx63
-rw-r--r--macros/latex/contrib/gene/crossword/cwpuzzle.ins6
-rw-r--r--macros/latex/contrib/gene/crossword/cwpuzzle.pdfbin363016 -> 337589 bytes
-rw-r--r--macros/latex/contrib/gene/crossword/makefile (renamed from macros/latex/contrib/gene/crossword/Makefile)13
6 files changed, 121 insertions, 57 deletions
diff --git a/macros/latex/contrib/gene/crossword/LICENSE b/macros/latex/contrib/gene/crossword/LICENSE
new file mode 100644
index 0000000000..0f67887021
--- /dev/null
+++ b/macros/latex/contrib/gene/crossword/LICENSE
@@ -0,0 +1,9 @@
+cwpuzzle.dtx is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY. No author or distributor accepts
+responsibility to anyone for the consequences of using it or for
+whether it serves any particular purpose or works at all, unless
+he says so in writing.
+
+Everyone is granted permission to copy, modify and redistribute
+cwpuzzle.dtx, provided this copyright notice is preserved and
+any modifications are indicated.
diff --git a/macros/latex/contrib/gene/crossword/README b/macros/latex/contrib/gene/crossword/README.md
index c9c50b9133..df4d3a67b1 100644
--- a/macros/latex/contrib/gene/crossword/README
+++ b/macros/latex/contrib/gene/crossword/README.md
@@ -1,20 +1,20 @@
- cwpuzzle.sty
- -
- a LaTeX package for typesetting crossword puzzles and more
+# cwpuzzle.sty
+---
+a LaTeX package for typesetting crossword puzzles and more
- Gerd Neugebauer
+Gerd Neugebauer
-CROSSWORD PUZZLES
+## Crossword Puzzles
Since I know only of one additional package for typesetting crossword
-puzzles on CTAN -- named crosswrd.sty -- I will compare it against
+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
+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.
@@ -36,8 +36,8 @@ same source:
- 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. cwpuzzle supports all
-of them.
+`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
@@ -45,7 +45,7 @@ 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
+`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.
@@ -55,34 +55,77 @@ cwpuzzle currently assumes that words are terminated by a black block
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
+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
+`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
+## 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.
+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
+## Location
cwpuzzle is located in the CTAN directory
- tex-archive/macros/latex/contrib/gene/crossword
+ https://ctan.org/tex-archive/macros/latex/contrib/gene/crossword
-Run tex on cwpuzzle.ins to produce the package and (pdf)latex on
-cwpuzzle.dtx to get the documentation (or the Makefile to do both).
-Per default the Makefile produces the documentation as PDF.
+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`.
diff --git a/macros/latex/contrib/gene/crossword/cwpuzzle.dtx b/macros/latex/contrib/gene/crossword/cwpuzzle.dtx
index 3442440ea4..c7c64db2ea 100644
--- a/macros/latex/contrib/gene/crossword/cwpuzzle.dtx
+++ b/macros/latex/contrib/gene/crossword/cwpuzzle.dtx
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\filename{cwpuzzle.dtx}
-\def\fileversion{1.9}
-\def\filedate{2014/01/12}
+\def\fileversion{1.10}
+\def\filedate{2020/05/23}
\let\docversion=\fileversion
\let\docdate=\filedate
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -19,11 +19,11 @@
%%
%%
%% Author: Gerd Neugebauer
-%% Im Lerchelsöhl 5
-%% 64521 Groß-Gerau
+%% Im Lerchels\"ohl 5
+%% 64521 Gro\ss-Gerau
%% Mail: gene@gerd-neugebauer.de
%%
-%% Copyright (c) 1995-2014 Gerd Neugebauer
+%% Copyright (c) 1995-2020 Gerd Neugebauer
%%
%% cwpuzzle.dtx is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY. No author or distributor accepts
@@ -35,10 +35,6 @@
%% cwpuzzle.dtx, provided this copyright notice is preserved and
%% any modifications are indicated.
%%
-%%
-%% This style is still under development and may be replaced with a
-%% new version which provides an enhanced functionality.
-%%
%<*driver>
\documentclass{ltxdoc}
\usepackage{xcolor}
@@ -77,8 +73,8 @@
% \DoNotIndex{\hfill,\if,\ifx,\large,\let,\makebox,\mbox,\newcommand}
% \DoNotIndex{\newcount,\newdimen,\newenvironment,\newif,\noindent}
% \DoNotIndex{\normalsize,\null,\par,\put,\raggedright,\raggedleft}
-% \DoNotIndex{\relax,\renewcommand,\RequirePackage,\rm,\rule}
-% \DoNotIndex{\scriptsize,\sf,\small,\textsf,\textwidth}
+% \DoNotIndex{\relax,\renewcommand,\RequirePackage,\rm,\rmfamily,\rule}
+% \DoNotIndex{\scriptsize,\sf,\sffamily,\small,\textsf,\textwidth}
% \DoNotIndex{\the,\tiny,\unitlength,\uppercase,\xdef,\ProvidesPackage}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -568,7 +564,7 @@
% \begin{minipage}{.65\textwidth}\small
% \begin{verbatim}
% \definecolor{gray}{gray}{.9}
-% \PuzzleDefineColorCell{g}{gray}
+% \PuzzleDefineColorCell{c}{gray}
% \begin{Puzzle}{2}{2}
% |{} |[1][cf]X |.
% |[2][c]X |{} |.
@@ -577,7 +573,7 @@
% \end{minipage}\hfill
% \begin{minipage}{.30\textwidth}
% \definecolor{gray}{gray}{.9}
-% \PuzzleDefineColorCell{g}{gray}
+% \PuzzleDefineColorCell{c}{gray}
% \begin{Puzzle}{2}{2}
% |{} |[1][cf]X |.
% |[2][c]X |{} |.
@@ -598,9 +594,10 @@
% default it is typeset in a mini-page of the appropriate width
% centered horizontally and vertically.
%
+% \changes{1.10}{2020/05/23}{Font changing macros modernized}
% \begin{verbatim}
% \begin{Puzzle}{8}{6}
-% \Frame{2}{2}{4}{2}{\sf Crossword\\Puzzle}
+% \Frame{2}{2}{4}{2}{\sffamily 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 |.
@@ -613,7 +610,7 @@
% \PuzzleUnsolved\noindent
% \begin{minipage}{.5\textwidth}\PuzzleUnitlength=18pt
% \begin{Puzzle}{8}{6}%
-% \Frame{2}{2}{4}{2}{\sf Crossword\\Puzzle}%
+% \Frame{2}{2}{4}{2}{\sffamily 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|.
@@ -769,7 +766,7 @@
% to switch to solution mode. Then all numbers are shown. The
% parameters to modify the appearance of a puzzle work here as well. \medskip
%
-% {\PuzzleSolution\PuzzleUnitlength=14pt\footnotesize\sf
+% {\PuzzleSolution\PuzzleUnitlength=14pt\sffamily\footnotesize
% \begin{Sudoku}
% | 7|*2| 4| 1| 3| 5| 6|*9| 8|.
% |*3| 8|*1|*9| 7|*6|*5| 4|*2|.
@@ -811,7 +808,7 @@
% \def\myColor{}\ifcase#1
% \def\myColor{white}\or\def\myColor{red}\or\def\myColor{green}\or\def\myColor{yellow}\or\def\myColor{orange}\or\def\myColor{lime}\or\def\myColor{purple}\or\def\myColor{violet}\or\def\myColor{teal}\or\def\myColor{brown}\else\def\myColor{white}\fi
% \colorbox{\myColor}{\makebox(1,1){#1}}}
-% \PuzzleSolution\PuzzleUnitlength=14pt\footnotesize\sf
+% \PuzzleSolution\PuzzleUnitlength=14pt\sffamily\footnotesize
% \begin{Sudoku}
% | 7|*2| 4| 1| 3| 5| 6|*9| 8|.
% |*3| 8|*1|*9| 7|*6|*5| 4|*2|.
@@ -882,7 +879,7 @@
% \begin{minipage}{.25\textwidth}
% {\PuzzleSolution
% \PuzzleUnitlength=14pt
-% \footnotesize\sf
+% \sffamily\footnotesize
% \begin{Kakuro}{6}{9}
% | - |<:13> |<:37> | - |<:41> |<:7> | - |.
% |<4:> |* 3 | 1 |<14:> | 8 | 6 | - |.
@@ -899,7 +896,7 @@
% \begin{verbatim}
% \PuzzleSolution
% \PuzzleUnitlength=14pt
-% \footnotesize\sf
+% \sffamily\footnotesize
% \begin{Kakuro}{6}{9}
% | - |<:13> |<:37>| - |<:41>|<:7> | - |.
% |<4:> |* 3 | 1 |<14:> | 8 | 6 | - |.
@@ -1191,16 +1188,18 @@
%
% The macro |\PuzzleFont| contains font changing
% commands issued before the puzzle is typeset.
+% \changes{1.10}{2020/05/23}{Font changing macros modernized}
% \begin{macrocode}
-\newcommand\PuzzleFont{\rm\normalsize}
+\newcommand\PuzzleFont{\rmfamily\normalsize}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\PuzzleNumberFont}
% The macro |\PuzzleNumberFont| contains font changing
% commands issued before the numbers in a puzzle are typeset.
+% \changes{1.10}{2020/05/23}{Font changing macros modernized}
% \begin{macrocode}
-\newcommand\PuzzleNumberFont{\sf\scriptsize}
+\newcommand\PuzzleNumberFont{\sffamily\scriptsize}
% \end{macrocode}
% \end{macro}
%
@@ -1970,7 +1969,8 @@
\gdef\Sudoku{\begin{Puzzle}{9}{9}%
\let\Puzzle@pipe=|%
\def\PPa{\Puzzle@pipe[][fS]}%
- \def|##1{\ifx##1*\let\next\PPa\else\Puzzle@pipe{##1}\let\next\relax\fi\next}
+ \def|##1{\ifx##1*\let\next\PPa\else
+ \Puzzle@pipe{##1}\let\next\relax\fi\next}
}
\endgroup
% \end{macrocode}
@@ -2014,8 +2014,9 @@
% The macro |\KakuroNumberFont| is used to typeset the hints, i.e.
% the horizontal and vertical sums.
% \changes{1.8}{2009/09/13}{New}
+% \changes{1.10}{2020/05/23}{Font changing macros modernized}
% \begin{macrocode}
-\newcommand\KakuroNumberFont{\sf\tiny}
+\newcommand\KakuroNumberFont{\sffamily\tiny}
% \end{macrocode}
% \end{macro}
%
@@ -2023,6 +2024,7 @@
% The macro |\Kakuro@cell| is used to typeset the cells. It
% analyzes the argument and acts accordingly.
% \changes{1.8}{2009/09/13}{New}
+% \changes{1.10}{2020/05/23}{Font changing macros modernized}
% \begin{macrocode}
\def\Kakuro@cell#1{%
\ifx#1. \def\next{\Puzzle@pipe.}%
@@ -2059,12 +2061,16 @@
\def\Kakuro@hint#1:#2>{%
\def\x{#2}%
\ifx\x\empty\else
- \put(\Puzzle@X,\Puzzle@Y){\makebox(1,.8)[r]{\parbox{.95\unitlength}{\raggedright\KakuroNumberFont
+ \put(\Puzzle@X,\Puzzle@Y){%
+ \makebox(1,.8)[r]{\parbox{.95\unitlength}{%
+ \raggedright\KakuroNumberFont
$\blacktriangledown$\\#2}}}
\fi
\def\x{#1}%
\ifx\x\empty\else
- \put(\Puzzle@X,\Puzzle@Y){\makebox(1,1.2){\parbox{.95\unitlength}{\raggedleft\KakuroNumberFont
+ \put(\Puzzle@X,\Puzzle@Y){%
+ \makebox(1,1.2){\parbox{.95\unitlength}{%
+ \raggedleft\KakuroNumberFont
#1 $\blacktriangleright$\\\mbox{}}}}
\fi
\Puzzle@pipe[][\KakuroHintType]{ }}%
@@ -2138,6 +2144,7 @@
% Now, that everything is in place we can arrange some package
% options.
% \changes{1.6}{2006/08/12}{Several style options defined}
+% \changes{1.10}{2020/05/23}{Font changing macros modernized}
% \begin{macrocode}
\DeclareOption{numbered}{\Puzzle@SolutionNumberedtrue}
\DeclareOption{nocenter}{\let\PuzzlePre=\relax
@@ -2145,11 +2152,11 @@
\DeclareOption{unboxed}{\let\PuzzleCluePre=\relax
\let\PuzzleCluePost=\relax}
\DeclareOption{normalsize}{\PuzzleUnitlength=20pt
- \def\PuzzleFont{\rm\normalsize}}
+ \def\PuzzleFont{\rmfamily\normalsize}}
\DeclareOption{small}{\PuzzleUnitlength=16pt
- \def\PuzzleFont{\rm\small}}
+ \def\PuzzleFont{\rmfamily\small}}
\DeclareOption{large}{\PuzzleUnitlength=24pt
- \def\PuzzleFont{\rm\large}}
+ \def\PuzzleFont{\rmfamily\large}}
\DeclareOption{german}{%
\renewcommand\PuzzleWordsText[1]{Worte der L\"ange #1: }%
\renewcommand\PuzzleLettersText{Benutzte Buchstaben: }%
diff --git a/macros/latex/contrib/gene/crossword/cwpuzzle.ins b/macros/latex/contrib/gene/crossword/cwpuzzle.ins
index 31d4c39b54..b7cc2b3b7f 100644
--- a/macros/latex/contrib/gene/crossword/cwpuzzle.ins
+++ b/macros/latex/contrib/gene/crossword/cwpuzzle.ins
@@ -1,11 +1,11 @@
%%------------------------------------------------------------------
%% Driver file to extract the dtx style and package file.
%%
-%% Copyright (C) 1995-2014 Gerd Neugebauer
+%% Copyright (C) 1995-2020 Gerd Neugebauer
%%
%% Author: Gerd Neugebauer
-%% Im Lerchelsöhl 5
-%% 64521 Groß-Gerau
+%% Im Lerchelsb\"ohl 5
+%% 64521 Gro\ss-Gerau
%% Mail: gene@gerd-neugebauer.de
%%
%% cwpuzzle.ins is distributed in the hope that it will be useful,
diff --git a/macros/latex/contrib/gene/crossword/cwpuzzle.pdf b/macros/latex/contrib/gene/crossword/cwpuzzle.pdf
index 5c53aff07f..965b3b67af 100644
--- a/macros/latex/contrib/gene/crossword/cwpuzzle.pdf
+++ b/macros/latex/contrib/gene/crossword/cwpuzzle.pdf
Binary files differ
diff --git a/macros/latex/contrib/gene/crossword/Makefile b/macros/latex/contrib/gene/crossword/makefile
index 663c046768..1fbd0c19c5 100644
--- a/macros/latex/contrib/gene/crossword/Makefile
+++ b/macros/latex/contrib/gene/crossword/makefile
@@ -8,8 +8,9 @@ INSTALLDIR = /usr/local/lib/texmf/tex/latex/cwpuzzle
FILES = cwpuzzle.dtx \
cwpuzzle.ins \
- Makefile \
- README
+ makefile \
+ README.md \
+ LICENSE
LATEX = latex
PDFLATEX = pdflatex
@@ -43,8 +44,12 @@ cwpuzzle.pdf pdf: cwpuzzle.sty cwpuzzle.gls
cwpuzzle.gls:
zip dist: ${FILES} cwpuzzle.pdf
- zip cwpuzzle-` perl -n -e 'print $$1 if m/\\\\def\\\\fileversion[{](.*)[}]/' cwpuzzle.dtx`.zip \
- ${FILES} cwpuzzle.pdf
+ rm -rf crossword
+ mkdir crossword
+ cp ${FILES} cwpuzzle.pdf crossword
+ zip crossword-` perl -n -e 'print $$1 if m/\\\\def\\\\fileversion[{](.*)[}]/' cwpuzzle.dtx`.zip \
+ crossword/*
+ rm -rf crossword
clean:
$(RM) cwpuzzle.log cwpuzzle.aux cwpuzzle.glo cwpuzzle.gls \