From 3e9898bf813da161e97f32376fc0eaa9bc6b9630 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 5 Apr 2013 23:10:02 +0000 Subject: logicpuzzle (5apr13) git-svn-id: svn://tug.org/texlive/trunk@29679 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/logicpuzzle/battleship.sty | 338 ++++------------- .../texmf-dist/tex/latex/logicpuzzle/bokkusu.sty | 224 ++--------- .../tex/latex/logicpuzzle/chaossudoku.sty | 189 +--------- .../texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty | 79 ++++ Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty | 189 +--------- Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty | 79 ++++ .../tex/latex/logicpuzzle/logicpuzzle.sty | 411 ++++++++++++++++----- .../texmf-dist/tex/latex/logicpuzzle/skyline.sty | 232 ++---------- 8 files changed, 648 insertions(+), 1093 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty create mode 100644 Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty (limited to 'Master/texmf-dist/tex/latex/logicpuzzle') diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty b/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty index af5715ab8a1..3dfde6d9a5a 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty @@ -23,269 +23,75 @@ % http://en.wikipedia.org/wiki/Battleship_%28puzzle%29 % http://de.wikipedia.org/wiki/Bimaru % -\ProvidesPackage{battleship}[2013/02/28 battleship.sty v1.3 - Josef Kleber (C) 2013]% +\ProvidesPackage{battleship}[2013/03/25 battleship.sty v1.4 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% -\tikzstyle{island} = [fill=yellow!30,draw, decorate, decoration={random steps,segment length=2.7pt,amplitude=1.7pt}]% -% -% options -\newcommand*\BS@width{6cm}% -\newcommand*\BS@fontsize\Large% -\newcommand*\BS@rows{5}% -\newcommand*\BS@columns{5}% -\newcommand*\BS@scale{1}% -\newcommand*\BS@bgcolor{}% -\newcommand*\BS@shipcolor{green}% -\newcommand*\BS@title{}% -\newcommand*\BS@titleindent{0.75cm}% -\newcommand*\BS@titlewidth{5.15cm}% -\newcommand*\BS@cvoffset{-23pt}% -\newcommand*\BS@SB@indent{0.75cm}% -\newcommand*\BS@SB@width{5.15cm}% -\newcommand*\BS@SB@shipboxscale{1}% -% -\newcounter{BS@rows}% -\newcounter{BS@columns}% -% -\setcounter{BS@rows}{\BS@rows}% -\setcounter{BS@columns}{\BS@columns}% -\stepcounter{BS@rows}% -\stepcounter{BS@columns}% -% -\define@key{battleship.sty}{rows}[5]% -{% - \renewcommand*\BS@rows{#1}% -}% -% -\define@key{battleship.sty}{columns}[5]% -{% - \renewcommand*\BS@columns{#1}% -}% -% -\define@key{battleship.sty}{shipcolor}[green]% -{% - \renewcommand*\BS@shipcolor{#1}% -}% -% -\define@key{battleship.sty}{scale}[1]% -{% - \renewcommand*\BS@scale{#1}% -}% -% -\define@key{battleship.sty}{counterstyle}[none]% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@key{battleship.sty}{bgcolor}[]% -{% - \renewcommand*\BS@bgcolor{#1}% -}% -% -\define@choicekey*{battleship.sty}{fontsize}[\BS@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\BS@fontsize{\tiny}% - \or% - \renewcommand*\BS@fontsize{\scriptsize}% - \or% - \renewcommand*\BS@fontsize{\footnotesize}% - \or% - \renewcommand*\BS@fontsize{\small}% - \or% - \renewcommand*\BS@fontsize{\normalsize}% - \or% - \renewcommand*\BS@fontsize{\large}% - \or% - \renewcommand*\BS@fontsize{\Large}% - \or% - \renewcommand*\BS@fontsize{\LARGE}% - \or% - \renewcommand*\BS@fontsize{\huge}% - \or% - \renewcommand*\BS@fontsize{\Huge}% - \fi% -}% -% -\define@key{battleship.sty}{width}[6cm]% -{% - \renewcommand*\BS@width{#1}% -}% -% -\define@key{battleship.sty}{title}[]% -{% - \renewcommand*\BS@title{#1}% -}% -% -\define@key{battleship.sty}{cvoffset}[-23pt]% -{% - \renewcommand*\BS@cvoffset{#1}% -}% -% -\define@key{battleship.sty}{titleindent}[0.75cm]% -{% - \renewcommand*\BS@titleindent{#1}% -}% -% -\define@key{battleship.sty}{titlewidth}[5.15cm]% -{% - \renewcommand*\BS@titlewidth{#1}% -}% -% -\define@key{battleship.sty}{sbindent}[0.75cm]% -{% - \renewcommand*\BS@SB@indent{#1}% -}% -% -\define@key{battleship.sty}{sbwidth}[5.15cm]% -{% - \renewcommand*\BS@SB@width{#1}% -}% -% -\define@key{battleship.sty}{sbshipscale}[1]% -{% - \renewcommand*\BS@SB@shipboxscale{#1}% -}% -% -\define@key{battleship}{rows}% -{% - \renewcommand*\BS@rows{#1}% -}% -% -\define@key{battleship}{columns}% -{% - \renewcommand*\BS@columns{#1}% -}% -% -\define@key{battleship}{shipcolor}% -{% - \renewcommand*\BS@shipcolor{#1}% -}% -% -\define@key{battleship}{scale}% -{% - \renewcommand*\BS@scale{#1}% -}% -% -\define@key{battleship}{bgcolor}% -{% - \renewcommand*\BS@bgcolor{#1}% -}% -% -\define@key{battleship}{counterstyle}% -{% - \renewcommand*\LP@counterstyle{#1}% -}% % -\define@choicekey*{battleship}{fontsize}[\BS@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\BS@fontsize{\tiny}% - \or% - \renewcommand*\BS@fontsize{\scriptsize}% - \or% - \renewcommand*\BS@fontsize{\footnotesize}% - \or% - \renewcommand*\BS@fontsize{\small}% - \or% - \renewcommand*\BS@fontsize{\normalsize}% - \or% - \renewcommand*\BS@fontsize{\large}% - \or% - \renewcommand*\BS@fontsize{\Large}% - \or% - \renewcommand*\BS@fontsize{\LARGE}% - \or% - \renewcommand*\BS@fontsize{\huge}% - \or% - \renewcommand*\BS@fontsize{\Huge}% - \fi% -}% -% -\define@key{battleship}{width}% -{% - \renewcommand*\BS@width{#1}% -}% -% -\define@key{battleship}{title}% -{% - \renewcommand*\BS@title{#1}% -}% -% -\define@key{battleship}{cvoffset}% -{% - \renewcommand*\BS@cvoffset{#1}% -}% -% -\define@key{battleship}{titleindent}% -{% - \renewcommand*\BS@titleindent{#1}% -}% -% -\define@key{battleship}{titlewidth}% -{% - \renewcommand*\BS@titlewidth{#1}% -}% -% -\define@key{battleship}{sbindent}% -{% - \renewcommand*\BS@SB@indent{#1}% -}% -% -\define@key{battleship}{sbwidth}% -{% - \renewcommand*\BS@SB@width{#1}% -}% -% -\define@key{battleship}{sbshipscale}% -{% - \renewcommand*\BS@SB@shipboxscale{#1}% -}% +\newcommand*\LP@BS@init@prefix{LP@BS}% +\newcommand*\LP@BS@init@package{battleship}% +% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{rows}{5}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{columns}{5}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{shipcolor}{green}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{scale}{1}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{counterstyle}{none}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{bgcolor}{}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{width}{6cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{title}{}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{titleindent}{0.75cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{titlewidth}{5.15cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{sbindent}{0.75cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{sbwidth}{5.15cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{sbshipscale}{1}% +\LP@define@choicekey@fontsize{\LP@BS@init@prefix}{\LP@BS@init@package}{{Large}}% % \ExecuteOptionsX{rows,columns,width,fontsize,shipcolor,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth,sbindent,sbwidth,sbshipscale}% -% \ProcessOptionsX\relax% % -\gdef\BS@shipbox{}% +\LP@init@counter{\LP@BS@init@prefix}% % -\newcommand*\Ship{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor] (0,0) circle (1);}% -\newcommand*\ShipC{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% -\newcommand*\ShipT{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% -\newcommand*\ShipB{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% -\newcommand*\ShipL{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% -\newcommand*\ShipR{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% -\newcommand*\Island{\tikz[scale=\BS@scale]\draw[scale=.36,island] (0,0) rectangle (2,2);}% -\newcommand*\Water{\tikz[scale=\BS@scale]\draw[scale=.36,fill,blue!40] (1,1) circle (0.2);}% -% versions for \shipbox without second scale -\newcommand*\@Ship{\tikz\draw[scale=.144,fill=\BS@shipcolor] (0,0) circle (1);}% -\newcommand*\@ShipC{\tikz\draw[scale=.144,fill=\BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% -\newcommand*\@ShipT{\tikz\draw[scale=.144,fill=\BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% -\newcommand*\@ShipB{\tikz\draw[scale=.144,fill=\BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% -\newcommand*\@ShipL{\tikz\draw[scale=.144,fill=\BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% -\newcommand*\@ShipR{\tikz\draw[scale=.144,fill=\BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% -% -\newcommand*\BS@printship[1]% -{% - \ifthenelse{\equal{#1}{1}}{\scalebox{\BS@SB@shipboxscale}{\@Ship}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{2}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{3}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{4}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{5}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{6}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{7}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{8}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{9}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{10}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% -}% +\gdef\LP@BS@shipbox{}% +\tikzstyle{island} = [fill=yellow!30,draw, decorate, decoration={random steps,segment length=2.7pt,amplitude=1.7pt}]% % -\newcommand*\BS@printshipbox[1]% +\newcommand*\Ship{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor] (0,0) circle (1);}% +\newcommand*\ShipC{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% +\newcommand*\ShipT{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% +\newcommand*\ShipB{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% +\newcommand*\ShipL{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% +\newcommand*\ShipR{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% +\newcommand*\Island{\tikz[scale=\LP@BS@scale]\draw[scale=.36,island] (0,0) rectangle (2,2);}% +\newcommand*\Water{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill,blue!40] (1,1) circle (0.2);}% +% versions for \shipbox without second scale +\newcommand*\@Ship{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor] (0,0) circle (1);}% +\newcommand*\@ShipC{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% +\newcommand*\@ShipT{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% +\newcommand*\@ShipB{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% +\newcommand*\@ShipL{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% +\newcommand*\@ShipR{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% +% +\newcommand*\LP@BS@printship[1]% +{% + \ifthenelse{\equal{#1}{1}}{\scalebox{\LP@BS@sbshipscale}{\@Ship}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{2}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{3}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{4}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{5}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{6}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{7}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{8}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{9}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{10}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% +}% +% +\newcommand*\LP@BS@printshipbox[1]% {% \expandafters needed because csv list is stored in macro - \expandafter\forcsvlist\expandafter\BS@printship\expandafter{#1}% + \expandafter\forcsvlist\expandafter\LP@BS@printship\expandafter{#1}% }% % \newcommand*\shipH[1]% {% - \LP@setrowcontents{#1}{1}{\value{BS@rows}}% + \LP@setrowcontents{#1}{1}{\value{LP@BS@rows}}% }% % \newcommand*\shipV[1]% @@ -295,7 +101,7 @@ % \newcommand*\placesegment[3]% {% - \LP@ingrid{#1}{#2}{\BS@columns}{\BS@rows}{battleship}% + \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% \LP@setcellcontent{#1}{#2}{#3}% }% % @@ -303,20 +109,20 @@ % \newcommand*\placeisland[2]% {% - \LP@ingrid{#1}{#2}{\BS@columns}{\BS@rows}{battleship}% + \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% \LP@setcellcontent{#1}{#2}{\Island}% }% % \newcommand*\placewater[2]% {% - \LP@ingrid{#1}{#2}{\BS@columns}{\BS@rows}{battleship}% + \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% \LP@setcellcontent{#1}{#2}{\Water}% }% % \newcommand*\shipbox[2][]% {% \setkeys{shipbox}{#1}% - \gdef\BS@shipbox{#2}% + \gdef\LP@BS@shipbox{#2}% }% % \newcommand*\placeship[4]% @@ -411,24 +217,24 @@ {% \setkeys{battleship}{#1}% \LP@set@package{battleship}% - \LP@set@env@prefix{BS}% + \LP@set@env@prefix{LP@BS}% \shipbox{}% clear shipbox - \setcounter{BS@rows}{\BS@rows}% - \setcounter{BS@columns}{\BS@columns}% - \stepcounter{BS@rows}% - \stepcounter{BS@columns}% - \begin{minipage}[t]{\BS@width}% - \ifthenelse{\equal{\BS@title}{}}% + \setcounter{LP@BS@rows}{\LP@BS@rows}% + \setcounter{LP@BS@columns}{\LP@BS@columns}% + \stepcounter{LP@BS@rows}% + \stepcounter{LP@BS@columns}% + \begin{minipage}[t]{\LP@BS@width}% + \ifthenelse{\equal{\LP@BS@title}{}}% {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\BS@titleindent}\parbox{\BS@titlewidth}{\strut\LP@titleformat\BS@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\BS@scale]% - \LP@drawbackground{1}{1}{\BS@columns}{\BS@rows}{\BS@bgcolor}% - \LP@drawgrid{1}{1}{\BS@columns}{\BS@rows}{1cm}% + {\enspace\par\noindent\hspace{\LP@BS@titleindent}\parbox{\LP@BS@titlewidth}{\strut\LP@titleformat\LP@BS@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@BS@scale]% + \LP@drawbackground{1}{1}{\LP@BS@columns}{\LP@BS@rows}{\LP@BS@bgcolor}% + \LP@drawgrid{1}{1}{\LP@BS@columns}{\LP@BS@rows}{1cm}% }% {% \end{tikzpicture}% - \LP@drawcounter{\LP@counterstyle}% - \par\hbadness=10000\medskip\noindent\hspace{\BS@SB@indent}\begin{minipage}{\BS@SB@width}{\hbadness=10000\RaggedRight\BS@printshipbox{\BS@shipbox}}\end{minipage}% + \LP@drawcounter{\LP@BS@counterstyle}% + \par\hbadness=10000\medskip\noindent\hspace{\LP@BS@sbindent}\begin{minipage}{\LP@BS@sbwidth}{\hbadness=10000\RaggedRight\LP@BS@printshipbox{\LP@BS@shipbox}}\end{minipage}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty b/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty index f7712888537..d740fb1c64b 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty @@ -20,195 +20,31 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{bokkusu}[2013/03/09 bokkusu.sty v1.1 - Josef Kleber (C) 2013]% +\ProvidesPackage{bokkusu}[2013/03/25 bokkusu.sty v1.2 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -% options -\newcommand*\BK@width{6.7cm}% -\newcommand*\BK@fontsize\Large% -\newcommand*\BK@rows{5}% -\newcommand*\BK@columns{5}% -\newcommand*\BK@scale{1}% -\newcommand*\BK@color{black}% -\newcommand*\BK@bgcolor{}% -\newcommand*\BK@cvoffset{-23pt}% -\newcommand*\BK@title{}% -\newcommand*\BK@titleindent{0.75cm}% -\newcommand*\BK@titlewidth{5.85cm}% -% -\newcounter{BK@rows}% -\newcounter{BK@columns}% -% -\setcounter{BK@rows}{\BK@rows}% -\setcounter{BK@columns}{\BK@columns}% -\stepcounter{BK@rows}% -\stepcounter{BK@columns}% -% -\define@key{bokkusu.sty}{rows}[5]% -{% - \renewcommand*\BK@rows{#1}% -}% -% -\define@key{bokkusu.sty}{columns}[5]% -{% - \renewcommand*\BK@columns{#1}% -}% -% -\define@key{bokkusu.sty}{scale}[1]% -{% - \renewcommand*\BK@scale{#1}% -}% -% -\define@key{bokkusu.sty}{counterstyle}[none]% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@key{bokkusu.sty}{color}[black]% -{% - \renewcommand*\BK@color{#1}% -}% -% -\define@key{bokkusu.sty}{bgcolor}[]% -{% - \renewcommand*\BK@bgcolor{#1}% -}% -% -\define@choicekey*{bokkusu.sty}{fontsize}[\BK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\BK@fontsize{\tiny}% - \or% - \renewcommand*\BK@fontsize{\scriptsize}% - \or% - \renewcommand*\BK@fontsize{\footnotesize}% - \or% - \renewcommand*\BK@fontsize{\small}% - \or% - \renewcommand*\BK@fontsize{\normalsize}% - \or% - \renewcommand*\BK@fontsize{\large}% - \or% - \renewcommand*\BK@fontsize{\Large}% - \or% - \renewcommand*\BK@fontsize{\LARGE}% - \or% - \renewcommand*\BK@fontsize{\huge}% - \or% - \renewcommand*\BK@fontsize{\Huge}% - \fi% -}% -% -\define@key{bokkusu.sty}{width}[6.7cm]% -{% - \renewcommand*\BK@width{#1}% -}% -% -\define@key{bokkusu.sty}{title}[]% -{% - \renewcommand*\BK@title{#1}% -}% -% -\define@key{bokkusu.sty}{cvoffset}[-38pt]% -{% - \renewcommand*\BK@cvoffset{#1}% -}% -% -\define@key{bokkusu.sty}{titleindent}[0.75cm]% -{% - \renewcommand*\BK@titleindent{#1}% -}% -% -\define@key{bokkusu.sty}{titlewidth}[5.85cm]% -{% - \renewcommand*\BK@titlewidth{#1}% -}% -% -\define@key{bokkusu}{rows}% -{% - \renewcommand*\BK@rows{#1}% -}% -% -\define@key{bokkusu}{columns}% -{% - \renewcommand*\BK@columns{#1}% -}% -% -\define@key{bokkusu}{scale}% -{% - \renewcommand*\BK@scale{#1}% -}% -% -\define@key{bokkusu}{color}% -{% - \renewcommand*\BK@color{#1}% -}% -% -\define@key{bokkusu}{bgcolor}% -{% - \renewcommand*\BK@bgcolor{#1}% -}% -% -\define@key{bokkusu}{counterstyle}% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@choicekey*{bokkusu}{fontsize}[\BK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\BK@fontsize{\tiny}% - \or% - \renewcommand*\BK@fontsize{\scriptsize}% - \or% - \renewcommand*\BK@fontsize{\footnotesize}% - \or% - \renewcommand*\BK@fontsize{\small}% - \or% - \renewcommand*\BK@fontsize{\normalsize}% - \or% - \renewcommand*\BK@fontsize{\large}% - \or% - \renewcommand*\BK@fontsize{\Large}% - \or% - \renewcommand*\BK@fontsize{\LARGE}% - \or% - \renewcommand*\BK@fontsize{\huge}% - \or% - \renewcommand*\BK@fontsize{\Huge}% - \fi% -}% -% -\define@key{bokkusu}{width}% -{% - \renewcommand*\BK@width{#1}% -}% -% -\define@key{bokkusu}{title}% -{% - \renewcommand*\BK@title{#1}% -}% -% -\define@key{bokkusu}{cvoffset}% -{% - \renewcommand*\BK@cvoffset{#1}% -}% -% -\define@key{bokkusu}{titleindent}% -{% - \renewcommand*\BK@titleindent{#1}% -}% -% -\define@key{bokkusu}{titlewidth}% -{% - \renewcommand*\BK@titlewidth{#1}% -}% +\newcommand*\LP@BK@init@prefix{LP@BK}% +\newcommand*\LP@BK@init@package{bokkusu}% +% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{rows}{5}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{columns}{5}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{scale}{1}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{counterstyle}{none}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{color}{black}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{bgcolor}{}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{width}{6.7cm}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{cvoffset}{-38pt}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{title}{}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{titleindent}{0.75cm}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{titlewidth}{5.85cm}% +\LP@define@choicekey@fontsize{\LP@BK@init@prefix}{\LP@BK@init@package}{Large}% % \ExecuteOptionsX{rows,columns,width,fontsize,scale,color,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% \ProcessOptionsX\relax% % +\LP@init@counter{\LP@BK@init@prefix}% +% \let\valueH\LP@bottomrow% \let\valueV\LP@leftcolumn% \let\sumH\LP@toprow% @@ -223,22 +59,22 @@ {% \setkeys{bokkusu}{#1}% \LP@set@package{bokkusu}% - \LP@set@env@prefix{BK}% - \setcounter{BK@rows}{\BK@rows}% - \setcounter{BK@columns}{\BK@columns}% - \stepcounter{BK@rows}% - \stepcounter{BK@columns}% - \begin{minipage}[t]{\BK@width}% - \ifthenelse{\equal{\BK@title}{}}% + \LP@set@env@prefix{LP@BK}% + \setcounter{LP@BK@rows}{\LP@BK@rows}% + \setcounter{LP@BK@columns}{\LP@BK@columns}% + \stepcounter{LP@BK@rows}% + \stepcounter{LP@BK@columns}% + \begin{minipage}[t]{\LP@BK@width}% + \ifthenelse{\equal{\LP@BK@title}{}}% {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\BK@titleindent}\parbox{\BK@titlewidth}{\strut\LP@titleformat\BK@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\BK@scale]% - \LP@drawbackground{1}{1}{\BK@columns}{\BK@rows}{\BK@bgcolor}% - \LP@drawgrid{1}{1}{\BK@columns}{\BK@rows}{1cm}% + {\enspace\par\noindent\hspace{\LP@BK@titleindent}\parbox{\LP@BK@titlewidth}{\strut\LP@titleformat\LP@BK@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@BK@scale]% + \LP@drawbackground{1}{1}{\LP@BK@columns}{\LP@BK@rows}{\LP@BK@bgcolor}% + \LP@drawgrid{1}{1}{\LP@BK@columns}{\LP@BK@rows}{1cm}% }% {% \end{tikzpicture}% - \LP@drawcounter{\LP@counterstyle}% + \LP@drawcounter{\LP@BK@counterstyle}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty index 6f6ab6204bf..618cb2a83fe 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty @@ -20,184 +20,31 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{chaossudoku}[2013/03/16 chaossudoku.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{chaossudoku}[2013/03/27 chaossudoku.sty v1.1 - 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}% -}% +\newcommand*\LP@CS@init@prefix{LP@CS}% +\newcommand*\LP@CS@init@package{chaossudoku}% +% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{rows}{5}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{columns}{5}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{scale}{1}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{counterstyle}{none}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{bgcolor}{}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{width}{5.1cm}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{title}{}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@CS@init@prefix}{\LP@CS@init@package}{Large}% % \ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% % \ProcessOptionsX\relax% % +\LP@init@counter{\LP@CS@init@prefix}% +% \let\chaossudokucell\setcell% % \newcommand*\chaossudokusetup[1]% @@ -224,7 +71,7 @@ }% {% \end{tikzpicture}% - \LP@drawcounter{\LP@counterstyle}% + \LP@drawcounter{\LP@CS@counterstyle}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% 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 +%% +%% +%% 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 diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty b/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty index 07ace4e5bc3..836e055e21a 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty @@ -20,184 +20,31 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{hakyuu}[2013/03/16 hakyuu.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{hakyuu}[2013/03/27 hakyuu.sty v1.1 - 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}% -}% +\newcommand*\LP@HY@init@prefix{LP@HY}% +\newcommand*\LP@HY@init@package{hakyuu}% +% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{rows}{5}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{columns}{5}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{scale}{1}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{counterstyle}{none}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{bgcolor}{}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{width}{5.1cm}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{title}{}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@HY@init@prefix}{\LP@HY@init@package}{Large}% % \ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% % \ProcessOptionsX\relax% % +\LP@init@counter{\LP@HY@init@prefix}% +% \let\hakyuucell\setcell% % \newcommand*\hakyuusetup[1]% @@ -224,7 +71,7 @@ }% {% \end{tikzpicture}% - \LP@drawcounter{\LP@counterstyle}% + \LP@drawcounter{\LP@HY@counterstyle}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty b/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty new file mode 100644 index 00000000000..e8307962299 --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty @@ -0,0 +1,79 @@ +%% +%% 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{hitori}[2013/04/05 hitori.sty v1.0 - Josef Kleber (C) 2013]% +% +\RequirePackage{logicpuzzle}% +% +\newcommand*\LP@HT@init@prefix{LP@HT}% +\newcommand*\LP@HT@init@package{hitori}% +% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{rows}{5}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{columns}{5}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{scale}{1}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{counterstyle}{none}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{bgcolor}{}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{width}{5.1cm}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{title}{}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@HT@init@prefix}{\LP@HT@init@package}{Large}% +% +\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% +% +\ProcessOptionsX\relax% +% +\LP@init@counter{\LP@HT@init@prefix}% +% +\let\hitoricell\setcell% +% +\newcommand*\hitorisetup[1]% +{% + \setkeys{hitori.sty}{#1}% +}% +% +\newenvironment{hitori}[1][]% +{% + \setkeys{hitori}{#1}% + \LP@set@package{hitori}% + \LP@set@env@prefix{LP@HT}% + \setcounter{LP@HT@rows}{\LP@HT@rows}% + \setcounter{LP@HT@columns}{\LP@HT@columns}% + \stepcounter{LP@HT@rows}% + \stepcounter{LP@HT@columns}% + \begin{minipage}[t]{\LP@HT@width}% + \ifthenelse{\equal{\LP@HT@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@HT@titleindent}\parbox{\LP@HT@titlewidth}{\strut\LP@titleformat\LP@HT@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@HT@scale]% + \LP@drawbackground{1}{1}{\LP@HT@columns}{\LP@HT@rows}{\LP@HT@bgcolor}% + \LP@drawgrid{1}{1}{\LP@HT@columns}{\LP@HT@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@HT@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 edb04f40e5f..74d6b42cbd5 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/16 logicpuzzle.sty v1.2a - Josef Kleber (C) 2013]% +\ProvidesPackage{logicpuzzle}[2013/04/05 logicpuzzle.sty v1.3 - Josef Kleber (C) 2013]% % \RequirePackage{xkeyval}% \RequirePackage{ifthen}% @@ -37,7 +37,8 @@ % \newcounter{LP@counti}% \newcounter{LP@countii}% -\newcounter{LP@whiledo}% +\newcounter{LP@whiledo@i}% +\newcounter{LP@whiledo@ii}% \newcounter{LP@count@ig@i}% \newcounter{LP@count@ig@ii}% \newcounter{LP@count@ig@iii}% @@ -58,36 +59,113 @@ % \newcommand*\LP@Pfive{.5}% % -\newcommand*\LP@ingrid[5]% +% init +% +% #1 prefix +\newcommand*\LP@init@counter[1]% {% - \setcounter{LP@count@ig@i}{#1}% column - \setcounter{LP@count@ig@ii}{#2}% row - \setcounter{LP@count@ig@iii}{#3}% max column - \setcounter{LP@count@ig@iv}{#4}% max row - %#5 style - % - \ifnum\value{LP@count@ig@i}<1% - \PackageError{#5}% - {element outside of the grid}% - {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% - \fi% - \ifnum\value{LP@count@ig@ii}<1% - \PackageError{#5}% - {element outside of the grid}% - {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% - \fi% - \ifnum\value{LP@count@ig@i}>\value{LP@count@ig@iii}% - \PackageError{#5}% - {element outside of the grid}% - {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% - \fi% - \ifnum\value{LP@count@ig@ii}>\value{LP@count@ig@iv}% - \PackageError{#5}% - {element outside of the grid}% - {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% - \fi% + \newcounter{#1@rows}% + \newcounter{#1@columns}% + \setcounter{#1@rows}{\csname #1@rows\endcsname}% + \setcounter{#1@columns}{\csname #1@columns\endcsname}% + \stepcounter{#1@rows}% + \stepcounter{#1@columns}% +}% +% +% #1 package prefix +% #2 package +% #3 option +% #4 default +\newcommand*\LP@define@key[4]% +{% + \expandafter\gdef\csname#1@#3\endcsname{#4}% + \define@key{#2.sty}{#3}[#4]% + {% + \expandafter\gdef\csname#1@#3\endcsname{##1}% + }% + \define@key{#2}{#3}% + {% + \expandafter\def\csname#1@#3\endcsname{##1}% + }% +}% +% +% #1 package prefix +% #2 package +% #3 default +\newcommand*\LP@define@choicekey@fontsize[3]% +{% + \expandafter\gdef\csname#1@fontsize\endcsname{\Large}% + \define@choicekey*{#2.sty}{fontsize}[\LP@dck@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[#3]% + {% + \ifcase\nr\relax% + \expandafter\gdef\csname#1@fontsize\endcsname{\tiny}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\scriptsize}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\footnotesize}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\small}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\normalsize}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\large}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\Large}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\LARGE}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\huge}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\Huge}% + \fi% + }% + \define@choicekey*{#2}{fontsize}[\LP@dck@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[#3]% + {% + \ifcase\nr\relax% + \expandafter\def\csname#1@fontsize\endcsname{\tiny}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\scriptsize}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\footnotesize}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\small}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\normalsize}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\large}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\Large}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\LARGE}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\huge}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\Huge}% + \fi% + }% }% % +% colors +% +% #1 name +% #2 rgb color +\newcommand*\LP@definecolor[2]% +{% + \definecolor{#1}{rgb}{#2}% +}% +% +\LP@definecolor{LP@c@i}{.9,.9,.98}% +\LP@definecolor{LP@c@ii}{.688,.932,.932}% +\LP@definecolor{LP@c@iii}{.88,1,1}% +\LP@definecolor{LP@c@iv}{1,1,.88}% +\LP@definecolor{LP@c@v}{1,.855,.725}% +\LP@definecolor{LP@c@vi}{.498,1,0}% +\LP@definecolor{LP@c@vii}{.53,.808,.98}% +\LP@definecolor{LP@c@viii}{.196,.804,.196}% +\LP@definecolor{LP@c@ix}{1,.96,.932}% +% +% drawing grids +% % #1 grid x min % #2 grid y min % #3 grid x max @@ -114,6 +192,8 @@ \draw[ultra thick] (1,10) -- (10,10);% }% % +% drawing grid background +% % #1 grid x min % #2 grid y min % #3 grid x max @@ -134,6 +214,38 @@ }% }% % +% In the grid +% +\newcommand*\LP@ingrid[5]% +{% + \setcounter{LP@count@ig@i}{#1}% column + \setcounter{LP@count@ig@ii}{#2}% row + \setcounter{LP@count@ig@iii}{#3}% max column + \setcounter{LP@count@ig@iv}{#4}% max row + %#5 style + % + \ifnum\value{LP@count@ig@i}<1% + \PackageError{#5}% + {element outside of the grid}% + {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% + \fi% + \ifnum\value{LP@count@ig@ii}<1% + \PackageError{#5}% + {element outside of the grid}% + {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% + \fi% + \ifnum\value{LP@count@ig@i}>\value{LP@count@ig@iii}% + \PackageError{#5}% + {element outside of the grid}% + {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% + \fi% + \ifnum\value{LP@count@ig@ii}>\value{LP@count@ig@iv}% + \PackageError{#5}% + {element outside of the grid}% + {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% + \fi% +}% +% % #1 column % #2 row % #3 content @@ -191,7 +303,7 @@ % \newcommand*\setcolumn[2]% {% - \LP@setrowcontents{#2}{#1}{1}% + \LP@setcolumncontents{#2}{#1}{1}% }% % \newcommand*\setcell[3]% @@ -204,6 +316,173 @@ \LP@setcellcontent{#1}{#2}{\LP@fontsize#3}% }% % +\newcommand*\setcolorrow[2]% +{% + \setcounter{LP@counti}{1}% + \setcounter{LP@countii}{#1}% + \forcsvlist\LP@setcolorrow@i{#2}% +}% +% +\newcommand*\LP@setcolorrow@i[1]% +{% + \ifthenelse{\equal{#1}{0}}% + {% + \gdef\LP@HT@color{black}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + }% + {% + \expandafter\gdef\expandafter\LP@HT@color{LP@c@\romannumeral#1}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + \setcell{\arabic{LP@counti}}{\arabic{LP@countii}}{#1}% + }% + \stepcounter{LP@counti}% +}% +% +\newcommand*\setcolorcolumn[2]% +{% + \setcounter{LP@counti}{#1}% + \setcounter{LP@countii}{1}% + \forcsvlist\LP@setcolorcolumn@i{#2}% +}% +% +\newcommand*\LP@setcolorcolumn@i[1]% +{% + \ifthenelse{\equal{#1}{0}}% + {% + \gdef\LP@HT@color{black}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + }% + {% + \expandafter\gdef\expandafter\LP@HT@color{LP@c@\romannumeral#1}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + \setcell{\arabic{LP@counti}}{\arabic{LP@countii}}{#1}% + }% + \stepcounter{LP@countii}% +}% +% +\newcommand*\fillcell[2]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \LP@set@LP@color{\LP@env@prefix}% + \LP@set@LP@rows{\LP@env@prefix}% + \LP@set@LP@columns{\LP@env@prefix}% + \LP@ingrid{#1}{#2}{\LP@columns}{\LP@rows}{\LP@package}% + \LP@setcellcontent{#1}{#2}{\LP@Block}% +}% +% +% #1 row +% #2 csv list +\newcommand*\fillrow[2]% +{% + \setcounter{LP@counti}{1}% + \setcounter{LP@countii}{#1}% + \forcsvlist\LP@fillrow@i{#2}% +}% +% +\newcommand*\LP@fillrow@i[1]% +{% + \ifthenelse{\equal{#1}{1}}% + {\fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}}% + {}% + \stepcounter{LP@counti}% +}% +% +% #1 column +% #2 csv list +\newcommand*\fillcolumn[2]% +{% + \setcounter{LP@counti}{#1}% + \setcounter{LP@countii}{1}% + \forcsvlist\LP@fillcolumn@i{#2}% +}% +% +\newcommand*\LP@fillcolumn@i[1]% +{% + \ifthenelse{\equal{#1}{1}}% + {\fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}}% + {}% + \stepcounter{LP@countii}% +}% +% +\newcommand*\framearea[2]% +{% + \draw[ultra thick,color=#1] #2;% +}% +% +\newcommand*\fillarea[2]% +{% + \draw[ultra thick,fill=#1] #2 ;% +}% +% +\newcommand*\filldiagonals[1][yellow!20]% +{% + \LP@set@LP@columns{\LP@env@prefix}% + \LP@set@LP@rows{\LP@env@prefix}% + \LP@set@LP@scale{\LP@env@prefix}% + \setcounter{LP@counti}{\LP@columns}% + \setcounter{LP@countii}{\LP@rows}% + \stepcounter{LP@counti}% + \stepcounter{LP@countii}% + \ifnum\value{LP@counti}=\value{LP@countii}% + \begin{puzzlebackground}% + \def\LP@color{#1}% + \setcounter{LP@whiledo@i}{1}% + \setcounter{LP@whiledo@ii}{\LP@rows}% + \whiledo{\value{LP@whiledo@i}<\value{LP@counti}}% + {% + \LP@setcellcontent{\arabic{LP@whiledo@i}}{\arabic{LP@whiledo@i}}{\LP@Block}% + \LP@setcellcontent{\arabic{LP@whiledo@i}}{\arabic{LP@whiledo@ii}}{\LP@Block}% + \stepcounter{LP@whiledo@i}% + \addtocounter{LP@whiledo@ii}{-1}% + }% + \end{puzzlebackground}% + \else% + \PackageError{\LP@package}% + {non quadratic grid (\filldiagonals)}% + {You tried to fill diagonals,\MessageBreak in a non quadratic grid (1,1) .. (\arabic{LP@counti},\arabic{LP@countii})\MessageBreak doesn't make sense!}% + \fi% +}% +% +\newcommand*\framepuzzle[1][black]% +{% + \LP@set@LP@columns{\LP@env@prefix}% + \LP@set@LP@rows{\LP@env@prefix}% + \setcounter{LP@counti}{\LP@columns}% + \setcounter{LP@countii}{\LP@rows}% + \stepcounter{LP@counti}% + \stepcounter{LP@countii}% + \draw[ultra thick,color=#1] (1,1)--(1,\arabic{LP@countii});% + \draw[ultra thick,color=#1] (1,\arabic{LP@countii})--(\arabic{LP@countii},\arabic{LP@countii});% + \draw[ultra thick,color=#1] (\arabic{LP@countii},\arabic{LP@countii})--(\arabic{LP@countii},1);% + \draw[ultra thick,color=#1] (\arabic{LP@countii},1)--(1,1);% +}% +% +\newenvironment{puzzlebackground}% +{% + \begin{pgfonlayer}{LPbackground}% +}% +{% + \end{pgfonlayer}% +}% +% +\newenvironment{puzzleforeground}% +{% + \begin{pgfonlayer}{LPforeground}% +}% +{% + \end{pgfonlayer}% +}% +% +% around the grid +% \newcommand*\LP@bottomrow[1]% {% \LP@setrowcontents{#1}{1}{0}% @@ -234,6 +513,8 @@ \LP@setcolumncontents{#1}{\csname the#2@columns\endcsname}{1}% }% % +% Presentation +% \newcommand*\titleformat[1]% {% \renewcommand*\LP@titleformat{#1}% @@ -265,49 +546,7 @@ % \newcommand*\LP@Block{\tikz[scale=\LP@scale]\draw[fill=\LP@color] (0,0) rectangle (1,1);}% % -\newcommand*\fillcell[2]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \LP@set@LP@color{\LP@env@prefix}% - \LP@set@LP@rows{\LP@env@prefix}% - \LP@set@LP@columns{\LP@env@prefix}% - \LP@ingrid{#1}{#2}{\LP@columns}{\LP@rows}{\LP@package}% - \LP@setcellcontent{#1}{#2}{\LP@Block}% -}% -% -% #1 row -% #2 csv list -\newcommand*\fillrow[2]% -{% - \setcounter{LP@counti}{1}% - \setcounter{LP@countii}{#1}% - \forcsvlist\LP@fillrow@i{#2}% -}% -% -\newcommand*\LP@fillrow@i[1]% -{% - \ifthenelse{\equal{#1}{1}}% - {\fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}}% - {}% - \stepcounter{LP@counti}% -}% -% -% #1 column -% #2 csv list -\newcommand*\fillcolumn[2]% -{% - \setcounter{LP@counti}{#1}% - \setcounter{LP@countii}{1}% - \forcsvlist\LP@fillcolumn@i{#2}% -}% -% -\newcommand*\LP@fillcolumn@i[1]% -{% - \ifthenelse{\equal{#1}{1}}% - {\fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}}% - {}% - \stepcounter{LP@countii}% -}% +% get package options with prefix % \newcommand*\LP@set@LP@scale[1]% {% @@ -350,30 +589,4 @@ \gdef\LP@package{#1}% }% % -\newcommand*\framearea[2]% -{% - \draw[ultra thick,color=#1] #2;% -}% -% -\newcommand*\fillarea[2]% -{% - \draw[ultra thick,fill=#1] #2 ;% -}% -% -\newenvironment{puzzlebackground}% -{% - \begin{pgfonlayer}{LPbackground}% -}% -{% - \end{pgfonlayer}% -}% -% -\newenvironment{puzzleforeground}% -{% - \begin{pgfonlayer}{LPforeground}% -}% -{% - \end{pgfonlayer}% -}% -% \endinput% \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty b/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty index 9cb2ae6bc8a..676f8537962 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty @@ -20,207 +20,55 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{skyline}[2013/03/09 skyline.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{skyline}[2013/03/27 skyline.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -% options -\newcommand*\SL@width{6.7cm}% -\newcommand*\SL@fontsize\Large% -\newcommand*\SL@rows{5}% -\newcommand*\SL@columns{5}% -\newcommand*\SL@scale{1}% -\newcommand*\SL@bgcolor{}% -\newcommand*\SL@sudoku{false}% -\newcommand*\SL@cvoffset{-39pt}% -\newcommand*\SL@title{}% -\newcommand*\SL@titleindent{0.75cm}% -\newcommand*\SL@titlewidth{5.85cm}% +\newcommand*\LP@SL@init@prefix{LP@SL}% +\newcommand*\LP@SL@init@package{skyline}% % -\newcounter{SL@rows}% -\newcounter{SL@columns}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{rows}{5}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{columns}{5}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{scale}{1}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{counterstyle}{none}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{bgcolor}{}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{width}{6.7cm}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{cvoffset}{-38pt}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{title}{}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{titleindent}{0.75cm}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{titlewidth}{5.85cm}% +\LP@define@choicekey@fontsize{\LP@SL@init@prefix}{\LP@SL@init@package}{Large}% % -\setcounter{SL@rows}{\SL@rows}% -\setcounter{SL@columns}{\SL@columns}% -\stepcounter{SL@rows}% -\stepcounter{SL@columns}% +\newcommand*\LP@SL@sudoku{false}% % -\define@key{skyline.sty}{rows}[5]% -{% - \renewcommand*\SL@rows{#1}% -}% -% -\define@key{skyline.sty}{columns}[5]% -{% - \renewcommand*\SL@columns{#1}% -}% -% -\define@choicekey*{skyline.sty}{sudoku}[\SL@sudoku\nr]{true,false}[true]% +\define@choicekey*{skyline.sty}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% {% \ifcase\nr\relax% - \renewcommand*\SL@sudoku{true}% - \renewcommand*\SL@rows{9}% - \renewcommand*\SL@columns{9}% + \renewcommand*\LP@SL@sudoku{true}% + \renewcommand*\LP@SL@rows{9}% + \renewcommand*\LP@SL@columns{9}% \or% - \renewcommand*\SL@sudoku{false}% + \renewcommand*\LP@SL@sudoku{false}% \fi% }% % -\define@key{skyline.sty}{scale}[1]% -{% - \renewcommand*\SL@scale{#1}% -}% -% -\define@key{skyline.sty}{counterstyle}[none]% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@key{skyline.sty}{bgcolor}[]% -{% - \renewcommand*\SL@bgcolor{#1}% -}% -% -\define@choicekey*{skyline.sty}{fontsize}[\SL@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +\define@choicekey*{skyline}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% {% \ifcase\nr\relax% - \renewcommand*\SL@fontsize{\tiny}% - \or% - \renewcommand*\SL@fontsize{\scriptsize}% - \or% - \renewcommand*\SL@fontsize{\footnotesize}% - \or% - \renewcommand*\SL@fontsize{\small}% - \or% - \renewcommand*\SL@fontsize{\normalsize}% - \or% - \renewcommand*\SL@fontsize{\large}% - \or% - \renewcommand*\SL@fontsize{\Large}% - \or% - \renewcommand*\SL@fontsize{\LARGE}% - \or% - \renewcommand*\SL@fontsize{\huge}% + \renewcommand*\LP@SL@sudoku{true}% + \renewcommand*\LP@SL@rows{9}% + \renewcommand*\LP@SL@columns{9}% \or% - \renewcommand*\SL@fontsize{\Huge}% + \renewcommand*\LP@SL@sudoku{false}% \fi% }% % -\define@key{skyline.sty}{width}[6.7cm]% -{% - \renewcommand*\SL@width{#1}% -}% -% -\define@key{skyline.sty}{title}[]% -{% - \renewcommand*\SL@title{#1}% -}% -% -\define@key{skyline.sty}{cvoffset}[-39pt]% -{% - \renewcommand*\SL@cvoffset{#1}% -}% -% -\define@key{skyline.sty}{titleindent}[0.75cm]% -{% - \renewcommand*\SL@titleindent{#1}% -}% -% -\define@key{skyline.sty}{titlewidth}[5.85cm]% -{% - \renewcommand*\SL@titlewidth{#1}% -}% -% -\define@key{skyline}{rows}% -{% - \renewcommand*\SL@rows{#1}% -}% -% -\define@key{skyline}{columns}% -{% - \renewcommand*\SL@columns{#1}% -}% -% -\define@choicekey*{skyline}{sudoku}[\SL@sudoku\nr]{true,false}[true]% -{% - \ifcase\nr\relax% - \renewcommand*\SL@sudoku{true}% - \renewcommand*\SL@rows{9}% - \renewcommand*\SL@columns{9}% - \or% - \renewcommand*\SL@sudoku{false}% - \fi% -}% -% -\define@key{skyline}{scale}% -{% - \renewcommand*\SL@scale{#1}% -}% -% -\define@key{skyline}{bgcolor}% -{% - \renewcommand*\SL@bgcolor{#1}% -}% -% -\define@key{skyline}{counterstyle}% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@choicekey*{skyline}{fontsize}[\SL@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\SL@fontsize{\tiny}% - \or% - \renewcommand*\SL@fontsize{\scriptsize}% - \or% - \renewcommand*\SL@fontsize{\footnotesize}% - \or% - \renewcommand*\SL@fontsize{\small}% - \or% - \renewcommand*\SL@fontsize{\normalsize}% - \or% - \renewcommand*\SL@fontsize{\large}% - \or% - \renewcommand*\SL@fontsize{\Large}% - \or% - \renewcommand*\SL@fontsize{\LARGE}% - \or% - \renewcommand*\SL@fontsize{\huge}% - \or% - \renewcommand*\SL@fontsize{\Huge}% - \fi% -}% -% -\define@key{skyline}{width}% -{% - \renewcommand*\SL@width{#1}% -}% -% -\define@key{skyline}{title}% -{% - \renewcommand*\SL@title{#1}% -}% -% -\define@key{skyline}{cvoffset}% -{% - \renewcommand*\SL@cvoffset{#1}% -}% -% -\define@key{skyline}{titleindent}% -{% - \renewcommand*\SL@titleindent{#1}% -}% -% -\define@key{skyline}{titlewidth}% -{% - \renewcommand*\SL@titlewidth{#1}% -}% -% \ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% % \ProcessOptionsX\relax% % +\LP@init@counter{\LP@SL@init@prefix}% +% \let\skylineB\LP@bottomrow% \let\skylineT\LP@toprow% \let\skylineL\LP@leftcolumn% @@ -236,25 +84,25 @@ {% \setkeys{skyline}{#1}% \LP@set@package{skyline}% - \LP@set@env@prefix{SL}% - \setcounter{SL@rows}{\SL@rows}% - \setcounter{SL@columns}{\SL@columns}% - \stepcounter{SL@rows}% - \stepcounter{SL@columns}% - \begin{minipage}[t]{\SL@width}% - \ifthenelse{\equal{\SL@title}{}}% + \LP@set@env@prefix{LP@SL}% + \setcounter{LP@SL@rows}{\LP@SL@rows}% + \setcounter{LP@SL@columns}{\LP@SL@columns}% + \stepcounter{LP@SL@rows}% + \stepcounter{LP@SL@columns}% + \begin{minipage}[t]{\LP@SL@width}% + \ifthenelse{\equal{\LP@SL@title}{}}% {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\SL@titleindent}\parbox{\SL@titlewidth}{\strut\LP@titleformat\SL@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\SL@scale]% - \LP@drawbackground{1}{1}{\SL@columns}{\SL@rows}{\SL@bgcolor}% - \LP@drawgrid{1}{1}{\SL@columns}{\SL@rows}{1cm}% - \ifthenelse{\equal{\SL@sudoku}{true}}% + {\enspace\par\noindent\hspace{\LP@SL@titleindent}\parbox{\LP@SL@titlewidth}{\strut\LP@titleformat\LP@SL@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@SL@scale]% + \LP@drawbackground{1}{1}{\LP@SL@columns}{\LP@SL@rows}{\LP@SL@bgcolor}% + \LP@drawgrid{1}{1}{\LP@SL@columns}{\LP@SL@rows}{1cm}% + \ifthenelse{\equal{\LP@SL@sudoku}{true}}% {\LP@drawsudokugrid}% {}% }% {% \end{tikzpicture}% - \LP@drawcounter{\LP@counterstyle}% + \LP@drawcounter{\LP@SL@counterstyle}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -- cgit v1.2.3