summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/logicpuzzle
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-18 22:14:40 +0000
committerKarl Berry <karl@freefriends.org>2013-05-18 22:14:40 +0000
commit6461e1333300fc749eb8fdd85714f3649021b413 (patch)
treee13b806b100d9a07e03f7c15fb5fce205eb8c3f6 /Master/texmf-dist/tex/latex/logicpuzzle
parent68fd46249f6c3eff8a7cb4fee28daf640265585b (diff)
logicpuzzle (18may13)
git-svn-id: svn://tug.org/texlive/trunk@30558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/logicpuzzle')
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty191
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty208
2 files changed, 387 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty
index d16df95b6c8..e2800f154dd 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/10 logicpuzzle.sty v2.1 - Josef Kleber (C) 2013]%
+\ProvidesPackage{logicpuzzle}[2013/05/17 logicpuzzle.sty v2.2 - Josef Kleber (C) 2013]%
%
\RequirePackage{xkeyval}%
\RequirePackage{ifthen}%
@@ -27,7 +27,7 @@
\RequirePackage{etoolbox}%
\RequirePackage{marginnote}%
\RequirePackage{tikz}%
-\usetikzlibrary{decorations.pathmorphing,calc}%
+\usetikzlibrary{decorations.pathmorphing,calc,shapes.geometric}%
\pgfdeclarelayer{LPdump}%
\pgfdeclarelayer{LPbgcolor}%
\pgfdeclarelayer{LPbackgroundtwo}%
@@ -65,6 +65,7 @@
\def\LP@normallines{0.5pt}%
\def\LP@thicklines{1.5pt}%
\def\LP@grid@linestyle{}%
+\def\LP@draw@opacity{1}%
\def\LP@rel@tikzpath{}%
%
\newcommand*\LP@Pfive{.5}%
@@ -168,6 +169,7 @@
\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@bridge}{1,0,0}%
%
% drawing grids
%
@@ -182,7 +184,7 @@
\setcounter{LP@countii}{#4}% max row
\stepcounter{LP@counti}%
\stepcounter{LP@countii}%
- \draw[step=#5,line width=\LP@normallines,\LP@grid@linestyle] (#1,#2) grid (\value{LP@counti},\value{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%
@@ -201,14 +203,14 @@
}%
\newcommand*\LP@drawsudokugrid%
{%
- \draw[line width=\LP@thicklines] (1,1) -- (1,10);%
- \draw[line width=\LP@thicklines] (4,1) -- (4,10);%
- \draw[line width=\LP@thicklines] (7,1) -- (7,10);%
- \draw[line width=\LP@thicklines] (10,1) -- (10,10);%
- \draw[line width=\LP@thicklines] (1,1) -- (10,1);%
- \draw[line width=\LP@thicklines] (1,4) -- (10,4);%
- \draw[line width=\LP@thicklines] (1,7) -- (10,7);%
- \draw[line width=\LP@thicklines] (1,10) -- (10,10);%
+ \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
@@ -509,6 +511,42 @@
};%
}%
%
+\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*\fillcell[2]%
{%
\LP@set@LP@scale{\LP@env@prefix}%
@@ -914,6 +952,137 @@
%
\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%
+%
+\define@key{LP@Line}{double}[double]%
+{%
+ \def\LP@Line@double{double}%
+}%
+%
+\define@key{LP@Line}{color}[LP@c@bridge]%
+{%
+ \def\LP@Line@linecolor{#1}%
+}%
+%
+\newcommand*\LP@Line[2][]%
+{%
+ \def\LP@Line@double{}%
+ \def\LP@Line@linecolor{LP@c@bridge}%
+ \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;}%
+ \end{pgfonlayer}%
+}%
+%
+\newcommand*\bridge[2][]%
+{%
+ \LP@Line[#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 24bc8cfa2bd..d485026b6a5 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/10 lpenv.sty v2.1 - Josef Kleber (C) 2013]%
+\ProvidesPackage{lpenv}[2013/05/17 lpenv.sty v2.2 - Josef Kleber (C) 2013]%
%
% battleship environment and options
%
@@ -283,6 +283,67 @@
\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}%
+\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{grid}{dashed}%
+\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{bgcolor}{}%
+\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{color}{green}%
+\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{width}{6.1cm}%
+\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{title}{}%
+\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}%
+}%
+%
+\newenvironment{bridges}[1][]%
+{%
+ \setkeys{bridges}{#1}%
+ \LP@set@package{bridges}%
+ \LP@set@env@prefix{LP@BG}%
+ \setcounter{LP@rows}{\LP@BG@rows}%
+ \setcounter{LP@columns}{\LP@BG@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@BG@width}%
+ \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]%
+ \LP@drawbackground{1}{1}{\LP@BG@columns}{\LP@BG@rows}{\LP@BG@bgcolor}%
+ \ifthenelse{\equal{\LP@BG@grid}{none}}%
+ {}%
+ {%
+ \ifthenelse{\equal{\LP@BG@grid}{dashed}}%
+ {%
+ \setgridlinestyle{dashed}%
+ \LP@drawgrid{1}{1}{\LP@BG@columns}{\LP@BG@rows}{1cm}%
+ }%
+ {%
+ \LP@drawgrid{1}{1}{\LP@BG@columns}{\LP@BG@rows}{1cm}%
+ }%
+ }%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@BG@counterstyle}%
+ \stepcounter{LP@puzzlecounter}%
+ \end{minipage}%
+}%
+%
% chaossudoku environment and options
%
\newcommand*\LP@CS@init@prefix{LP@CS}%
@@ -977,6 +1038,151 @@
\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}%
+\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{bgcolor}{}%
+\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{width}{5.1cm}%
+\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{title}{}%
+\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}%
+ \LP@set@package{starbattle}%
+ \LP@set@env@prefix{LP@SB}%
+ \setcounter{LP@rows}{\LP@SB@rows}%
+ \setcounter{LP@columns}{\LP@SB@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@SB@width}%
+ \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]%
+ \LP@drawbackground{1}{1}{\LP@SB@columns}{\LP@SB@rows}{\LP@SB@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@SB@columns}{\LP@SB@rows}{1cm}%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@SB@counterstyle}%
+ \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}%
+\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{bgcolor}{}%
+\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{width}{5.9cm}%
+\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{title}{}%
+\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}%
+}%
+%
+\newenvironment{starsandarrows}[1][]%
+{%
+ \setkeys{starsandarrows}{#1}%
+ \LP@set@package{starsandarrows}%
+ \LP@set@env@prefix{LP@SAA}%
+ \setcounter{LP@rows}{\LP@SAA@rows}%
+ \setcounter{LP@columns}{\LP@SAA@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@SAA@width}%
+ \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]%
+ \LP@drawbackground{1}{1}{\LP@SAA@columns}{\LP@SAA@rows}{\LP@SAA@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@SAA@columns}{\LP@SAA@rows}{1cm}%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@SAA@counterstyle}%
+ \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}%
+\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{bgcolor}{}%
+\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{width}{5.1cm}%
+\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{cvoffset}{-23pt}%
+\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{title}{}%
+\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}%
+}%
+%
+\newenvironment{sunandmoon}[1][]%
+{%
+ \setkeys{sunandmoon}{#1}%
+ \LP@set@package{sunandmoon}%
+ \LP@set@env@prefix{LP@SAM}%
+ \setcounter{LP@rows}{\LP@SAM@rows}%
+ \setcounter{LP@columns}{\LP@SAM@columns}%
+ \stepcounter{LP@rows}%
+ \stepcounter{LP@columns}%
+ \begin{minipage}[t]{\LP@SAM@width}%
+ \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]%
+ \LP@drawbackground{1}{1}{\LP@SAM@columns}{\LP@SAM@rows}{\LP@SAM@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@SAM@columns}{\LP@SAM@rows}{1cm}%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@SAM@counterstyle}%
+ \stepcounter{LP@puzzlecounter}%
+ \end{minipage}%
+}%
+%
% tentsandtrees environment and options
%
\newcommand*\LP@TAT@init@prefix{LP@TAT}%