diff options
author | Karl Berry <karl@freefriends.org> | 2013-05-10 21:48:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-05-10 21:48:09 +0000 |
commit | 5bdf51514141e1698e3ad64a72778cec9d47f3a2 (patch) | |
tree | 35b60de43f7a933751c20fdd71fa05635e5beacf /Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty | |
parent | d9bba30bc8d09836a233febcb3df673d14904d3c (diff) |
logicpuzzle (10may13)
git-svn-id: svn://tug.org/texlive/trunk@30379 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty | 316 |
1 files changed, 229 insertions, 87 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty b/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty index dc5ff8c261f..24bc8cfa2bd 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/03 lpenv.sty v2.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{lpenv}[2013/05/10 lpenv.sty v2.1 - Josef Kleber (C) 2013]% % % battleship environment and options % @@ -43,8 +43,6 @@ \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}}% % -\LP@init@counter{\LP@BS@init@prefix}% -% \gdef\LP@BS@shipbox{}% \tikzstyle{island} = [fill=yellow!30,draw, decorate, decoration={random steps,segment length=2.7pt,amplitude=1.7pt}]% % @@ -85,7 +83,7 @@ % \newcommand*\shipH[1]% {% - \LP@setrowcontents{#1}{1}{\value{LP@BS@rows}}% + \LP@setrowcontents{#1}{1}{\value{LP@rows}}% }% % \newcommand*\shipV[1]% @@ -213,10 +211,10 @@ \LP@set@package{battleship}% \LP@set@env@prefix{LP@BS}% \shipbox{}% clear shipbox - \setcounter{LP@BS@rows}{\LP@BS@rows}% - \setcounter{LP@BS@columns}{\LP@BS@columns}% - \stepcounter{LP@BS@rows}% - \stepcounter{LP@BS@columns}% + \setcounter{LP@rows}{\LP@BS@rows}% + \setcounter{LP@columns}{\LP@BS@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@BS@width}% \ifthenelse{\equal{\LP@BS@title}{}}% {\par\enspace\par}% empty @@ -251,8 +249,6 @@ \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}% % -\LP@init@counter{\LP@BK@init@prefix}% -% \let\valueH\LP@bottomrow% \let\valueV\LP@leftcolumn% \let\sumH\LP@toprow% @@ -268,10 +264,10 @@ \setkeys{bokkusu}{#1}% \LP@set@package{bokkusu}% \LP@set@env@prefix{LP@BK}% - \setcounter{LP@BK@rows}{\LP@BK@rows}% - \setcounter{LP@BK@columns}{\LP@BK@columns}% - \stepcounter{LP@BK@rows}% - \stepcounter{LP@BK@columns}% + \setcounter{LP@rows}{\LP@BK@rows}% + \setcounter{LP@columns}{\LP@BK@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@BK@width}% \ifthenelse{\equal{\LP@BK@title}{}}% {\par\enspace\par}% empty @@ -304,8 +300,6 @@ \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}% % -\LP@init@counter{\LP@CS@init@prefix}% -% \let\chaossudokucell\setcell% % \newcommand*\chaossudokusetup[1]% @@ -318,10 +312,10 @@ \setkeys{chaossudoku}{#1}% \LP@set@package{chaossudoku}% \LP@set@env@prefix{LP@CS}% - \setcounter{LP@CS@rows}{\LP@CS@rows}% - \setcounter{LP@CS@columns}{\LP@CS@columns}% - \stepcounter{LP@CS@rows}% - \stepcounter{LP@CS@columns}% + \setcounter{LP@rows}{\LP@CS@rows}% + \setcounter{LP@columns}{\LP@CS@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@CS@width}% \ifthenelse{\equal{\LP@CS@title}{}}% {\par\enspace\par}% empty @@ -354,8 +348,6 @@ \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}% % -\LP@init@counter{\LP@DDS@init@prefix}% -% \let\ddsudokucell\setcell% % \newcommand*\ddsudokusetup[1]% @@ -368,10 +360,10 @@ \setkeys{ddsudoku}{#1}% \LP@set@package{ddsudoku}% \LP@set@env@prefix{LP@DDS}% - \setcounter{LP@DDS@rows}{\LP@DDS@rows}% - \setcounter{LP@DDS@columns}{\LP@DDS@columns}% - \stepcounter{LP@DDS@rows}% - \stepcounter{LP@DDS@columns}% + \setcounter{LP@rows}{\LP@DDS@rows}% + \setcounter{LP@columns}{\LP@DDS@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@DDS@width}% \ifthenelse{\equal{\LP@DDS@title}{}}% {\par\enspace\par}% empty @@ -404,8 +396,6 @@ \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}% % -\LP@init@counter{\LP@HY@init@prefix}% -% \let\hakyuucell\setcell% % \newcommand*\hakyuusetup[1]% @@ -418,10 +408,10 @@ \setkeys{hakyuu}{#1}% \LP@set@package{hakyuu}% \LP@set@env@prefix{LP@HY}% - \setcounter{LP@HY@rows}{\LP@HY@rows}% - \setcounter{LP@HY@columns}{\LP@HY@columns}% - \stepcounter{LP@HY@rows}% - \stepcounter{LP@HY@columns}% + \setcounter{LP@rows}{\LP@HY@rows}% + \setcounter{LP@columns}{\LP@HY@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@HY@width}% \ifthenelse{\equal{\LP@HY@title}{}}% {\par\enspace\par}% empty @@ -454,8 +444,6 @@ \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}% % -\LP@init@counter{\LP@HT@init@prefix}% -% \let\hitoricell\setcell% % \newcommand*\hitorisetup[1]% @@ -468,10 +456,10 @@ \setkeys{hitori}{#1}% \LP@set@package{hitori}% \LP@set@env@prefix{LP@HT}% - \setcounter{LP@HT@rows}{\LP@HT@rows}% - \setcounter{LP@HT@columns}{\LP@HT@columns}% - \stepcounter{LP@HT@rows}% - \stepcounter{LP@HT@columns}% + \setcounter{LP@rows}{\LP@HT@rows}% + \setcounter{LP@columns}{\LP@HT@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@HT@width}% \ifthenelse{\equal{\LP@HT@title}{}}% {\par\enspace\par}% empty @@ -487,6 +475,79 @@ \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}% +\LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{counterstyle}{none}% +\LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{bgcolor}{}% +\LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{color}{green}% +\LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{width}{5.1cm}% +\LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@KKR@init@prefix}{\LP@KKR@init@package}{title}{}% +\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% + \renewcommand*\LP@KKR@solution{true}% + \LP@KKR@solutiontrue% + \or% + \renewcommand*\LP@KKR@solution{false}% + \LP@KKR@solutionfalse% + \fi% +}% +% +\define@choicekey*{kakuro}{solution}[\LP@KKR@solution\nr]{true,false}[true]% +{% + \ifcase\nr\relax% + \renewcommand*\LP@KKR@solution{true}% + \LP@KKR@solutiontrue% + \or% + \renewcommand*\LP@KKR@solution{false}% + \LP@KKR@solutionfalse% + \fi% +}% +% +\let\kakurocell\setcell% +% +\newcommand*\kakurosetup[1]% +{% + \setkeys{kakuro.sty}{#1}% +}% +% +\newenvironment{kakuro}[1][]% +{% + \setkeys{kakuro}{#1}% + \LP@set@package{kakuro}% + \LP@set@env@prefix{LP@KKR}% + \setcounter{LP@rows}{\LP@KKR@rows}% + \setcounter{LP@columns}{\LP@KKR@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% + \begin{minipage}[t]{\LP@KKR@width}% + \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]% + \LP@drawbackground{1}{1}{\LP@KKR@columns}{\LP@KKR@rows}{\LP@KKR@bgcolor}% + \LP@drawgrid{1}{1}{\LP@KKR@columns}{\LP@KKR@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@KKR@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% % kendoku environment and options % \newcommand*\LP@KD@init@prefix{LP@KD}% @@ -504,8 +565,6 @@ \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}% % -\LP@init@counter{\LP@KD@init@prefix}% -% \let\kendokucell\setcell% % \newcommand*\kendokusetup[1]% @@ -518,10 +577,10 @@ \setkeys{kendoku}{#1}% \LP@set@package{kendoku}% \LP@set@env@prefix{LP@KD}% - \setcounter{LP@KD@rows}{\LP@KD@rows}% - \setcounter{LP@KD@columns}{\LP@KD@columns}% - \stepcounter{LP@KD@rows}% - \stepcounter{LP@KD@columns}% + \setcounter{LP@rows}{\LP@KD@rows}% + \setcounter{LP@columns}{\LP@KD@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@KD@width}% \ifthenelse{\equal{\LP@KD@title}{}}% {\par\enspace\par}% empty @@ -554,8 +613,6 @@ \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}% % -\LP@init@counter{\LP@KSDK@init@prefix}% -% \let\killersudokucell\setcell% % \newcommand*\killersudokusetup[1]% @@ -568,10 +625,10 @@ \setkeys{killersudoku}{#1}% \LP@set@package{killersudoku}% \LP@set@env@prefix{LP@KSDK}% - \setcounter{LP@KSDK@rows}{\LP@KSDK@rows}% - \setcounter{LP@KSDK@columns}{\LP@KSDK@columns}% - \stepcounter{LP@KSDK@rows}% - \stepcounter{LP@KSDK@columns}% + \setcounter{LP@rows}{\LP@KSDK@rows}% + \setcounter{LP@columns}{\LP@KSDK@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@KSDK@width}% \ifthenelse{\equal{\LP@KSDK@title}{}}% {\par\enspace\par}% empty @@ -604,8 +661,6 @@ \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}% % -\LP@init@counter{\LP@LB@init@prefix}% -% \let\laserH\LP@toprow% \let\laserV\LP@leftcolumn% \let\mirrorH\LP@bottomrow@edge% @@ -614,7 +669,7 @@ \newcommand*\laser[2][red]% {% % avoid little laser peaks outside grid - \clip (1,1) rectangle (\arabic{LP@LB@columns},\arabic{LP@LB@rows}); + \clip (1,1) rectangle (\arabic{LP@columns},\arabic{LP@rows});% \framearea{#1}{#2}% }% % @@ -628,10 +683,10 @@ \setkeys{laserbeam}{#1}% \LP@set@package{laserbeam}% \LP@set@env@prefix{LP@LB}% - \setcounter{LP@LB@rows}{\LP@LB@rows}% - \setcounter{LP@LB@columns}{\LP@LB@columns}% - \stepcounter{LP@LB@rows}% - \stepcounter{LP@LB@columns}% + \setcounter{LP@rows}{\LP@LB@rows}% + \setcounter{LP@columns}{\LP@LB@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@LB@width}% \ifthenelse{\equal{\LP@LB@title}{}}% {\par\enspace\par}% empty @@ -664,8 +719,6 @@ \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}% % -\LP@init@counter{\LP@SDK@init@prefix}% -% \let\lpsudokucell\setcell% % \newcommand*\lpsudokusetup[1]% @@ -678,10 +731,10 @@ \setkeys{lpsudoku}{#1}% \LP@set@package{lpsudoku}% \LP@set@env@prefix{LP@SDK}% - \setcounter{LP@SDK@rows}{\LP@SDK@rows}% - \setcounter{LP@SDK@columns}{\LP@SDK@columns}% - \stepcounter{LP@SDK@rows}% - \stepcounter{LP@SDK@columns}% + \setcounter{LP@rows}{\LP@SDK@rows}% + \setcounter{LP@columns}{\LP@SDK@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@SDK@width}% \ifthenelse{\equal{\LP@SDK@title}{}}% {\par\enspace\par}% empty @@ -715,8 +768,6 @@ \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}% % -\LP@init@counter{\LP@MS@init@prefix}% -% \let\minesweepercell\setcell% % \newcommand*\minesweepersetup[1]% @@ -729,10 +780,10 @@ \setkeys{minesweeper}{#1}% \LP@set@package{minesweeper}% \LP@set@env@prefix{LP@MS}% - \setcounter{LP@MS@rows}{\LP@MS@rows}% - \setcounter{LP@MS@columns}{\LP@MS@columns}% - \stepcounter{LP@MS@rows}% - \stepcounter{LP@MS@columns}% + \setcounter{LP@rows}{\LP@MS@rows}% + \setcounter{LP@columns}{\LP@MS@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@MS@width}% \ifthenelse{\equal{\LP@MS@title}{}}% {\par\enspace\par}% empty @@ -748,6 +799,54 @@ \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}% +\LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{counterstyle}{none}% +\LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{bgcolor}{}% +\LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{width}{5.1cm}% +\LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@SS@init@prefix}{\LP@SS@init@package}{title}{}% +\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}% +}% +% +\newenvironment{schatzsuche}[1][]% +{% + \setkeys{schatzsuche}{#1}% + \LP@set@package{schatzsuche}% + \LP@set@env@prefix{LP@SS}% + \setcounter{LP@rows}{\LP@SS@rows}% + \setcounter{LP@columns}{\LP@SS@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% + \begin{minipage}[t]{\LP@SS@width}% + \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]% + \LP@drawbackground{1}{1}{\LP@SS@columns}{\LP@SS@rows}{\LP@SS@bgcolor}% + \LP@drawgrid{1}{1}{\LP@SS@columns}{\LP@SS@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@SS@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% % skyline environment and options % \newcommand*\LP@SL@init@prefix{LP@SL}% @@ -789,8 +888,6 @@ \fi% }% % -\LP@init@counter{\LP@SL@init@prefix}% -% \let\skylineB\LP@bottomrow% \let\skylineT\LP@toprow% \let\skylineL\LP@leftcolumn% @@ -807,10 +904,10 @@ \setkeys{skyline}{#1}% \LP@set@package{skyline}% \LP@set@env@prefix{LP@SL}% - \setcounter{LP@SL@rows}{\LP@SL@rows}% - \setcounter{LP@SL@columns}{\LP@SL@columns}% - \stepcounter{LP@SL@rows}% - \stepcounter{LP@SL@columns}% + \setcounter{LP@rows}{\LP@SL@rows}% + \setcounter{LP@columns}{\LP@SL@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@SL@width}% \ifthenelse{\equal{\LP@SL@title}{}}% {\par\enspace\par}% empty @@ -846,8 +943,6 @@ \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}% % -\LP@init@counter{\LP@SK@init@prefix}% -% \let\slitherlinkcell\setcell% % \newcommand*\slitherlinksetup[1]% @@ -862,10 +957,10 @@ \LP@set@env@prefix{LP@SK}% \ifthenelse{\equal{\LP@grid@linestyle}{}}% {\setgridlinestyle{dashed}}{}% - \setcounter{LP@SK@rows}{\LP@SK@rows}% - \setcounter{LP@SK@columns}{\LP@SK@columns}% - \stepcounter{LP@SK@rows}% - \stepcounter{LP@SK@columns}% + \setcounter{LP@rows}{\LP@SK@rows}% + \setcounter{LP@columns}{\LP@SK@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@SK@width}% \ifthenelse{\equal{\LP@SK@title}{}}% {\par\enspace\par}% empty @@ -882,6 +977,55 @@ \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}% +\LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{counterstyle}{none}% +\LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{bgcolor}{}% +\LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{width}{5.9cm}% +\LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@TAT@init@prefix}{\LP@TAT@init@package}{title}{}% +\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}% +}% +% +\newenvironment{tentsandtrees}[1][]% +{% + \setkeys{tentsandtrees}{#1}% + \LP@set@package{tentsandtrees}% + \LP@set@env@prefix{LP@TAT}% + \setcounter{LP@rows}{\LP@TAT@rows}% + \setcounter{LP@columns}{\LP@TAT@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% + \begin{minipage}[t]{\LP@TAT@width}% + \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]% + \LP@drawbackground{1}{1}{\LP@TAT@columns}{\LP@TAT@rows}{\LP@TAT@bgcolor}% + \LP@drawgrid{1}{1}{\LP@TAT@columns}{\LP@TAT@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@TAT@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% % tunnel environment and options % \newcommand*\LP@TN@init@prefix{LP@TN}% @@ -899,8 +1043,6 @@ \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}% % -\LP@init@counter{\LP@TN@init@prefix}% -% \let\tunnelH\LP@toprow% \let\tunnelV\LP@leftcolumn% % @@ -914,10 +1056,10 @@ \setkeys{tunnel}{#1}% \LP@set@package{tunnel}% \LP@set@env@prefix{LP@TN}% - \setcounter{LP@TN@rows}{\LP@TN@rows}% - \setcounter{LP@TN@columns}{\LP@TN@columns}% - \stepcounter{LP@TN@rows}% - \stepcounter{LP@TN@columns}% + \setcounter{LP@rows}{\LP@TN@rows}% + \setcounter{LP@columns}{\LP@TN@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@TN@width}% \ifthenelse{\equal{\LP@TN@title}{}}% {\par\enspace\par}% empty |