diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/CHANGES | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/README | 17 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf | bin | 0 -> 388698 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex (renamed from Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.tex) | 273 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.pdf | bin | 357337 -> 0 bytes | |||
-rwxr-xr-x | Master/texmf-dist/scripts/logicpuzzle/lpsmag | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty | 152 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty | 316 |
8 files changed, 634 insertions, 140 deletions
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES index e7f8c73ac65..f7d7db3a565 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES +++ b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES @@ -1,3 +1,15 @@ +== Logicpuzzle bundel (v2.1) == + +07/05/2013 reduced package counters -> LP@rows, LP@columns [jk] + +06/05/2013 updated lpsmag for v2.0+ [jk] + +06/05/2013 added schatzsuche environment and \kakurocolumn, \Diamond [jk] + +05/05/2013 added kakuro environment and \kakurorow, \KKR, \Black [jk] + +04/05/2013 added tentsandtrees environment and \Tree, \Tent [jk] + == Logicpuzzle bundel (v2.0) == 30/04/2013 moved package contents to logicpuzzle.sty [jk] diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/README b/Master/texmf-dist/doc/latex/logicpuzzle/README index 93678e66b2f..3873439b30b 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/README +++ b/Master/texmf-dist/doc/latex/logicpuzzle/README @@ -7,29 +7,32 @@ puzzles. At the moment the following puzzles are supported: * Chaos Sudoku * Hakyuu (aka Seismic, Ripple Effect, ...) * Hitori +* Kakuro * Kendoku (aka Mathdoku, Calcudoku, Basic, MiniPlu, Ken Ken, Square Wisdom, Sukendo, Caldoku, ...) * Killer Sudoku (aka Samunapure, Sum Number Place, Sumdoku, Gebietssummen, ...) * Laser Beam (aka Laserstrahl, ...) -* Minesweeper (aka Minensuche, ...) +* Minesweeper (aka Minensuche, ...) +* Schatzsuche * Skyline (aka Skycrapers, Wolkenkratzer, Hochhäuser, ...) incl. Skyline Sudoku and Skyline Sudoku (N*N) variants * Slitherlink (aka Fences, Number Line, Dotty Dilemma, Sli-Lin, Takegaki, Great Wall of China, Loop the Loop, Rundweg, Gartenzaun, ...) * Sudoku +* Tents and Trees (aka Zeltlager, Zeltplatz, Camping, ...) * Tunnel License: LPPL -Changes in v2.0: +Changes in v2.1: -- added support for Minesweeper puzzle +- added support for Kakuro puzzle https://bitbucket.org/kleberj/logicpuzzle/wiki/Minesweeper -- added support for Tunnel puzzle - https://bitbucket.org/kleberj/logicpuzzle/wiki/Tunnel +- added support for Schatzsuche puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/Schatzsuche -- moved package contents to logicpuzzle.sty and lpenv.sty - merged docs into logicpuzzle.pdf
\ No newline at end of file +- added support for Tents and Trees puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/TentsAndTrees diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf Binary files differnew file mode 100644 index 00000000000..8e8818ff848 --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.tex b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex index 47aa95d394e..2adf999008b 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.tex +++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex @@ -20,6 +20,8 @@ \usepackage{marginnote}% \usepackage[svgnames,rgb]{xcolor}% \usepackage[automark,nouppercase]{scrpage2} +\usepackage[tocgraduated]{tocstyle} +\usetocstyle{KOMAlike} \usepackage{logicpuzzle} \usepackage{hyperref} % @@ -39,7 +41,7 @@ \AtBeginDocument{\IfFileExists{qrcode.png}{}{\write18{wget -O qrcode.png http://i.imgur.com/KAunnuS.png}}}% \hypersetup{colorlinks=true,urlcolor=NavyBlue,linkcolor=NavyBlue,citecolor=CornflowerBlue,naturalnames=true,hypertexnames=false}% \lstset{language=[LaTeX]TeX,numbers=left,numberstyle=\tiny, basicstyle=\ttfamily, aboveskip=\baselineskip, frame=single, backgroundcolor=\color{LightGoldenrodYellow}, keywordstyle=\color{Blue}, -emph={ddsudoku, battleship, bokkusu, chaossudoku, hakyuu, hitori, kendoku, killersudoku, laserbeam, skyline, slitherlink, lpsudoku, minesweeper, tunnel, +emph={ddsudoku, battleship, bokkusu, chaossudoku, hakyuu, hitori, kakuro, kendoku, killersudoku, laserbeam, skyline, slitherlink, lpsudoku, minesweeper, schatzsuche, tentsandtrees, tunnel, minipage, tikzpicture, puzzlebackground, puzzleforeground, center, pgfonlayer, left, shape, fill, inner, sep, draw, rounded, corners, thick}, emphstyle=\color{Tomato}, emph={[2]Wheat, HotPink, GreenYellow, LightBlue, LightSalmon, @@ -55,7 +57,8 @@ ddsudokucell, chaossudokucell, hakyuucell, setrow, LP@cvoffset, titleformat, def marginnote, tikz, node, placesegment, placeship, shipH, shipV, shipbox, puzzlecounter, color, fillrow, setcolorrow, laserV, laserH, mirrorV, mirrorH, placearrow, placecross, placemirror, laser, skylineT, skylineB, skylineR, skylineL, skylinecell, setbigcell, slitherlinkcell, -tunnelH, tunnelV, tube, portal, Mine, ShipR, [, ]}} +tunnelH, tunnelV, tube, portal, Mine, Diamond, ShipR, kakurosetup, kakurorow, KKR, Black, +Tent, Tree, definecolor, tentH, tentV, [, ]}} \makeatletter \renewcommand{\maketitle}% {% @@ -172,11 +175,6 @@ tunnelH, tunnelV, tube, portal, Mine, ShipR, [, ]}} \index{#1=\string\meta{#1} optional argument}\index{optional argument>#1=\string\meta{#1}}% }% % -%\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -\renewcommand*\l@subsection{\@dottedtocline{2}{1.6em}{3.1em}} -\renewcommand*\l@subsubsection{\@dottedtocline{3}{4.7em}{3.8em}} -\renewcommand*\l@paragraph{\@dottedtocline{3}{8.5em}{5em}} -\renewcommand*\l@subparagraph{\@dottedtocline{3}{13.5em}{6em}} \renewenvironment{theindex} {\if@twocolumn \@restonecolfalse @@ -356,6 +354,28 @@ tunnelH, tunnelV, tube, portal, Mine, ShipR, [, ]}} year = {2013}, } +@misc{bib:ex:schatzsuche, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-schatzsuche.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-schatzsuche.pdf)}, + title = {{Examples \& Solutions (schatzsuche)}}, + year = {2013}, + } + +@misc{bib:ex:kakuro, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-kakuro.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-kakuro.pdf)}, + title = {{Examples \& Solutions (kakuro)}}, + year = {2013}, + } + +@misc{bib:ex:tentsandtrees, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-tentsandtrees.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-tentsandtrees.pdf)}, + title = {{Examples \& Solutions (tentsandtrees)}}, + year = {2013}, + } + + \end{filecontents} \bibliographystyle{plain} \ddsudokusetup{width=4.5cm,scale=0.85} @@ -364,18 +384,21 @@ tunnelH, tunnelV, tube, portal, Mine, ShipR, [, ]}} \chaossudokusetup{width=4.5cm,scale=0.89} \hakyuusetup{width=4.5cm,scale=0.89} \hitorisetup{width=4.5cm,scale=0.85} +\kakurosetup{width=4.5cm,scale=0.85} \kendokusetup{width=4.5cm,scale=0.89} \killersudokusetup{width=4.5cm,scale=0.89} \laserbeamsetup{width=4.5cm,scale=0.66,fontsize=normalsize} \minesweepersetup{width=4.5cm,scale=0.85} +\schatzsuchesetup{width=4.5cm,scale=0.85} \skylinesetup{width=4.5cm,scale=0.66,fontsize=normalsize} \slitherlinksetup{width=4.5cm,scale=0.85} \lpsudokusetup{width=4.5cm,scale=0.49,fontsize=small} +\tentsandtreessetup{width=4.5cm,scale=0.75} \tunnelsetup{width=4.5cm,scale=0.75} \title{\filename}% \Subtitle{A style file for typesetting logic puzzles}% \author{Josef Kleber} -\Fileversion{v2.0} +\Fileversion{v2.1} \Refline{\href{mailto:josef.kleber@gmx.de}{\texttt{josef.kleber@gmx.de}}\\\href{https://bitbucket.org/kleberj/logicpuzzle/}{\texttt{https://bitbucket.org/kleberj/logicpuzzle/}}} \newsavebox\logo \savebox\logo{% @@ -869,6 +892,71 @@ Black out some cells according to these specifications: In each row and each col \optitem{\envoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} \end{optionlist} +\subsection{Kakuro} +Enter numbers from 1 to 9 in any order into the blank cells. Here, the given horizontal and vertical sums should result. The zero does not occur. Within a summation, no number can be repeated. +\subsubsection{Example} +\definecolor{kakuro}{RGB}{155,206,167} +\kakurosetup{color=kakuro} +\begin{center} + \begin{kakuro} + \framepuzzle + \kakurorow{5}{\Black,\KKR{23}{},\KKR{16}{},\KKR{10}{},\Black} + \kakurorow{4}{\KKR{}{14},9,1,4,\KKR{3}{}} + \kakurorow{3}{\KKR{}{16},6,5,3,2} + \kakurorow{2}{\KKR{}{14},8,3,2,1} + \kakurorow{1}{\Black,\KKR{}{8},7,1,\Black} + \end{kakuro} + \hspace{1.5cm} + \begin{kakuro}[solution] + \framepuzzle + \kakurorow{5}{\Black,\KKR{23}{},\KKR{16}{},\KKR{10}{},\Black} + \kakurorow{4}{\KKR{}{14},9,1,4,\KKR{3}{}} + \kakurorow{3}{\KKR{}{16},6,5,3,2} + \kakurorow{2}{\KKR{}{14},8,3,2,1} + \kakurorow{1}{\Black,\KKR{}{8},7,1,\Black} + \end{kakuro} +\end{center} +\begin{lstlisting} +\definecolor{kakuro}{RGB}{155,206,167} +\kakurosetup{color=kakuro} +\begin{center} + \begin{kakuro} + \framepuzzle + \kakurorow{5}{\Black,\KKR{23}{},\KKR{16}{},\KKR{10}{},\Black} + \kakurorow{4}{\KKR{}{14},9,1,4,\KKR{3}{}} + \kakurorow{3}{\KKR{}{16},6,5,3,2} + \kakurorow{2}{\KKR{}{14},8,3,2,1} + \kakurorow{1}{\Black,\KKR{}{8},7,1,\Black} + \end{kakuro} + \hspace{1.5cm} + \begin{kakuro}[solution] + \framepuzzle + \kakurorow{5}{\Black,\KKR{23}{},\KKR{16}{},\KKR{10}{},\Black} + \kakurorow{4}{\KKR{}{14},9,1,4,\KKR{3}{}} + \kakurorow{3}{\KKR{}{16},6,5,3,2} + \kakurorow{2}{\KKR{}{14},8,3,2,1} + \kakurorow{1}{\Black,\KKR{}{8},7,1,\Black} + \end{kakuro} +\end{center} +\end{lstlisting} + +\subsubsection{Options} +\begin{optionlist} + \optitem{\envoption{rows}}{5}{defines the number of rows in the grid.} + \optitem{\envoption{columns}}{5}{specifies the number of columns in the grid} + \optitem{\envoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} + \optitem{\envoption{scale}}{1}{scales the size of the grid in the minipage.} + \optitem{\envoption{fontsize}}{Large}{specifies the size of the numbers next to the grid. Here, the usual \LaTeX\ sizes are used. Possible values: \texttt{tiny}, \texttt{scriptsize}, \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}, \texttt{large}, \underline{\texttt{Large}}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}} + \optitem{\envoption{title}}{}{sets the title of a puzzle.} + \optitem{\envoption{titleindent}}{0cm}{defines the indent of the title.} + \optitem{\envoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} + \optitem{\envoption{color}}{green}{specifies the color of the kakuro cells.} + \optitem{\envoption{bgcolor}}{}{sets the background color of the grid.} + \optitem{\envoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} + \optitem{\envoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} + \optitem{\envoption{solution}}{false}{You can use the solution also for the puzzle, as the numbers in the cells are only typeset with option \envoption{solution}\texttt{=true}.} +\end{optionlist} + \subsection{Kendoku} Fill the cells with the numbers from 1 to SIZE of the puzzle. In the top left corner of a framed area, you will find the result of the specified arithmetic function, which is applied on the entered numbers. The numbers may occur only once in each row and column. The numbers of an area may not necessarily be different when they are in different rows or columns. \subsubsection{Example} @@ -1262,6 +1350,65 @@ Draw a mine in some cells of the grid. The number in a cell indicates how many o \optitem{\envoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} \end{optionlist} +\subsection{Schatzsuche} +It's a variant of Minesweeper, just with diamonds instead of mines. Draw a diamond in some cells of the grid. The number in a cell indicates how many of the eight neighboring cells contain a diamond. A numbered cell does not contain a diamond. +\subsubsection{Example} +\begin{center} + \begin{schatzsuche} + \framepuzzle + \setrow{5}{{},1} + \setrow{4}{{},{},3,3} + \setrow{3}{3,{},4,2} + \setrow{2}{{},{},{},{},0} + \setrow{1}{{},2} + \end{schatzsuche} + \hspace{1.5cm} + \begin{schatzsuche} + \framepuzzle + \setrow{5}{{},1,{},\Diamond,\Diamond} + \setrow{4}{{},\Diamond,3,3,\Diamond} + \setrow{3}{3,\Diamond,4,2} + \setrow{2}{{},\Diamond,\Diamond,{},0} + \setrow{1}{{},2} + \end{schatzsuche} +\end{center} +\begin{lstlisting} +\begin{center} + \begin{schatzsuche} + \framepuzzle + \setrow{5}{{},1} + \setrow{4}{{},{},3,3} + \setrow{3}{3,{},4,2} + \setrow{2}{{},{},{},{},0} + \setrow{1}{{},2} + \end{schatzsuche} + \hspace{1.5cm} + \begin{schatzsuche} + \framepuzzle + \setrow{5}{{},1,{},\Diamond,\Diamond} + \setrow{4}{{},\Diamond,3,3,\Diamond} + \setrow{3}{3,\Diamond,4,2} + \setrow{2}{{},\Diamond,\Diamond,{},0} + \setrow{1}{{},2} + \end{schatzsuche} +\end{center} +\end{lstlisting} + +\subsubsection{Options} +\begin{optionlist} + \optitem{\envoption{rows}}{5}{defines the number of rows in the grid.} + \optitem{\envoption{columns}}{5}{specifies the number of columns in the grid} + \optitem{\envoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} + \optitem{\envoption{scale}}{1}{scales the size of the grid in the minipage.} + \optitem{\envoption{fontsize}}{Large}{specifies the size of the numbers next to the grid. Here, the usual \LaTeX\ sizes are used. Possible values: \texttt{tiny}, \texttt{scriptsize}, \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}, \texttt{large}, \underline{\texttt{Large}}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}} + \optitem{\envoption{title}}{}{sets the title of a puzzle.} + \optitem{\envoption{titleindent}}{0cm}{defines the indent of the title.} + \optitem{\envoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} + \optitem{\envoption{bgcolor}}{}{sets the background color of the grid.} + \optitem{\envoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} + \optitem{\envoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} +\end{optionlist} + \subsection{Skyline} There are skyscrapers located in each cell. Try to find out the height of the skyscraper in the respective cell. There are heights of 1 to MAX in every row, every column, and in each of the two diagonals if indicated. Some cells may be empty (parks). The numbers around the grid indicate how many buildings you can see from this position when you look at the skyscraper lineup. Bear in mind that only those skyscrapers are visible which are higher than the ones in front. \subsubsection{Example} @@ -1683,6 +1830,69 @@ This config file will be sourced into the \texttt{lpsmag bash} script and contai After running \texttt{lpsmag} you will find a \texttt{lpsmag.tex} in your working directory. Just run \texttt{pdflatex lpsmag.tex} twice and you finally get for example this \href{https://bitbucket.org/kleberj/logicpuzzle/downloads/lpsmag.pdf}{\texttt{lpsmag.pdf}}. +\subsection{Tents and Trees} +Draw tents in the grid. Next to each tree, a tent must be entered in a horizontally or vertically adjacent cell, which is associated with this tree. The numbers next to the grid indicate the quantity of tents in each row or column. No tent can stand directly next to another one, not even diagonally. +\subsubsection{Example} +\begin{center} + \begin{tentsandtrees} + \framepuzzle + \tentH{1,2,1,1,2} + \tentV{2,0,2,0,3} + \setrow{4}{\Tree,{},\Tree,\Tree,\Tree} + \setrow{2}{{},\Tree} + \setrow{1}{\Tree,{},{},\Tree} + \end{tentsandtrees} + \hspace{1.5cm} + \begin{tentsandtrees} + \framepuzzle + \tentH{1,2,1,1,2} + \tentV{2,0,2,0,3} + \setrow{5}{\Tent,{},\Tent,{},\Tent,} + \setrow{4}{\Tree,{},\Tree,\Tree,\Tree} + \setrow{3}{{},\Tent,{},\Tent} + \setrow{2}{{},\Tree} + \setrow{1}{\Tree,\Tent,{},\Tree,\Tent} + \end{tentsandtrees} +\end{center} +\begin{lstlisting} +\begin{center} + \begin{tentsandtrees} + \framepuzzle + \tentH{1,2,1,1,2} + \tentV{2,0,2,0,3} + \setrow{4}{\Tree,{},\Tree,\Tree,\Tree} + \setrow{2}{{},\Tree} + \setrow{1}{\Tree,{},{},\Tree} + \end{tentsandtrees} + \hspace{1.5cm} + \begin{tentsandtrees} + \framepuzzle + \tentH{1,2,1,1,2} + \tentV{2,0,2,0,3} + \setrow{5}{\Tent,{},\Tent,{},\Tent,} + \setrow{4}{\Tree,{},\Tree,\Tree,\Tree} + \setrow{3}{{},\Tent,{},\Tent} + \setrow{2}{{},\Tree} + \setrow{1}{\Tree,\Tent,{},\Tree,\Tent} + \end{tentsandtrees} +\end{center} +\end{lstlisting} + +\subsubsection{Options} +\begin{optionlist} + \optitem{\envoption{rows}}{5}{defines the number of rows in the grid.} + \optitem{\envoption{columns}}{5}{specifies the number of columns in the grid} + \optitem{\envoption{width}}{5.9cm}{sets the width of the minipage, in which the grid is typeset.} + \optitem{\envoption{scale}}{1}{scales the size of the grid in the minipage.} + \optitem{\envoption{fontsize}}{Large}{specifies the size of the numbers next to the grid. Here, the usual \LaTeX\ sizes are used. Possible values: \texttt{tiny}, \texttt{scriptsize}, \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}, \texttt{large}, \underline{\texttt{Large}}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}} + \optitem{\envoption{title}}{}{sets the title of a puzzle.} + \optitem{\envoption{titleindent}}{0cm}{defines the indent of the title.} + \optitem{\envoption{titlewidth}}{5.9cm}{specifies the width of the box the title is set in.} + \optitem{\envoption{bgcolor}}{}{sets the background color of the grid.} + \optitem{\envoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} + \optitem{\envoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} +\end{optionlist} + \subsection{Tunnel} Determine the course of the tube. Draw the only possible connection. from the beginning to the end. The numbers indicate how many tube segments (including portals) are present in the corresponding rows and columns. The tube is one cell wide, and does not cross or touch itself! \subsubsection{Example} @@ -1772,10 +1982,9 @@ We wrote a package \package{bokkusu.sty} with version number v1.2 and date 2013/ \ExecuteOptionsX{rows,columns,width,fontsize,scale,color,bgcolor,cvoffset, counterstyle,title,titleindent,titlewidth}% \ProcessOptionsX\relax% -\LP@init@counter{\LP@BK@init@prefix}% \end{lstlisting} -We save the package prefix and name in a macro for easy change. Then we define the options for package \package{bokkusu.sty} and the environment \env{bokkusu}, which are executed afterwards to create the macros for the option values. In the end, we need to initialize the package counters. +We save the package prefix and name in a macro for easy change. Then we define the options for package \package{bokkusu.sty} and the environment \env{bokkusu}, which are executed afterwards to create the macros for the option values. \begin{lstlisting} \let\valueH\LP@bottomrow% @@ -1804,10 +2013,10 @@ Finally, we define the \env{bokkusu} environment. \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}% \end{lstlisting} We locally set the environment options and the prefix and name of the current puzzle environment. We need to reset the counters for \envoption{rows} and \envoption{columns}, as they might have been altered. @@ -1961,6 +2170,20 @@ With the command \cs{hakyuusetup}\margcs{\cmd\hakyuusetup\{\marg{options}\}} you \label{sec:pschitori} \subparagraph{\texttt{hitorisetup}} With the command \cs{hitorisetup}\margcs{\cmd\hitorisetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Kakuro} +\label{sec:psckakuro} +\subparagraph{\texttt{kakurorow}} +\label{sec:psckakurorow} +With\margcs{\cmd\kakurorow\{\marg{row}\}\{\marg{csv list}\}} the \cmd\kakurorow\ command, you can set the contents of a kakuro \marg{row}. These may be numbers and the commands \cmd\KKR\ or \cmd\Black. +\subparagraph{\texttt{kakurocolumn}} +\label{sec:psckakurocolumn} +With\margcs{\cmd\kakurocolumn\{\marg{column}\}\{\marg{csv list}\}} the \cmd\kakurocolumn\ command, you can set the contents of a kakuro \marg{column}. +\subparagraph{\texttt{KKR}} +With\margcs{\cmd\KKR\{\marg{sumV}\}\{\marg{sumH}\}} the \cmd\KKR\ command, you can set the contents of a kakuro cell. +\subparagraph{\texttt{Black}} +The command \cs{Black}\margcs{\cmd\Black} blacks out a cell. +\subparagraph{\texttt{kakurosetup}} +With the command \cs{kakurosetup}\margcs{\cmd\kakurosetup\{\marg{options}\}} you can reset the options with global scope. \paragraph{Kendoku} \label{sec:psckendoku} \subparagraph{\texttt{kendokucell}} @@ -2005,6 +2228,12 @@ With the command \cs{laserbeamsetup}\margcs{\cmd\laserbeamsetup\{\marg{options}\ The command \cs{Mine}\margcs{\cmd\Mine} draws a mine. It can be used in commands like \cmd\setcell\ [see: \ref{sec:setcell}] or \cmd\setrow\ [see: \ref{sec:setrow}]! \subparagraph{\texttt{minesweepersetup}} With the command \cs{minesweepersetup}\margcs{\cmd\minesweepersetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Schatzsuche} +\label{sec:pscschatzsuche} +\subparagraph{\texttt{Diamond}} +The command \cs{Diamond}\margcs{\cmd\Diamond} draws a diamond. It can be used in commands like \cmd\setcell\ [see: \ref{sec:setcell}] or \cmd\setrow\ [see: \ref{sec:setrow}]! +\subparagraph{\texttt{schatzsuchesetup}} +With the command \cs{schatzsuchesetup}\margcs{\cmd\schatzsuchesetup\{\marg{options}\}} you can reset the options with global scope. \paragraph{Skyline} \label{sec:pscskyline} \subparagraph{\texttt{skylineT}} @@ -2031,6 +2260,18 @@ With the command \cs{slitherlinksetup}\margcs{\cmd\slitherlinksetup\{\marg{optio The command \cs{lpsudokucell}\margcs{\cmd\lpsudokucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column} \marg{row}. \subparagraph{\texttt{lpsudokusetup}} With the command \cs{lpsudokusetup}\margcs{\cmd\lpsudokusetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Tents and Trees} +\label{sec:psctentsandtrees} +\subparagraph{\texttt{tentH}} +The command \cs{tentH}\margcs{\cmd\tentH\{\marg{csv list}\}} typesets the numbers above the grid indicating how many tents are in the respective column. It expects a comma-separated list as an argument. +\subparagraph{\texttt{tentV}} +The command \cs{tentV}\margcs{\cmd\tentV\{\marg{csv list}\}} typesets the numbers left to the grid. +\subparagraph{\texttt{Tree}} +The command \cs{Tree}\margcs{\cmd\Tree} draws a tree. It can be used in commands like \cmd\setcell\ [see: \ref{sec:setcell}] or \cmd\setrow\ [see: \ref{sec:setrow}]! The design of the tree is based on \href{http://tex.stackexchange.com/users/3144/alain-matthes}{Alain Matthes}' answer to this \href{http://tex.stackexchange.com/questions/39149/how-can-we-draw-a-christmas-tree-with-decorations-using-tikz}{question} on \TeX.sx. +\subparagraph{\texttt{Tent}} +The command \cs{Tent}\margcs{\cmd\Tent} draws a tent. It can be used in commands like \cmd\setcell\ [see: \ref{sec:setcell}] or \cmd\setrow\ [see: \ref{sec:setrow}]! +\subparagraph{\texttt{tentsandtreessetup}} +With the command \cs{tentsandtreessetup}\margcs{\cmd\tentsandtreessetup\{\marg{options}\}} you can reset the options with global scope. \paragraph{Tunnel} \label{sec:psctunnel} \subparagraph{\texttt{tunnelH}} @@ -2193,10 +2434,6 @@ This code snippet defines the option \envoption{rows} for environment \env{battl \label{sec:LPdefinechoicekeyfontsize} With\margcs{\cmd\LP@define@choicekey@fontsize\\\{\marg{prefix}\}\{\marg{package}\}\{\marg{default}\}} this command, you can define the choice key option \envoption{fontsize} of the environment \marg{package}. Possible keys are: tiny, scriptsize, footnotesize, small, normalsize, large, Large, LARGE, huge, Huge -\subparagraph{\texttt{LP@init@counter}} -\label{sec:LPinitcounter} -The command\margcs{\cmd\LP@init@counter\{\marg{prefix}\}} \cmd\LP@init@counter\ defines the counters \marg{prefix}@rows and \marg{prefix}@columns. Furthermore, they are initialized with \textbackslash\marg{prefix}@rows\ and \textbackslash\marg{prefix}@columns\ and steped. - \paragraph{Drawing grids} \subparagraph{\texttt{LP@drawgrid}} \label{sec:LPdrawgrid} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.pdf Binary files differdeleted file mode 100644 index 0e77a0f56d3..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.pdf +++ /dev/null diff --git a/Master/texmf-dist/scripts/logicpuzzle/lpsmag b/Master/texmf-dist/scripts/logicpuzzle/lpsmag index 9e7725b1b47..9b24a9c3c09 100755 --- a/Master/texmf-dist/scripts/logicpuzzle/lpsmag +++ b/Master/texmf-dist/scripts/logicpuzzle/lpsmag @@ -7,6 +7,7 @@ # # License: LPPL # +VERSION="v1.1 (06/05/2013)" CONFIGFILE="$1" TEXFILE="lpsmag.tex" TEXFILEBAK="${TEXFILE}.bak" @@ -158,7 +159,8 @@ deleteauxfiles() cat >preamble.tmp <<EOF \documentclass[a4paper]{article}% \usepackage[bottom=3cm,top=3cm,left=2.7cm,right=2.7cm]{geometry} -\usepackage[width=5cm,scale=0.55,fontsize=normalsize]{lpsudoku}% +\usepackage{logicpuzzle}% +\lpsudokusetup{width=5cm,scale=0.55,fontsize=normalsize}% EOF # cat preamble.tmp diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty index dbbc3e0b7a7..d16df95b6c8 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/03 logicpuzzle.sty v2.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{logicpuzzle}[2013/05/10 logicpuzzle.sty v2.1 - Josef Kleber (C) 2013]% % \RequirePackage{xkeyval}% \RequirePackage{ifthen}% @@ -36,6 +36,8 @@ \pgfdeclarelayer{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}% @@ -69,17 +71,6 @@ % % init % -% #1 prefix -\newcommand*\LP@init@counter[1]% -{% - \newcounter{#1@rows}% - \newcounter{#1@columns}% - \setcounter{#1@rows}{\csname #1@rows\endcsname}% - \setcounter{#1@columns}{\csname #1@columns\endcsname}% - \stepcounter{#1@rows}% - \stepcounter{#1@columns}% -}% -% % #1 package prefix % #2 package % #3 option @@ -284,7 +275,7 @@ \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);};% - \end{pgfonlayer}{LPdump} + \end{pgfonlayer}% \node [shape=rectangle,inner sep=0pt,anchor=north west,scale=\LP@scale,font=\tiny] at (A_\theLP@counter@unique.north west) {$#3$};% }% % @@ -484,6 +475,40 @@ \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*\fillcell[2]% {% \LP@set@LP@scale{\LP@env@prefix}% @@ -675,7 +700,7 @@ % \newcommand*\LP@toprow@i[2]% {% - \LP@setrowcontents{#1}{1}{\csname the#2@rows\endcsname}% + \LP@setrowcontents{#1}{1}{\theLP@rows}% }% % \newcommand*\LP@rightcolumn[1]% @@ -685,7 +710,7 @@ % \newcommand*\LP@rightcolumn@i[2]% {% - \LP@setcolumncontents{#1}{\csname the#2@columns\endcsname}{1}% + \LP@setcolumncontents{#1}{\theLP@columns}{1}% }% % \newcommand*\LP@rightcolumn@edge[1]% @@ -695,7 +720,7 @@ % \newcommand*\LP@rightcolumn@edge@i[2]% {% - \LP@setcolumncontents@edge{#1}{\csname the#2@columns\endcsname}{1}% + \LP@setcolumncontents@edge{#1}{\theLP@columns}{1}% }% % % Presentation @@ -745,12 +770,12 @@ \newcommand*\LP@Cross% {% \LP@set@LP@scale{\LP@env@prefix}% - \begin{tikzpicture} - \begin{pgfonlayer}{LPforeground} + \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} + \end{pgfonlayer}% + \end{tikzpicture}% }% % \newcommand*\LP@Mirror[1]% @@ -768,7 +793,7 @@ % \newcommand*\LP@Mine% {% - \begin{tikzpicture}[scale=\LP@scale]% + \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;% @@ -814,6 +839,81 @@ \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% +% % get package options with prefix % \newcommand*\LP@set@LP@scale[1]% @@ -899,8 +999,6 @@ % \ProcessOptionsX\relax% % -\LP@init@counter{\LP@LP@init@prefix}% -% \let\logicpuzzlecell\setcell% % \newcommand*\logicpuzzlesetup[1]% @@ -913,10 +1011,10 @@ \setkeys{logicpuzzle}{#1}% \LP@set@package{logicpuzzle}% \LP@set@env@prefix{LP@LP}% - \setcounter{LP@LP@rows}{\LP@LP@rows}% - \setcounter{LP@LP@columns}{\LP@LP@columns}% - \stepcounter{LP@LP@rows}% - \stepcounter{LP@LP@columns}% + \setcounter{LP@rows}{\LP@LP@rows}% + \setcounter{LP@columns}{\LP@LP@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% \begin{minipage}[t]{\LP@LP@width}% \ifthenelse{\equal{\LP@LP@title}{}}% {\par\enspace\par}% empty 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 |