diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty | 213 |
1 files changed, 213 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty new file mode 100644 index 00000000000..dfc892e468e --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty @@ -0,0 +1,213 @@ +%% +%% 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{lpsudoku}[2013/03/22 lpsudoku.sty v1.0 - Josef Kleber (C) 2013]% +% +\RequirePackage{logicpuzzle}% +% +% options +\newcommand*\LP@SDK@width{9.1cm}% +\newcommand*\LP@SDK@fontsize\Large% +\newcommand*\LP@SDK@rows{9}% +\newcommand*\LP@SDK@columns{9}% +\newcommand*\LP@SDK@scale{1}% +\newcommand*\LP@SDK@bgcolor{}% +\newcommand*\LP@SDK@cvoffset{-24pt}% +\newcommand*\LP@SDK@title{}% +\newcommand*\LP@SDK@titleindent{0cm}% +\newcommand*\LP@SDK@titlewidth{9.1cm}% +% +\newcounter{LP@SDK@rows}% +\newcounter{LP@SDK@columns}% +% +\setcounter{LP@SDK@rows}{\LP@SDK@rows}% +\setcounter{LP@SDK@columns}{\LP@SDK@columns}% +\stepcounter{LP@SDK@rows}% +\stepcounter{LP@SDK@columns}% +% +\define@key{lpsudoku.sty}{scale}[1]% +{% + \renewcommand*\LP@SDK@scale{#1}% +}% +% +\define@key{lpsudoku.sty}{counterstyle}[none]% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@key{lpsudoku.sty}{bgcolor}[]% +{% + \renewcommand*\LP@SDK@bgcolor{#1}% +}% +% +\define@choicekey*{lpsudoku.sty}{fontsize}[\LP@SDK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\LP@SDK@fontsize{\tiny}% + \or% + \renewcommand*\LP@SDK@fontsize{\scriptsize}% + \or% + \renewcommand*\LP@SDK@fontsize{\footnotesize}% + \or% + \renewcommand*\LP@SDK@fontsize{\small}% + \or% + \renewcommand*\LP@SDK@fontsize{\normalsize}% + \or% + \renewcommand*\LP@SDK@fontsize{\large}% + \or% + \renewcommand*\LP@SDK@fontsize{\Large}% + \or% + \renewcommand*\LP@SDK@fontsize{\LARGE}% + \or% + \renewcommand*\LP@SDK@fontsize{\huge}% + \or% + \renewcommand*\LP@SDK@fontsize{\Huge}% + \fi% +}% +% +\define@key{lpsudoku.sty}{width}[9.1cm]% +{% + \renewcommand*\LP@SDK@width{#1}% +}% +% +\define@key{lpsudoku.sty}{title}[]% +{% + \renewcommand*\LP@SDK@title{#1}% +}% +% +\define@key{lpsudoku.sty}{cvoffset}[-24pt]% +{% + \renewcommand*\LP@SDK@cvoffset{#1}% +}% +% +\define@key{lpsudoku.sty}{titleindent}[0cm]% +{% + \renewcommand*\LP@SDK@titleindent{#1}% +}% +% +\define@key{lpsudoku.sty}{titlewidth}[9.1cm]% +{% + \renewcommand*\LP@SDK@titlewidth{#1}% +}% +% +\define@key{lpsudoku}{scale}% +{% + \renewcommand*\LP@SDK@scale{#1}% +}% +% +\define@key{lpsudoku}{bgcolor}% +{% + \renewcommand*\LP@SDK@bgcolor{#1}% +}% +% +\define@key{lpsudoku}{counterstyle}% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@choicekey*{lpsudoku}{fontsize}[\LP@SDK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\LP@SDK@fontsize{\tiny}% + \or% + \renewcommand*\LP@SDK@fontsize{\scriptsize}% + \or% + \renewcommand*\LP@SDK@fontsize{\footnotesize}% + \or% + \renewcommand*\LP@SDK@fontsize{\small}% + \or% + \renewcommand*\LP@SDK@fontsize{\normalsize}% + \or% + \renewcommand*\LP@SDK@fontsize{\large}% + \or% + \renewcommand*\LP@SDK@fontsize{\Large}% + \or% + \renewcommand*\LP@SDK@fontsize{\LARGE}% + \or% + \renewcommand*\LP@SDK@fontsize{\huge}% + \or% + \renewcommand*\LP@SDK@fontsize{\Huge}% + \fi% +}% +% +\define@key{lpsudoku}{width}% +{% + \renewcommand*\LP@SDK@width{#1}% +}% +% +\define@key{lpsudoku}{title}% +{% + \renewcommand*\LP@SDK@title{#1}% +}% +% +\define@key{lpsudoku}{cvoffset}% +{% + \renewcommand*\LP@SDK@cvoffset{#1}% +}% +% +\define@key{lpsudoku}{titleindent}% +{% + \renewcommand*\LP@SDK@titleindent{#1}% +}% +% +\define@key{lpsudoku}{titlewidth}% +{% + \renewcommand*\LP@SDK@titlewidth{#1}% +}% +% +\ExecuteOptionsX{width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% +% +\ProcessOptionsX\relax% +% +\let\lpsudokucell\setcell% +% +\newcommand*\lpsudokusetup[1]% +{% + \setkeys{lpsudoku.sty}{#1}% +}% +% +\newenvironment{lpsudoku}[1][]% +{% + \setkeys{lpsudoku}{#1}% + \LP@set@package{lpsudoku}% + \LP@set@env@prefix{LP@SDK}% + \setcounter{LP@SDK@rows}{\LP@SDK@rows}% + \setcounter{LP@SDK@columns}{\LP@SDK@columns}% + \stepcounter{LP@SDK@rows}% + \stepcounter{LP@SDK@columns}% + \begin{minipage}[t]{\LP@SDK@width}% + \ifthenelse{\equal{\LP@SDK@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@SDK@titleindent}\parbox{\LP@SDK@titlewidth}{\strut\LP@titleformat\LP@SDK@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@SDK@scale]% + \LP@drawbackground{1}{1}{\LP@SDK@columns}{\LP@SDK@rows}{\LP@SDK@bgcolor}% + \LP@drawgrid{1}{1}{\LP@SDK@columns}{\LP@SDK@rows}{1cm}% + \LP@drawsudokugrid% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +\endinput%
\ No newline at end of file |