summaryrefslogtreecommitdiff
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
parentae3316ebcba4127854375bc6089614efdad986a3 (diff)
crossword (13jan14)
git-svn-id: svn://tug.org/texlive/trunk@32657 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/crossword/Makefile (renamed from Master/texmf-dist/source/latex/crossword/Makefile)6
-rw-r--r--Master/texmf-dist/doc/latex/crossword/cwpuzzle.pdfbin227913 -> 363016 bytes
-rw-r--r--Master/texmf-dist/source/latex/crossword/cwpuzzle.dtx78
-rw-r--r--Master/texmf-dist/source/latex/crossword/cwpuzzle.ins2
-rw-r--r--Master/texmf-dist/tex/latex/crossword/cwpuzzle.sty11
5 files changed, 78 insertions, 19 deletions
diff --git a/Master/texmf-dist/source/latex/crossword/Makefile b/Master/texmf-dist/doc/latex/crossword/Makefile
index e674b29df73..663c0467680 100644
--- a/Master/texmf-dist/source/latex/crossword/Makefile
+++ b/Master/texmf-dist/doc/latex/crossword/Makefile
@@ -20,7 +20,7 @@ MKDIR = mkdir
#*=============================================================================
-all: cwpuzzle.sty cwpuzzle.pdf
+all: cwpuzzle.pdf
cwpuzzle.sty sty: cwpuzzle.dtx cwpuzzle.ins
$(RM) cwpuzzle.cls cwpuzzle.sty
@@ -33,7 +33,7 @@ cwpuzzle.dvi dvi: cwpuzzle.dtx cwpuzzle.sty
$(MAKEINDEX) -s gglo.ist -o cwpuzzle.gls cwpuzzle.glo
$(LATEX) cwpuzzle.dtx
-cwpuzzle.pdf pdf: cwpuzzle.dtx cwpuzzle.sty cwpuzzle.gls
+cwpuzzle.pdf pdf: cwpuzzle.sty cwpuzzle.gls
$(PDFLATEX) cwpuzzle.dtx
$(PDFLATEX) cwpuzzle.dtx
$(MAKEINDEX) -s gind.ist cwpuzzle
@@ -43,7 +43,7 @@ cwpuzzle.pdf pdf: cwpuzzle.dtx cwpuzzle.sty cwpuzzle.gls
cwpuzzle.gls:
zip dist: ${FILES} cwpuzzle.pdf
- zip cwpuzzle-`awk '/^\\\\xdef\\\\fileversion/{print $$2}' cwpuzzle.dtx`.zip \
+ zip cwpuzzle-` perl -n -e 'print $$1 if m/\\\\def\\\\fileversion[{](.*)[}]/' cwpuzzle.dtx`.zip \
${FILES} cwpuzzle.pdf
clean:
diff --git a/Master/texmf-dist/doc/latex/crossword/cwpuzzle.pdf b/Master/texmf-dist/doc/latex/crossword/cwpuzzle.pdf
index 2f1555d36d0..5c53aff07fb 100644
--- a/Master/texmf-dist/doc/latex/crossword/cwpuzzle.pdf
+++ b/Master/texmf-dist/doc/latex/crossword/cwpuzzle.pdf
Binary files differ
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
diff --git a/Master/texmf-dist/tex/latex/crossword/cwpuzzle.sty b/Master/texmf-dist/tex/latex/crossword/cwpuzzle.sty
index 674e11fbfa0..c48631ee385 100644
--- a/Master/texmf-dist/tex/latex/crossword/cwpuzzle.sty
+++ b/Master/texmf-dist/tex/latex/crossword/cwpuzzle.sty
@@ -20,11 +20,9 @@
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
-%%^^A $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
\typeout{%
@@ -44,7 +42,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
@@ -180,7 +178,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}%
@@ -192,6 +190,7 @@
\advance\Puzzle@X 1
\fi
}
+\def\PuzzleSolutionContent#1{\makebox(1,1){\uppercase{#1}}}
\newcommand\PuzzleDefineCell[2]{
\global\@namedef{Puzzle@Cell@@#1}##1##2{#2}%
}