summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty392
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty348
2 files changed, 732 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty
index e2800f154dd..1fdd9900ac5 100644
--- a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty
+++ b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty
@@ -19,7 +19,7 @@
%%
%% This work consists of all files listed in manifest.txt.
%%
-\ProvidesPackage{logicpuzzle}[2013/05/17 logicpuzzle.sty v2.2 - Josef Kleber (C) 2013]%
+\ProvidesPackage{logicpuzzle}[2013/06/06 logicpuzzle.sty v2.4 - Josef Kleber (C) 2013]%
%
\RequirePackage{xkeyval}%
\RequirePackage{ifthen}%
@@ -27,7 +27,7 @@
\RequirePackage{etoolbox}%
\RequirePackage{marginnote}%
\RequirePackage{tikz}%
-\usetikzlibrary{decorations.pathmorphing,calc,shapes.geometric}%
+\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,calc,shapes.geometric}%
\pgfdeclarelayer{LPdump}%
\pgfdeclarelayer{LPbgcolor}%
\pgfdeclarelayer{LPbackgroundtwo}%
@@ -50,6 +50,8 @@
\newcounter{LP@puzzlecounter}%
\setcounter{LP@puzzlecounter}{1}%
%
+\newlength\LP@length%
+%
\newcommand*\LP@counterstyle{none}%
\newcommand*\LP@titleformat{}%
\gdef\LP@env@prefix{}%
@@ -67,6 +69,8 @@
\def\LP@grid@linestyle{}%
\def\LP@draw@opacity{1}%
\def\LP@rel@tikzpath{}%
+\def\LP@tracks@scale{.3}%
+\def\LP@fw@linestyle{-|}%
%
\newcommand*\LP@Pfive{.5}%
%
@@ -170,6 +174,7 @@
\definecolor{LP@c@tunnel@i}{rgb}{.8,.8,.8}%
\definecolor{LP@c@tunnel@ii}{rgb}{.5,.5,.5}%
\LP@definecolor{LP@c@bridge}{1,0,0}%
+\colorlet{LP@c@track}{black!80}%
%
% drawing grids
%
@@ -201,6 +206,27 @@
\fill[color=LP@c@griddots] (\i,\j) circle [radius=3pt];%
\end{pgfonlayer}%
}%
+%
+\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);%
@@ -407,6 +433,19 @@
\LP@setcellcontent{#1}{#2}{\LP@fontsize#3}%
}%
%
+\newcommand*\setcells[2]%
+{%
+ \LP@set@LP@scale{\LP@env@prefix}%
+ \LP@set@LP@fontsize{\LP@env@prefix}%
+ \LP@set@LP@rows{\LP@env@prefix}%
+ \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}%
+ };%
+}%
+%
\newcommand*\setbigcell[4][Huge]%
{%
\LP@set@LP@scale{\LP@env@prefix}%
@@ -641,6 +680,38 @@
};%
}%
%
+\newcommand*\xtikzpath[3]%
+{%
+ (#1\LP@rel@tikzpath,#2\LP@rel@tikzpath)%
+ \foreach \LP@dir/\LP@plength in {#3}%
+ {%
+ \ifnum\LP@dir=1%
+ --++(-\LP@plength,-\LP@plength)%
+ \fi%
+ \ifnum\LP@dir=2%
+ --++(0,-\LP@plength)%
+ \fi%
+ \ifnum\LP@dir=3%
+ --++(\LP@plength,-\LP@plength)%
+ \fi%
+ \ifnum\LP@dir=4%
+ --++(-\LP@plength,0)%
+ \fi%
+ \ifnum\LP@dir=6%
+ --++(\LP@plength,0)%
+ \fi%
+ \ifnum\LP@dir=7%
+ --++(-\LP@plength,\LP@plength)%
+ \fi%
+ \ifnum\LP@dir=8%
+ --++(0,\LP@plength)%
+ \fi%
+ \ifnum\LP@dir=9%
+ --++(\LP@plength,\LP@plength)%
+ \fi%
+ };%
+}%
+%
\newcommand*\filldiagonals[1][yellow!20]%
{%
\LP@set@LP@columns{\LP@env@prefix}%
@@ -679,9 +750,9 @@
\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@countii},\arabic{LP@countii});%
- \draw[line width=\LP@thicklines,color=#1] (\arabic{LP@countii},\arabic{LP@countii})--(\arabic{LP@countii},1);%
- \draw[line width=\LP@thicklines,color=#1] (\arabic{LP@countii},1)--(1,1);%
+ \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]%
@@ -1065,16 +1136,22 @@
\def\LP@Line@linecolor{#1}%
}%
%
+\define@key{LP@Line}{linewidth}[1mm]%
+{%
+ \def\LP@Line@linewidth{#1}%
+}%
+%
\newcommand*\LP@Line[2][]%
{%
\def\LP@Line@double{}%
\def\LP@Line@linecolor{LP@c@bridge}%
+ \def\LP@Line@linewidth{1mm}%
\setkeys{LP@Line}{#1}%
\LP@set@LP@scale{\LP@env@prefix}%
\begin{pgfonlayer}{LPbackgroundtwo}%
\ifthenelse{\equal{\LP@Line@double}{double}}%
- {\draw[double,double distance=.1cm*\LP@scale,color=\LP@Line@linecolor, line width=.1cm*\LP@scale] #2;}%
- {\draw[color=\LP@Line@linecolor, line width=.1cm*\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}%
}%
%
@@ -1083,6 +1160,307 @@
\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]%
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty b/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty
index d485026b6a5..dc31c538505 100644
--- a/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty
+++ b/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty
@@ -20,7 +20,7 @@
%% This work consists of all files listed in manifest.txt.
%%
%
-\ProvidesPackage{lpenv}[2013/05/17 lpenv.sty v2.2 - Josef Kleber (C) 2013]%
+\ProvidesPackage{lpenv}[2013/06/06 lpenv.sty v2.4 - Josef Kleber (C) 2013]%
%
% battleship environment and options
%
@@ -440,6 +440,75 @@
\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}%
+\LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{bgcolor}{}%
+\LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{color}{blue}%
+\LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{width}{5.1cm}%
+\LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@FW@init@prefix}{\LP@FW@init@package}{title}{}%
+\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}%
+ \LP@set@LP@color{\LP@env@prefix}%
+ \LP@set@LP@bgcolor{\LP@env@prefix}%
+ \LP@set@LP@scale{\LP@env@prefix}%
+ \ifthenelse{\equal{\LP@bgcolor}{}}%
+ {\gdef\LP@c@bg@fw{white}}%
+ {\gdef\LP@c@bg@fw{\LP@bgcolor}}%
+ \foreach \LP@fw@dir/\LP@fw@length in {#4}%
+ {%
+ \begin{pgfonlayer}{LPbackgroundtwo}%
+ \def\LP@rel@tikzpath{.5}%
+ \draw[\LP@fw@linestyle,color=\LP@color,line width=.1cm*\LP@scale,shorten >=-3mm*\LP@scale]%
+ \xtikzpath{#1}{#2}{\LP@fw@dir/\LP@fw@length};%
+ \end{pgfonlayer}%
+ };%
+ \begin{puzzlebackground}%
+ \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}%
+ \LP@set@package{fourwinds}%
+ \LP@set@env@prefix{LP@FW}%
+ \setcounter{LP@rows}{\LP@FW@rows}%
+ \setcounter{LP@columns}{\LP@FW@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@FW@width}%
+ \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]%
+ \LP@drawbackground{1}{1}{\LP@FW@columns}{\LP@FW@rows}{\LP@FW@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@FW@columns}{\LP@FW@rows}{1cm}%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@FW@counterstyle}%
+ \stepcounter{LP@puzzlecounter}%
+ \end{minipage}%
+}%
+%
% hakyuu environment and options
%
\newcommand*\LP@HY@init@prefix{LP@HY}%
@@ -812,6 +881,181 @@
\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}%
+\LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{bgcolor}{}%
+\LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{width}{5.1cm}%
+\LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@ML@init@prefix}{\LP@ML@init@package}{title}{}%
+\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}%
+}%
+%
+\newenvironment{magiclabyrinth}[1][]%
+{%
+ \setkeys{magiclabyrinth}{#1}%
+ \LP@set@package{magiclabyrinth}%
+ \LP@set@env@prefix{LP@ML}%
+ \setcounter{LP@rows}{\LP@ML@rows}%
+ \setcounter{LP@columns}{\LP@ML@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@ML@width}%
+ \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]%
+ \LP@drawbackground{1}{1}{\LP@ML@columns}{\LP@ML@rows}{\LP@ML@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@ML@columns}{\LP@ML@rows}{1cm}%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@ML@counterstyle}%
+ \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}%
+\LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{bgcolor}{}%
+\LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{width}{8.1cm}%
+\LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@MN@init@prefix}{\LP@MN@init@package}{title}{}%
+\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}%
+ \setcounter{LP@counti}{1}%
+ \foreach \LP@element in{#1}%
+ {%
+ \node at (-0.5,\arabic{LP@counti}\LP@Pfive){\LP@fontsize\LP@element};%
+ \stepcounter{LP@counti}%
+ };%
+}%
+%
+\newcommand*\plusH[1]%
+{%
+ \LP@set@LP@fontsize{\LP@env@prefix}%
+ \LP@set@LP@rows{\LP@env@prefix}%
+ \setcounter{LP@counti}{1}%
+ \setcounter{LP@countii}{\LP@rows}%
+ \addtocounter{LP@countii}{2}%
+ \foreach \LP@element in{#1}%
+ {%
+ \node at (\arabic{LP@counti}\LP@Pfive,\arabic{LP@countii}\LP@Pfive){\LP@fontsize\LP@element};%
+ \stepcounter{LP@counti}%
+ };%
+}%
+%
+\newcommand*\magnetssetup[1]%
+{%
+ \setkeys{magnets.sty}{#1}%
+}%
+%
+\newenvironment{magnets}[1][]%
+{%
+ \setkeys{magnets}{#1}%
+ \LP@set@package{magnets}%
+ \LP@set@env@prefix{LP@MN}%
+ \setcounter{LP@rows}{\LP@MN@rows}%
+ \setcounter{LP@columns}{\LP@MN@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@MN@width}%
+ \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]%
+ \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%
+ \framepuzzle%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@MN@counterstyle}%
+ \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}%
+\LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{color}{green}%
+\LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{bgcolor}{}%
+\LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{width}{5.1cm}%
+\LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@MY@init@prefix}{\LP@MY@init@package}{title}{}%
+\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}%
+}%
+%
+\newenvironment{masyu}[1][]%
+{%
+ \setkeys{masyu}{#1}%
+ \LP@set@package{masyu}%
+ \LP@set@env@prefix{LP@MY}%
+ \setcounter{LP@rows}{\LP@MY@rows}%
+ \setcounter{LP@columns}{\LP@MY@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@MY@width}%
+ \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]%
+ \LP@drawbackground{1}{1}{\LP@MY@columns}{\LP@MY@rows}{\LP@MY@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@MY@columns}{\LP@MY@rows}{1cm}%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@MY@counterstyle}%
+ \stepcounter{LP@puzzlecounter}%
+ \end{minipage}%
+}%
+%
% minesweeper environment and options
%
\newcommand*\LP@MS@init@prefix{LP@MS}%
@@ -860,6 +1104,108 @@
\end{minipage}%
}%
%
+% numberlink environment and options
+%
+\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}%
+\LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{bgcolor}{}%
+\LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{color}{red}%
+\LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{width}{5.1cm}%
+\LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@NL@init@prefix}{\LP@NL@init@package}{title}{}%
+\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}%
+}%
+%
+\newenvironment{numberlink}[1][]%
+{%
+ \setkeys{numberlink}{#1}%
+ \LP@set@package{numberlink}%
+ \LP@set@env@prefix{LP@NL}%
+ \setcounter{LP@rows}{\LP@NL@rows}%
+ \setcounter{LP@columns}{\LP@NL@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@NL@width}%
+ \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]%
+ \LP@drawbackground{1}{1}{\LP@NL@columns}{\LP@NL@rows}{\LP@NL@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@NL@columns}{\LP@NL@rows}{1cm}%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@NL@counterstyle}%
+ \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}%
+\LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{bgcolor}{}%
+\LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{color}{blue}%
+\LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{width}{5.1cm}%
+\LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@RSK@init@prefix}{\LP@RSK@init@package}{title}{}%
+\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}%
+}%
+%
+\newenvironment{resuko}[1][]%
+{%
+ \setkeys{resuko}{#1}%
+ \LP@set@package{resuko}%
+ \LP@set@env@prefix{LP@RSK}%
+ \setcounter{LP@rows}{\LP@RSK@rows}%
+ \setcounter{LP@columns}{\LP@RSK@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@RSK@width}%
+ \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]%
+ \LP@drawbackground{1}{1}{\LP@RSK@columns}{\LP@RSK@rows}{\LP@RSK@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@RSK@columns}{\LP@RSK@rows}{1cm}%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@RSK@counterstyle}%
+ \stepcounter{LP@puzzlecounter}%
+ \end{minipage}%
+}%
+%
% schatzsuche environment and options
%
\newcommand*\LP@SS@init@prefix{LP@SS}%