summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/crossword
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-14 00:01:11 +0000
committerKarl Berry <karl@freefriends.org>2014-01-14 00:01:11 +0000
commit1c08941501b1f859fb7042142be8cd9eae3fe656 (patch)
tree81628b67af50245df09b44ffb81058af1dc466fa /Master/texmf-dist/source/latex/crossword
parentae3316ebcba4127854375bc6089614efdad986a3 (diff)
crossword (13jan14)
git-svn-id: svn://tug.org/texlive/trunk@32657 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/crossword')
-rw-r--r--Master/texmf-dist/source/latex/crossword/Makefile56
-rw-r--r--Master/texmf-dist/source/latex/crossword/cwpuzzle.dtx78
-rw-r--r--Master/texmf-dist/source/latex/crossword/cwpuzzle.ins2
3 files changed, 70 insertions, 66 deletions
diff --git a/Master/texmf-dist/source/latex/crossword/Makefile b/Master/texmf-dist/source/latex/crossword/Makefile
deleted file mode 100644
index e674b29df73..00000000000
--- a/Master/texmf-dist/source/latex/crossword/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-#******************************************************************************
-#* $Id: Makefile,v 1.9 2009/09/13 08:37:19 gene Exp gene $
-#******************************************************************************
-#* Author: Gerd Neugebauer
-#*=============================================================================
-
-INSTALLDIR = /usr/local/lib/texmf/tex/latex/cwpuzzle
-
-FILES = cwpuzzle.dtx \
- cwpuzzle.ins \
- Makefile \
- README
-
-LATEX = latex
-PDFLATEX = pdflatex
-MAKEINDEX = makeindex
-RM = rm -f
-INSTALL = install
-MKDIR = mkdir
-
-#*=============================================================================
-
-all: cwpuzzle.sty cwpuzzle.pdf
-
-cwpuzzle.sty sty: cwpuzzle.dtx cwpuzzle.ins
- $(RM) cwpuzzle.cls cwpuzzle.sty
- $(PDFLATEX) cwpuzzle.ins
-
-cwpuzzle.dvi dvi: cwpuzzle.dtx cwpuzzle.sty
- $(LATEX) cwpuzzle.dtx
- $(LATEX) cwpuzzle.dtx
- $(MAKEINDEX) -s gind.ist cwpuzzle
- $(MAKEINDEX) -s gglo.ist -o cwpuzzle.gls cwpuzzle.glo
- $(LATEX) cwpuzzle.dtx
-
-cwpuzzle.pdf pdf: cwpuzzle.dtx cwpuzzle.sty cwpuzzle.gls
- $(PDFLATEX) cwpuzzle.dtx
- $(PDFLATEX) cwpuzzle.dtx
- $(MAKEINDEX) -s gind.ist cwpuzzle
- $(MAKEINDEX) -s gglo.ist -o cwpuzzle.gls cwpuzzle.glo
- $(PDFLATEX) cwpuzzle.dtx
-
-cwpuzzle.gls:
-
-zip dist: ${FILES} cwpuzzle.pdf
- zip cwpuzzle-`awk '/^\\\\xdef\\\\fileversion/{print $$2}' cwpuzzle.dtx`.zip \
- ${FILES} cwpuzzle.pdf
-
-clean:
- $(RM) cwpuzzle.log cwpuzzle.aux cwpuzzle.glo cwpuzzle.gls \
- cwpuzzle.idx cwpuzzle.ilg cwpuzzle.ind cwpuzzle.toc
-
-veryclean: clean
- $(RM) cwpuzzle.cls cwpuzzle.sty cwpuzzle.dvi cwpuzzle.pdf
-
-#
diff --git a/Master/texmf-dist/source/latex/crossword/cwpuzzle.dtx b/Master/texmf-dist/source/latex/crossword/cwpuzzle.dtx
index efd2c7d27ac..3442440ea4f 100644
--- a/Master/texmf-dist/source/latex/crossword/cwpuzzle.dtx
+++ b/Master/texmf-dist/source/latex/crossword/cwpuzzle.dtx
@@ -1,10 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% $Id: cwpuzzle.dtx,v 1.8 2009/09/13 08:32:34 gene Exp gene $
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\CWP@RCS$#1: #2 #3${#2}
\def\filename{cwpuzzle.dtx}
-\xdef\fileversion{\CWP@RCS$Revision: 1.8 $}
-\xdef\filedate{\CWP@RCS$Date: 2009/09/13 08:32:34 $}
+\def\fileversion{1.9}
+\def\filedate{2014/01/12}
\let\docversion=\fileversion
\let\docdate=\filedate
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -26,7 +23,7 @@
%% 64521 Groß-Gerau
%% Mail: gene@gerd-neugebauer.de
%%
-%% Copyright (C) 1995-2009 Gerd Neugebauer
+%% Copyright (c) 1995-2014 Gerd Neugebauer
%%
%% cwpuzzle.dtx is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY. No author or distributor accepts
@@ -44,7 +41,7 @@
%%
%<*driver>
\documentclass{ltxdoc}
-\usepackage{color}
+\usepackage{xcolor}
\usepackage{cwpuzzle}
\EnableCrossrefs
\CodelineIndex
@@ -89,7 +86,7 @@
% \changes{1.3}{1996/10/28}{First public release.}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \CheckSum{637}
+% \CheckSum{640}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -785,6 +782,52 @@
% | 1|*5| 7| 3| 6| 2| 4|*8| 9|.
% \end{Sudoku}}
%
+% Since the characters in the solution are numbers only we can use
+% the following definition to colorize the cells in the solution.
+%
+% \begin{verbatim}
+% \def\PuzzleSolutionContent#1{\fboxsep=0pt
+% \def\myColor{}%
+% \ifcase#1
+% \def\myColor{white}%0
+% \or\def\myColor{red}%1
+% \or\def\myColor{green}%2
+% \or\def\myColor{yellow}%3
+% \or\def\myColor{orange}%4
+% \or\def\myColor{lime}%5
+% \or\def\myColor{purple}%6
+% \or\def\myColor{violet}%7
+% \or\def\myColor{teal}%8
+% \or\def\myColor{brown}%9
+% \else\def\myColor{white}%*
+% \fi
+% \colorbox{\myColor}{\makebox(1,1){#1}}}
+% \end{verbatim}
+%
+% With the help of the package \textsf{xcolor} for the predefined
+% colors we get the following output: \medskip
+%
+% {\def\PuzzleSolutionContent#1{\fboxsep=0pt
+% \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
+% \begin{Sudoku}
+% | 7|*2| 4| 1| 3| 5| 6|*9| 8|.
+% |*3| 8|*1|*9| 7|*6|*5| 4|*2|.
+% | 9| 6| 5|*8| 2|*4| 1| 3| 7|.
+% | 2|*9| 6| 7| 1| 8| 3|*5| 4|.
+% |*5| 1| 8|*2| 4|*3| 9| 7|*6|.
+% | 4|*7| 3| 6| 5| 9| 8|*2| 1|.
+% | 6| 3| 9|*4| 8|*7| 2| 1| 5|.
+% |*8| 4|*2|*5| 9|*1|*7| 6|*3|.
+% | 1|*5| 7| 3| 6| 2| 4|*8| 9|.
+% \end{Sudoku}}
+%
+% Note that this definition has to be restricted to a local block
+% if you have solutions for other puzzle types in the same
+% document.
+%
%
% \subsection{Kakuro}
%
@@ -1053,6 +1096,11 @@
% This macro contains the content of a cell during formatting this
% cell. This enables the cell formating macro to access it.
%
+% \DescribeMacro{\PuzzleSolutionContent}
+% This macro processes the letter in solution mode. It takes one
+% argument, the letter. This macro can be redefinied to achieve
+% special effects for the solution.
+%
% \DescribeMacro{\SudokuLinethickness}
% This macro contains the thickness of the thick lines in a sudoku.
%
@@ -1065,6 +1113,7 @@
% hint. It can be used to redefine the appearance.
%
%
+%
% \section{Further Plans}
%
% \subsection{General}
@@ -1406,6 +1455,7 @@
% should be typeset in ``solution'' mode. The arguments are evaluated
% and the appropriate type of box typeset or other actions performed.
% \changes{1.5}{2006/08/10}{Reimplemented to cope with two optional arguments.}
+% \changes{1.9}{2014/01/12}{Macro PuzzleSolutionContent introduced as extension point}
% \begin{macrocode}
\newcommand\Puzzle@Box@@solution@[2][f]{%
\def\Puzzle@tmp{#2}%
@@ -1419,7 +1469,7 @@
\Puzzle@Cell@Loop *#1{}%
\else
\Puzzle@Cell@Loop #1{}%
- \put(\Puzzle@X,\Puzzle@Y){\makebox(1,1){\uppercase{#2}}}%
+ \put(\Puzzle@X,\Puzzle@Y){\PuzzleSolutionContent{#2}}%
\fi
\fi
\def\Puzzle@tmp{#1}%
@@ -1434,6 +1484,16 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\PuzzleSolutionContent}
+% The macro |\PuzzleSolutionContent| procees the character in
+% solution mode. Per default it converts the argument to upper
+% caseand sets it in a box of size $1\times1$.
+% \changes{1.9}{2014/01/12}{Macro PuzzleSolutionContent introduced as extension point}
+% \begin{macrocode}
+\def\PuzzleSolutionContent#1{\makebox(1,1){\uppercase{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Predefined Cell Types}
% In this section a series of frame types are defined.
%
diff --git a/Master/texmf-dist/source/latex/crossword/cwpuzzle.ins b/Master/texmf-dist/source/latex/crossword/cwpuzzle.ins
index 964de081099..31d4c39b549 100644
--- a/Master/texmf-dist/source/latex/crossword/cwpuzzle.ins
+++ b/Master/texmf-dist/source/latex/crossword/cwpuzzle.ins
@@ -1,7 +1,7 @@
%%------------------------------------------------------------------
%% Driver file to extract the dtx style and package file.
%%
-%% Copyright (C) 1995-2009 Gerd Neugebauer
+%% Copyright (C) 1995-2014 Gerd Neugebauer
%%
%% Author: Gerd Neugebauer
%% Im Lerchelsöhl 5