diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/logicpuzzle')
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty | 35 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/kendoku.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/killersudoku.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty | 1304 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty | 1232 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/slitherlink.sty | 32 |
14 files changed, 1248 insertions, 1675 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty b/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty deleted file mode 100644 index 442cfc155f7..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty +++ /dev/null @@ -1,35 +0,0 @@ -%% -%% 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. -%% -% for more infos see: -% http://en.wikipedia.org/wiki/Battleship_%28puzzle%29 -% http://de.wikipedia.org/wiki/Bimaru -% -\ProvidesPackage{battleship}[2013/04/30 battleship.sty v1.5 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{battleship}{ -Usage of package battleship.sty is deprecated\MessageBreak -\space battleship.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty b/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty deleted file mode 100644 index 081e2ad05a4..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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{bokkusu}[2013/04/30 bokkusu.sty v1.3 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{bokkusu}{ -Usage of package bokkusu.sty is deprecated\MessageBreak -\space bokkusu.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty deleted file mode 100644 index 1f8608aac5a..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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{chaossudoku}[2013/04/30 chaossudoku.sty v1.2 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{chaossudoku}{ -Usage of package chaossudoku.sty is deprecated\MessageBreak -\space chaossudoku.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty deleted file mode 100644 index 9c5e0233863..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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/30 ddsudoku.sty v1.1 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{ddsudoku}{ -Usage of package ddsudoku.sty is deprecated\MessageBreak -\space ddsudoku.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\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 deleted file mode 100644 index 567acb1d95a..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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{hakyuu}[2013/04/30 hakyuu.sty v1.2 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{hakyuu}{ -Usage of package hakyuu.sty is deprecated\MessageBreak -\space hakyuu.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty b/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty deleted file mode 100644 index 8b34dc3699c..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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{hitori}[2013/04/30 hitori.sty v1.1 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{hitori}{ -Usage of package hitori.sty is deprecated\MessageBreak -\space hitori.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/kendoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/kendoku.sty deleted file mode 100644 index d4b8f0da146..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/kendoku.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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{kendoku}[2013/04/30 kendoku.sty v1.1 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{kendoku}{ -Usage of package kendoku.sty is deprecated\MessageBreak -\space kendoku.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/killersudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/killersudoku.sty deleted file mode 100644 index 1743cb7b777..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/killersudoku.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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{killersudoku}[2013/04/30 killersudoku.sty v1.1 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{killersudoku}{ -Usage of package killersudoku.sty is deprecated\MessageBreak -\space killersudoku.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty b/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty deleted file mode 100644 index 96cd6fe164e..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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{laserbeam}[2013/04/30 laserbeam.sty v1.1 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{laserbeam}{ -Usage of package laserbeam.sty is deprecated\MessageBreak -\space laserbeam.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\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 1fdd9900ac5..291e3c223b4 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty @@ -1,46 +1,55 @@ %% -%% Copyright (C) 2013 by: +%% This is file `logicpuzzle.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% logicpuzzle.dtx (with options: `package') +%% +%% Copyright (C) 2013-2014 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{logicpuzzle}[2013/06/06 logicpuzzle.sty v2.4 - Josef Kleber (C) 2013]% -% +%% +\NeedsTeXFormat{LaTeX2e}% +\ProvidesPackage{logicpuzzle}[2014/06/15 v2.5 logicpuzzle.sty% + - Josef Kleber (C) 2013-2014]% \RequirePackage{xkeyval}% \RequirePackage{ifthen}% \RequirePackage{ragged2e}% -\RequirePackage{etoolbox}% \RequirePackage{marginnote}% \RequirePackage{tikz}% -\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,calc,shapes.geometric}% +\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,% + calc,shapes.geometric}% \pgfdeclarelayer{LPdump}% \pgfdeclarelayer{LPbgcolor}% \pgfdeclarelayer{LPbackgroundtwo}% \pgfdeclarelayer{LPbackground}% \pgfdeclarelayer{LPforeground}% \pgfdeclarelayer{LPforegroundtwo}% -\pgfsetlayers{LPdump,LPbgcolor,LPbackgroundtwo,LPbackground,main,LPforeground,LPforegroundtwo}% -% +\pgfsetlayers{LPdump,LPbgcolor,LPbackgroundtwo,LPbackground,main,% + LPforeground,LPforegroundtwo}% \newcounter{LP@rows}% \newcounter{LP@columns}% \newcounter{LP@counter@unique}% \newcounter{LP@counti}% \newcounter{LP@countii}% +\newcounter{LP@countiii}% \newcounter{LP@whiledo@i}% \newcounter{LP@whiledo@ii}% \newcounter{LP@count@ig@i}% @@ -49,13 +58,7 @@ \newcounter{LP@count@ig@iv}% \newcounter{LP@puzzlecounter}% \setcounter{LP@puzzlecounter}{1}% -% \newlength\LP@length% -% -\newcommand*\LP@counterstyle{none}% -\newcommand*\LP@titleformat{}% -\gdef\LP@env@prefix{}% -\gdef\LP@package{}% \gdef\LP@rows{}% \gdef\LP@columns{}% \gdef\LP@scale{1}% @@ -63,7 +66,10 @@ \gdef\LP@bgcolor{}% \gdef\LP@fontsize\Large% \gdef\LP@cvoffset{0pt}% -% +\newcommand*\LP@counterstyle{none}% +\newcommand*\LP@titleformat{}% +\gdef\LP@env@prefix{}% +\gdef\LP@package{}% \def\LP@normallines{0.5pt}% \def\LP@thicklines{1.5pt}% \def\LP@grid@linestyle{}% @@ -71,15 +77,7 @@ \def\LP@rel@tikzpath{}% \def\LP@tracks@scale{.3}% \def\LP@fw@linestyle{-|}% -% \newcommand*\LP@Pfive{.5}% -% -% init -% -% #1 package prefix -% #2 package -% #3 option -% #4 default \newcommand*\LP@define@key[4]% {% \expandafter\gdef\csname#1@#3\endcsname{#4}% @@ -92,14 +90,12 @@ \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]% + \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}% @@ -123,7 +119,9 @@ \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]% + \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}% @@ -148,16 +146,10 @@ \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}% @@ -170,82 +162,21 @@ \LP@definecolor{LP@c@griddots}{.25,.51,.33}% \LP@definecolor{LP@c@cross}{.25,.51,.33}% \LP@definecolor{LP@c@mirror}{.8,.8,.8}% -\definecolor{LP@c@tunnel}{rgb}{.7,.7,.7}% -\definecolor{LP@c@tunnel@i}{rgb}{.8,.8,.8}% -\definecolor{LP@c@tunnel@ii}{rgb}{.5,.5,.5}% +\LP@definecolor{LP@c@tunnel}{.7,.7,.7}% +\LP@definecolor{LP@c@tunnel@i}{.8,.8,.8}% +\LP@definecolor{LP@c@tunnel@ii}{.5,.5,.5}% \LP@definecolor{LP@c@bridge}{1,0,0}% \colorlet{LP@c@track}{black!80}% -% -% drawing grids -% -% #1 grid x min -% #2 grid y min -% #3 grid x max -% #4 grid y max -% #5 step \newcommand*\LP@drawgrid[5]% {% \setcounter{LP@counti}{#3}% max column \setcounter{LP@countii}{#4}% max row \stepcounter{LP@counti}% \stepcounter{LP@countii}% - \draw[step=#5,line width=\LP@normallines,\LP@grid@linestyle,draw opacity=\LP@draw@opacity] (#1,#2) grid (\value{LP@counti},\value{LP@countii});% -}% -% -\newcommand*\LP@drawgriddots% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \pgfmathsetmacro{\START}{1}% - % dots are drawn immediatly after the grid, - % so we can recycle LP@counti and LP@countii - \pgfmathsetmacro{\ENDC}{\arabic{LP@counti}}% - \pgfmathsetmacro{\ENDR}{\arabic{LP@countii}}% - \begin{pgfonlayer}{LPforeground}% - \foreach \i in {\START,...,\ENDC}% - \foreach \j in {\START,...,\ENDR}% - \fill[color=LP@c@griddots] (\i,\j) circle [radius=3pt];% - \end{pgfonlayer}% + \draw[step=#5,line width=\LP@normallines,\LP@grid@linestyle,% + draw opacity=\LP@draw@opacity]% + (#1,#2) grid (\value{LP@counti},\value{LP@countii});% }% -% -\newcommand*\LP@magnetsgrid% -{% - \LP@set@LP@fontsize{\LP@env@prefix}% - \LP@set@LP@columns{\LP@env@prefix}% - \LP@set@LP@rows{\LP@env@prefix}% - \setcounter{LP@counti}{\LP@columns}% max column - \setcounter{LP@countii}{\LP@rows}% max row - \stepcounter{LP@counti}% - \stepcounter{LP@countii}% - \draw[step=1cm,line width=\LP@normallines] (-1,1) grid (1,\arabic{LP@countii});% - \draw[step=1cm,line width=\LP@normallines] (1,\arabic{LP@countii}) grid ++(\LP@columns,2);% - \draw[line width=\LP@normallines] (0,\arabic{LP@countii}) -- ++(0,1) -- ++(1,0);% - \draw[line width=\LP@thicklines] (-1,1) rectangle (1,\arabic{LP@countii});% - \draw[line width=\LP@thicklines] (1,\arabic{LP@countii}) rectangle ++(\LP@columns,2);% - \draw[line width=\LP@thicklines] (1,\arabic{LP@countii}) rectangle ++(-2,2);% - \node[font=\LP@fontsize\bfseries] at (0.5,\arabic{LP@counti}.5) {$-$};% - \stepcounter{LP@counti}% - \node[font=\LP@fontsize\bfseries] at (-0.5,\arabic{LP@counti}.5) {$+$};% -}% -% -\newcommand*\LP@drawsudokugrid% -{% - \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,1) -- (1,10);% - \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (4,1) -- (4,10);% - \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (7,1) -- (7,10);% - \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (10,1) -- (10,10);% - \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,1) -- (10,1);% - \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,4) -- (10,4);% - \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,7) -- (10,7);% - \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,10) -- (10,10);% -}% -% -% drawing grid background -% -% #1 grid x min -% #2 grid y min -% #3 grid x max -% #4 grid y max -% #5 bgcolor \newcommand*\LP@drawbackground[5]% {% \ifthenelse{\equal{#5}{}}% @@ -256,43 +187,42 @@ \stepcounter{LP@counti}% \stepcounter{LP@countii}% \begin{pgfonlayer}{LPbgcolor}% - \fill[color=#5] (#1,#2) rectangle (\value{LP@counti},\value{LP@countii});% - \end{pgfonlayer}{LPbgcolor}% + \fill[color=#5] (#1,#2) rectangle% + (\value{LP@counti},\value{LP@countii});% + \end{pgfonlayer}% }% }% -% -% 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)}% + {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)}% + {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)}% + {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)}% + {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% }% -% \newcommand*\setrule[3]% {% \LP@set@LP@scale{\LP@env@prefix}% @@ -302,127 +232,108 @@ {\gdef\LP@sr@bgcolor{\LP@bgcolor}}% \stepcounter{LP@counter@unique}% \begin{pgfonlayer}{LPdump}% - \node [shape=rectangle,inner sep=0pt] (A_\theLP@counter@unique) at (#1\LP@Pfive,#2\LP@Pfive) {\tikz\draw[scale=\LP@scale,color=\LP@sr@bgcolor] (0.08,0.1) rectangle (0.92,0.9);};% + \node [shape=rectangle,inner sep=0pt] (A_\theLP@counter@unique)% + at (#1\LP@Pfive,#2\LP@Pfive)% + {\tikz\draw[scale=\LP@scale,color=\LP@sr@bgcolor]% + (0.08,0.1) rectangle (0.92,0.9);};% \end{pgfonlayer}% - \node [shape=rectangle,inner sep=0pt,anchor=north west,scale=\LP@scale,font=\tiny] at (A_\theLP@counter@unique.north west) {$#3$};% + \node [shape=rectangle,inner sep=0pt,anchor=north west,% + scale=\LP@scale,font=\tiny] at% + (A_\theLP@counter@unique.north west) {$#3$};% }% -% -% #1 column -% #2 row -% #3 content -\newcommand*\LP@setcellcontent[3]% +\define@key{LP@G@setcellcontent}{vcenter}[\LP@Pfive]% {% - \node at (#1\LP@Pfive,#2\LP@Pfive){#3};% + \def\LP@scc@v{\LP@Pfive}% }% -% -% #1 column -% #2 row -% #3 content -\newcommand*\LP@setcellcontentC[3]% +\define@key{LP@G@setcellcontent}{hcenter}[\LP@Pfive]% {% - \node at (#1,#2){#3};% + \def\LP@scc@h{\LP@Pfive}% }% -% -\newcommand*\LP@setcellcontentVE[3]% +\newcommand*\LP@G@setcellcontent[4][]% {% - \node at (#1,#2\LP@Pfive){#3};% + \def\LP@scc@h{}% + \def\LP@scc@v{}% + \setkeys{LP@G@setcellcontent}{#1}% + \node at (#2\LP@scc@h,#3\LP@scc@v){#4};% }% -% -\newcommand*\LP@setcellcontentHE[3]% +\newcommand*\LP@setcellcontent[3]% {% - \node at (#1\LP@Pfive,#2){#3};% + \LP@G@setcellcontent[hcenter,vcenter]{#1}{#2}{#3}% }% -% -% #1 csv list -% #2 column -% #3 row -\newcommand*\LP@setrowcontents[3]% +\newcommand*\LP@setcellcontentC[3]% {% - \setcounter{LP@counti}{#2}% - \setcounter{LP@countii}{#3}% - \forcsvlist\LP@setrowcontents@i{#1}{\LP@env@prefix}% + \LP@G@setcellcontent{#1}{#2}{#3}% }% -% -\newcommand*\LP@setrowcontents@i[1]% +\newcommand*\LP@setcellcontentVE[3]% {% - \LP@setrowcontents@ii{#1}{\LP@env@prefix}% + \LP@G@setcellcontent[vcenter]{#1}{#2}{#3}% }% -% -\newcommand*\LP@setrowcontents@ii[2]% +\newcommand*\LP@setcellcontentHE[3]% {% - \LP@setcellcontent{\arabic{LP@counti}}{\arabic{LP@countii}}{\csname #2@fontsize\endcsname#1}% - \stepcounter{LP@counti}% + \LP@G@setcellcontent[hcenter]{#1}{#2}{#3}% }% -% -\newcommand*\LP@setrowcontents@edge[3]% +\newcommand*\LP@setrowcontents[3]% {% + \LP@set@LP@fontsize{\LP@env@prefix}% \setcounter{LP@counti}{#2}% \setcounter{LP@countii}{#3}% - \forcsvlist\LP@setrowcontents@edge@i{#1}{\LP@env@prefix}% -}% -% -\newcommand*\LP@setrowcontents@edge@i[1]% -{% - \LP@setrowcontents@edge@ii{#1}{\LP@env@prefix}% -}% -% -\newcommand*\LP@setrowcontents@edge@ii[2]% -{% - \LP@setcellcontentVE{\arabic{LP@counti}}{\arabic{LP@countii}}{\csname #2@fontsize\endcsname#1}% - \stepcounter{LP@counti}% -}% -% -\newcommand*\setrow[2]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \LP@setrowcontents{#2}{1}{#1}% + \foreach \LP@element in {#1}% + {% + \LP@G@setcellcontent[vcenter,hcenter]% + {\arabic{LP@counti}}{\arabic{LP@countii}}% + {\LP@fontsize\LP@element}% + \stepcounter{LP@counti}% + }% }% -% -% #1 csv list -% #2 column -% #3 row \newcommand*\LP@setcolumncontents[3]% {% + \LP@set@LP@fontsize{\LP@env@prefix}% \setcounter{LP@counti}{#2}% \setcounter{LP@countii}{#3}% - \forcsvlist\LP@setcolumncontents@i{#1}% -}% -% -\newcommand*\LP@setcolumncontents@i[1]% -{% - \LP@setcolumncontents@ii{#1}{\LP@env@prefix}% + \foreach \LP@element in {#1}% + {% + \LP@G@setcellcontent[vcenter,hcenter]% + {\arabic{LP@counti}}{\arabic{LP@countii}}% + {\LP@fontsize\LP@element}% + \stepcounter{LP@countii}% + }% }% -% -\newcommand*\LP@setcolumncontents@ii[2]% +\newcommand*\LP@setrowcontents@edge[3]% {% - \LP@setcellcontent{\arabic{LP@counti}}{\arabic{LP@countii}}{\csname #2@fontsize\endcsname#1}% - \stepcounter{LP@countii}% + \LP@set@LP@fontsize{\LP@env@prefix}% + \setcounter{LP@counti}{#2}% + \setcounter{LP@countii}{#3}% + \foreach \LP@element in {#1}% + {% + \LP@G@setcellcontent[vcenter]% + {\arabic{LP@counti}}{\arabic{LP@countii}}% + {\LP@fontsize\LP@element}% + \stepcounter{LP@counti}% + }% }% -% \newcommand*\LP@setcolumncontents@edge[3]% {% + \LP@set@LP@fontsize{\LP@env@prefix}% \setcounter{LP@counti}{#2}% \setcounter{LP@countii}{#3}% - \forcsvlist\LP@setcolumncontents@edge@i{#1}% -}% -% -\newcommand*\LP@setcolumncontents@edge@i[1]% -{% - \LP@setcolumncontents@edge@ii{#1}{\LP@env@prefix}% + \foreach \LP@element in {#1}% + {% + \LP@G@setcellcontent[hcenter]% + {\arabic{LP@counti}}{\arabic{LP@countii}}% + {\LP@fontsize\LP@element}% + \stepcounter{LP@countii}% + }% }% -% -\newcommand*\LP@setcolumncontents@edge@ii[2]% +\newcommand*\setrow[2]% {% - \LP@setcellcontentHE{\arabic{LP@counti}}{\arabic{LP@countii}}{\csname #2@fontsize\endcsname#1}% - \stepcounter{LP@countii}% + \LP@set@LP@scale{\LP@env@prefix}% + \LP@setrowcontents{#2}{1}{#1}% }% -% \newcommand*\setcolumn[2]% {% \LP@set@LP@scale{\LP@env@prefix}% \LP@setcolumncontents{#2}{#1}{1}% }% -% \newcommand*\setcell[3]% {% \LP@set@LP@scale{\LP@env@prefix}% @@ -430,9 +341,8 @@ \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@fontsize#3}% + \LP@G@setcellcontent[hcenter,vcenter]{#1}{#2}{\LP@fontsize#3}% }% -% \newcommand*\setcells[2]% {% \LP@set@LP@scale{\LP@env@prefix}% @@ -441,11 +351,12 @@ \LP@set@LP@columns{\LP@env@prefix}% \foreach \LP@sc@column/\LP@sc@row in {#1}% {% - \LP@ingrid{\LP@sc@column}{\LP@sc@row}{\LP@columns}{\LP@rows}{\LP@package}% - \LP@setcellcontent{\LP@sc@column}{\LP@sc@row}{\LP@fontsize#2}% + \LP@ingrid{\LP@sc@column}{\LP@sc@row}% + {\LP@columns}{\LP@rows}{\LP@package}% + \LP@G@setcellcontent[hcenter,vcenter]% + {\LP@sc@column}{\LP@sc@row}{\LP@fontsize#2}% };% }% -% \newcommand*\setbigcell[4][Huge]% {% \LP@set@LP@scale{\LP@env@prefix}% @@ -457,135 +368,65 @@ \setcounter{LP@countii}{#3}% \stepcounter{LP@counti}% \stepcounter{LP@countii}% - \draw[line width=\LP@normallines,fill=\LP@sbc@bgcolor,\LP@grid@linestyle] (#2,#3) rectangle ++(2,2);% + \draw[line width=\LP@normallines,fill=\LP@sbc@bgcolor,% + \LP@grid@linestyle]% + (#2,#3) rectangle ++(2,2);% \begin{pgfonlayer}{LPforegroundtwo}% - \fill[color=\LP@sbc@bgcolor] (\arabic{LP@counti},\arabic{LP@countii}) circle [radius=3.5pt*\LP@scale];% - \node at (\arabic{LP@counti},\arabic{LP@countii}){\csname#1\endcsname#4};% + \fill[color=\LP@sbc@bgcolor]% + (\arabic{LP@counti},\arabic{LP@countii})% + circle [radius=3.5pt*\LP@scale];% + \node at (\arabic{LP@counti},\arabic{LP@countii})% + {\csname#1\endcsname#4};% \end{pgfonlayer}% }% -% \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}% -}% -% -\def\LP@KKR@print@element#1% -{% - \if!\ifnum9<1#1!\else_\fi% - \ifLP@KKR@solution% - \setcell{\arabic{LP@counti}}{\arabic{LP@countii}}{#1}% - \else% - \fi% - \else% - #1% - \fi% -}% -% -\newcommand*\kakurorow[2]% -{% - \setcounter{LP@counti}{1}% - \setcounter{LP@countii}{#1}% - \foreach \LP@element in {#2}% - {% - \LP@KKR@print@element{\LP@element}% - \stepcounter{LP@counti}% - };% -}% -% -\newcommand*\kakurocolumn[2]% -{% - \setcounter{LP@counti}{#1}% - \setcounter{LP@countii}{1}% - \foreach \LP@element in {#2}% - {% - \LP@KKR@print@element{\LP@element}% - \stepcounter{LP@countii}% - };% -}% -% -\newcommand*\bridgesrow[2]% -{% - \setcounter{LP@counti}{1}% - \setcounter{LP@countii}{#1}% - \LP@set@LP@fontsize{\LP@env@prefix}% - \LP@set@LP@color{\LP@env@prefix}% \foreach \LP@element in {#2}% {% - \ifthenelse{\equal{\LP@element}{}}% - {}% + \ifthenelse{\equal{\LP@element}{0}}% {% - \draw[fill=\LP@color] (\arabic{LP@counti},\arabic{LP@countii}) circle (0.5cm);% - \node[scale=\LP@scale,font=\LP@fontsize] at (\arabic{LP@counti},\arabic{LP@countii}){\LP@element};% + \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\LP@element}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + \setcell{\arabic{LP@counti}}{\arabic{LP@countii}}{\LP@element}% }% \stepcounter{LP@counti}% - };% + }% }% -% -\newcommand*\bridgescolumn[2]% +\newcommand*\setcolorcolumn[2]% {% \setcounter{LP@counti}{#1}% \setcounter{LP@countii}{1}% - \LP@set@LP@fontsize{\LP@env@prefix}% - \LP@set@LP@color{\LP@env@prefix}% \foreach \LP@element in {#2}% {% - \ifthenelse{\equal{\LP@element}{}}% - {}% + \ifthenelse{\equal{\LP@element}{0}}% + {% + \gdef\LP@HT@color{black}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + }% {% - \draw[fill=\LP@color] (\arabic{LP@counti},\arabic{LP@countii}) circle (0.5cm);% - \node[scale=\LP@scale,font=\LP@fontsize] at (\arabic{LP@counti},\arabic{LP@countii}){\LP@element};% + \expandafter\gdef\expandafter\LP@HT@color% + {LP@c@\romannumeral\LP@element}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + \setcell{\arabic{LP@counti}}{\arabic{LP@countii}}{\LP@element}% }% \stepcounter{LP@countii}% - };% + }% }% -% \newcommand*\fillcell[2]% {% \LP@set@LP@scale{\LP@env@prefix}% @@ -593,61 +434,44 @@ \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}% + \LP@G@setcellcontent[hcenter,vcenter]{#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}% + \foreach \LP@element in {#2}% + {% + \ifthenelse{\equal{\LP@element}{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}% + \foreach \LP@element in {#2}% + {% + \ifthenelse{\equal{\LP@element}{1}}% + {\fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}}% + {}% + \stepcounter{LP@countii}% + }% }% -% \newcommand*\framearea[2]% {% \draw[line width=\LP@thicklines,color=#1] #2;% }% -% \newcommand*\fillarea[2]% {% - \draw[line width=\LP@thicklines,fill=#1] #2 ;% + \draw[line width=\LP@thicklines,fill=#1] #2;% }% -% \newcommand*\colorarea[2]% {% \fill[color=#1] #2 ;% }% -% -% #1 column -% #2 row -% #3 csv list of directions \newcommand*\tikzpath[3]% {% (#1\LP@rel@tikzpath,#2\LP@rel@tikzpath)% @@ -679,7 +503,6 @@ \fi% };% }% -% \newcommand*\xtikzpath[3]% {% (#1\LP@rel@tikzpath,#2\LP@rel@tikzpath)% @@ -711,7 +534,6 @@ \fi% };% }% -% \newcommand*\filldiagonals[1][yellow!20]% {% \LP@set@LP@columns{\LP@env@prefix}% @@ -728,19 +550,22 @@ \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}% + \LP@G@setcellcontent[hcenter,vcenter]% + {\arabic{LP@whiledo@i}}{\arabic{LP@whiledo@i}}{\LP@Block}% + \LP@G@setcellcontent[hcenter,vcenter]% + {\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!}% + {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}% @@ -749,25 +574,16 @@ \setcounter{LP@countii}{\LP@rows}% \stepcounter{LP@counti}% \stepcounter{LP@countii}% - \draw[line width=\LP@thicklines,color=#1] (1,1)--(1,\arabic{LP@countii});% - \draw[line width=\LP@thicklines,color=#1] (1,\arabic{LP@countii})--(\arabic{LP@counti},\arabic{LP@countii});% - \draw[line width=\LP@thicklines,color=#1] (\arabic{LP@counti},\arabic{LP@countii})--(\arabic{LP@counti},1);% - \draw[line width=\LP@thicklines,color=#1] (\arabic{LP@counti},1)--(1,1);% -}% -% -\newcommand*\placecross[2]% -{% - \LP@setcellcontentC{#1}{#2}{\LP@Cross}% -}% -% -\newcommand*\placemirror[3]% -{% - \LP@setcellcontentC{#1}{#2}{\LP@Mirror{#3}}% -}% -% -\newcommand*\placearrow[3]% -{% - \LP@setcellcontentC{#1}{#2}{\LP@Arrow{#3}}% + \draw[line width=\LP@thicklines,color=#1]% + (1,1)--(1,\arabic{LP@countii});% + \draw[line width=\LP@thicklines,color=#1]% + (1,\arabic{LP@countii})--% + (\arabic{LP@counti},\arabic{LP@countii});% + \draw[line width=\LP@thicklines,color=#1]% + (\arabic{LP@counti},\arabic{LP@countii})--% + (\arabic{LP@counti},1);% + \draw[line width=\LP@thicklines,color=#1]% + (\arabic{LP@counti},1)--(1,1);% }% \newenvironment{puzzlebackground}% {% @@ -776,7 +592,6 @@ {% \end{pgfonlayer}% }% -% \newenvironment{puzzleforeground}% {% \begin{pgfonlayer}{LPforeground}% @@ -784,363 +599,81 @@ {% \end{pgfonlayer}% }% -% -% around the grid -% \newcommand*\LP@bottomrow[1]% {% \LP@setrowcontents{#1}{1}{0}% }% -% \newcommand*\LP@bottomrow@edge[1]% {% \LP@setrowcontents@edge{#1}{1}{0}% }% -% \newcommand*\LP@leftcolumn[1]% {% \LP@setcolumncontents{#1}{0}{1}% }% -% \newcommand*\LP@toprow[1]% {% - \LP@toprow@i{#1}{\LP@env@prefix}% -}% -% -\newcommand*\LP@toprow@i[2]% -{% \LP@setrowcontents{#1}{1}{\theLP@rows}% }% -% \newcommand*\LP@rightcolumn[1]% {% - \LP@rightcolumn@i{#1}{\LP@env@prefix}% -}% -% -\newcommand*\LP@rightcolumn@i[2]% -{% \LP@setcolumncontents{#1}{\theLP@columns}{1}% }% -% \newcommand*\LP@rightcolumn@edge[1]% {% - \LP@rightcolumn@edge@i{#1}{\LP@env@prefix}% -}% -% -\newcommand*\LP@rightcolumn@edge@i[2]% -{% \LP@setcolumncontents@edge{#1}{\theLP@columns}{1}% }% -% -% Presentation -% \newcommand*\titleformat[1]% {% \renewcommand*\LP@titleformat{#1}% }% \titleformat{\centering\Large\color{blue}}% -% \newcommand*\puzzlecounter{\theLP@puzzlecounter}% -% \newcommand*\setpuzzlecounter[1]% {% \setcounter{LP@puzzlecounter}{#1}% }% -% -% #1 counterstyle \newcommand*\LP@drawcounter[1]% {% \LP@set@LP@cvoffset{\LP@env@prefix}% \csname LP@cs@#1\endcsname% }% -% \newcommand*{\definecounterstyle}[2]% {% \expandafter\gdef\csname LP@cs@#1\endcsname{#2}% }% -% \definecounterstyle{none}{}% -\definecounterstyle{left}{\begingroup\reversemarginpar\marginnote{\tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt,draw,rounded corners=3pt,thick]{\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup}% -\definecounterstyle{right}{\marginnote{\tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt,draw,rounded corners=3pt,thick]{\Huge\puzzlecounter};}[\LP@cvoffset]}% -% -\newcommand*\LP@Block{\tikz[scale=\LP@scale]\draw[line width=\LP@normallines,fill=\LP@color] (0,0) rectangle (1,1);}% -% -\newcommand*\LP@Arrow[1]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \def\LP@rotate{45}% - \ifthenelse{\equal{#1}{LeftUp}}{\def\LP@rotate{135}}{}% - \ifthenelse{\equal{#1}{LeftDown}}{\def\LP@rotate{225}}{}% - \ifthenelse{\equal{#1}{RightDown}}{\def\LP@rotate{315}}{}% - \pgfmathsetmacro{\LPlinewidth}{3pt*\LP@scale}% - \tikz\draw[->,line width=\LPlinewidth,rotate=\LP@rotate,scale=\LP@scale] (0.1,.5) -- (0.9,.5);% -}% -% -\newcommand*\LP@Cross% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}% - \begin{pgfonlayer}{LPforeground}% - \pgfmathsetmacro{\LPlinewidth}{3pt*\LP@scale}% - \draw[line width=\LPlinewidth,scale=\LP@scale,color=LP@c@cross] (.35,.35) -- (0.65,.65) -- (.5,.5) -- (.65,.35)-- (.35,.65);% - \end{pgfonlayer}% - \end{tikzpicture}% -}% -% -\newcommand*\LP@Mirror[1]% -{% - \def\LP@rotate{0}% - \ifthenelse{\equal{#1}{V}}{\def\LP@rotate{90}}{}% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}% - \begin{pgfonlayer}{LPforegroundtwo}% - \pgfmathsetmacro{\LPlinewidth}{3pt*\LP@scale}% - \draw[line width=\LPlinewidth,scale=\LP@scale,color=LP@c@mirror,rotate=\LP@rotate] (.35,.5) -- (0.65,.5);% - \end{pgfonlayer}% - \end{tikzpicture}% -}% -% -\newcommand*\LP@Mine% -{% - \begin{tikzpicture}[scale=\LP@scale]% - \fill[color=black] (.2,.5) -- (.5,.6) -- (.5,.4) -- cycle;% - \fill[color=black] (.8,.5) -- (.5,.6) -- (.5,.4) -- cycle;% - \fill[color=black] (.5,.8) -- (.4,.5) -- (.6,.5) -- cycle;% - \fill[color=black] (.5,.2) -- (.4,.5) -- (.6,.5) -- cycle;% - \shade[ball color=black] (.5,.5) circle (.225cm);% - \end{tikzpicture}% -}% -\let\Mine\LP@Mine% -% -\newcommand*\LP@Portal% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}[scale=\LP@scale]% - \fill[color=black] (0,0) -- (0,1) -- (.4,.5) -- (.4,0) -- cycle;% - \fill[color=LP@c@tunnel@ii] (0,1) -- (1,1) -- (1,.5) -- (.4,.5) -- cycle;% - \fill[color=LP@c@tunnel@i] (.4,0) rectangle (1,.5);% - \draw[line width=\LP@normallines] (0,0) rectangle (1,1) ;% - \end{tikzpicture}% -}% -% -\newcommand*\portal[2]% -{% - \begin{puzzlebackground}% - \LP@setcellcontent{#1}{#2}{\LP@Portal}% - \end{puzzlebackground}% -}% -% -\newcommand*\tube[1]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \bgroup% - \def\LP@rel@tikzpath{.5}% - \begin{pgfonlayer}{LPbackgroundtwo}% - \pgfsetcornersarced{\pgfpoint{3mm}{3mm}}% - \draw[color=LP@c@tunnel!80!black, line width=.4cm*\LP@scale] #1;% - \draw[color=LP@c@tunnel, line width=.38cm*\LP@scale] #1;% - \draw[color=LP@c@tunnel!85, line width=.35cm*\LP@scale] #1;% - \draw[color=LP@c@tunnel!70, line width=.32cm*\LP@scale] #1;% - \draw[color=LP@c@tunnel!55, line width=.29cm*\LP@scale] #1;% - \draw[color=LP@c@tunnel!45, line width=.25cm*\LP@scale] #1;% - \draw[color=LP@c@tunnel!35, line width=.2cm*\LP@scale] #1;% - \end{pgfonlayer}% - \egroup% -}% -% -\newcommand*\LP@Tree% -{% - \begin{tikzpicture}[scale=.07*\LP@scale]% - \draw[fill=brown!95!black!95,line width=.1pt*\LP@scale]% - (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) --% - (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1);% - \shade[top color=green!50!black!60,draw=black,line width=.1pt*\LP@scale,bottom color=green!50!black]% - (0,10) .. controls (0,8) and (1,7) .. (1.5,7)% - .. controls (1,7) and (1,7) .. (0.5,7.25)% - .. controls (1.5,5) and (2.5,4) .. (3,4)% - .. controls (2,4) and (1.25,4) .. (1,4.5)% - .. controls (2,2) and (3.5,2) .. (4,2)% - .. controls (1,1) and (-1,1) .. (-4,2)% - .. controls (-3.5,2) and (-2,2) .. (-1,4.5)% - .. controls (-1.25,4) and (-2,4) .. (-3,4)% - .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25)% - .. controls (-1,7) and (-1,7) .. (-1.5,7)% - .. controls (-1,7) and (0,8) .. (0,10);% - \end{tikzpicture}% -}% -% -\let\Tree\LP@Tree% -% -\newcommand*\LP@Tent% -{% - \begin{tikzpicture}[scale=\LP@scale]% - \draw[fill=yellow!50,line width=.1pt*\LP@scale] (.1,.1) -- (.6,.1) -- (.9,.5) -- (.75,.8) -- (.35,.6) -- cycle;% - \draw[line width=.1pt*\LP@scale] (.35,.6) -- (.35,.1);% - \draw[line width=.1pt*\LP@scale] (.35,.6) -- (.6,.1);% - \end{tikzpicture}% -}% -% -\let\Tent\LP@Tent% -% -\newcommand*\KKR[2]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \LP@set@LP@bgcolor{\LP@env@prefix}% - \LP@set@LP@color{\LP@env@prefix}% - \ifthenelse{\equal{\LP@bgcolor}{}}% - {\gdef\LP@sr@bgcolor{white}}% - {\gdef\LP@sr@bgcolor{\LP@bgcolor}}% - \stepcounter{LP@counter@unique}% - \begin{pgfonlayer}{LPdump}% - \node [shape=rectangle,inner sep=0pt] (A_\theLP@counter@unique) at (\arabic{LP@counti}\LP@Pfive,\arabic{LP@countii}\LP@Pfive) {\tikz\draw[scale=\LP@scale,color=\LP@sr@bgcolor] (0.08,0.1) rectangle (0.92,0.9);};% - \end{pgfonlayer}% - \begin{puzzlebackground}% - \fill[color=\LP@color] (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(1,1);% - \draw[line width=\LP@normallines] (\arabic{LP@counti},\arabic{LP@countii}) -- ++(0,1) -- ++(1,-1);% - \end{puzzlebackground}% - \node [shape=rectangle,inner sep=0pt,anchor=south west,scale=\LP@scale,font=\small] at (A_\theLP@counter@unique.south west) {#1};% - \node [shape=rectangle,inner sep=0pt,anchor=north east,scale=\LP@scale,font=\small] at (A_\theLP@counter@unique.north east) {#2};% -}% -% -\newcommand*\Black% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{puzzlebackground}% - \fill[color=black] (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(1,1);% - \end{puzzlebackground}% -}% -% -\newcommand*\LP@Diamond% -{% - \begin{tikzpicture}[scale=\LP@scale*.9]% - \clip (.05,.905) rectangle (.95,.1);% - \draw[line width=\LP@normallines,fill=yellow!20] (.5,.1) -- (.7,.9) -- (.3,.9) -- cycle;% - \draw[line width=\LP@normallines,fill=orange!20] (.5,.1) -- (.7,.9) -- (.9,.8) -- cycle;% - \draw[line width=\LP@normallines,fill=orange!20] (.5,.1) -- (.3,.9) -- (.1,.8) -- cycle;% - \draw[line width=\LP@normallines] (.1,.8) -- (.9,.8);% -\end{tikzpicture}% -}% -% -\let\Diamond\LP@Diamond% -% -\newcommand*\LP@Star% -{% - \tikz\node[shape=star,fill=yellow,draw,scale=.8*\LP@scale,star point height=.25cm] {};% -}% -% -\let\Star\LP@Star% -% -\newcommand*\LP@ArrowA[2][red]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \pgfmathsetmacro{\LPlinewidth}{3pt*\LP@scale}% - \tikz\draw[->,line width=\LPlinewidth,rotate=#2,scale=\LP@scale,color=#1] (0.1,.5) -- (0.9,.5);% -}% -% -\newcommand*\LP@c@stararrow{red}% -\newcommand*\Right{\LP@ArrowA[\LP@c@stararrow]{0}}% -\newcommand*\RightUp{\LP@ArrowA[\LP@c@stararrow]{45}}% -\newcommand*\Up{\LP@ArrowA[\LP@c@stararrow]{90}}% -\newcommand*\LeftUp{\LP@ArrowA[\LP@c@stararrow]{135}}% -\newcommand*\Left{\LP@ArrowA[\LP@c@stararrow]{180}}% -\newcommand*\LeftDown{\LP@ArrowA[\LP@c@stararrow]{225}}% -\newcommand*\Down{\LP@ArrowA[\LP@c@stararrow]{270}}% -\newcommand*\RightDown{\LP@ArrowA[\LP@c@stararrow]{315}}% -% -\newcommand*\LP@DarkCloud{\tikz[scale=0.7*\LP@scale]\fill[color=black!60] (0,0) rectangle (1,1);}% -% -\newcommand*\LP@Moon{\tikz[scale=0.7*\LP@scale]\fill[color=black!60] (0,0) circle (0.5cm);}% -% -\newcommand*\LP@MoonR% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \fill[color=black!60] (0.5,0.5) circle (0.5cm);% - \fill[color=yellow] (.5,0) arc (270:450:.5);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@MoonL% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \fill[color=black!60] (0.5,0.5) circle (0.5cm);% - \fill[color=yellow] (.5,0) arc (270:90:.5);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@MoonT% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \fill[color=black!60] (0.5,0.5) circle (0.5cm);% - \fill[color=yellow] (0,0.5) arc (180:0:.5);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@MoonB% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \fill[color=black!60] (0.5,0.5) circle (0.5cm);% - \fill[color=yellow] (0,0.5) arc (180:360:.5);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@MoonTL% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \fill[color=yellow] (0.5,0.5) circle (0.5cm);% - \fill[color=black!60] (1,.5) -- (.5,.5) -- (.5,0) arc (270:360:.5);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@MoonBL% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \fill[color=yellow] (0.5,0.5) circle (0.5cm);% - \fill[color=black!60] (1,.5) -- (.5,.5) -- (.5,1) arc (90:0:.5);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@MoonBR% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \fill[color=yellow] (0.5,0.5) circle (0.5cm);% - \fill[color=black!60] (0,.5) -- (.5,.5) -- (.5,1) arc (90:180:.5);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@MoonTR% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \fill[color=yellow] (0.5,0.5) circle (0.5cm);% - \fill[color=black!60] (0,.5) -- (.5,.5) -- (.5,0) arc (270:180:.5);% - \end{tikzpicture}% -}% -% -\let\Cloud\LP@DarkCloud% -\let\Moon\LP@Moon% -\let\MoonR\LP@MoonR% -\let\MoonL\LP@MoonL% -\let\MoonT\LP@MoonT% -\let\MoonB\LP@MoonB% -\let\MoonTL\LP@MoonTL% -\let\MoonBL\LP@MoonBL% -\let\MoonBR\LP@MoonBR% -\let\MoonTR\LP@MoonTR% -% +\definecounterstyle{left}{% + \begingroup\reversemarginpar% + \marginnote{% + \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt,draw,% + rounded corners=3pt,thick]% + {\Huge\puzzlecounter};}[\LP@cvoffset]% + \endgroup% +}% +\definecounterstyle{right}{% + \marginnote{% + \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt,draw,% + rounded corners=3pt,thick]% + {\Huge\puzzlecounter};% + }[\LP@cvoffset]% +}% +\newcommand*\LP@Block{% + \tikz[scale=\LP@scale]% + \draw[line width=\LP@normallines,fill=\LP@color]% + (0,0) rectangle (1,1);}% \define@key{LP@Line}{double}[double]% {% \def\LP@Line@double{double}% }% -% \define@key{LP@Line}{color}[LP@c@bridge]% {% \def\LP@Line@linecolor{#1}% }% -% \define@key{LP@Line}{linewidth}[1mm]% {% \def\LP@Line@linewidth{#1}% }% -% \newcommand*\LP@Line[2][]% {% \def\LP@Line@double{}% @@ -1150,409 +683,119 @@ \LP@set@LP@scale{\LP@env@prefix}% \begin{pgfonlayer}{LPbackgroundtwo}% \ifthenelse{\equal{\LP@Line@double}{double}}% - {\draw[double,double distance=\LP@Line@linewidth*\LP@scale,color=\LP@Line@linecolor, line width=\LP@Line@linewidth*\LP@scale] #2;}% - {\draw[color=\LP@Line@linecolor, line width=\LP@Line@linewidth*\LP@scale] #2;}% + {\draw[double,double distance=\LP@Line@linewidth*\LP@scale,% + color=\LP@Line@linecolor,% + line width=\LP@Line@linewidth*\LP@scale] #2;}% + {\draw[color=\LP@Line@linecolor,% + line width=\LP@Line@linewidth*\LP@scale] #2;}% \end{pgfonlayer}% }% -% -\newcommand*\bridge[2][]% -{% - \LP@Line[#1]{#2}% -}% -% -\newcommand*\LP@trackC% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}[scale=\LP@scale]% - \pgfsetcornersarced{\pgfpoint{4mm*\LP@scale}{4mm*\LP@scale}}% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (0,.5)--(.5,.5)--(.5,0);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@G@trackC[1][0]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}[scale=\LP@scale,rotate=#1]% - \clip (0,0) rectangle (1,1);% - \pgfsetcornersarced{\pgfpoint{4mm*\LP@scale}{4mm*\LP@scale}}% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (0,.5)--(.5,.5)--(.5,0);% - \end{tikzpicture}% -}% -% -\let\CurveBL\LP@G@trackC% -\newcommand*\CurveBR{\LP@G@trackC[90]}% -\newcommand*\CurveTR{\LP@G@trackC[180]}% -\newcommand*\CurveTL{\LP@G@trackC[270]}% -% -\newcommand*\LP@trackS% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}[scale=\LP@scale]% - \draw[draw opacity=0] (.2,0) -- (.8,1);% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (.5,0)--(.5,1);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@G@trackS[1][0]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}[scale=\LP@scale,rotate=#1]% - \clip (0,0) rectangle (1,1);% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (.5,0)--(.5,1);% - \end{tikzpicture}% -}% -% -\newcommand*\StraightV{\LP@G@trackS}% -\newcommand*\StraightH{\LP@G@trackS[90]}% -\let\Straight\StraightV% -% -\newcommand*\LP@trackCR% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}[scale=\LP@scale]% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (0,0.5)--(1,.5);% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (0.5,0)--(.5,.2);% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (0.5,1)--(.5,.8);% - \end{tikzpicture}% -}% -% -\newcommand*\LP@G@trackCR[1][0]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}[scale=\LP@scale,rotate=#1]% - \clip (0,0) rectangle (1,1);% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (0,0.5)--(1,.5);% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (0.5,0)--(.5,.2);% - \draw[color=LP@c@track, line width=.3cm*\LP@scale] (0.5,1)--(.5,.8);% - \end{tikzpicture}% -}% -% -\newcommand*\CrossH{\LP@G@trackCR}% -\newcommand*\CrossV{\LP@G@trackCR[90]}% -\let\Cross\CrossH% -% -\newcommand*\LP@graveltrap% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture}[scale=\LP@scale]% - \clip (0,0) rectangle (1,1);% - \fill[color=LP@c@track] (.5,.5) circle (.1cm);% - \end{tikzpicture}% -}% -% -\let\Graveltrap\LP@graveltrap% -% -\newcommand*\parkinglot[2]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \LP@set@LP@color{\LP@env@prefix}% - \LP@set@LP@bgcolor{\LP@env@prefix}% - \LP@set@LP@fontsize{\LP@env@prefix}% - \ifthenelse{\equal{\LP@color}{}}% - {\gdef\LP@c@parkinglot{black}}% - {\gdef\LP@c@parkinglot{\LP@color}}% - \ifthenelse{\equal{\LP@bgcolor}{}}% - {\gdef\LP@c@bg@parkinglot{white}}% - {\gdef\LP@c@bg@parkinglot{\LP@bgcolor}}% - \setcounter{LP@counti}{#1}% - \setcounter{LP@countii}{#2}% - \stepcounter{LP@counti}% - \stepcounter{LP@countii}% - \draw[color=\LP@c@parkinglot,line width=\LP@normallines,fill=\LP@c@bg@parkinglot] (#1,#2) rectangle ++(2,2);% - \node[color=\LP@c@parkinglot,font=\sffamily\bfseries\LP@fontsize] at (\arabic{LP@counti},\arabic{LP@countii}){P};% -}% -% -\newcommand*\pitlane[3]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \LP@set@LP@color{\LP@env@prefix}% - \ifthenelse{\equal{\LP@color}{}}% - {\gdef\LP@c@pitlane{black}}% - {\gdef\LP@c@pitlane{\LP@color}}% - \ifthenelse{\equal{#3}{V}}% - {\draw[color=black,line width=\LP@normallines,fill=\LP@c@pitlane] (#1,#2) rectangle ++(1,4);}% - {\draw[color=black,line width=\LP@normallines,fill=\LP@c@pitlane] (#1,#2) rectangle ++(4,1);}% -}% -% -\newcommand*\LP@trackline[3]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \pgfmathsetlength{\LP@length}{.1cm*\LP@scale}% - \scalebox{\LP@tracks@scale}% - {% - \hspace{\LP@length}% - \setcounter{LP@whiledo@i}{#1}% - \whiledo{\arabic{LP@whiledo@i}>0}% - {% - \LP@trackS% - \addtocounter{LP@whiledo@i}{-1}% - }% - \setcounter{LP@whiledo@i}{#2}% - \whiledo{\arabic{LP@whiledo@i}>0}% - {% - \LP@trackC% - \addtocounter{LP@whiledo@i}{-1}% - }% - \hspace{\LP@length}% - \setcounter{LP@whiledo@i}{#3}% - \whiledo{\arabic{LP@whiledo@i}>0}% - {% - \LP@trackCR% - \addtocounter{LP@whiledo@i}{-1}% - }% - }% -}% -% -\newcommand*\trackV[1]% -{% - \LP@set@LP@columns{\LP@env@prefix}% - \setcounter{LP@counti}{\LP@columns}% - \stepcounter{LP@counti}% - \setcounter{LP@countii}{1}% - \foreach \LP@c@straight/\LP@c@curve/\LP@c@cross in {#1}% - {% - \node[anchor=west] at (\arabic{LP@counti},\arabic{LP@countii}.5) {\LP@trackline{\LP@c@straight}{\LP@c@curve}{\LP@c@cross}};% - \stepcounter{LP@countii}% - };% -}% -% -\newcommand*\trackH[1]% -{% - \setcounter{LP@counti}{1}% - \setcounter{LP@countii}{1}% - \foreach \LP@c@straight/\LP@c@curve/\LP@c@cross in {#1}% - {% - \node[anchor=west,rotate=-90] at (\arabic{LP@counti}.5,\arabic{LP@countii}) {\LP@trackline{\LP@c@straight}{\LP@c@curve}{\LP@c@cross}};% - \stepcounter{LP@counti}% - };% -}% -% -\newcommand*\track[1]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \LP@set@LP@bgcolor{\LP@env@prefix}% - \ifthenelse{\equal{\LP@bgcolor}{}}% - {\gdef\LP@c@bg@track{white}}% - {\gdef\LP@c@bg@track{\LP@bgcolor}}% - \bgroup% - \def\LP@rel@tikzpath{.5}% - \begin{pgfonlayer}{LPbackgroundtwo}% - \pgfsetcornersarced{\pgfpoint{4.9mm*\LP@scale}{4.9mm*\LP@scale}}% - \draw[decorate,decoration={show path construction,% - lineto code={% - \draw [\LP@c@bg@track,line width=0.15cm*\LP@scale,double=LP@c@track,double distance=.3cm*\LP@scale]% - (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);},% - curveto code={% - \draw [LP@c@track,line width=0.3cm*\LP@scale] (\tikzinputsegmentfirst) .. controls% - (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb)% - ..(\tikzinputsegmentlast);}}] #1;% - \end{pgfonlayer}% - \egroup% -}% -% -\newcommand*\link[2][]% -{% - \LP@set@LP@color{\LP@env@prefix}% - \bgroup% - \def\LP@rel@tikzpath{.5}% - \LP@Line[color=\LP@color,#1]{#2}% - \egroup% -}% -% -\newcommand*\mlline[1]% -{% - \draw[color=black, line width=\LP@thicklines] #1;% -}% -% -\newcommand*\MasyuW% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \draw[color=black,fill=white] (0.5,0.5) circle (0.5cm);% - \end{tikzpicture}% -}% -% -\newcommand*\MasyuB% -{% - \begin{tikzpicture}[scale=0.7*\LP@scale]% - \fill[color=black] (0.5,0.5) circle (0.5cm);% - \end{tikzpicture}% -}% -% -\newcommand*\masyuline[1]% -{% - \LP@set@LP@color{\LP@env@prefix}% - \begin{puzzleforeground}% - \bgroup% - \def\LP@rel@tikzpath{.5}% - \draw[color=\LP@color, line width=\LP@thicklines] #1;% - \egroup% - \end{puzzleforeground}% -}% -% -\newcommand*\PMH[1]% -{% - \LP@set@LP@fontsize{\LP@env@prefix}% - \foreach \LP@fe@column/\LP@fe@row in {#1}% - {% - \setcounter{LP@counti}{\LP@fe@column}% - \setcounter{LP@countii}{\LP@fe@row}% - \draw[line width=\LP@thicklines,fill=white] (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(2,1);% - \node[font=\LP@fontsize\bfseries] at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$+$};% - \stepcounter{LP@counti} - \node[font=\LP@fontsize\bfseries] at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$-$};% - };% -}% -% -\newcommand*\MPH[1]% -{% - \LP@set@LP@fontsize{\LP@env@prefix}% - \foreach \LP@fe@column/\LP@fe@row in {#1}% - {% - \setcounter{LP@counti}{\LP@fe@column}% - \setcounter{LP@countii}{\LP@fe@row}% - \draw[line width=\LP@thicklines,fill=white] (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(2,1);% - \node[font=\LP@fontsize\bfseries] at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$-$};% - \stepcounter{LP@counti} - \node[font=\LP@fontsize\bfseries] at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$+$};% - };% -}% -% -\newcommand*\PMV[1]% -{% - \LP@set@LP@fontsize{\LP@env@prefix}% - \foreach \LP@fe@column/\LP@fe@row in {#1}% - {% - \setcounter{LP@counti}{\LP@fe@column}% - \setcounter{LP@countii}{\LP@fe@row}% - \draw[line width=\LP@thicklines,fill=white] (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(1,2);% - \node[font=\LP@fontsize\bfseries] at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$+$};% - \stepcounter{LP@countii} - \node[font=\LP@fontsize\bfseries] at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$-$};% - };% -}% -% -\newcommand*\MPV[1]% -{% - \LP@set@LP@fontsize{\LP@env@prefix}% - \foreach \LP@fe@column/\LP@fe@row in {#1}% - {% - \setcounter{LP@counti}{\LP@fe@column}% - \setcounter{LP@countii}{\LP@fe@row}% - \draw[line width=\LP@thicklines,fill=white] (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(1,2);% - \node[font=\LP@fontsize\bfseries] at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$-$};% - \stepcounter{LP@countii} - \node[font=\LP@fontsize\bfseries] at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$+$};% - };% -}% -% -\newcommand*\magnetsH[1]% -{% - \foreach \LP@fe@column/\LP@fe@row in {#1}% - {% - \draw[line width=\LP@thicklines,fill=white] (\LP@fe@column,\LP@fe@row) rectangle ++(2,1);% - };% -}% -% -\newcommand*\magnetsV[1]% -{% - \foreach \LP@fe@column/\LP@fe@row in {#1}% - {% - \draw[line width=\LP@thicklines,fill=white] (\LP@fe@column,\LP@fe@row) rectangle ++(1,2);% - };% -}% -% -% get package options with prefix -% \newcommand*\LP@set@LP@scale[1]% {% \expandafter\xdef\expandafter\LP@scale{\csname #1@scale\endcsname}% }% -% \newcommand*\LP@set@LP@color[1]% {% \expandafter\xdef\expandafter\LP@color{\csname #1@color\endcsname}% }% -% \newcommand*\LP@set@LP@rows[1]% {% \expandafter\xdef\expandafter\LP@rows{\csname #1@rows\endcsname}% }% -% \newcommand*\LP@set@LP@columns[1]% {% \expandafter\xdef\expandafter\LP@columns{\csname #1@columns\endcsname}% }% -% \newcommand*\LP@set@LP@cvoffset[1]% {% \expandafter\xdef\expandafter\LP@cvoffset{\csname #1@cvoffset\endcsname}% }% -% \newcommand*\LP@set@LP@bgcolor[1]% {% \expandafter\xdef\expandafter\LP@bgcolor{\csname #1@bgcolor\endcsname}% }% -% +\newcommand*\LP@set@LP@extracells[1]% +{% + \expandafter\xdef\expandafter\LP@extracells{\csname #1@extracells\endcsname}% +}% \newcommand*\LP@set@LP@fontsize[1]% {% - % can't expand \Large \expandafter\gdef\expandafter\LP@fontsize{\csname #1@fontsize\endcsname}% }% -% \newcommand*\LP@set@env@prefix[1]% {% \gdef\LP@env@prefix{#1}% }% -% \newcommand*\LP@set@package[1]% {% \gdef\LP@package{#1}% }% -% \newcommand*\setgridlinestyle[1]% {% \def\LP@grid@linestyle{#1}% }% -% \newcommand*\setnormallinewidth[1]% {% \def\LP@normallines{#1}% }% -% \newcommand*\setthicklinewidth[1]% {% \def\LP@thicklines{#1}% }% -% -% generic logicpuzzle environment and options -% +\newcommand*\puzzlestrut% +{% + \LP@set@LP@rows{\LP@env@prefix}% + \ifthenelse{\equal{\LP@package}{nonogram}}% + {% + \LP@set@LP@extracells{\LP@env@prefix}% + \setcounter{LP@counti}{\LP@rows}% max row + \stepcounter{LP@counti}% + \addtocounter{LP@counti}{\LP@NG@extracells}% + \draw[line width=\LP@thicklines, transparent]% + (1,1) -- (1,\arabic{LP@counti});% + }{}% +}% +\newcommand*\setTikZpreset[1]% +{% + \tikzset{% + LPpreset/.style={#1}% + }% +}% +\setTikZpreset{line cap=rect,line join=round}% \newcommand*\LP@LP@init@prefix{LP@LP}% \newcommand*\LP@LP@init@package{logicpuzzle}% -% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{rows}{5}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{columns}{5}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{scale}{1}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{counterstyle}{none}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{color}{}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{bgcolor}{}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{width}{5.1cm}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{cvoffset}{-23pt}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{title}{}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{titleindent}{0cm}% -\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}{titlewidth}{5.1cm}% -\LP@define@choicekey@fontsize{\LP@LP@init@prefix}{\LP@LP@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{rows}{5}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{columns}{5}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{scale}{1}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{counterstyle}{none}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{color}{}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{bgcolor}{}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{width}{5.1cm}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{cvoffset}{-23pt}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{title}{}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{titleindent}{0cm}% +\LP@define@key{\LP@LP@init@prefix}{\LP@LP@init@package}% +{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@LP@init@prefix}% +{\LP@LP@init@package}{Large}% +\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor% +,cvoffset,counterstyle,title,titleindent,titlewidth}% \ProcessOptionsX\relax% -% \let\logicpuzzlecell\setcell% -% \newcommand*\logicpuzzlesetup[1]% {% \setkeys{logicpuzzle.sty}{#1}% }% -% \newenvironment{logicpuzzle}[1][]% {% \setkeys{logicpuzzle}{#1}% @@ -1565,9 +808,12 @@ \begin{minipage}[t]{\LP@LP@width}% \ifthenelse{\equal{\LP@LP@title}{}}% {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@LP@titleindent}\parbox{\LP@LP@titlewidth}{\strut\LP@titleformat\LP@LP@title}\vspace{3mm}\par}% + {\enspace\par\noindent\hspace{\LP@LP@titleindent}% + \parbox{\LP@LP@titlewidth}{\strut\LP@titleformat\LP@LP@title}% + \vspace{3mm}\par}% \begin{tikzpicture}[scale=\LP@LP@scale]% - \LP@drawbackground{1}{1}{\LP@LP@columns}{\LP@LP@rows}{\LP@LP@bgcolor}% + \LP@drawbackground{1}{1}{\LP@LP@columns}{\LP@LP@rows}% + {\LP@LP@bgcolor}% \LP@drawgrid{1}{1}{\LP@LP@columns}{\LP@LP@rows}{1cm}% }% {% @@ -1576,7 +822,7 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% \RequirePackage{lpenv}% -% -\endinput%
\ No newline at end of file +\endinput +%% +%% End of file `logicpuzzle.sty'. diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty b/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty index dc31c538505..5bcd6cbafd7 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty @@ -1,32 +1,35 @@ %% -%% Copyright (C) 2013 by: +%% This is file `lpenv.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% logicpuzzle.dtx (with options: `lpenv') +%% +%% Copyright (C) 2013-2014 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{lpenv}[2013/06/06 lpenv.sty v2.4 - Josef Kleber (C) 2013]% -% -% battleship environment and options -% +%% +\NeedsTeXFormat{LaTeX2e}% +\ProvidesPackage{lpenv}[2015/06/15 v2.5 lpenv.sty - Josef Kleber (C) 2013-2014]% \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}% @@ -42,10 +45,8 @@ \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}}% -% \gdef\LP@BS@shipbox{}% \tikzstyle{island} = [fill=yellow!30,draw, decorate, decoration={random steps,segment length=2.7pt,amplitude=1.7pt}]% -% \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);}% @@ -54,14 +55,12 @@ \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}{}% @@ -75,48 +74,42 @@ \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\LP@BS@printship\expandafter{#1}% +{% + \foreach \LP@element in #1% + {% + \LP@BS@printship{\LP@element}% + }% }% -% \newcommand*\shipH[1]% {% \LP@setrowcontents{#1}{1}{\value{LP@rows}}% }% -% \newcommand*\shipV[1]% {% \LP@setcolumncontents{#1}{0}{1}% }% -% \newcommand*\placesegment[3]% {% \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% - \LP@setcellcontent{#1}{#2}{#3}% + \LP@G@setcellcontent[hcenter,vcenter]{#1}{#2}{#3}% }% -% \let\ship\placesegment% -% \newcommand*\placeisland[2]% {% \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% - \LP@setcellcontent{#1}{#2}{\Island}% + \LP@G@setcellcontent[hcenter,vcenter]{#1}{#2}{\Island}% }% -% \newcommand*\placewater[2]% {% \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% - \LP@setcellcontent{#1}{#2}{\Water}% + \LP@G@setcellcontent[hcenter,vcenter]{#1}{#2}{\Water}% }% -% \newcommand*\shipbox[2][]% {% \setkeys{shipbox}{#1}% \gdef\LP@BS@shipbox{#2}% }% -% \newcommand*\placeship[4]% {% \setcounter{LP@counti}{#4}% length @@ -170,12 +163,10 @@ }% \fi% }% -% \newcommand*\battleshipsetup[1]% {% \setkeys{battleship.sty}{#1}% }% -% \newcommand{\classicgame}[1]% {% \begin{center}% @@ -204,7 +195,6 @@ \end{battleship}% \end{center}% }% -% \newenvironment{battleship}[1][]% {% \setkeys{battleship}{#1}% @@ -219,7 +209,7 @@ \ifthenelse{\equal{\LP@BS@title}{}}% {\par\enspace\par}% empty {\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]% + \begin{tikzpicture}[LPpreset,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}% }% @@ -230,12 +220,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% bokkusu environment and options -% \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}% @@ -248,17 +234,14 @@ \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}% -% \let\valueH\LP@bottomrow% \let\valueV\LP@leftcolumn% \let\sumH\LP@toprow% \let\sumV\LP@rightcolumn% -% \newcommand*\bokkususetup[1]% {% \setkeys{bokkusu.sty}{#1}% }% -% \newenvironment{bokkusu}[1][]% {% \setkeys{bokkusu}{#1}% @@ -272,7 +255,7 @@ \ifthenelse{\equal{\LP@BK@title}{}}% {\par\enspace\par}% empty {\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]% + \begin{tikzpicture}[LPpreset,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}% }% @@ -282,12 +265,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% bridges environment and options -% \newcommand*\LP@BG@init@prefix{LP@BG}% \newcommand*\LP@BG@init@package{bridges}% -% \LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{rows}{5}% \LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{columns}{5}% \LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{scale}{1}% @@ -301,14 +280,54 @@ \LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{titleindent}{0cm}% \LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{titlewidth}{6.1cm}% \LP@define@choicekey@fontsize{\LP@BG@init@prefix}{\LP@BG@init@package}{Large}% -% \let\bridgescell\setcell% -% \newcommand*\bridgessetup[1]% {% \setkeys{bridges.sty}{#1}% }% -% +\newcommand*\bridgesrow[2]% +{% + \setcounter{LP@counti}{1}% + \setcounter{LP@countii}{#1}% + \LP@set@LP@fontsize{\LP@env@prefix}% + \LP@set@LP@color{\LP@env@prefix}% + \foreach \LP@element in {#2}% + {% + \ifthenelse{\equal{\LP@element}{}}% + {}% + {% + \draw[fill=\LP@color] (\arabic{LP@counti},\arabic{LP@countii})% + circle (0.5cm);% + \node[scale=\LP@scale,font=\LP@fontsize] at% + (\arabic{LP@counti},\arabic{LP@countii}){\LP@element};% + }% + \stepcounter{LP@counti}% + };% +}% +\newcommand*\bridgescolumn[2]% +{% + \setcounter{LP@counti}{#1}% + \setcounter{LP@countii}{1}% + \LP@set@LP@fontsize{\LP@env@prefix}% + \LP@set@LP@color{\LP@env@prefix}% + \foreach \LP@element in {#2}% + {% + \ifthenelse{\equal{\LP@element}{}}% + {}% + {% + \draw[fill=\LP@color] (\arabic{LP@counti},\arabic{LP@countii})% + circle (0.5cm);% + \node[scale=\LP@scale,font=\LP@fontsize]% + at (\arabic{LP@counti},\arabic{LP@countii})% + {\LP@element};% + }% + \stepcounter{LP@countii}% + };% +}% +\newcommand*\bridge[2][]% +{% + \LP@Line[#1]{#2}% +}% \newenvironment{bridges}[1][]% {% \setkeys{bridges}{#1}% @@ -322,7 +341,7 @@ \ifthenelse{\equal{\LP@BG@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@BG@titleindent}\parbox{\LP@BG@titlewidth}{\strut\LP@titleformat\LP@BG@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@BG@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@BG@scale]% \LP@drawbackground{1}{1}{\LP@BG@columns}{\LP@BG@rows}{\LP@BG@bgcolor}% \ifthenelse{\equal{\LP@BG@grid}{none}}% {}% @@ -343,12 +362,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% chaossudoku environment and options -% \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}% @@ -360,14 +375,11 @@ \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}% -% \let\chaossudokucell\setcell% -% \newcommand*\chaossudokusetup[1]% {% \setkeys{chaossudoku.sty}{#1}% }% -% \newenvironment{chaossudoku}[1][]% {% \setkeys{chaossudoku}{#1}% @@ -381,7 +393,7 @@ \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]% + \begin{tikzpicture}[LPpreset,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}% }% @@ -391,12 +403,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% ddsudoku environment and options -% \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}% @@ -408,14 +416,11 @@ \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}% -% \let\ddsudokucell\setcell% -% \newcommand*\ddsudokusetup[1]% {% \setkeys{ddsudoku.sty}{#1}% }% -% \newenvironment{ddsudoku}[1][]% {% \setkeys{ddsudoku}{#1}% @@ -429,7 +434,7 @@ \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]% + \begin{tikzpicture}[LPpreset,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}% }% @@ -439,12 +444,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% fourwinds environment and options -% \newcommand*\LP@FW@init@prefix{LP@FW}% \newcommand*\LP@FW@init@package{fourwinds}% -% \LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{rows}{5}% \LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{columns}{5}% \LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{scale}{1}% @@ -457,7 +458,6 @@ \LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{titleindent}{0cm}% \LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@FW@init@prefix}{\LP@FW@init@package}{Large}% -% \newcommand*\fourwindscell[4]% {% \LP@set@LP@fontsize{\LP@env@prefix}% @@ -479,12 +479,10 @@ \node[fill=\LP@c@bg@fw,font=\LP@fontsize] at (#1.5,#2.5) {#3};% \end{puzzlebackground}% }% -% \newcommand*\fourwindssetup[1]% {% \setkeys{fourwinds.sty}{#1}% }% -% \newenvironment{fourwinds}[1][]% {% \setkeys{fourwinds}{#1}% @@ -498,7 +496,7 @@ \ifthenelse{\equal{\LP@FW@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@FW@titleindent}\parbox{\LP@FW@titlewidth}{\strut\LP@titleformat\LP@FW@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@FW@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@FW@scale]% \LP@drawbackground{1}{1}{\LP@FW@columns}{\LP@FW@rows}{\LP@FW@bgcolor}% \LP@drawgrid{1}{1}{\LP@FW@columns}{\LP@FW@rows}{1cm}% }% @@ -508,12 +506,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% hakyuu environment and options -% \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}% @@ -525,14 +519,11 @@ \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}% -% \let\hakyuucell\setcell% -% \newcommand*\hakyuusetup[1]% {% \setkeys{hakyuu.sty}{#1}% }% -% \newenvironment{hakyuu}[1][]% {% \setkeys{hakyuu}{#1}% @@ -546,7 +537,7 @@ \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]% + \begin{tikzpicture}[LPpreset,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}% }% @@ -556,12 +547,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% hitori environment and options -% \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}% @@ -573,14 +560,11 @@ \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}% -% \let\hitoricell\setcell% -% \newcommand*\hitorisetup[1]% {% \setkeys{hitori.sty}{#1}% }% -% \newenvironment{hitori}[1][]% {% \setkeys{hitori}{#1}% @@ -594,7 +578,7 @@ \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]% + \begin{tikzpicture}[LPpreset,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}% }% @@ -604,12 +588,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% kakuro environment and options -% \newcommand*\LP@KKR@init@prefix{LP@KKR}% \newcommand*\LP@KKR@init@package{kakuro}% -% \LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{rows}{5}% \LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{columns}{5}% \LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{scale}{1}% @@ -622,9 +602,7 @@ \LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{titleindent}{0cm}% \LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@KKR@init@prefix}{\LP@KKR@init@package}{Large}% -% \newif\ifLP@KKR@solution\LP@KKR@solutionfalse% -% \define@choicekey*{kakuro.sty}{solution}[\LP@KKR@solution\nr]{true,false}[true]% {% \ifcase\nr\relax% @@ -635,7 +613,6 @@ \LP@KKR@solutionfalse% \fi% }% -% \define@choicekey*{kakuro}{solution}[\LP@KKR@solution\nr]{true,false}[true]% {% \ifcase\nr\relax% @@ -646,14 +623,78 @@ \LP@KKR@solutionfalse% \fi% }% -% \let\kakurocell\setcell% -% \newcommand*\kakurosetup[1]% {% \setkeys{kakuro.sty}{#1}% }% -% +\def\LP@KKR@print@element#1% +{% + \if!\ifnum9<1#1!\else_\fi% + \ifLP@KKR@solution% + \setcell{\arabic{LP@counti}}{\arabic{LP@countii}}{#1}% + \else% + \fi% + \else% + #1% + \fi% +}% +\newcommand*\kakurorow[2]% +{% + \setcounter{LP@counti}{1}% + \setcounter{LP@countii}{#1}% + \foreach \LP@element in {#2}% + {% + \LP@KKR@print@element{\LP@element}% + \stepcounter{LP@counti}% + };% +}% +\newcommand*\kakurocolumn[2]% +{% + \setcounter{LP@counti}{#1}% + \setcounter{LP@countii}{1}% + \foreach \LP@element in {#2}% + {% + \LP@KKR@print@element{\LP@element}% + \stepcounter{LP@countii}% + };% +}% +\newcommand*\KKR[2]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \LP@set@LP@bgcolor{\LP@env@prefix}% + \LP@set@LP@color{\LP@env@prefix}% + \ifthenelse{\equal{\LP@bgcolor}{}}% + {\gdef\LP@sr@bgcolor{white}}% + {\gdef\LP@sr@bgcolor{\LP@bgcolor}}% + \stepcounter{LP@counter@unique}% + \begin{pgfonlayer}{LPdump}% + \node [shape=rectangle,inner sep=0pt] (A_\theLP@counter@unique)% + at (\arabic{LP@counti}\LP@Pfive,\arabic{LP@countii}\LP@Pfive)% + {\tikz\draw[scale=\LP@scale,color=\LP@sr@bgcolor]% + (0.08,0.1) rectangle (0.92,0.9);};% + \end{pgfonlayer}% + \begin{puzzlebackground}% + \fill[color=\LP@color]% + (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(1,1);% + \draw[line width=\LP@normallines]% + (\arabic{LP@counti},\arabic{LP@countii}) -- ++(0,1) -- ++(1,-1);% + \end{puzzlebackground}% + \node [shape=rectangle,inner sep=0pt,anchor=south west,% + scale=\LP@scale,font=\small]% + at (A_\theLP@counter@unique.south west) {#1};% + \node [shape=rectangle,inner sep=0pt,anchor=north east,% + scale=\LP@scale,font=\small]% + at (A_\theLP@counter@unique.north east) {#2};% +}% +\newcommand*\Black% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{puzzlebackground}% + \fill[color=black]% + (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(1,1);% + \end{puzzlebackground}% +}% \newenvironment{kakuro}[1][]% {% \setkeys{kakuro}{#1}% @@ -667,7 +708,7 @@ \ifthenelse{\equal{\LP@KKR@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@KKR@titleindent}\parbox{\LP@KKR@titlewidth}{\strut\LP@titleformat\LP@KKR@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@KKR@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@KKR@scale]% \LP@drawbackground{1}{1}{\LP@KKR@columns}{\LP@KKR@rows}{\LP@KKR@bgcolor}% \LP@drawgrid{1}{1}{\LP@KKR@columns}{\LP@KKR@rows}{1cm}% }% @@ -677,12 +718,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% kendoku environment and options -% \newcommand*\LP@KD@init@prefix{LP@KD}% \newcommand*\LP@KD@init@package{kendoku}% -% \LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{rows}{5}% \LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{columns}{5}% \LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{scale}{1}% @@ -694,14 +731,11 @@ \LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{titleindent}{0cm}% \LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@KD@init@prefix}{\LP@KD@init@package}{Large}% -% \let\kendokucell\setcell% -% \newcommand*\kendokusetup[1]% {% \setkeys{kendoku.sty}{#1}% }% -% \newenvironment{kendoku}[1][]% {% \setkeys{kendoku}{#1}% @@ -715,7 +749,7 @@ \ifthenelse{\equal{\LP@KD@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@KD@titleindent}\parbox{\LP@KD@titlewidth}{\strut\LP@titleformat\LP@KD@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@KD@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@KD@scale]% \LP@drawbackground{1}{1}{\LP@KD@columns}{\LP@KD@rows}{\LP@KD@bgcolor}% \LP@drawgrid{1}{1}{\LP@KD@columns}{\LP@KD@rows}{1cm}% }% @@ -725,12 +759,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% killersudoku environment and options -% \newcommand*\LP@KSDK@init@prefix{LP@KSDK}% \newcommand*\LP@KSDK@init@package{killersudoku}% -% \LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{rows}{5}% \LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{columns}{5}% \LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{scale}{1}% @@ -742,14 +772,11 @@ \LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{titleindent}{0cm}% \LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{Large}% -% \let\killersudokucell\setcell% -% \newcommand*\killersudokusetup[1]% {% \setkeys{killersudoku.sty}{#1}% }% -% \newenvironment{killersudoku}[1][]% {% \setkeys{killersudoku}{#1}% @@ -763,7 +790,7 @@ \ifthenelse{\equal{\LP@KSDK@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@KSDK@titleindent}\parbox{\LP@KSDK@titlewidth}{\strut\LP@titleformat\LP@KSDK@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@KSDK@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@KSDK@scale]% \LP@drawbackground{1}{1}{\LP@KSDK@columns}{\LP@KSDK@rows}{\LP@KSDK@bgcolor}% \LP@drawgrid{1}{1}{\LP@KSDK@columns}{\LP@KSDK@rows}{1cm}% }% @@ -773,12 +800,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% laserbeam environment and options -% \newcommand*\LP@LB@init@prefix{LP@LB}% \newcommand*\LP@LB@init@package{laserbeam}% -% \LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{rows}{5}% \LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{columns}{5}% \LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{scale}{1}% @@ -790,24 +813,68 @@ \LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{titleindent}{0cm}% \LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{titlewidth}{6.5cm}% \LP@define@choicekey@fontsize{\LP@LB@init@prefix}{\LP@LB@init@package}{Large}% -% \let\laserH\LP@toprow% \let\laserV\LP@leftcolumn% \let\mirrorH\LP@bottomrow@edge% \let\mirrorV\LP@rightcolumn@edge% -% \newcommand*\laser[2][red]% {% - % avoid little laser peaks outside grid \clip (1,1) rectangle (\arabic{LP@columns},\arabic{LP@rows});% \framearea{#1}{#2}% }% -% \newcommand*\laserbeamsetup[1]% {% \setkeys{laserbeam.sty}{#1}% }% -% +\newcommand*\placecross[2]% +{% + \LP@G@setcellcontent{#1}{#2}{\LP@Cross}% +}% +\newcommand*\placemirror[3]% +{% + \LP@G@setcellcontent{#1}{#2}{\LP@Mirror{#3}}% +}% +\newcommand*\placearrow[3]% +{% + \LP@G@setcellcontent{#1}{#2}{\LP@Arrow{#3}}% +}% +\newcommand*\LP@Arrow[1]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \def\LP@rotate{45}% + \ifthenelse{\equal{#1}{LeftUp}}{\def\LP@rotate{135}}{}% + \ifthenelse{\equal{#1}{LeftDown}}{\def\LP@rotate{225}}{}% + \ifthenelse{\equal{#1}{RightDown}}{\def\LP@rotate{315}}{}% + \pgfmathsetmacro{\LPlinewidth}{3pt*\LP@scale}% + \tikz\draw[->,line width=\LPlinewidth,% + rotate=\LP@rotate,scale=\LP@scale]% + (0.1,.5) -- (0.9,.5);% +}% +\newcommand*\LP@Cross% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}% + \begin{pgfonlayer}{LPforeground}% + \pgfmathsetmacro{\LPlinewidth}{3pt*\LP@scale}% + \draw[line width=\LPlinewidth,scale=\LP@scale,color=LP@c@cross]% + (.35,.35) -- (0.65,.65) -- (.5,.5) -- (.65,.35)-- (.35,.65);% + \end{pgfonlayer}% + \end{tikzpicture}% +}% +\newcommand*\LP@Mirror[1]% +{% + \def\LP@rotate{0}% + \ifthenelse{\equal{#1}{V}}{\def\LP@rotate{90}}{}% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}% + \begin{pgfonlayer}{LPforegroundtwo}% + \pgfmathsetmacro{\LPlinewidth}{3pt*\LP@scale}% + \draw[line width=\LPlinewidth,scale=\LP@scale,% + color=LP@c@mirror,rotate=\LP@rotate]% + (.35,.5) -- (0.65,.5);% + \end{pgfonlayer}% + \end{tikzpicture}% +}% \newenvironment{laserbeam}[1][]% {% \setkeys{laserbeam}{#1}% @@ -821,7 +888,7 @@ \ifthenelse{\equal{\LP@LB@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@LB@titleindent}\parbox{\LP@LB@titlewidth}{\strut\LP@titleformat\LP@LB@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@LB@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@LB@scale]% \LP@drawbackground{1}{1}{\LP@LB@columns}{\LP@LB@rows}{\LP@LB@bgcolor}% \LP@drawgrid{1}{1}{\LP@LB@columns}{\LP@LB@rows}{1cm}% }% @@ -831,12 +898,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% lpsudoku environment and options -% \newcommand*\LP@SDK@init@prefix{LP@SDK}% \newcommand*\LP@SDK@init@package{lpsudoku}% -% \LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{rows}{9}% \LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{columns}{9}% \LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{scale}{1}% @@ -848,14 +911,57 @@ \LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{titleindent}{0cm}% \LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{titlewidth}{9.1cm}% \LP@define@choicekey@fontsize{\LP@SDK@init@prefix}{\LP@SDK@init@package}{Large}% -% \let\lpsudokucell\setcell% -% \newcommand*\lpsudokusetup[1]% {% \setkeys{lpsudoku.sty}{#1}% }% -% +\newcommand*\LP@drawsudokugrid% +{% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity]% + (1,1) -- (1,10);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity]% + (4,1) -- (4,10);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity]% + (7,1) -- (7,10);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity]% + (10,1) -- (10,10);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity]% + (1,1) -- (10,1);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity]% + (1,4) -- (10,4);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity]% + (1,7) -- (10,7);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity]% + (1,10) -- (10,10);% +}% +\newcommand*\LP@magnetsgrid% +{% + \LP@set@LP@fontsize{\LP@env@prefix}% + \LP@set@LP@columns{\LP@env@prefix}% + \LP@set@LP@rows{\LP@env@prefix}% + \setcounter{LP@counti}{\LP@columns}% max column + \setcounter{LP@countii}{\LP@rows}% max row + \stepcounter{LP@counti}% + \stepcounter{LP@countii}% + \draw[step=1cm,line width=\LP@normallines]% + (-1,1) grid (1,\arabic{LP@countii});% + \draw[step=1cm,line width=\LP@normallines]% + (1,\arabic{LP@countii}) grid ++(\LP@columns,2);% + \draw[line width=\LP@normallines]% + (0,\arabic{LP@countii}) -- ++(0,1) -- ++(1,0);% + \draw[line width=\LP@thicklines]% + (-1,1) rectangle (1,\arabic{LP@countii});% + \draw[line width=\LP@thicklines]% + (1,\arabic{LP@countii}) rectangle ++(\LP@columns,2);% + \draw[line width=\LP@thicklines]% + (1,\arabic{LP@countii}) rectangle ++(-2,2);% + \node[font=\LP@fontsize\bfseries] at (0.5,\arabic{LP@counti}.5)% + {$-$};% + \stepcounter{LP@counti}% + \node[font=\LP@fontsize\bfseries] at (-0.5,\arabic{LP@counti}.5)% + {$+$};% +}% \newenvironment{lpsudoku}[1][]% {% \setkeys{lpsudoku}{#1}% @@ -869,23 +975,19 @@ \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]% + \begin{tikzpicture}[LPpreset,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}% + \LP@drawcounter{\LP@SDK@counterstyle}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% magiclabyrinth environment and options -% \newcommand*\LP@ML@init@prefix{LP@ML}% \newcommand*\LP@ML@init@package{magiclabyrinth}% -% \LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{rows}{5}% \LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{columns}{5}% \LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{scale}{1}% @@ -897,14 +999,21 @@ \LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{titleindent}{0cm}% \LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@ML@init@prefix}{\LP@ML@init@package}{Large}% -% \let\magiclabyrinthcell\setcell% -% \newcommand*\magiclabyrinthsetup[1]% {% \setkeys{magiclabyrinth.sty}{#1}% }% -% +\newcommand*\mlline[1]% +{% + \draw[color=black, line width=\LP@thicklines] #1;% +}% +\newcommand*\MasyuW% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \draw[color=black,fill=white] (0.5,0.5) circle (0.5cm);% + \end{tikzpicture}% +}% \newenvironment{magiclabyrinth}[1][]% {% \setkeys{magiclabyrinth}{#1}% @@ -918,7 +1027,7 @@ \ifthenelse{\equal{\LP@ML@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@ML@titleindent}\parbox{\LP@ML@titlewidth}{\strut\LP@titleformat\LP@ML@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@ML@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@ML@scale]% \LP@drawbackground{1}{1}{\LP@ML@columns}{\LP@ML@rows}{\LP@ML@bgcolor}% \LP@drawgrid{1}{1}{\LP@ML@columns}{\LP@ML@rows}{1cm}% }% @@ -928,12 +1037,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% magnets environment and options -% \newcommand*\LP@MN@init@prefix{LP@MN}% \newcommand*\LP@MN@init@package{magnets}% -% \LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{rows}{6}% \LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{columns}{6}% \LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{scale}{1}% @@ -945,12 +1050,9 @@ \LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{titleindent}{0cm}% \LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{titlewidth}{8.1cm}% \LP@define@choicekey@fontsize{\LP@MN@init@prefix}{\LP@MN@init@package}{Large}% -% \let\magnetscell\setcell% -% \let\minusH\LP@toprow% \let\minusV\LP@leftcolumn% -% \newcommand*\plusV[1]% {% \LP@set@LP@fontsize{\LP@env@prefix}% @@ -961,7 +1063,6 @@ \stepcounter{LP@counti}% };% }% -% \newcommand*\plusH[1]% {% \LP@set@LP@fontsize{\LP@env@prefix}% @@ -975,12 +1076,90 @@ \stepcounter{LP@counti}% };% }% -% \newcommand*\magnetssetup[1]% {% \setkeys{magnets.sty}{#1}% }% -% +\newcommand*\PMH[1]% +{% + \LP@set@LP@fontsize{\LP@env@prefix}% + \foreach \LP@fe@column/\LP@fe@row in {#1}% + {% + \setcounter{LP@counti}{\LP@fe@column}% + \setcounter{LP@countii}{\LP@fe@row}% + \draw[line width=\LP@thicklines,fill=white]% + (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(2,1);% + \node[font=\LP@fontsize\bfseries]% + at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$+$};% + \stepcounter{LP@counti}% + \node[font=\LP@fontsize\bfseries]% + at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$-$};% + };% +}% +\newcommand*\MPH[1]% +{% + \LP@set@LP@fontsize{\LP@env@prefix}% + \foreach \LP@fe@column/\LP@fe@row in {#1}% + {% + \setcounter{LP@counti}{\LP@fe@column}% + \setcounter{LP@countii}{\LP@fe@row}% + \draw[line width=\LP@thicklines,fill=white]% + (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(2,1);% + \node[font=\LP@fontsize\bfseries]% + at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$-$};% + \stepcounter{LP@counti}% + \node[font=\LP@fontsize\bfseries]% + at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$+$};% + };% +}% +\newcommand*\PMV[1]% +{% + \LP@set@LP@fontsize{\LP@env@prefix}% + \foreach \LP@fe@column/\LP@fe@row in {#1}% + {% + \setcounter{LP@counti}{\LP@fe@column}% + \setcounter{LP@countii}{\LP@fe@row}% + \draw[line width=\LP@thicklines,fill=white]% + (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(1,2);% + \node[font=\LP@fontsize\bfseries]% + at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$+$};% + \stepcounter{LP@countii}% + \node[font=\LP@fontsize\bfseries]% + at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$-$};% + };% +}% +\newcommand*\MPV[1]% +{% + \LP@set@LP@fontsize{\LP@env@prefix}% + \foreach \LP@fe@column/\LP@fe@row in {#1}% + {% + \setcounter{LP@counti}{\LP@fe@column}% + \setcounter{LP@countii}{\LP@fe@row}% + \draw[line width=\LP@thicklines,fill=white]% + (\arabic{LP@counti},\arabic{LP@countii}) rectangle ++(1,2);% + \node[font=\LP@fontsize\bfseries]% + at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$-$};% + \stepcounter{LP@countii}% + \node[font=\LP@fontsize\bfseries]% + at (\arabic{LP@counti}.5,\arabic{LP@countii}.5) {$+$};% + };% +}% +\newcommand*\magnetsH[1]% +{% + \foreach \LP@fe@column/\LP@fe@row in {#1}% + {% + \draw[line width=\LP@thicklines,fill=white]% + (\LP@fe@column,\LP@fe@row) rectangle ++(2,1);% + };% +}% +\newcommand*\magnetsV[1]% +{% + \foreach \LP@fe@column/\LP@fe@row in {#1}% + {% + \draw[line width=\LP@thicklines,fill=white]% + (\LP@fe@column,\LP@fe@row) rectangle ++(1,2);% + };% +}% \newenvironment{magnets}[1][]% {% \setkeys{magnets}{#1}% @@ -994,7 +1173,7 @@ \ifthenelse{\equal{\LP@MN@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@MN@titleindent}\parbox{\LP@MN@titlewidth}{\strut\LP@titleformat\LP@MN@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@MN@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@MN@scale]% \LP@drawbackground{1}{1}{\LP@MN@columns}{\LP@MN@rows}{\LP@MN@bgcolor}% \LP@drawgrid{1}{1}{\LP@MN@columns}{\LP@MN@rows}{1cm}% \LP@magnetsgrid% @@ -1006,12 +1185,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% masyu environment and options -% \newcommand*\LP@MY@init@prefix{LP@MY}% \newcommand*\LP@MY@init@package{masyu}% -% \LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{rows}{5}% \LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{columns}{5}% \LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{scale}{1}% @@ -1024,14 +1199,27 @@ \LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{titleindent}{0cm}% \LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@MY@init@prefix}{\LP@MY@init@package}{Large}% -% \let\masyucell\setcell% -% \newcommand*\masyusetup[1]% {% \setkeys{masyu.sty}{#1}% }% -% +\newcommand*\MasyuB% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=black] (0.5,0.5) circle (0.5cm);% + \end{tikzpicture}% +}% +\newcommand*\masyuline[1]% +{% + \LP@set@LP@color{\LP@env@prefix}% + \begin{puzzleforeground}% + \bgroup% + \def\LP@rel@tikzpath{.5}% + \draw[color=\LP@color, line width=\LP@thicklines] #1;% + \egroup% + \end{puzzleforeground}% +}% \newenvironment{masyu}[1][]% {% \setkeys{masyu}{#1}% @@ -1045,7 +1233,7 @@ \ifthenelse{\equal{\LP@MY@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@MY@titleindent}\parbox{\LP@MY@titlewidth}{\strut\LP@titleformat\LP@MY@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@MY@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@MY@scale]% \LP@drawbackground{1}{1}{\LP@MY@columns}{\LP@MY@rows}{\LP@MY@bgcolor}% \LP@drawgrid{1}{1}{\LP@MY@columns}{\LP@MY@rows}{1cm}% }% @@ -1055,12 +1243,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% minesweeper environment and options -% \newcommand*\LP@MS@init@prefix{LP@MS}% \newcommand*\LP@MS@init@package{minesweeper}% -% \LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{rows}{5}% \LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{columns}{5}% \LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{scale}{1}% @@ -1072,14 +1256,22 @@ \LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{titleindent}{0cm}% \LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@MS@init@prefix}{\LP@MS@init@package}{Large}% -% \let\minesweepercell\setcell% -% \newcommand*\minesweepersetup[1]% {% \setkeys{minesweeper.sty}{#1}% }% -% +\newcommand*\LP@Mine% +{% + \begin{tikzpicture}[scale=\LP@scale]% + \fill[color=black] (.2,.5) -- (.5,.6) -- (.5,.4) -- cycle;% + \fill[color=black] (.8,.5) -- (.5,.6) -- (.5,.4) -- cycle;% + \fill[color=black] (.5,.8) -- (.4,.5) -- (.6,.5) -- cycle;% + \fill[color=black] (.5,.2) -- (.4,.5) -- (.6,.5) -- cycle;% + \shade[ball color=black] (.5,.5) circle (.225cm);% + \end{tikzpicture}% +}% +\let\Mine\LP@Mine% \newenvironment{minesweeper}[1][]% {% \setkeys{minesweeper}{#1}% @@ -1093,7 +1285,7 @@ \ifthenelse{\equal{\LP@MS@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@MS@titleindent}\parbox{\LP@MS@titlewidth}{\strut\LP@titleformat\LP@MS@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@MS@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@MS@scale]% \LP@drawbackground{1}{1}{\LP@MS@columns}{\LP@MS@rows}{\LP@MS@bgcolor}% \LP@drawgrid{1}{1}{\LP@MS@columns}{\LP@MS@rows}{1cm}% }% @@ -1103,12 +1295,207 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% numberlink environment and options -% +\newcommand*\LP@NG@init@prefix{LP@NG}% +\newcommand*\LP@NG@init@package{nonogram}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{rows}{5}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{columns}{5}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{extracells}{5}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{helplines}{5}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{solution}{false}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{scale}{1}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{counterstyle}{none}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{bgcolor}{}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{color}{black}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{width}{5.1cm}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{title}{}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@NG@init@prefix}{\LP@NG@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@NG@init@prefix}{\LP@NG@init@package}{Large}% +\newcommand*\nonogramrow[2]% +{% + \foreach \LP@fe@column/\LP@fe@length in {#2}% + {% + \setcounter{LP@whiledo@i}{\LP@fe@length}% + \setcounter{LP@countiii}{\LP@fe@column}% + \whiledo{\value{LP@whiledo@i}>0}% + {% + \fillcell{\arabic{LP@countiii}}{#1}% + \addtocounter{LP@countiii}{1}% + \addtocounter{LP@whiledo@i}{-1}% + }% + };% +}% +\newcommand*\nonogramcolumn[2]% +{% + \foreach \LP@fe@row/\LP@fe@length in {#2}% + {% + \setcounter{LP@whiledo@i}{\LP@fe@length}% + \setcounter{LP@countiii}{\LP@fe@row}% + \whiledo{\value{LP@whiledo@i}>0}% + {% + \fillcell{#1}{\arabic{LP@countiii}}% + \addtocounter{LP@countiii}{1}% + \addtocounter{LP@whiledo@i}{-1}% + }% + };% +}% +\newcommand*\nonogramV[1]% +{% + \LP@set@LP@fontsize{\LP@env@prefix}% + \setcounter{LP@whiledo@i}{0}% + \foreach \LP@line in {#1}% + {% + \setcounter{LP@countiii}{0}% + \addtocounter{LP@whiledo@i}{1}% + \foreach \LP@element in \LP@line% + {% + \ifthenelse{\value{LP@countiii}=0}% + {% + {\LP@fontsize\node at (0.5,\arabic{LP@whiledo@i}.5){\LP@element};}% + }% + {% + \ifthenelse{\value{LP@countiii}=-1}% + {% + {\LP@fontsize\node at (-0.5,\arabic{LP@whiledo@i}.5){\LP@element};}% + }% + {% + \addtocounter{LP@countiii}{1}% + {\LP@fontsize\node at% + (\arabic{LP@countiii}.5,\arabic{LP@whiledo@i}.5){\LP@element};}% + \addtocounter{LP@countiii}{-1}% + }% + }% + \addtocounter{LP@countiii}{-1}% + }% + };% +}% +\newcommand*\nonogramH[1]% +{% + \setcounter{LP@whiledo@i}{0}% + \foreach \LP@line in {#1}% + {% + \setcounter{LP@countiii}{\LP@rows}% + \addtocounter{LP@countiii}{1}% + \addtocounter{LP@whiledo@i}{1}% + \foreach \LP@element in \LP@line% + {% + {\LP@fontsize\node at% + (\arabic{LP@whiledo@i}.5,\arabic{LP@countiii}.5){\LP@element};}% + \addtocounter{LP@countiii}{1}% + }% + };% +}% +\newcommand*\LP@nonogramgrid% +{% + \LP@set@LP@columns{\LP@env@prefix}% + \LP@set@LP@rows{\LP@env@prefix}% + \setcounter{LP@counti}{\LP@columns}% max column + \setcounter{LP@countii}{\LP@rows}% max row + \setcounter{LP@countiii}{\LP@NG@extracells}% + \stepcounter{LP@counti}% + \stepcounter{LP@countii}% + \addtocounter{LP@countiii}{-1}% + \setcounter{LP@whiledo@i}{1}% + \setcounter{LP@whiledo@ii}{\LP@NG@extracells}% + \addtocounter{LP@whiledo@ii}{\arabic{LP@countii}}% + \setcounter{LP@countiii}{\arabic{LP@countii}}% + \addtocounter{LP@countiii}{\LP@NG@extracells}% + \addtocounter{LP@counti}{1}% + \whiledo{\value{LP@whiledo@i}<\value{LP@counti}}% + {% + \draw[line width=\LP@normallines]% + (\arabic{LP@whiledo@i},1) --% + (\arabic{LP@whiledo@i},\arabic{LP@countiii});% + \addtocounter{LP@whiledo@i}{1}% + }% + \addtocounter{LP@counti}{-1}% + \setcounter{LP@whiledo@i}{1}% + \setcounter{LP@whiledo@ii}{-\LP@NG@extracells}% + \addtocounter{LP@whiledo@ii}{1}% + \addtocounter{LP@countii}{1}% + \whiledo{\value{LP@whiledo@i}<\value{LP@countii}}% + {% + \draw[line width=\LP@normallines]% + (\arabic{LP@whiledo@ii},\arabic{LP@whiledo@i}) --% + (\arabic{LP@counti},\arabic{LP@whiledo@i});% + \addtocounter{LP@whiledo@i}{1}% + }% + \addtocounter{LP@countii}{-1}% + \setcounter{LP@countiii}{\LP@NG@helplines}% + \ifthenelse{\arabic{LP@countiii}>0}% + {% + \setcounter{LP@whiledo@i}{1}% + \addtocounter{LP@whiledo@i}{\LP@NG@helplines}% + \setcounter{LP@whiledo@ii}{\LP@NG@extracells}% + \addtocounter{LP@whiledo@ii}{\arabic{LP@countii}}% + \setcounter{LP@countiii}{\arabic{LP@countii}}% + \addtocounter{LP@countiii}{\LP@NG@extracells}% + \whiledo{\value{LP@whiledo@i}<\value{LP@counti}}% + {% + \draw[line width=\LP@thicklines]% + (\arabic{LP@whiledo@i},1) --% + (\arabic{LP@whiledo@i},\arabic{LP@countiii});% + \addtocounter{LP@whiledo@i}{\LP@NG@helplines}% + }% + \draw[line width=\LP@thicklines] (1,1) -- (1,\arabic{LP@countiii});% + \draw[line width=\LP@thicklines]% + (\arabic{LP@counti},1) --% + (\arabic{LP@counti},\arabic{LP@countiii});% + \setcounter{LP@whiledo@i}{1}% + \addtocounter{LP@whiledo@i}{\LP@NG@helplines}% + \setcounter{LP@whiledo@ii}{-\LP@NG@extracells}% + \addtocounter{LP@whiledo@ii}{1}% + \whiledo{\value{LP@whiledo@i}<\value{LP@countii}}% + {% + \draw[line width=\LP@thicklines]% + (\arabic{LP@whiledo@ii},\arabic{LP@whiledo@i}) --% + (\arabic{LP@counti},\arabic{LP@whiledo@i});% + \addtocounter{LP@whiledo@i}{\LP@NG@helplines}% + }% + \draw[line width=\LP@thicklines]% + (\arabic{LP@whiledo@ii},1) -- (\arabic{LP@counti},1);% + \draw[line width=\LP@thicklines]% + (\arabic{LP@whiledo@ii},\arabic{LP@countii}) --% + (\arabic{LP@counti},\arabic{LP@countii});% + }% + {}% +}% +\newcommand*\nonogramsetup[1]% +{% + \setkeys{nonogram.sty}{#1}% +}% +\newenvironment{nonogram}[1][]% +{% + \setkeys{nonogram}{#1}% + \LP@set@package{nonogram}% + \LP@set@env@prefix{LP@NG}% + \setcounter{LP@rows}{\LP@NG@rows}% + \setcounter{LP@columns}{\LP@NG@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% + \begin{minipage}[t]{\LP@NG@width}% + \ifthenelse{\equal{\LP@NG@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@NG@titleindent}\parbox{\LP@NG@titlewidth}{\strut\LP@titleformat\LP@NG@title}\vspace{3mm}\par}% + \begin{tikzpicture}[LPpreset,scale=\LP@NG@scale]% + \LP@drawbackground{1}{1}{\LP@NG@columns}{\LP@NG@rows}{\LP@NG@bgcolor}% + \LP@drawgrid{1}{1}{\LP@NG@columns}{\LP@NG@rows}{1cm}% + \framepuzzle% + \ifthenelse{\equal{\LP@NG@solution}{false}}% + {% + \LP@nonogramgrid% + }% + {}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@NG@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% \newcommand*\LP@NL@init@prefix{LP@NL}% \newcommand*\LP@NL@init@package{numberlink}% -% \LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{rows}{5}% \LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{columns}{5}% \LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{scale}{1}% @@ -1121,18 +1508,22 @@ \LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{titleindent}{0cm}% \LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@NL@init@prefix}{\LP@NL@init@package}{Large}% -% \newcommand*\numberlinkcell[3]% {% \fourwindscell{#1}{#2}{#3}{}% }% -% -% \newcommand*\numberlinksetup[1]% {% \setkeys{numberlink.sty}{#1}% }% -% +\newcommand*\link[2][]% +{% + \LP@set@LP@color{\LP@env@prefix}% + \bgroup% + \def\LP@rel@tikzpath{.5}% + \LP@Line[color=\LP@color,#1]{#2}% + \egroup% +}% \newenvironment{numberlink}[1][]% {% \setkeys{numberlink}{#1}% @@ -1146,7 +1537,7 @@ \ifthenelse{\equal{\LP@NL@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@NL@titleindent}\parbox{\LP@NL@titlewidth}{\strut\LP@titleformat\LP@NL@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@NL@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@NL@scale]% \LP@drawbackground{1}{1}{\LP@NL@columns}{\LP@NL@rows}{\LP@NL@bgcolor}% \LP@drawgrid{1}{1}{\LP@NL@columns}{\LP@NL@rows}{1cm}% }% @@ -1156,12 +1547,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% resuko environment and options -% \newcommand*\LP@RSK@init@prefix{LP@RSK}% \newcommand*\LP@RSK@init@package{resuko}% -% \LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{rows}{5}% \LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{columns}{5}% \LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{scale}{1}% @@ -1174,14 +1561,203 @@ \LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{titleindent}{0cm}% \LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@RSK@init@prefix}{\LP@RSK@init@package}{Large}% -% \let\resukocell\setcell% -% \newcommand*\resukosetup[1]% {% \setkeys{resuko.sty}{#1}% }% -% +\newcommand*\LP@trackC% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}[scale=\LP@scale]% + \pgfsetcornersarced{\pgfpoint{4mm*\LP@scale}{4mm*\LP@scale}}% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (0,.5)--(.5,.5)--(.5,0);% + \end{tikzpicture}% +}% +\newcommand*\LP@G@trackC[1][0]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}[scale=\LP@scale,rotate=#1]% + \clip (0,0) rectangle (1,1);% + \pgfsetcornersarced{\pgfpoint{4mm*\LP@scale}{4mm*\LP@scale}}% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (0,.5)--(.5,.5)--(.5,0);% + \end{tikzpicture}% +}% +\let\CurveBL\LP@G@trackC% +\newcommand*\CurveBR{\LP@G@trackC[90]}% +\newcommand*\CurveTR{\LP@G@trackC[180]}% +\newcommand*\CurveTL{\LP@G@trackC[270]}% +\newcommand*\LP@trackS% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}[scale=\LP@scale]% + \draw[draw opacity=0] (.2,0) -- (.8,1);% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (.5,0)--(.5,1);% + \end{tikzpicture}% +}% +\newcommand*\LP@G@trackS[1][0]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}[scale=\LP@scale,rotate=#1]% + \clip (0,0) rectangle (1,1);% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (.5,0)--(.5,1);% + \end{tikzpicture}% +}% +\newcommand*\StraightV{\LP@G@trackS}% +\newcommand*\StraightH{\LP@G@trackS[90]}% +\let\Straight\StraightV% +\newcommand*\LP@trackCR% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}[scale=\LP@scale]% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (0,0.5)--(1,.5);% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (0.5,0)--(.5,.2);% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (0.5,1)--(.5,.8);% + \end{tikzpicture}% +}% +\newcommand*\LP@G@trackCR[1][0]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}[scale=\LP@scale,rotate=#1]% + \clip (0,0) rectangle (1,1);% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (0,0.5)--(1,.5);% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (0.5,0)--(.5,.2);% + \draw[color=LP@c@track, line width=.3cm*\LP@scale]% + (0.5,1)--(.5,.8);% + \end{tikzpicture}% +}% +\newcommand*\CrossH{\LP@G@trackCR}% +\newcommand*\CrossV{\LP@G@trackCR[90]}% +\let\Cross\CrossH% +\newcommand*\LP@graveltrap% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}[scale=\LP@scale]% + \clip (0,0) rectangle (1,1);% + \fill[color=LP@c@track] (.5,.5) circle (.1cm);% + \end{tikzpicture}% +}% +\let\Graveltrap\LP@graveltrap% +\newcommand*\parkinglot[2]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \LP@set@LP@color{\LP@env@prefix}% + \LP@set@LP@bgcolor{\LP@env@prefix}% + \LP@set@LP@fontsize{\LP@env@prefix}% + \ifthenelse{\equal{\LP@color}{}}% + {\gdef\LP@c@parkinglot{black}}% + {\gdef\LP@c@parkinglot{\LP@color}}% + \ifthenelse{\equal{\LP@bgcolor}{}}% + {\gdef\LP@c@bg@parkinglot{white}}% + {\gdef\LP@c@bg@parkinglot{\LP@bgcolor}}% + \setcounter{LP@counti}{#1}% + \setcounter{LP@countii}{#2}% + \stepcounter{LP@counti}% + \stepcounter{LP@countii}% + \draw[color=\LP@c@parkinglot,line width=\LP@normallines,% + fill=\LP@c@bg@parkinglot] (#1,#2) rectangle ++(2,2);% + \node[color=\LP@c@parkinglot,font=\sffamily\bfseries\LP@fontsize]% + at (\arabic{LP@counti},\arabic{LP@countii}){P};% +}% +\newcommand*\pitlane[3]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \LP@set@LP@color{\LP@env@prefix}% + \ifthenelse{\equal{\LP@color}{}}% + {\gdef\LP@c@pitlane{black}}% + {\gdef\LP@c@pitlane{\LP@color}}% + \ifthenelse{\equal{#3}{V}}% + {\draw[color=black,line width=\LP@normallines,fill=\LP@c@pitlane]% + (#1,#2) rectangle ++(1,4);}% + {\draw[color=black,line width=\LP@normallines,fill=\LP@c@pitlane]% + (#1,#2) rectangle ++(4,1);}% +}% +\newcommand*\LP@trackline[3]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \pgfmathsetlength{\LP@length}{.1cm*\LP@scale}% + \scalebox{\LP@tracks@scale}% + {% + \hspace{\LP@length}% + \setcounter{LP@whiledo@i}{#1}% + \whiledo{\arabic{LP@whiledo@i}>0}% + {% + \LP@trackS% + \addtocounter{LP@whiledo@i}{-1}% + }% + \setcounter{LP@whiledo@i}{#2}% + \whiledo{\arabic{LP@whiledo@i}>0}% + {% + \LP@trackC% + \addtocounter{LP@whiledo@i}{-1}% + }% + \hspace{\LP@length}% + \setcounter{LP@whiledo@i}{#3}% + \whiledo{\arabic{LP@whiledo@i}>0}% + {% + \LP@trackCR% + \addtocounter{LP@whiledo@i}{-1}% + }% + }% +}% +\newcommand*\trackV[1]% +{% + \LP@set@LP@columns{\LP@env@prefix}% + \setcounter{LP@counti}{\LP@columns}% + \stepcounter{LP@counti}% + \setcounter{LP@countii}{1}% + \foreach \LP@c@straight/\LP@c@curve/\LP@c@cross in {#1}% + {% + \node[anchor=west] at (\arabic{LP@counti},\arabic{LP@countii}.5)% + {\LP@trackline{\LP@c@straight}{\LP@c@curve}{\LP@c@cross}};% + \stepcounter{LP@countii}% + };% +}% +\newcommand*\trackH[1]% +{% + \setcounter{LP@counti}{1}% + \setcounter{LP@countii}{1}% + \foreach \LP@c@straight/\LP@c@curve/\LP@c@cross in {#1}% + {% + \node[anchor=west,rotate=-90]% + at (\arabic{LP@counti}.5,\arabic{LP@countii})% + {\LP@trackline{\LP@c@straight}{\LP@c@curve}{\LP@c@cross}};% + \stepcounter{LP@counti}% + };% +}% +\newcommand*\track[1]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \LP@set@LP@bgcolor{\LP@env@prefix}% + \ifthenelse{\equal{\LP@bgcolor}{}}% + {\gdef\LP@c@bg@track{white}}% + {\gdef\LP@c@bg@track{\LP@bgcolor}}% + \bgroup% + \def\LP@rel@tikzpath{.5}% + \begin{pgfonlayer}{LPbackgroundtwo}% + \pgfsetcornersarced{\pgfpoint{4.9mm*\LP@scale}{4.9mm*\LP@scale}}% + \draw[decorate,decoration={show path construction,% + lineto code={% + \draw [\LP@c@bg@track,line width=0.15cm*\LP@scale,% + double=LP@c@track,double distance=.3cm*\LP@scale]% + (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);},% + curveto code={% + \draw [LP@c@track,line width=0.3cm*\LP@scale]% + (\tikzinputsegmentfirst) .. controls% + (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb)% + ..(\tikzinputsegmentlast);}}] #1;% + \end{pgfonlayer}% + \egroup% +}% \newenvironment{resuko}[1][]% {% \setkeys{resuko}{#1}% @@ -1195,7 +1771,7 @@ \ifthenelse{\equal{\LP@RSK@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@RSK@titleindent}\parbox{\LP@RSK@titlewidth}{\strut\LP@titleformat\LP@RSK@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@RSK@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@RSK@scale]% \LP@drawbackground{1}{1}{\LP@RSK@columns}{\LP@RSK@rows}{\LP@RSK@bgcolor}% \LP@drawgrid{1}{1}{\LP@RSK@columns}{\LP@RSK@rows}{1cm}% }% @@ -1205,12 +1781,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% schatzsuche environment and options -% \newcommand*\LP@SS@init@prefix{LP@SS}% \newcommand*\LP@SS@init@package{schatzsuche}% -% \LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{rows}{5}% \LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{columns}{5}% \LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{scale}{1}% @@ -1222,14 +1794,25 @@ \LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{titleindent}{0cm}% \LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@SS@init@prefix}{\LP@SS@init@package}{Large}% -% \let\schatzsuchecell\setcell% -% \newcommand*\schatzsuchesetup[1]% {% \setkeys{schatzsuche.sty}{#1}% }% -% +\newcommand*\LP@Diamond% +{% + \begin{tikzpicture}[scale=\LP@scale*.9]% + \clip (.05,.905) rectangle (.95,.1);% + \draw[line width=\LP@normallines,fill=yellow!20]% + (.5,.1) -- (.7,.9) -- (.3,.9) -- cycle;% + \draw[line width=\LP@normallines,fill=orange!20]% + (.5,.1) -- (.7,.9) -- (.9,.8) -- cycle;% + \draw[line width=\LP@normallines,fill=orange!20]% + (.5,.1) -- (.3,.9) -- (.1,.8) -- cycle;% + \draw[line width=\LP@normallines] (.1,.8) -- (.9,.8);% +\end{tikzpicture}% +}% +\let\Diamond\LP@Diamond% \newenvironment{schatzsuche}[1][]% {% \setkeys{schatzsuche}{#1}% @@ -1243,7 +1826,7 @@ \ifthenelse{\equal{\LP@SS@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@SS@titleindent}\parbox{\LP@SS@titlewidth}{\strut\LP@titleformat\LP@SS@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@SS@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@SS@scale]% \LP@drawbackground{1}{1}{\LP@SS@columns}{\LP@SS@rows}{\LP@SS@bgcolor}% \LP@drawgrid{1}{1}{\LP@SS@columns}{\LP@SS@rows}{1cm}% }% @@ -1253,12 +1836,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% skyline environment and options -% \newcommand*\LP@SL@init@prefix{LP@SL}% \newcommand*\LP@SL@init@package{skyline}% -% \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}% @@ -1270,9 +1849,7 @@ \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}% -% \newcommand*\LP@SL@sudoku{false}% -% \define@choicekey*{skyline.sty}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% {% \ifcase\nr\relax% @@ -1283,7 +1860,6 @@ \renewcommand*\LP@SL@sudoku{false}% \fi% }% -% \define@choicekey*{skyline}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% {% \ifcase\nr\relax% @@ -1294,18 +1870,15 @@ \renewcommand*\LP@SL@sudoku{false}% \fi% }% -% \let\skylineB\LP@bottomrow% \let\skylineT\LP@toprow% \let\skylineL\LP@leftcolumn% \let\skylineR\LP@rightcolumn% \let\skylinecell\setcell% -% \newcommand*\skylinesetup[1]% {% \setkeys{skyline.sty}{#1}% }% -% \newenvironment{skyline}[1][]% {% \setkeys{skyline}{#1}% @@ -1319,7 +1892,7 @@ \ifthenelse{\equal{\LP@SL@title}{}}% {\par\enspace\par}% empty {\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]% + \begin{tikzpicture}[LPpreset,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}}% @@ -1332,12 +1905,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% slitherlink environment and options -% \newcommand*\LP@SK@init@prefix{LP@SK}% \newcommand*\LP@SK@init@package{slitherlink}% -% \LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{rows}{5}% \LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{columns}{5}% \LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{scale}{1}% @@ -1349,14 +1918,22 @@ \LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{titleindent}{0cm}% \LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{titlewidth}{5.2cm}% \LP@define@choicekey@fontsize{\LP@SK@init@prefix}{\LP@SK@init@package}{Large}% -% \let\slitherlinkcell\setcell% -% \newcommand*\slitherlinksetup[1]% {% \setkeys{slitherlink.sty}{#1}% }% -% +\newcommand*\LP@drawgriddots% +{% + \pgfmathsetmacro{\START}{1}% + \pgfmathsetmacro{\ENDC}{\arabic{LP@counti}}% + \pgfmathsetmacro{\ENDR}{\arabic{LP@countii}}% + \begin{pgfonlayer}{LPforeground}% + \foreach \i in {\START,...,\ENDC}% + \foreach \j in {\START,...,\ENDR}% + \fill[color=LP@c@griddots] (\i,\j) circle [radius=3pt];% + \end{pgfonlayer}% +}% \newenvironment{slitherlink}[1][]% {% \setkeys{slitherlink}{#1}% @@ -1372,7 +1949,7 @@ \ifthenelse{\equal{\LP@SK@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@SK@titleindent}\parbox{\LP@SK@titlewidth}{\strut\LP@titleformat\LP@SK@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@SK@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@SK@scale]% \LP@drawbackground{1}{1}{\LP@SK@columns}{\LP@SK@rows}{\LP@SK@bgcolor}% \LP@drawgrid{1}{1}{\LP@SK@columns}{\LP@SK@rows}{1cm}% \LP@drawgriddots% @@ -1383,12 +1960,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% starbattle environment and options -% \newcommand*\LP@SB@init@prefix{LP@SB}% \newcommand*\LP@SB@init@package{starbattle}% -% \LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{rows}{5}% \LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{columns}{5}% \LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{scale}{1}% @@ -1400,14 +1973,11 @@ \LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{titleindent}{0cm}% \LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@SB@init@prefix}{\LP@SB@init@package}{Large}% -% \let\starbattlecell\setcell% -% \newcommand*\starbattlesetup[1]% {% \setkeys{starbattle.sty}{#1}% }% -% \newenvironment{starbattle}[1][]% {% \setkeys{starbattle}{#1}% @@ -1421,7 +1991,7 @@ \ifthenelse{\equal{\LP@SB@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@SB@titleindent}\parbox{\LP@SB@titlewidth}{\strut\LP@titleformat\LP@SB@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@SB@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@SB@scale]% \LP@drawbackground{1}{1}{\LP@SB@columns}{\LP@SB@rows}{\LP@SB@bgcolor}% \LP@drawgrid{1}{1}{\LP@SB@columns}{\LP@SB@rows}{1cm}% }% @@ -1431,12 +2001,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% starsandarrows environment and options -% \newcommand*\LP@SAA@init@prefix{LP@SAA}% \newcommand*\LP@SAA@init@package{starsandarrows}% -% \LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{rows}{5}% \LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{columns}{5}% \LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{scale}{1}% @@ -1448,15 +2014,35 @@ \LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{titleindent}{0cm}% \LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{titlewidth}{5.9cm}% \LP@define@choicekey@fontsize{\LP@SAA@init@prefix}{\LP@SAA@init@package}{Large}% -% \let\starsH\LP@toprow% \let\starsV\LP@leftcolumn% -% \newcommand*\starsandarrowssetup[1]% {% \setkeys{starsandarrows.sty}{#1}% }% -% +\newcommand*\LP@Star% +{% + \tikz\node[shape=star,fill=yellow,draw,scale=.8*\LP@scale,% + star point height=.25cm] {};% +}% +\let\Star\LP@Star% +\newcommand*\LP@ArrowA[2][red]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \pgfmathsetmacro{\LPlinewidth}{3pt*\LP@scale}% + \tikz\draw[->,line width=\LPlinewidth,rotate=#2,% + scale=\LP@scale,color=#1]% + (0.1,.5) -- (0.9,.5);% +}% +\newcommand*\LP@c@stararrow{red}% +\newcommand*\Right{\LP@ArrowA[\LP@c@stararrow]{0}}% +\newcommand*\RightUp{\LP@ArrowA[\LP@c@stararrow]{45}}% +\newcommand*\Up{\LP@ArrowA[\LP@c@stararrow]{90}}% +\newcommand*\LeftUp{\LP@ArrowA[\LP@c@stararrow]{135}}% +\newcommand*\Left{\LP@ArrowA[\LP@c@stararrow]{180}}% +\newcommand*\LeftDown{\LP@ArrowA[\LP@c@stararrow]{225}}% +\newcommand*\Down{\LP@ArrowA[\LP@c@stararrow]{270}}% +\newcommand*\RightDown{\LP@ArrowA[\LP@c@stararrow]{315}}% \newenvironment{starsandarrows}[1][]% {% \setkeys{starsandarrows}{#1}% @@ -1470,7 +2056,7 @@ \ifthenelse{\equal{\LP@SAA@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@SAA@titleindent}\parbox{\LP@SAA@titlewidth}{\strut\LP@titleformat\LP@SAA@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@SAA@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@SAA@scale]% \LP@drawbackground{1}{1}{\LP@SAA@columns}{\LP@SAA@rows}{\LP@SAA@bgcolor}% \LP@drawgrid{1}{1}{\LP@SAA@columns}{\LP@SAA@rows}{1cm}% }% @@ -1480,12 +2066,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% sunandmoon environment and options -% \newcommand*\LP@SAM@init@prefix{LP@SAM}% \newcommand*\LP@SAM@init@package{sunandmoon}% -% \LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{rows}{5}% \LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{columns}{5}% \LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{scale}{1}% @@ -1497,14 +2079,89 @@ \LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{titleindent}{0cm}% \LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{titlewidth}{5.1cm}% \LP@define@choicekey@fontsize{\LP@SAM@init@prefix}{\LP@SAM@init@package}{Large}% -% \let\sunandmooncell\setcell% -% \newcommand*\sunandmoonsetup[1]% {% \setkeys{sunandmoon.sty}{#1}% }% -% +\newcommand*\LP@DarkCloud{% + \tikz[scale=0.7*\LP@scale]\fill[color=black!60] (0,0)% + rectangle (1,1);% +}% +\newcommand*\LP@Moon{% + \tikz[scale=0.7*\LP@scale]\fill[color=black!60]% + (0,0) circle (0.5cm);% +}% +\newcommand*\LP@MoonR% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=black!60] (0.5,0.5) circle (0.5cm);% + \fill[color=yellow] (.5,0) arc (270:450:.5);% + \end{tikzpicture}% +}% +\newcommand*\LP@MoonL% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=black!60] (0.5,0.5) circle (0.5cm);% + \fill[color=yellow] (.5,0) arc (270:90:.5);% + \end{tikzpicture}% +}% +\newcommand*\LP@MoonT% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=black!60] (0.5,0.5) circle (0.5cm);% + \fill[color=yellow] (0,0.5) arc (180:0:.5);% + \end{tikzpicture}% +}% +\newcommand*\LP@MoonB% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=black!60] (0.5,0.5) circle (0.5cm);% + \fill[color=yellow] (0,0.5) arc (180:360:.5);% + \end{tikzpicture}% +}% +\newcommand*\LP@MoonTL% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=yellow] (0.5,0.5) circle (0.5cm);% + \fill[color=black!60] (1,.5) -- (.5,.5) -- (.5,0)% + arc (270:360:.5);% + \end{tikzpicture}% +}% +\newcommand*\LP@MoonBL% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=yellow] (0.5,0.5) circle (0.5cm);% + \fill[color=black!60] (1,.5) -- (.5,.5) -- (.5,1)% + arc (90:0:.5);% + \end{tikzpicture}% +}% +\newcommand*\LP@MoonBR% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=yellow] (0.5,0.5) circle (0.5cm);% + \fill[color=black!60] (0,.5) -- (.5,.5) -- (.5,1)% + arc (90:180:.5);% + \end{tikzpicture}% +}% +\newcommand*\LP@MoonTR% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=yellow] (0.5,0.5) circle (0.5cm);% + \fill[color=black!60] (0,.5) -- (.5,.5) -- (.5,0)% + arc (270:180:.5);% + \end{tikzpicture}% +}% +\let\Cloud\LP@DarkCloud% +\let\Moon\LP@Moon% +\let\MoonR\LP@MoonR% +\let\MoonL\LP@MoonL% +\let\MoonT\LP@MoonT% +\let\MoonB\LP@MoonB% +\let\MoonTL\LP@MoonTL% +\let\MoonBL\LP@MoonBL% +\let\MoonBR\LP@MoonBR% +\let\MoonTR\LP@MoonTR% \newenvironment{sunandmoon}[1][]% {% \setkeys{sunandmoon}{#1}% @@ -1518,7 +2175,7 @@ \ifthenelse{\equal{\LP@SAM@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@SAM@titleindent}\parbox{\LP@SAM@titlewidth}{\strut\LP@titleformat\LP@SAM@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@SAM@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@SAM@scale]% \LP@drawbackground{1}{1}{\LP@SAM@columns}{\LP@SAM@rows}{\LP@SAM@bgcolor}% \LP@drawgrid{1}{1}{\LP@SAM@columns}{\LP@SAM@rows}{1cm}% }% @@ -1528,12 +2185,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% tentsandtrees environment and options -% \newcommand*\LP@TAT@init@prefix{LP@TAT}% \newcommand*\LP@TAT@init@package{tentsandtrees}% -% \LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{rows}{5}% \LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{columns}{5}% \LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{scale}{1}% @@ -1545,15 +2198,45 @@ \LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{titleindent}{0cm}% \LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{titlewidth}{5.9cm}% \LP@define@choicekey@fontsize{\LP@TAT@init@prefix}{\LP@TAT@init@package}{Large}% -% \let\tentH\LP@toprow% \let\tentV\LP@leftcolumn% -% \newcommand*\tentsandtreessetup[1]% {% \setkeys{tentsandtrees.sty}{#1}% }% -% +\newcommand*\LP@Tree% +{% + \begin{tikzpicture}[scale=.07*\LP@scale]% + \draw[fill=brown!95!black!95,line width=.1pt*\LP@scale]% + (.75,-1) .. controls (.5,.5) and (.5,3) .. (0.5,4) --% + (-0.5,4) .. controls (-.5,3) and (-.5,.5) .. (-.75,-1);% + \shade[top color=green!50!black!60,draw=black,% + line width=.1pt*\LP@scale,bottom color=green!50!black]% + (0,10) .. controls (0,8) and (1,7) .. (1.5,7)% + .. controls (1,7) and (1,7) .. (0.5,7.25)% + .. controls (1.5,5) and (2.5,4) .. (3,4)% + .. controls (2,4) and (1.25,4) .. (1,4.5)% + .. controls (2,2) and (3.5,2) .. (4,2)% + .. controls (1,1) and (-1,1) .. (-4,2)% + .. controls (-3.5,2) and (-2,2) .. (-1,4.5)% + .. controls (-1.25,4) and (-2,4) .. (-3,4)% + .. controls (-2.5,4) and (-1.5,5) .. (-0.5,7.25)% + .. controls (-1,7) and (-1,7) .. (-1.5,7)% + .. controls (-1,7) and (0,8) .. (0,10);% + \end{tikzpicture}% +}% +\let\Tree\LP@Tree% +\newcommand*\LP@Tent% +{% + \begin{tikzpicture}[scale=\LP@scale]% + \draw[fill=yellow!50,line width=.1pt*\LP@scale]% + (.1,.1) -- (.6,.1) -- (.9,.5) -- (.75,.8) -- (.35,.6)% + -- cycle;% + \draw[line width=.1pt*\LP@scale] (.35,.6) -- (.35,.1);% + \draw[line width=.1pt*\LP@scale] (.35,.6) -- (.6,.1);% + \end{tikzpicture}% +}% +\let\Tent\LP@Tent% \newenvironment{tentsandtrees}[1][]% {% \setkeys{tentsandtrees}{#1}% @@ -1567,7 +2250,7 @@ \ifthenelse{\equal{\LP@TAT@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@TAT@titleindent}\parbox{\LP@TAT@titlewidth}{\strut\LP@titleformat\LP@TAT@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@TAT@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@TAT@scale]% \LP@drawbackground{1}{1}{\LP@TAT@columns}{\LP@TAT@rows}{\LP@TAT@bgcolor}% \LP@drawgrid{1}{1}{\LP@TAT@columns}{\LP@TAT@rows}{1cm}% }% @@ -1577,12 +2260,8 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -% tunnel environment and options -% \newcommand*\LP@TN@init@prefix{LP@TN}% \newcommand*\LP@TN@init@package{tunnel}% -% \LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{rows}{5}% \LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{columns}{5}% \LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{scale}{1}% @@ -1594,15 +2273,49 @@ \LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{titleindent}{0cm}% \LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{titlewidth}{5.9cm}% \LP@define@choicekey@fontsize{\LP@TN@init@prefix}{\LP@TN@init@package}{Large}% -% \let\tunnelH\LP@toprow% \let\tunnelV\LP@leftcolumn% -% \newcommand*\tunnelsetup[1]% {% \setkeys{tunnel.sty}{#1}% }% -% +\newcommand*\LP@Portal% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}[scale=\LP@scale]% + \fill[color=black]% + (0,0) -- (0,1) -- (.4,.5) -- (.4,0) -- cycle;% + \fill[color=LP@c@tunnel@ii]% + (0,1) -- (1,1) -- (1,.5) -- (.4,.5) -- cycle;% + \fill[color=LP@c@tunnel@i]% + (.4,0) rectangle (1,.5);% + \draw[line width=\LP@normallines] (0,0) rectangle (1,1) ;% + \end{tikzpicture}% +}% +\newcommand*\portal[2]% +{% + \begin{puzzlebackground}% + \LP@G@setcellcontent[hcenter,vcenter]{#1}{#2}{\LP@Portal}% + \end{puzzlebackground}% +}% +\newcommand*\tube[1]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \bgroup% + \def\LP@rel@tikzpath{.5}% + \begin{pgfonlayer}{LPbackgroundtwo}% + \pgfsetcornersarced{\pgfpoint{3mm}{3mm}}% + \draw[color=LP@c@tunnel!80!black, line width=.4cm*\LP@scale]% + #1;% + \draw[color=LP@c@tunnel, line width=.38cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!85, line width=.35cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!70, line width=.32cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!55, line width=.29cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!45, line width=.25cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!35, line width=.2cm*\LP@scale] #1;% + \end{pgfonlayer}% + \egroup% +}% \newenvironment{tunnel}[1][]% {% \setkeys{tunnel}{#1}% @@ -1616,7 +2329,7 @@ \ifthenelse{\equal{\LP@TN@title}{}}% {\par\enspace\par}% empty {\enspace\par\noindent\hspace{\LP@TN@titleindent}\parbox{\LP@TN@titlewidth}{\strut\LP@titleformat\LP@TN@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@TN@scale]% + \begin{tikzpicture}[LPpreset,scale=\LP@TN@scale]% \LP@drawbackground{1}{1}{\LP@TN@columns}{\LP@TN@rows}{\LP@TN@bgcolor}% \LP@drawgrid{1}{1}{\LP@TN@columns}{\LP@TN@rows}{1cm}% }% @@ -1626,5 +2339,6 @@ \stepcounter{LP@puzzlecounter}% \end{minipage}% }% -% -\endinput%
\ No newline at end of file +\endinput +%% +%% End of file `lpenv.sty'. diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty deleted file mode 100644 index fb359542e8c..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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/04/30 lpsudoku.sty v1.1 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{lpsudoku}{ -Usage of package lpsudoku.sty is deprecated\MessageBreak -\space lpsudoku.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\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 deleted file mode 100644 index 985c014e032..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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{skyline}[2013/04/30 skyline.sty v1.2 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{skyline}{ -Usage of package skyline.sty is deprecated\MessageBreak -\space skyline.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/slitherlink.sty b/Master/texmf-dist/tex/latex/logicpuzzle/slitherlink.sty deleted file mode 100644 index 04a30d3f9cf..00000000000 --- a/Master/texmf-dist/tex/latex/logicpuzzle/slitherlink.sty +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% 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{slitherlink}[2013/04/30 slitherlink.sty v1.1 - Josef Kleber (C) 2013]% -% -\RequirePackage{logicpuzzle}% -% -\PackageWarningNoLine{slitherlink}{ -Usage of package slitherlink.sty is deprecated\MessageBreak -\space slitherlink.sty will be deleted in near future!\MessageBreak -\space Just use package logicpuzzle.sty instead! -} -\endinput%
\ No newline at end of file |