From a9682d5de4862ec688defed3cc52e0df721351a5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 18 Mar 2013 22:33:00 +0000 Subject: logicpuzzle (17mar13) git-svn-id: svn://tug.org/texlive/trunk@29418 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/logicpuzzle/chaossudoku.sty | 232 +++++++++++++++++++++ Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty | 232 +++++++++++++++++++++ .../tex/latex/logicpuzzle/logicpuzzle.sty | 35 ++-- 3 files changed, 484 insertions(+), 15 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty create mode 100644 Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty (limited to 'Master/texmf-dist/tex/latex/logicpuzzle') diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty new file mode 100644 index 00000000000..6f6ab6204bf --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty @@ -0,0 +1,232 @@ +%% +%% Copyright (C) 2013 by: +%% Josef Kleber +%% +%% +%% 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{chaossudoku}[2013/03/16 chaossudoku.sty v1.0 - Josef Kleber (C) 2013]% +% +\RequirePackage{logicpuzzle}% +% +% options +\newcommand*\LP@CS@width{5.1cm}% +\newcommand*\LP@CS@fontsize\Large% +\newcommand*\LP@CS@rows{5}% +\newcommand*\LP@CS@columns{5}% +\newcommand*\LP@CS@scale{1}% +\newcommand*\LP@CS@bgcolor{}% +\newcommand*\LP@CS@cvoffset{-39pt}% +\newcommand*\LP@CS@title{}% +\newcommand*\LP@CS@titleindent{0cm}% +\newcommand*\LP@CS@titlewidth{5.1cm}% +% +\newcounter{LP@CS@rows}% +\newcounter{LP@CS@columns}% +% +\setcounter{LP@CS@rows}{\LP@CS@rows}% +\setcounter{LP@CS@columns}{\LP@CS@columns}% +\stepcounter{LP@CS@rows}% +\stepcounter{LP@CS@columns}% +% +\define@key{chaossudoku.sty}{rows}[5]% +{% + \renewcommand*\LP@CS@rows{#1}% +}% +% +\define@key{chaossudoku.sty}{columns}[5]% +{% + \renewcommand*\LP@CS@columns{#1}% +}% +% +\define@key{chaossudoku.sty}{scale}[1]% +{% + \renewcommand*\LP@CS@scale{#1}% +}% +% +\define@key{chaossudoku.sty}{counterstyle}[none]% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@key{chaossudoku.sty}{bgcolor}[]% +{% + \renewcommand*\LP@CS@bgcolor{#1}% +}% +% +\define@choicekey*{chaossudoku.sty}{fontsize}[\LP@CS@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\LP@CS@fontsize{\tiny}% + \or% + \renewcommand*\LP@CS@fontsize{\scriptsize}% + \or% + \renewcommand*\LP@CS@fontsize{\footnotesize}% + \or% + \renewcommand*\LP@CS@fontsize{\small}% + \or% + \renewcommand*\LP@CS@fontsize{\normalsize}% + \or% + \renewcommand*\LP@CS@fontsize{\large}% + \or% + \renewcommand*\LP@CS@fontsize{\Large}% + \or% + \renewcommand*\LP@CS@fontsize{\LARGE}% + \or% + \renewcommand*\LP@CS@fontsize{\huge}% + \or% + \renewcommand*\LP@CS@fontsize{\Huge}% + \fi% +}% +% +\define@key{chaossudoku.sty}{width}[5.1cm]% +{% + \renewcommand*\LP@CS@width{#1}% +}% +% +\define@key{chaossudoku.sty}{title}[]% +{% + \renewcommand*\LP@CS@title{#1}% +}% +% +\define@key{chaossudoku.sty}{cvoffset}[-22pt]% +{% + \renewcommand*\LP@CS@cvoffset{#1}% +}% +% +\define@key{chaossudoku.sty}{titleindent}[0cm]% +{% + \renewcommand*\LP@CS@titleindent{#1}% +}% +% +\define@key{chaossudoku.sty}{titlewidth}[5.1cm]% +{% + \renewcommand*\LP@CS@titlewidth{#1}% +}% +% +\define@key{chaossudoku}{rows}% +{% + \renewcommand*\LP@CS@rows{#1}% +}% +% +\define@key{chaossudoku}{columns}% +{% + \renewcommand*\LP@CS@columns{#1}% +}% +% +\define@key{chaossudoku}{scale}% +{% + \renewcommand*\LP@CS@scale{#1}% +}% +% +\define@key{chaossudoku}{bgcolor}% +{% + \renewcommand*\LP@CS@bgcolor{#1}% +}% +% +\define@key{chaossudoku}{counterstyle}% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@choicekey*{chaossudoku}{fontsize}[\LP@CS@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\LP@CS@fontsize{\tiny}% + \or% + \renewcommand*\LP@CS@fontsize{\scriptsize}% + \or% + \renewcommand*\LP@CS@fontsize{\footnotesize}% + \or% + \renewcommand*\LP@CS@fontsize{\small}% + \or% + \renewcommand*\LP@CS@fontsize{\normalsize}% + \or% + \renewcommand*\LP@CS@fontsize{\large}% + \or% + \renewcommand*\LP@CS@fontsize{\Large}% + \or% + \renewcommand*\LP@CS@fontsize{\LARGE}% + \or% + \renewcommand*\LP@CS@fontsize{\huge}% + \or% + \renewcommand*\LP@CS@fontsize{\Huge}% + \fi% +}% +% +\define@key{chaossudoku}{width}% +{% + \renewcommand*\LP@CS@width{#1}% +}% +% +\define@key{chaossudoku}{title}% +{% + \renewcommand*\LP@CS@title{#1}% +}% +% +\define@key{chaossudoku}{cvoffset}% +{% + \renewcommand*\LP@CS@cvoffset{#1}% +}% +% +\define@key{chaossudoku}{titleindent}% +{% + \renewcommand*\LP@CS@titleindent{#1}% +}% +% +\define@key{chaossudoku}{titlewidth}% +{% + \renewcommand*\LP@CS@titlewidth{#1}% +}% +% +\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% +% +\ProcessOptionsX\relax% +% +\let\chaossudokucell\setcell% +% +\newcommand*\chaossudokusetup[1]% +{% + \setkeys{chaossudoku.sty}{#1}% +}% +% +\newenvironment{chaossudoku}[1][]% +{% + \setkeys{chaossudoku}{#1}% + \LP@set@package{chaossudoku}% + \LP@set@env@prefix{LP@CS}% + \setcounter{LP@CS@rows}{\LP@CS@rows}% + \setcounter{LP@CS@columns}{\LP@CS@columns}% + \stepcounter{LP@CS@rows}% + \stepcounter{LP@CS@columns}% + \begin{minipage}[t]{\LP@CS@width}% + \ifthenelse{\equal{\LP@CS@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@CS@titleindent}\parbox{\LP@CS@titlewidth}{\strut\LP@titleformat\LP@CS@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@CS@scale]% + \LP@drawbackground{1}{1}{\LP@CS@columns}{\LP@CS@rows}{\LP@CS@bgcolor}% + \LP@drawgrid{1}{1}{\LP@CS@columns}{\LP@CS@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +\endinput% \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty b/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty new file mode 100644 index 00000000000..07ace4e5bc3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty @@ -0,0 +1,232 @@ +%% +%% Copyright (C) 2013 by: +%% Josef Kleber +%% +%% +%% 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{hakyuu}[2013/03/16 hakyuu.sty v1.0 - Josef Kleber (C) 2013]% +% +\RequirePackage{logicpuzzle}% +% +% options +\newcommand*\LP@HY@width{5.1cm}% +\newcommand*\LP@HY@fontsize\Large% +\newcommand*\LP@HY@rows{5}% +\newcommand*\LP@HY@columns{5}% +\newcommand*\LP@HY@scale{1}% +\newcommand*\LP@HY@bgcolor{}% +\newcommand*\LP@HY@cvoffset{-39pt}% +\newcommand*\LP@HY@title{}% +\newcommand*\LP@HY@titleindent{0cm}% +\newcommand*\LP@HY@titlewidth{5.1cm}% +% +\newcounter{LP@HY@rows}% +\newcounter{LP@HY@columns}% +% +\setcounter{LP@HY@rows}{\LP@HY@rows}% +\setcounter{LP@HY@columns}{\LP@HY@columns}% +\stepcounter{LP@HY@rows}% +\stepcounter{LP@HY@columns}% +% +\define@key{hakyuu.sty}{rows}[5]% +{% + \renewcommand*\LP@HY@rows{#1}% +}% +% +\define@key{hakyuu.sty}{columns}[5]% +{% + \renewcommand*\LP@HY@columns{#1}% +}% +% +\define@key{hakyuu.sty}{scale}[1]% +{% + \renewcommand*\LP@HY@scale{#1}% +}% +% +\define@key{hakyuu.sty}{counterstyle}[none]% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@key{hakyuu.sty}{bgcolor}[]% +{% + \renewcommand*\LP@HY@bgcolor{#1}% +}% +% +\define@choicekey*{hakyuu.sty}{fontsize}[\LP@HY@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\LP@HY@fontsize{\tiny}% + \or% + \renewcommand*\LP@HY@fontsize{\scriptsize}% + \or% + \renewcommand*\LP@HY@fontsize{\footnotesize}% + \or% + \renewcommand*\LP@HY@fontsize{\small}% + \or% + \renewcommand*\LP@HY@fontsize{\normalsize}% + \or% + \renewcommand*\LP@HY@fontsize{\large}% + \or% + \renewcommand*\LP@HY@fontsize{\Large}% + \or% + \renewcommand*\LP@HY@fontsize{\LARGE}% + \or% + \renewcommand*\LP@HY@fontsize{\huge}% + \or% + \renewcommand*\LP@HY@fontsize{\Huge}% + \fi% +}% +% +\define@key{hakyuu.sty}{width}[5.1cm]% +{% + \renewcommand*\LP@HY@width{#1}% +}% +% +\define@key{hakyuu.sty}{title}[]% +{% + \renewcommand*\LP@HY@title{#1}% +}% +% +\define@key{hakyuu.sty}{cvoffset}[-22pt]% +{% + \renewcommand*\LP@HY@cvoffset{#1}% +}% +% +\define@key{hakyuu.sty}{titleindent}[0cm]% +{% + \renewcommand*\LP@HY@titleindent{#1}% +}% +% +\define@key{hakyuu.sty}{titlewidth}[5.1cm]% +{% + \renewcommand*\LP@HY@titlewidth{#1}% +}% +% +\define@key{hakyuu}{rows}% +{% + \renewcommand*\LP@HY@rows{#1}% +}% +% +\define@key{hakyuu}{columns}% +{% + \renewcommand*\LP@HY@columns{#1}% +}% +% +\define@key{hakyuu}{scale}% +{% + \renewcommand*\LP@HY@scale{#1}% +}% +% +\define@key{hakyuu}{bgcolor}% +{% + \renewcommand*\LP@HY@bgcolor{#1}% +}% +% +\define@key{hakyuu}{counterstyle}% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@choicekey*{hakyuu}{fontsize}[\LP@HY@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\LP@HY@fontsize{\tiny}% + \or% + \renewcommand*\LP@HY@fontsize{\scriptsize}% + \or% + \renewcommand*\LP@HY@fontsize{\footnotesize}% + \or% + \renewcommand*\LP@HY@fontsize{\small}% + \or% + \renewcommand*\LP@HY@fontsize{\normalsize}% + \or% + \renewcommand*\LP@HY@fontsize{\large}% + \or% + \renewcommand*\LP@HY@fontsize{\Large}% + \or% + \renewcommand*\LP@HY@fontsize{\LARGE}% + \or% + \renewcommand*\LP@HY@fontsize{\huge}% + \or% + \renewcommand*\LP@HY@fontsize{\Huge}% + \fi% +}% +% +\define@key{hakyuu}{width}% +{% + \renewcommand*\LP@HY@width{#1}% +}% +% +\define@key{hakyuu}{title}% +{% + \renewcommand*\LP@HY@title{#1}% +}% +% +\define@key{hakyuu}{cvoffset}% +{% + \renewcommand*\LP@HY@cvoffset{#1}% +}% +% +\define@key{hakyuu}{titleindent}% +{% + \renewcommand*\LP@HY@titleindent{#1}% +}% +% +\define@key{hakyuu}{titlewidth}% +{% + \renewcommand*\LP@HY@titlewidth{#1}% +}% +% +\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% +% +\ProcessOptionsX\relax% +% +\let\hakyuucell\setcell% +% +\newcommand*\hakyuusetup[1]% +{% + \setkeys{hakyuu.sty}{#1}% +}% +% +\newenvironment{hakyuu}[1][]% +{% + \setkeys{hakyuu}{#1}% + \LP@set@package{hakyuu}% + \LP@set@env@prefix{LP@HY}% + \setcounter{LP@HY@rows}{\LP@HY@rows}% + \setcounter{LP@HY@columns}{\LP@HY@columns}% + \stepcounter{LP@HY@rows}% + \stepcounter{LP@HY@columns}% + \begin{minipage}[t]{\LP@HY@width}% + \ifthenelse{\equal{\LP@HY@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@HY@titleindent}\parbox{\LP@HY@titlewidth}{\strut\LP@titleformat\LP@HY@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@HY@scale]% + \LP@drawbackground{1}{1}{\LP@HY@columns}{\LP@HY@rows}{\LP@HY@bgcolor}% + \LP@drawgrid{1}{1}{\LP@HY@columns}{\LP@HY@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +\endinput% \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty index 1d2fa7358fb..edb04f40e5f 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty @@ -19,7 +19,7 @@ %% %% This work consists of all files listed in manifest.txt. %% -\ProvidesPackage{logicpuzzle}[2013/03/09 logicpuzzle.sty v1.2 - Josef Kleber (C) 2013]% +\ProvidesPackage{logicpuzzle}[2013/03/16 logicpuzzle.sty v1.2a - Josef Kleber (C) 2013]% % \RequirePackage{xkeyval}% \RequirePackage{ifthen}% @@ -28,9 +28,12 @@ \RequirePackage{marginnote}% \RequirePackage{tikz}% \usetikzlibrary{decorations.pathmorphing}% -\pgfdeclarelayer{LPbackground} -\pgfdeclarelayer{LPforeground} -\pgfsetlayers{LPbackground,main,LPforeground} +\pgfdeclarelayer{LPbgcolor}% +\pgfdeclarelayer{LPbackgroundtwo}% +\pgfdeclarelayer{LPbackground}% +\pgfdeclarelayer{LPforeground}% +\pgfdeclarelayer{LPforegroundtwo}% +\pgfsetlayers{LPbgcolor,LPbackgroundtwo,LPbackground,main,LPforeground,LPforegroundtwo}% % \newcounter{LP@counti}% \newcounter{LP@countii}% @@ -101,14 +104,14 @@ % \newcommand*\LP@drawsudokugrid% {% - \draw[ultra thick] (1,1) -- (1,10); - \draw[ultra thick] (4,1) -- (4,10); - \draw[ultra thick] (7,1) -- (7,10); - \draw[ultra thick] (10,1) -- (10,10); - \draw[ultra thick] (1,1) -- (10,1); - \draw[ultra thick] (1,4) -- (10,4); - \draw[ultra thick] (1,7) -- (10,7); - \draw[ultra thick] (1,10) -- (10,10); + \draw[ultra thick] (1,1) -- (1,10);% + \draw[ultra thick] (4,1) -- (4,10);% + \draw[ultra thick] (7,1) -- (7,10);% + \draw[ultra thick] (10,1) -- (10,10);% + \draw[ultra thick] (1,1) -- (10,1);% + \draw[ultra thick] (1,4) -- (10,4);% + \draw[ultra thick] (1,7) -- (10,7);% + \draw[ultra thick] (1,10) -- (10,10);% }% % % #1 grid x min @@ -125,7 +128,9 @@ \setcounter{LP@countii}{#4}% max row \stepcounter{LP@counti}% \stepcounter{LP@countii}% - \draw[fill=#5] (#1,#2) rectangle (\value{LP@counti},\value{LP@countii});% + \begin{pgfonlayer}{LPbgcolor}% + \draw[fill=#5] (#1,#2) rectangle (\value{LP@counti},\value{LP@countii});% + \end{pgfonlayer}{LPbgcolor}% }% }% % @@ -347,12 +352,12 @@ % \newcommand*\framearea[2]% {% - \draw[ultra thick,color=#1] #2; + \draw[ultra thick,color=#1] #2;% }% % \newcommand*\fillarea[2]% {% - \draw[ultra thick,fill=#1] #2 ; + \draw[ultra thick,fill=#1] #2 ;% }% % \newenvironment{puzzlebackground}% -- cgit v1.2.3