From 8e31fe3c99d1f1b6a0eda074f89b206fd70aa9e5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 14 Jul 2006 22:41:47 +0000 Subject: sudoku update git-svn-id: svn://tug.org/texlive/trunk@1841 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/sudoku/sudoku.dtx | 62 ++++++++++++++++++++---- Master/texmf-dist/source/latex/sudoku/sudoku.ins | 4 +- 2 files changed, 54 insertions(+), 12 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/sudoku/sudoku.dtx b/Master/texmf-dist/source/latex/sudoku/sudoku.dtx index b6e6129c9a3..c74c72afa92 100644 --- a/Master/texmf-dist/source/latex/sudoku/sudoku.dtx +++ b/Master/texmf-dist/source/latex/sudoku/sudoku.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % sudoku.dtx -% Copyright 2005 Paul Abraham +% Copyright 2005,2006 Paul Abraham % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -24,7 +24,7 @@ % \iffalse %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{sudoku} -% [2005/06/29 v1.0 Sudoku grid] +% [2006/03/25 v1.0.1 Sudoku grid] % %<*driver> \documentclass{ltxdoc} @@ -40,7 +40,7 @@ % % \fi % -% \CheckSum{84} +% \CheckSum{104} % % \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 @@ -59,6 +59,7 @@ % Right brace \} Tilde \~} % % \changes{v1.0}{2005/06/29}{Initial version} +% \changes{v1.0.1}{2006/03/25}{Added ability to specify line thickness} % % \GetFileInfo{sudoku.sty} % @@ -68,7 +69,7 @@ % % \title{The \textsf{sudoku} package\thanks{This document % corresponds to \textsf{sudoku}~\fileversion, dated \filedate.}} -% \author{Paul Abraham \\ \texttt{paul.abraham@hotpop.com}} +% \author{Paul Abraham \\ \texttt{paul.abraham@linuxdirect.org}} % % \maketitle % @@ -113,13 +114,23 @@ % This length contains the size of the grid, defaulting to \verb|10cm|. % It can be changed with \verb|\setlength\sudokusize{|\meta{size}|}|. % +% \DescribeMacro{\sudokuthickline} +% This length determines the thickness of the thick lines and defaults +% to \verb|2pt|. It can be changed with +% \verb|\setlength\sudokuthickline{|\meta{size}|}|. +% +% \DescribeMacro{\sudokuthinline} +% This length determines the thickness of the thin lines and defaults +% to \verb|0.4pt|. It can be changed with +% It can be changed with \verb|\setlength\sudokuthinline{|\meta{size}|}|. +% % \DescribeEnv{sudoku-block} % This environment draws the sudoku grid. The contents of each cell % in the grid are delimited by the vertical bar (\verb+|+) character. % % \DescribeEnv{sudoku} -% This environment starts a |center| environment, then uses the -% |sudoku-block| environment to draw the grid. +% This environment starts a \verb|center| environment, then uses the +% \verb|sudoku-block| environment to draw the grid. % % \section{Examples} % @@ -212,6 +223,7 @@ % %\iffalse % 2005/06/29 v1.0 Initial version +% 2006/03/25 v1.0.1 Added ability to specify line thickness %\fi % % \section{Implementation} @@ -247,16 +259,38 @@ % \end{macrocode} % % Now we can draw the grid. Each 3$\times$3 box has thicker borders -% than the rest of the grid. +% than the rest of the grid. From version 1.0.1, the line thickness +% can be determined by changing \verb|\sudokuthinline| and +% \verb|\sudokuthickline|. % % \begin{macrocode} -\newcommand*\@sudoku@grid{% - \thinlines +\newcommand*\@sudoku@grid{ +% \end{macrocode} +% +% First draw the thin lines. +% +% \begin{macrocode} + \linethickness{\sudokuthinline}% \multiput(0,0)(1,0){10}{\line(0,1){9}}% \multiput(0,0)(0,1){10}{\line(1,0){9}} - \thicklines +% \end{macrocode} +% +% Now draw the thick lines. +% +% \begin{macrocode} + \linethickness{\sudokuthickline}% \multiput(0,0)(3,0){4}{\line(0,1){9}}% \multiput(0,0)(0,3){4}{\line(1,0){9}} +% \end{macrocode} +% +% Finally try and fill in the four corners of the grid. +% +% \begin{macrocode} + \linethickness{0.5\sudokuthickline}% + \put(0,0){\framebox(0,0){}}% + \put(9,0){\framebox(0,0){}}% + \put(0,9){\framebox(0,0){}}% + \put(9,9){\framebox(0,0){}} } % \end{macrocode} % @@ -271,6 +305,14 @@ \setlength\sudokusize{10cm} % \end{macrocode} % +% Set line thicknesses to 0.4pt and 2pt for thin and thick lines. +% \begin{macrocode} +\newdimen\sudokuthinline +\setlength\sudokuthinline{0.4pt} +\newdimen\sudokuthickline +\setlength\sudokuthickline{2pt} +% \end{macrocode} +% % Make the size of each square $1/9$ of the size of sudoku grid. % \begin{macrocode} \newenvironment{sudoku-block}{% diff --git a/Master/texmf-dist/source/latex/sudoku/sudoku.ins b/Master/texmf-dist/source/latex/sudoku/sudoku.ins index 2ae2b8359bb..fe8f6dc9dce 100644 --- a/Master/texmf-dist/source/latex/sudoku/sudoku.ins +++ b/Master/texmf-dist/source/latex/sudoku/sudoku.ins @@ -1,5 +1,5 @@ %% sudoku.ins -%% Copyright 2005 Paul Abraham +%% Copyright 2005,2006 Paul Abraham %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -23,7 +23,7 @@ This is a generated file. -Copyright 2005 Paul Abraham +Copyright 2005,2006 Paul Abraham This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either -- cgit v1.2.3