diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-05 23:10:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-05 23:10:02 +0000 |
commit | 3e9898bf813da161e97f32376fc0eaa9bc6b9630 (patch) | |
tree | 9acd9ef5e60b7047f721e4194e6aceda26b7f6bb /Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty | |
parent | e871cf60fc09d3490d03edd318214ae79c60d646 (diff) |
logicpuzzle (5apr13)
git-svn-id: svn://tug.org/texlive/trunk@29679 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty new file mode 100644 index 00000000000..81a85c7fcca --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty @@ -0,0 +1,79 @@ +%% +%% Copyright (C) 2013 by: +%% Josef Kleber +%% <josef.kleber@gmx.de> +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX version +%% 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "author-maintained". +%% +%% The Current Maintainer of this work is Josef Kleber. +%% +%% This work consists of all files listed in manifest.txt. +%% +% +\ProvidesPackage{ddsudoku}[2013/04/05 ddsudoku.sty v1.0 - Josef Kleber (C) 2013]% +% +\RequirePackage{logicpuzzle}% +% +\newcommand*\LP@DDS@init@prefix{LP@DDS}% +\newcommand*\LP@DDS@init@package{ddsudoku}% +% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{rows}{5}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{columns}{5}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{scale}{1}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{counterstyle}{none}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{bgcolor}{}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{width}{5.1cm}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{title}{}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@DDS@init@prefix}{\LP@DDS@init@package}{Large}% +% +\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% +% +\ProcessOptionsX\relax% +% +\LP@init@counter{\LP@DDS@init@prefix}% +% +\let\ddsudokucell\setcell% +% +\newcommand*\ddsudokusetup[1]% +{% + \setkeys{ddsudoku.sty}{#1}% +}% +% +\newenvironment{ddsudoku}[1][]% +{% + \setkeys{ddsudoku}{#1}% + \LP@set@package{ddsudoku}% + \LP@set@env@prefix{LP@DDS}% + \setcounter{LP@DDS@rows}{\LP@DDS@rows}% + \setcounter{LP@DDS@columns}{\LP@DDS@columns}% + \stepcounter{LP@DDS@rows}% + \stepcounter{LP@DDS@columns}% + \begin{minipage}[t]{\LP@DDS@width}% + \ifthenelse{\equal{\LP@DDS@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@DDS@titleindent}\parbox{\LP@DDS@titlewidth}{\strut\LP@titleformat\LP@DDS@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@DDS@scale]% + \LP@drawbackground{1}{1}{\LP@DDS@columns}{\LP@DDS@rows}{\LP@DDS@bgcolor}% + \LP@drawgrid{1}{1}{\LP@DDS@columns}{\LP@DDS@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@DDS@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +\endinput%
\ No newline at end of file |