summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-06-29 00:16:40 +0000
committerKarl Berry <karl@freefriends.org>2013-06-29 00:16:40 +0000
commitec4fd129ad01f534716631faed103a0aab51eb94 (patch)
tree7fa128c4c04f9ba8c4d79b5a1e57a1b1020fbecc /Master/texmf-dist
parent41837423e5e17767c06fc0fc81d47da607b823f5 (diff)
logicpuzzle (6jun13)
git-svn-id: svn://tug.org/texlive/trunk@31024 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/CHANGES28
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/README23
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdfbin430713 -> 512386 bytes
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex634
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty392
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty348
6 files changed, 1380 insertions, 45 deletions
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES
index 6794413d455..1e1a6270e91 100644
--- a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES
@@ -1,3 +1,31 @@
+== Logicpuzzle bundel (v2.4) ==
+
+04/06/2013 added magnets environment [jk]
+ \minus{H|V}, \plus{H|V}, \{PM|MP}{V|H}, \magnets{H|V}
+
+03/06/2013 added masyu environment [jk]
+ \masyuline, \MasyuW, \MasyuB
+
+03/06/2013 added \setcells [jk]
+
+03/06/2013 added magiclabyrinth environment [jk]
+ and \mlline
+
+== Logicpuzzle bundel (v2.3) ==
+
+29/05/2013 added numberlink environment [jk]
+ \link, \numberlinkcell
+
+28/05/2013 added fourwinds environment [jk]
+ \fourwindscell
+
+28/05/2013 Bugfix: \framepuzzle only worked correctly for quadratic puzzles [jk]
+
+27/05/2013 added resuko environment [jk]
+ \xtikzpath, \Curve{B|T}{L|R}, \Straight{H|V},
+ \Cross{H|V}, \Graveltrap. \parkinglot, \pitlane,
+ \track, \trackH, \trackV
+
== Logicpuzzle bundel (v2.2) ==
16/05/2013 added bridges environment [jk]
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/README b/Master/texmf-dist/doc/latex/logicpuzzle/README
index bc1c0ea316d..36fc84dd17c 100644
--- a/Master/texmf-dist/doc/latex/logicpuzzle/README
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/README
@@ -6,6 +6,7 @@ puzzles. At the moment the following puzzles are supported:
* Bokkusu (aka Kakurasu, Feldersummenrätsel, ...)
* Bridges (aka Brückenbau, Hashi, ...)
* Chaos Sudoku
+* Four Winds (aka Eminent Domain, Lichtstrahl, ...)
* Hakyuu (aka Seismic, Ripple Effect, ...)
* Hitori
* Kakuro
@@ -14,7 +15,12 @@ puzzles. At the moment the following puzzles are supported:
* Killer Sudoku (aka Samunapure, Sum Number Place, Sumdoku,
Gebietssummen, ...)
* Laser Beam (aka Laserstrahl, ...)
+* Magic Labyrinth (aka Magic Spiral, Magisches Labyrinth, ...)
+* Magnets (aka Magnetplatte, Magnetfeld, ...)
+* Masyu (aka Mashi, {White|Black} Pearls, ...)
* Minesweeper (aka Minensuche, ...)
+* Number Link (aka Alphabet Link, Arukone, Buchstabenbund, ...)
+* Resuko
* Schatzsuche
* Skyline (aka Skycrapers, Wolkenkratzer, Hochhäuser, ...)
incl. Skyline Sudoku and Skyline Sudoku (N*N) variants
@@ -30,16 +36,13 @@ puzzles. At the moment the following puzzles are supported:
License: LPPL
-Changes in v2.2:
+Changes in v2.4:
-- added support for Bridges puzzle
- https://bitbucket.org/kleberj/logicpuzzle/wiki/Bridges
+- added support for Magnets puzzle
+ https://bitbucket.org/kleberj/logicpuzzle/wiki/Magnets
-- added support for Sun and Moon puzzle
- https://bitbucket.org/kleberj/logicpuzzle/wiki/SunAndMoon
+- added support for Masyu puzzle
+ https://bitbucket.org/kleberj/logicpuzzle/wiki/Masyu
-- added support for Star Battle puzzle
- https://bitbucket.org/kleberj/logicpuzzle/wiki/StarBattle
-
-- added support for Stars and Arrows puzzle
- https://bitbucket.org/kleberj/logicpuzzle/wiki/StarsAndArrows \ No newline at end of file
+- added support for Magic Labyrinth puzzle
+ https://bitbucket.org/kleberj/logicpuzzle/wiki/MagicLabyrinth \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf
index c59f92ebf57..119fbe208f2 100644
--- a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex
index 22ac85d0e93..a3cf0589f0b 100644
--- a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex
@@ -21,7 +21,7 @@
\usepackage[svgnames,rgb]{xcolor}%
\usepackage[automark,nouppercase]{scrpage2}
\usepackage[tocgraduated]{tocstyle}
-\usetocstyle{KOMAlike}
+\usetocstyle{classic}
\usepackage{logicpuzzle}
\usepackage{hyperref}
%
@@ -41,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, kakuro, kendoku, killersudoku, laserbeam, skyline, slitherlink, lpsudoku, minesweeper, schatzsuche, tentsandtrees, tunnel, bridges, starsandarrows, starbattle, sunandmoon,
+emph={ddsudoku, battleship, bokkusu, chaossudoku, hakyuu, hitori, kakuro, kendoku, killersudoku, laserbeam, skyline, slitherlink, lpsudoku, minesweeper, schatzsuche, tentsandtrees, tunnel, bridges, starsandarrows, starbattle, sunandmoon, fourwinds, numberlink, resuko, magiclabyrinth, masyu, magnets
,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,
@@ -60,7 +60,11 @@ laser, skylineT, skylineB, skylineR, skylineL, skylinecell, setbigcell, slitherl
tunnelH, tunnelV, tube, portal, Mine, Diamond, ShipR, kakurosetup, kakurorow, KKR, Black,
Tent, Tree, definecolor, tentH, tentV, bridgesrow, starbattlecell, starsH, starsV, [, ],
RightDown, Right, LeftDown, LeftUp, Up, RightUp, Left, Star, Cloud, Moon, MoonTL, MoonR,
-MoonT, colorlet, bridge}}
+MoonT, colorlet, bridge, fourwindscell, numberlinkcell, link, resukosetup, resukocell,
+Graveltrap, Cross, StraightV, StraightH, CurveTR, CurveBR, trackH, trackV, track,
+parkinglot, pitlane, xtikzpath, mlline, setcells, magiclabyrinthcell, magnetssetup, minusH,
+minusV, plusH, plusV, magnetsH, magnetsV, PMH, PMV, MPH, MPV, masyucell, masyuline,
+masyusetup, MasyuW, MasyuB}}
\makeatletter
\renewcommand{\maketitle}%
{%
@@ -390,6 +394,42 @@ MoonT, colorlet, bridge}}
title = {{Examples \& Solutions (bridges)}},
year = {2013},
}
+
+@misc{bib:ex:fourwinds,
+ author = {Josef Kleber},
+ note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-fourwinds.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-fourwinds.pdf)},
+ title = {{Examples \& Solutions (fourwinds)}},
+ year = {2013},
+ }
+
+@misc{bib:ex:numberlink,
+ author = {Josef Kleber},
+ note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-numberlink.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-numberlink.pdf)},
+ title = {{Examples \& Solutions (numberlink)}},
+ year = {2013},
+ }
+
+@misc{bib:ex:magiclabyrinth,
+ author = {Josef Kleber},
+ note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-magiclabyrinth.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-magiclabyrinth.pdf)},
+ title = {{Examples \& Solutions (magiclabyrinth)}},
+ year = {2013},
+ }
+
+@misc{bib:ex:masyu,
+ author = {Josef Kleber},
+ note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-masyu.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-masyu.pdf)},
+ title = {{Examples \& Solutions (masyu)}},
+ year = {2013},
+ }
+
+@misc{bib:ex:magnets,
+ author = {Josef Kleber},
+ note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-magnets.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-magnets.pdf)},
+ title = {{Examples \& Solutions (magnets)}},
+ year = {2013},
+ }
+
\end{filecontents}
\bibliographystyle{plain}
\ddsudokusetup{width=4.5cm,scale=0.85}
@@ -412,11 +452,17 @@ MoonT, colorlet, bridge}}
\sunandmoonsetup{width=4.5cm,scale=0.85}
\starsandarrowssetup{width=4.5cm,scale=0.75}
\starbattlesetup{width=4.5cm,scale=0.85}
-\bridgessetup{rows=8,columns=8,scale=0.63,color=orange!40}
+\bridgessetup{width=4.5cm,rows=8,columns=8,scale=0.55,color=orange!40}
+\resukosetup{rows=8,columns=8,width=4cm,fontsize=Huge,scale=.48}
+\numberlinksetup{width=4.5cm,scale=0.89}
+\killersudokusetup{width=4.5cm,scale=0.89}
+\magiclabyrinthsetup{width=4.5cm,scale=0.89}
+\masyusetup{width=4.5cm,scale=0.89,color=Teal}
+\magnetssetup{width=4.5cm,scale=0.55,bgcolor=Teal!50}
\title{\filename}%
\Subtitle{A style file for typesetting logic puzzles}%
\author{Josef Kleber}
-\Fileversion{v2.2}
+\Fileversion{v2.4}
\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{%
@@ -461,7 +507,7 @@ MoonT, colorlet, bridge}}
Fill every row, every column and each of the two diagonals -- if indicated -- with numbers from 1 to SIZE of the grid.
\subsubsection{Example}
-
+\begin{figure}[htbp]
\begin{center}
\begin{ddsudoku}
\framepuzzle
@@ -484,7 +530,7 @@ Fill every row, every column and each of the two diagonals -- if indicated -- wi
\setrow{1}{4,1,2,3,5}
\end{ddsudoku}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{ddsudoku}
@@ -529,6 +575,7 @@ Fill every row, every column and each of the two diagonals -- if indicated -- wi
Try to find the positions of the ships listed below the puzzle. The numbers on the side of the puzzle reveals how many ship segments can be found in the rows and columns. All remaining fields indicate 'water'. Consider the following rules: The ships are arranged horizontally and vertically. No ship touches another ship at any point, not even diagonally.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{battleship}
\placesegment{4}{1}{\ShipR}
@@ -547,7 +594,7 @@ Try to find the positions of the ships listed below the puzzle. The numbers on t
\shipV{3,1,4,0,3}
\end{battleship}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{battleship}
@@ -592,6 +639,7 @@ Try to find the positions of the ships listed below the puzzle. The numbers on t
Black out some of the grid cells. The numbers on the left and the bottom edge of the grid indicate the values of the cells for adding up. The numbers on the right and the top edge of the grid specify the sums of the values of the colored cells.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{bokkusu}
\valueH{1,2,3,4,5}
@@ -612,7 +660,7 @@ Black out some of the grid cells. The numbers on the left and the bottom edge of
\fillrow{5}{0,0,1,0,0}
\end{bokkusu}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{bokkusu}
@@ -657,6 +705,7 @@ Connect all the islands (circles) located in the grid by bridges. The bridges ma
\subsubsection{Example}
\colorlet{LP@c@bridge}{Teal}
+\begin{figure}[htbp]
\begin{center}
\begin{bridges}
\framepuzzle
@@ -683,7 +732,7 @@ Connect all the islands (circles) located in the grid by bridges. The bridges ma
\bridge{\tikzpath{5}{2}{6,6,6,8,8,8,8,8,8,4,4}}
\end{bridges}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\colorlet{LP@c@bridge}{Teal}
\begin{center}
@@ -733,6 +782,7 @@ Connect all the islands (circles) located in the grid by bridges. The bridges ma
\subsection{Chaos Sudoku}
Fill the cells of an area with numbers from 1 to N of the N*N grid. Each number can appear only once - in each area, column, row or diagonal if indicated.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{chaossudoku}
\chaossudokucell{1}{1}{3}
@@ -764,7 +814,7 @@ Fill the cells of an area with numbers from 1 to N of the N*N grid. Each number
\end{puzzlebackground}
\end{chaossudoku}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{chaossudoku}
@@ -824,9 +874,75 @@ Fill the cells of an area with numbers from 1 to N of the N*N grid. Each number
\optitem{\envoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.}
\end{optionlist}
+\subsection{Four Winds}
+Fill all cells with light rays. These may not intersect. Cells with numbers represent the lighting system that lits horizontally and vertically. The number indicates how many cells are illuminated. Cells with numbers do not count. No cell must remain empty.
+
+\subsubsection{Example}
+\begin{figure}[htbp]
+\begin{center}
+\begin{fourwinds}
+ \framepuzzle
+ \fourwindscell{1}{2}{2}{}
+ \fourwindscell{1}{5}{2}{}
+ \fourwindscell{2}{4}{3}{}
+ \fourwindscell{3}{3}{3}{}
+ \fourwindscell{4}{1}{4}{}
+ \fourwindscell{5}{5}{5}{}
+\end{fourwinds}
+\hspace{1.5cm}
+\begin{fourwinds}
+ \framepuzzle
+ \fourwindscell{1}{2}{2}{2/1,6/1}
+ \fourwindscell{1}{5}{2}{2/2}
+ \fourwindscell{2}{4}{3}{8/1,6/2}
+ \fourwindscell{3}{3}{3}{4/1,6/1,2/1}
+ \fourwindscell{4}{1}{4}{4/2,6/1,8/1}
+ \fourwindscell{5}{5}{5}{4/2,2/3}
+\end{fourwinds}
+\end{center}
+\end{figure}
+\begin{lstlisting}
+\begin{fourwinds}
+ \framepuzzle
+ \fourwindscell{1}{2}{2}{}
+ \fourwindscell{1}{5}{2}{}
+ \fourwindscell{2}{4}{3}{}
+ \fourwindscell{3}{3}{3}{}
+ \fourwindscell{4}{1}{4}{}
+ \fourwindscell{5}{5}{5}{}
+\end{fourwinds}
+\hspace{1.5cm}
+\begin{fourwinds}
+ \framepuzzle
+ \fourwindscell{1}{2}{2}{2/1,6/1}
+ \fourwindscell{1}{5}{2}{2/2}
+ \fourwindscell{2}{4}{3}{8/1,6/2}
+ \fourwindscell{3}{3}{3}{4/1,6/1,2/1}
+ \fourwindscell{4}{1}{4}{4/2,6/1,8/1}
+ \fourwindscell{5}{5}{5}{4/2,2/3}
+\end{fourwinds}
+\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}}{blue}{sets the color of the lines.}
+ \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{Hakyuu}
Fill the cells of an area with numbers from 1 to SIZE of the area. If there are two cells with the same number N in a row or a column, there must be at least N cells between those two cells.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{hakyuu}
\hakyuucell{1}{5}{2}
@@ -863,7 +979,7 @@ Fill the cells of an area with numbers from 1 to SIZE of the area. If there are
\end{puzzlebackground}
\end{hakyuu}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{hakyuu}
@@ -931,6 +1047,7 @@ Fill the cells of an area with numbers from 1 to SIZE of the area. If there are
\subsection{Hitori}
Black out some cells according to these specifications: In each row and each column a number may only occur once or can be completely blackened. The blackened cells can touch neither horizontal nor vertical. All non blackened cells must remain connected. Each number has its own color, which otherwise has no meaning.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{hitori}
\framepuzzle
@@ -950,7 +1067,7 @@ Black out some cells according to these specifications: In each row and each col
\setcolorrow{1}{0,1,0,2,3}
\end{hitori}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{hitori}
@@ -993,6 +1110,7 @@ Enter numbers from 1 to 9 in any order into the blank cells. Here, the given hor
\subsubsection{Example}
\definecolor{kakuro}{RGB}{155,206,167}
\kakurosetup{color=kakuro}
+\begin{figure}[htbp]
\begin{center}
\begin{kakuro}
\framepuzzle
@@ -1012,6 +1130,7 @@ Enter numbers from 1 to 9 in any order into the blank cells. Here, the given hor
\kakurorow{1}{\Black,\KKR{}{8},7,1,\Black}
\end{kakuro}
\end{center}
+\end{figure}
\begin{lstlisting}
\definecolor{kakuro}{RGB}{155,206,167}
\kakurosetup{color=kakuro}
@@ -1056,6 +1175,7 @@ Enter numbers from 1 to 9 in any order into the blank cells. Here, the given hor
\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}
+\begin{figure}[htbp]
\begin{center}
\begin{kendoku}
\framearea{black}{\tikzpath{1}{1}{8,8,6,2,6,2,4,4}}
@@ -1118,7 +1238,7 @@ Fill the cells with the numbers from 1 to SIZE of the puzzle. In the top left co
\setrow{1}{4,1,2,3,5}
\end{kendoku}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{kendoku}
@@ -1202,6 +1322,7 @@ Fill the cells with the numbers from 1 to SIZE of the puzzle. In the top left co
\subsection{Killer Sudoku}
Fill the cells with the numbers from 1 to SIZE of the puzzle. The numbers may occur only once in each row, column and colored area if specified. In the top left corner of a framed area, you will find the sum of the entered numbers. The numbers of an area may not necessarily be different, when they are in different rows or columns. But they must be different, when additional colored areas are specified.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{killersudoku}[columns=4,rows=4,scale=1.11]
\framearea{black}{\tikzpath{1}{1}{8,8,6,6,2,4,2,4}}
@@ -1245,7 +1366,7 @@ Fill the cells with the numbers from 1 to SIZE of the puzzle. The numbers may oc
\setrow{1}{1,3,2,4}
\end{killersudoku}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{killersudoku}
\framearea{black}{\tikzpath{1}{1}{8,8,6,6,2,4,2,4}}
@@ -1308,6 +1429,7 @@ Fill the cells with the numbers from 1 to SIZE of the puzzle. The numbers may oc
\subsection{Laser Beam}
Draw a laser beam in each grid according to the following guidelines. The beam has to enter or to leave the grid at the arrows. At each intersection, a mirror, on which the laser beam must reflect on one side, can be placed horizontally or vertically. The other side must not be touched by the beam. All locations where the laser crosses are given. The numbers to the left and above the grid indicate how many cells are traversed by the beam in the corresponding row or column. The numbers to the right and below reveal, how many mirrors are found in the intersection of the corresponding row or column.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{laserbeam}
\laserV{1}
@@ -1338,7 +1460,7 @@ Draw a laser beam in each grid according to the following guidelines. The beam h
\end{puzzlebackground}
\end{laserbeam}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{laserbeam}
@@ -1387,9 +1509,187 @@ Draw a laser beam in each grid according to the following guidelines. The beam h
\optitem{\envoption{cvoffset}}{-38pt}{sets the vertical offset of the counters in the margin.}
\end{optionlist}
+\subsection{Magic Labyrinth}
+Enter the numbers 1 to N into the grid. Each number can appear only once in each column and row. Following the labyrinth from the outside inwards, then the given number sequence must be repeated continuously.
+\subsubsection{Example}
+\begin{figure}[htbp]
+\begin{center}
+\begin{magiclabyrinth}
+ \mlline{\xtikzpath{1}{6}{6/5,2/5,4/5,8/4,6/4,2/3,4/3,8/2,6/2,2/1,4/1}}
+ \setcells{1/1,2/4,4/5}{3}
+ \magiclabyrinthcell{4}{2}{2}
+ \magiclabyrinthcell{5}{4}{1}
+\end{magiclabyrinth}
+\hspace{1.5cm}
+\begin{magiclabyrinth}
+ \mlline{\xtikzpath{1}{6}{6/5,2/5,4/5,8/4,6/4,2/3,4/3,8/2,6/2,2/1,4/1}}
+ \setrow{5}{{},1,2,3}
+ \setrow{4}{2,3,{},{},1}
+ \setrow{3}{{},{},3,1,2}
+ \setrow{2}{1,{},{},2,3}
+ \setrow{1}{3,2,1}
+\end{magiclabyrinth}
+\end{center}
+\end{figure}
+\begin{lstlisting}
+\begin{magiclabyrinth}
+ \mlline{\xtikzpath{1}{6}{6/5,2/5,4/5,8/4,6/4,2/3,4/3,8/2,6/2,
+ 2/1,4/1}}
+ \setcells{1/1,2/4,4/5}{3}
+ \magiclabyrinthcell{4}{2}{2}
+ \magiclabyrinthcell{5}{4}{1}
+\end{magiclabyrinth}
+\hspace{1.5cm}
+\begin{magiclabyrinth}
+ \mlline{\xtikzpath{1}{6}{6/5,2/5,4/5,8/4,6/4,2/3,4/3,8/2,6/2,
+ 2/1,4/1}}
+ \setrow{5}{{},1,2,3}
+ \setrow{4}{2,3,{},{},1}
+ \setrow{3}{{},{},3,1,2}
+ \setrow{2}{1,{},{},2,3}
+ \setrow{1}{3,2,1}
+\end{magiclabyrinth}
+\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{Magnets}
+Draw magnetic and neutral plates into the grid. The magnetic plates have a positive and a negative pole, neutral plates do not. The same poles must not touch neither horizontal nor vertical. Neutral plates may touch. The numbers to the left and above the grid indicate how many plus or minus poles are present in the respective column or row.
+\subsubsection{Example}
+\begin{figure}[htbp]
+\begin{center}
+\begin{magnets}
+ \minusH{2,1,2,2,1,2}
+ \minusV{2,1,3,1,2,1}
+ \plusH{2,1,2,2,2,1}
+ \plusV{1,2,1,3,2,1}
+ \magnetsH{2/1,2/4,2/5,2/6,3/2,3/3,4/1,4/4,5/5,5/6}
+ \magnetsV{1/1,1/3,1/5,2/2,4/5,5/2,6/1,6/3}
+ \MPH{2/6}
+ \PMH{5/5}
+ \MPV{6/3}
+\end{magnets}
+\hspace{1.5cm}
+\begin{magnets}
+ \minusH{2,1,2,2,1,2}
+ \minusV{2,1,3,1,2,1}
+ \plusH{2,1,2,2,2,1}
+ \plusV{1,2,1,3,2,1}
+ \MPH{2/6,3/2,4/1}
+ \PMH{2/5,5/5,4/4,3/3}
+ \MPV{1/1,1/3,6/3}
+\end{magnets}
+\end{center}
+\end{figure}
+\begin{lstlisting}
+\magnetssetup{bgcolor=Teal!50}
+\begin{magnets}
+ \minusH{2,1,2,2,1,2}
+ \minusV{2,1,3,1,2,1}
+ \plusH{2,1,2,2,2,1}
+ \plusV{1,2,1,3,2,1}
+ \magnetsH{2/1,2/4,2/5,2/6,3/2,3/3,4/1,4/4,5/5,5/6}
+ \magnetsV{1/1,1/3,1/5,2/2,4/5,5/2,6/1,6/3}
+ \MPH{2/6}
+ \PMH{5/5}
+ \MPV{6/3}
+\end{magnets}
+\hspace{1.5cm}
+\begin{magnets}
+ \minusH{2,1,2,2,1,2}
+ \minusV{2,1,3,1,2,1}
+ \plusH{2,1,2,2,2,1}
+ \plusV{1,2,1,3,2,1}
+ \MPH{2/6,3/2,4/1}
+ \PMH{2/5,5/5,4/4,3/3}
+ \MPV{1/1,1/3,6/3}
+\end{magnets}
+\end{lstlisting}
+
+\subsubsection{Options}
+\begin{optionlist}
+ \optitem{\envoption{rows}}{6}{defines the number of rows in the grid.}
+ \optitem{\envoption{columns}}{6}{specifies the number of columns in the grid}
+ \optitem{\envoption{width}}{8.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}}{8.1cm}{specifies the width of the box the title is set in.}
+ \optitem{\envoption{bgcolor}}{}{sets the background color of the grid for indicating the neutral areas.}
+ \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{Masyu}
+Draw a line into the grid. The line can only run horizontally and vertically and must pass through all the circles. In cells with a black circle it have to turn in a 90 degree angle and go straight on for at least another cell. The line must go straight through empty circles, but turn left or right in at least one of the neighboring cells. There is no need to go through all cells.
+\subsubsection{Example}
+\begin{figure}[htbp]
+\begin{center}
+\begin{masyu}
+ \framepuzzle
+ \setcells{1/2,3/3,4/1,4/2,4/5,5/4}{\MasyuW}
+ \masyucell{1}{4}{\MasyuB}
+\end{masyu}
+\hspace{1.5cm}
+\begin{masyu}
+ \framepuzzle
+ \setcells{1/2,3/3,4/1,4/2,4/5,5/4}{\MasyuW}
+ \masyucell{1}{4}{\MasyuB}
+ \masyuline{\xtikzpath{1}{1}{8/3,6/2,8/1,6/2,2/2,4/3,2/1,6/3,2/1,4/4}}
+\end{masyu}
+\end{center}
+\end{figure}
+\begin{lstlisting}
+\masyusetup{color=Teal}
+\begin{masyu}
+ \framepuzzle
+ \setcells{1/2,3/3,4/1,4/2,4/5,5/4}{\MasyuW}
+ \masyucell{1}{4}{\MasyuB}
+\end{masyu}
+\hspace{1.5cm}
+\begin{masyu}
+ \framepuzzle
+ \setcells{1/2,3/3,4/1,4/2,4/5,5/4}{\MasyuW}
+ \masyucell{1}{4}{\MasyuB}
+ \masyuline{\xtikzpath{1}{1}{8/3,6/2,8/1,6/2,2/2,4/3,2/1,6/3,
+ 2/1,4/4}}
+\end{masyu}
+\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}{sets the color of the line.}
+ \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{Minesweeper}
Draw a mine in some cells of the grid. The number in a cell indicates how many of the eight neighboring cells contain a mine. A numbered cell does not contain a mine.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{minesweeper}
\framepuzzle
@@ -1409,6 +1709,7 @@ Draw a mine in some cells of the grid. The number in a cell indicates how many o
\setrow{1}{{},2}
\end{minesweeper}
\end{center}
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{minesweeper}
@@ -1446,9 +1747,179 @@ 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{Number Link}
+Link all the same numbers or letters in each case by a line. The lines can run horizontally, vertically and in 90 degree angles. Each cell must be traversed by exactly one line. The lines must not intersect.
+
+\subsubsection{Example}
+\begin{figure}[htbp]
+\begin{center}
+\begin{numberlink}
+ \framepuzzle
+ \numberlinkcell{2}{1}{B}
+ \numberlinkcell{5}{1}{C}
+ \numberlinkcell{2}{2}{C}
+ \numberlinkcell{4}{2}{D}
+ \numberlinkcell{3}{3}{A}
+ \numberlinkcell{4}{3}{E}
+ \numberlinkcell{1}{4}{B}
+ \numberlinkcell{1}{5}{A}
+ \numberlinkcell{3}{5}{E}
+ \numberlinkcell{4}{5}{D}
+\end{numberlink}
+\hspace{1.5cm}
+\begin{numberlink}
+ \framepuzzle
+ \numberlinkcell{2}{1}{B}
+ \numberlinkcell{5}{1}{C}
+ \numberlinkcell{2}{2}{C}
+ \numberlinkcell{4}{2}{D}
+ \numberlinkcell{3}{3}{A}
+ \numberlinkcell{4}{3}{E}
+ \numberlinkcell{1}{4}{B}
+ \numberlinkcell{1}{5}{A}
+ \numberlinkcell{3}{5}{E}
+ \numberlinkcell{4}{5}{D}
+ \link{\tikzpath{4}{3}{8,4,8}}
+ \link{\tikzpath{2}{1}{4,8,8,8}}
+ \link{\tikzpath{2}{2}{6,2,6,6}}
+ \link{\tikzpath{1}{5}{6,2,2,6}}
+ \link{\tikzpath{4}{2}{6,8,8,8,4}}
+\end{numberlink}
+\end{center}
+\end{figure}
+\begin{lstlisting}
+\begin{numberlink}
+ \framepuzzle
+ \numberlinkcell{2}{1}{B}
+ \numberlinkcell{5}{1}{C}
+ \numberlinkcell{2}{2}{C}
+ \numberlinkcell{4}{2}{D}
+ \numberlinkcell{3}{3}{A}
+ \numberlinkcell{4}{3}{E}
+ \numberlinkcell{1}{4}{B}
+ \numberlinkcell{1}{5}{A}
+ \numberlinkcell{3}{5}{E}
+ \numberlinkcell{4}{5}{D}
+\end{numberlink}
+\hspace{1.5cm}
+\begin{numberlink}
+ \framepuzzle
+ \numberlinkcell{2}{1}{B}
+ \numberlinkcell{5}{1}{C}
+ \numberlinkcell{2}{2}{C}
+ \numberlinkcell{4}{2}{D}
+ \numberlinkcell{3}{3}{A}
+ \numberlinkcell{4}{3}{E}
+ \numberlinkcell{1}{4}{B}
+ \numberlinkcell{1}{5}{A}
+ \numberlinkcell{3}{5}{E}
+ \numberlinkcell{4}{5}{D}
+ \link{\tikzpath{4}{3}{8,4,8}}
+ \link{\tikzpath{2}{1}{4,8,8,8}}
+ \link{\tikzpath{2}{2}{6,2,6,6}}
+ \link{\tikzpath{1}{5}{6,2,2,6}}
+ \link{\tikzpath{4}{2}{6,8,8,8,4}}
+\end{numberlink}
+\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}}{red}{sets the color of the lines.}
+ \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{Resuko}
+Complete the given elements in the grid to two race tracks (a race track and a much shorter test track) with pitlane and parking lot. The elements below and to the left of the grid indicate how many straights, curves and intersections are located in the respective columns and rows. The pit lane is always located next to four straights of the circuit on a free area of 1x4 cells. At the end, the parking lot is located on the only free area of 2x2 cells. Both can not be built on a gravel trap.
+
+\subsubsection{Example}
+\begin{figure}[htbp]
+\begin{center}
+\begin{resuko}[width=5.2cm]
+ \resukocell{1}{7}{\Graveltrap}
+ \resukocell{4}{7}{\Graveltrap}
+ \resukocell{7}{3}{\Graveltrap}
+ \resukocell{6}{2}{\Cross}
+ \resukocell{8}{4}{\StraightV}
+ \resukocell{6}{7}{\StraightH}
+ \resukocell{3}{5}{\CurveBR}
+ \resukocell{5}{5}{\CurveTR}
+ \trackH{1/4/0,4/0/0,3/2/0,2/2/0,3/2/0,3/2/1,2/2/2,2/4/0}
+ \trackV{4/2/0,5/2/1,2/0/0,2/4/0,2/4/1,4/2/0,1/2/1,0/2/0}
+ \framepuzzle
+\end{resuko}
+\hspace{1.5cm}
+\begin{resuko}
+ \resukocell{1}{7}{\Graveltrap}
+ \resukocell{4}{7}{\Graveltrap}
+ \resukocell{7}{3}{\Graveltrap}
+ \parkinglot{2}{7}
+ \pitlane{2}{3}{H}
+ \track{\tikzpath{2}{4}{6,8,6,8,4,4,4,2,2,6}}
+ \track{\xtikzpath{2}{1}{6/4,8/3,6/1,8/4,6/1,2/1,4/3,2/2,6/3,2/3,4/7,2/1,6/1}}
+ \framepuzzle
+\end{resuko}
+\end{center}
+\end{figure}
+\begin{lstlisting}
+\resukosetup{rows=8,columns=8,width=5.8cm,fontsize=Huge,
+ scale=.708}
+\begin{resuko}[width=7.4cm]
+ \resukocell{1}{7}{\Graveltrap}
+ \resukocell{4}{7}{\Graveltrap}
+ \resukocell{7}{3}{\Graveltrap}
+ \resukocell{6}{2}{\Cross}
+ \resukocell{8}{4}{\StraightV}
+ \resukocell{6}{7}{\StraightH}
+ \resukocell{3}{5}{\CurveBR}
+ \resukocell{5}{5}{\CurveTR}
+ \trackH{1/4/0,4/0/0,3/2/0,2/2/0,3/2/0,3/2/1,2/2/2,2/4/0}
+ \trackV{4/2/0,5/2/1,2/0/0,2/4/0,2/4/1,4/2/0,1/2/1,0/2/0}
+ \framepuzzle
+\end{resuko}
+\hspace{1.5cm}
+\begin{resuko}
+ \resukocell{1}{7}{\Graveltrap}
+ \resukocell{4}{7}{\Graveltrap}
+ \resukocell{7}{3}{\Graveltrap}
+ \parkinglot{2}{7}
+ \pitlane{2}{3}{H}
+ \track{\tikzpath{2}{4}{6,8,6,8,4,4,4,2,2,6}}
+ \track{\xtikzpath{2}{1}{6/4,8/3,6/1,8/4,6/1,2/1,4/3,2/2,6/3,
+ 2/3,4/7,2/1,6/1}}
+ \framepuzzle
+\end{resuko}
+\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}}{blue}{sets the color of the pitlane and parking lot.}
+ \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{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{figure}[htbp]
\begin{center}
\begin{schatzsuche}
\framepuzzle
@@ -1468,6 +1939,7 @@ It's a variant of Minesweeper, just with diamonds instead of mines. Draw a diamo
\setrow{1}{{},2}
\end{schatzsuche}
\end{center}
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{schatzsuche}
@@ -1508,6 +1980,7 @@ It's a variant of Minesweeper, just with diamonds instead of mines. Draw a diamo
\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}
+\begin{figure}[htbp]
\begin{center}
\begin{skyline}
\skylineB{3,{},3,1,{}}
@@ -1530,7 +2003,7 @@ There are skyscrapers located in each cell. Try to find out the height of the sk
\setrow{1}{3,1,2,5,4}
\end{skyline}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{skyline}
@@ -1558,6 +2031,7 @@ There are skyscrapers located in each cell. Try to find out the height of the sk
\paragraph{Variants}
\subparagraph{Skyline Sudoku}
+
\begin{center}
\begin{skyline}[sudoku,scale=.4]
\skylineB{4,5,2,5,2,1,2,4,3}
@@ -1629,6 +2103,7 @@ There are skyscrapers located in each cell. Try to find out the height of the sk
\end{lstlisting}
\subparagraph{Skyline Sudoku (N*N)}
+
\begin{center}
\begin{skyline}[rows=6,columns=6,scale=.58]
\skylineB{4,2,1,3,3,2}
@@ -1748,6 +2223,7 @@ There are skyscrapers located in each cell. Try to find out the height of the sk
\subsection{Slitherlink}
Draw a closed line into the grid. This line must be on the existing dashed lines, but do not have to go through all grid points. If numbers are present in the grid cells, they indicate how many sides of the cell are touched by the line. The line must not touch or cross itself.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{slitherlink}
\setbigcell{1}{1}{4}
@@ -1772,7 +2248,7 @@ Draw a closed line into the grid. This line must be on the existing dashed lines
\framearea{black}{\tikzpath{3}{1}{8,8,4,4,8,6,6,8,6,2,6,6,2,4,2,4,2,4}}
\end{slitherlink}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{slitherlink}
@@ -1820,6 +2296,7 @@ Draw a closed line into the grid. This line must be on the existing dashed lines
Enter exactly one star in each row, each column and each area of the grid. Cells with stars must not touch each other orthogonally or diagonally.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{starbattle}
\framepuzzle
@@ -1844,7 +2321,7 @@ Enter exactly one star in each row, each column and each area of the grid. Cells
\starbattlecell{5}{3}{\Star}
\end{starbattle}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{starbattle}
@@ -1853,8 +2330,8 @@ Enter exactly one star in each row, each column and each area of the grid. Cells
4,4}}
\framearea{black}{\tikzpath{1}{2}{8,8,6,2,2,4}}
\framearea{black}{\tikzpath{1}{4}{8,8,6,6,2,6,2,2,4,4,8,4}}
- \framearea{black}{\tikzpath{4}{2}{8,8,8,4,8,6,6,6,2,4,2,2,6,2,
- 4,4}}
+ \framearea{black}{\tikzpath{4}{2}{8,8,8,4,8,6,6,6,2,4,2,2,6,
+ 2,4,4}}
\framearea{black}{\tikzpath{5}{3}{8,8,6,2,2,4}}
\end{starbattle}
\hspace{1.5cm}
@@ -1864,8 +2341,8 @@ Enter exactly one star in each row, each column and each area of the grid. Cells
4,4}}
\framearea{black}{\tikzpath{1}{2}{8,8,6,2,2,4}}
\framearea{black}{\tikzpath{1}{4}{8,8,6,6,2,6,2,2,4,4,8,4}}
- \framearea{black}{\tikzpath{4}{2}{8,8,8,4,8,6,6,6,2,4,2,2,6,2,
- 4,4}}
+ \framearea{black}{\tikzpath{4}{2}{8,8,8,4,8,6,6,6,2,4,2,2,6,
+ 2,4,4}}
\framearea{black}{\tikzpath{5}{3}{8,8,6,2,2,4}}
\starbattlecell{1}{2}{\Star}
\starbattlecell{2}{4}{\Star}
@@ -1894,6 +2371,7 @@ Enter exactly one star in each row, each column and each area of the grid. Cells
\subsection{Stars and Arrows}
Enter a star in some empty cells of the grid. Each arrow points to at least one star and every star is referenced by at least one arrow. Arrows point to a whole row, column or diagonal, also through other stars and arrows. The numbers on the left and top of the grid indicate how many stars are located in the row or column.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{starsandarrows}
\framepuzzle
@@ -1916,7 +2394,7 @@ Enter a star in some empty cells of the grid. Each arrow points to at least one
\setrow{1}{\RightUp,{},\Star,\LeftUp,\Left}
\end{starsandarrows}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{starsandarrows}
@@ -1960,6 +2438,7 @@ Enter a star in some empty cells of the grid. Each arrow points to at least one
\subsection{Sudoku}
Well, it's Sudoku -- nothing to explain! Fill each row and column with numbers from 1 to 9.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{lpsudoku}
\setrow{9}{{},2,6,{},{},{},{},{},{}}
@@ -1985,7 +2464,7 @@ Well, it's Sudoku -- nothing to explain! Fill each row and column with numbers f
\setrow{1}{3,1,7,6,2,5,9,4,8}
\end{lpsudoku}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{lpsudoku}
@@ -2071,6 +2550,7 @@ After running \texttt{lpsmag} you will find a \texttt{lpsmag.tex} in your workin
Enter exactly one star and one dark cloud in each row and each column of the grid, so that the planets are illuminated as specified. The stars shine horizontally or vertically arbitrarily far, but not through a planet or a dark cloud.
\subsubsection{Example}
+\begin{figure}[htbp]
\begin{center}
\begin{sunandmoon}
\framepuzzle
@@ -2090,7 +2570,7 @@ Enter exactly one star and one dark cloud in each row and each column of the gri
\setrow{1}{\Star,{},\Cloud,\MoonT}
\end{sunandmoon}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{sunandmoon}
@@ -2131,6 +2611,7 @@ Enter exactly one star and one dark cloud in each row and each column of the gri
\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{figure}[htbp]
\begin{center}
\begin{tentsandtrees}
\framepuzzle
@@ -2152,6 +2633,7 @@ Draw tents in the grid. Next to each tree, a tent must be entered in a horizonta
\setrow{1}{\Tree,\Tent,{},\Tree,\Tent}
\end{tentsandtrees}
\end{center}
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{tentsandtrees}
@@ -2194,6 +2676,7 @@ Draw tents in the grid. Next to each tree, a tent must be entered in a horizonta
\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}
+\begin{figure}[htbp]
\begin{center}
\begin{tunnel}
\framepuzzle
@@ -2212,7 +2695,7 @@ Determine the course of the tube. Draw the only possible connection. from the be
\tube{\tikzpath{1}{1}{6,6,6,6,8,8,4,4,4,4,8,8,6,6,6,6}}
\end{tunnel}
\end{center}
-
+\end{figure}
\begin{lstlisting}
\begin{center}
\begin{tunnel}
@@ -2470,6 +2953,12 @@ With the command \cs{bridgessetup}\margcs{\cmd\bridgessetup\{\marg{options}\}} y
With the command \cs{chaossudokucell}\margcs{\cmd\chaossudokucell\{\marg{column}\}\\\{\marg{row}\}\{\marg{number}\}}, you can set the \marg{number} of the grid cell \marg{column} \marg{row}.
\subparagraph{\texttt{chaossudokusetup}}
With the command \cs{chaossudokusetup}\margcs{\cmd\chaossudokusetup\{\marg{options}\}} you can reset the options with global scope.
+\paragraph{Four Winds}
+\label{sec:pscfourwinds}
+\subparagraph{\texttt{fourwindscell}}
+The command \cs{fourwindscell}\margcs{\cmd\fourwindscell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}\{\marg{csv list}\}} sets the \marg{number} into grid cell \marg{column}\marg{row}. Furthermore, it draws lines specified in \marg{csv list} in the \texttt{direction/length} format.
+\subparagraph{\texttt{fourwindssetup}}
+With the command \cs{fourwindssetup}\margcs{\cmd\fourwindssetup\{\marg{options}\}} you can reset the options with global scope.
\paragraph{Hakyuu}
\label{sec:pschakyuu}
\subparagraph{\texttt{hakyuucell}}
@@ -2532,12 +3021,90 @@ The command \cs{laser}\margcs{\cmd\laser[\oarg{color}]\{\marg{Ti\textit{k}Z path
You should consider using this command in the \env{puzzlebackground} environment.
\subparagraph{\texttt{laserbeamsetup}}
With the command \cs{laserbeamsetup}\margcs{\cmd\laserbeamsetup\{\marg{options}\}} you can reset the options with global scope.
+\paragraph{Magic Labyrinth}
+\label{sec:pscmagiclabyrinth}
+\subparagraph{\texttt{magiclabyrinthcell}}
+The command \cs{magiclabyrinthcell}\margcs{\cmd\magiclabyrinthcell\\\{\marg{column}\}\{\marg{row}\}\{\marg{number}\}} sets a number into grid cell \marg{column} \marg{row}.
+\subparagraph{\texttt{mlline}}
+The command \cs{mlline}\margcs{\cmd\mlline\{\marg{Ti\textit{k}Z path}\}} draws a line given by \marg{Ti\textit{k}Z path}.
+\subparagraph{\texttt{magiclabyrinthsetup}}
+The \cs{magiclabyrinthsetup}\margcs{\cmd\magiclabyrinthsetup\{\marg{options}\}} command resets the options with global scope.
+\paragraph{Magnets}
+\label{sec:pscmagnets}
+\subparagraph{\texttt{plusH}}
+The command \cs{plusH}\margcs{\cmd\plusH\{\marg{csv list}\}} typesets the numbers above the grid indicating how many positive poles are in the respective column. It expects a comma-separated list as an argument.
+\subparagraph{\texttt{minusH}}
+The command \cs{minusH}\margcs{\cmd\minusH\{\marg{csv list}\}} typesets the numbers above the grid indicating how many negative poles are in the respective column.
+\subparagraph{\texttt{plusV}}
+The command \cs{plusV}\margcs{\cmd\plusV\{\marg{csv list}\}} typesets the numbers left to the grid indicating how many positive poles are in the respective row.
+\subparagraph{\texttt{minusV}}
+The command \cs{minusV}\margcs{\cmd\minusV\{\marg{csv list}\}} typesets the numbers left to the grid indicating how many negative pole ares in the respective row.
+\subparagraph{\texttt{magnetsH}}
+The command \cs{magnetsH}\margcs{\cmd\magnetsH\{\marg{csv list}\}} typesets non-magnetic horizontal plates by using the \texttt{column}/\texttt{row} format in \marg{csv list}.
+\subparagraph{\texttt{magnetsV}}
+The command \cs{magnetsV}\margcs{\cmd\magnetsV\{\marg{csv list}\}} typesets non-magnetic vertical plates by using the \texttt{column}/\texttt{row} format in \marg{csv list}.
+\subparagraph{\texttt{Magnetic plates}}
+The command \cs{PMH}\margcs{\cmd\PMH\{\marg{csv list}\}, \cmd\MPH\{\marg{csv list}\}, \cmd\PMV\{\marg{csv list}\}, \cmd\MPV\{\marg{csv list}\}} draws horizontal magnetic plates with \fbox{$+$ $-$} arrangement. It expects the \texttt{column}/\texttt{row} format in \marg{csv list}. You can typeset the three other magnetic arrangements by using the \cmd\MPH, \cmd\PMV\ and \cmd\MPV\ commands.
+\subparagraph{\texttt{magnetssetup}}
+With the command \cs{magnetssetup}\margcs{\cmd\magnetssetup\{\marg{options}\}} you can reset the options with global scope.
+\paragraph{Masyu}
+\label{sec:pscmasyu}
+\subparagraph{\texttt{masyucell}}
+The command \cs{masyucell}\margcs{\cmd\masyucell\\\{\marg{column}\}\{\marg{row}\}\{\marg{element}\}} sets an element into grid cell \marg{column} \marg{row}.
+\subparagraph{\texttt{MasyuW}}
+The command \cs{MasyuW}\margcs{\cmd\MasyuW} draws an empty (white) circle.
+\subparagraph{\texttt{MasyuB}}
+The command \cs{MasyuB}\margcs{\cmd\MasyuB} draws a black circle.
+\subparagraph{\texttt{masyuline}}
+The command \cs{masyuline}\margcs{\cmd\masyuline\{\marg{Ti\textit{k}Z path}\}} draws a line given by \marg{Ti\textit{k}Z path}.
+\subparagraph{\texttt{masyusetup}}
+The \cs{masyusetup}\margcs{\cmd\masyusetup\{\marg{options}\}} command resets the options with global scope.
\paragraph{Minesweeper}
\label{sec:pscminesweeper}
\subparagraph{\texttt{Mine}}
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{Number Link}
+\label{sec:pscnumberlink}
+\subparagraph{\texttt{numberlinkcell}}
+The command \cs{numberlinkcell}\margcs{\cmd\numberlinkcell\\\{\marg{column}\}\{\marg{row}\}\{\marg{element}\}} sets a number or letter into grid cell \marg{column} \marg{row}.
+\subparagraph{\texttt{link}}
+The command \cs{link}\margcs{\cmd\link\{\marg{Ti\textit{k}Z path}\}} draws a line given by \marg{Ti\textit{k}Z path}.
+\subparagraph{\texttt{numberlinksetup}}
+With the command \cs{numberlinksetup}\margcs{\cmd\numberlinksetup\{\marg{options}\}} you can reset the options with global scope.
+\paragraph{Resuko}
+\label{sec:pscresuko}
+\subparagraph{\texttt{resukocell}}
+The command \cs{resukocell}\margcs{\cmd\resukocell\\\{\marg{column}\}\{\marg{row}\}\{\marg{element}\}} sets the \marg{element} into grid cell \marg{column} \marg{row}.
+\subparagraph{\texttt{Track tiles}}
+You can use the following commands to draw different track tiles, e.g. with the \cmd\resukocell\ command:
+
+\begin{center}
+\begin{tabular}{rlrlrl}
+\raisebox{-7pt}{\Straight} & \cmd\Straight & \raisebox{-7pt}{\StraightH} & \cmd\StraightH & \raisebox{-7pt}{\StraightV} & \cmd\StraightV \\
+ & & & & & \\
+\raisebox{-7pt}{\Cross} & \cmd\Cross & \raisebox{-7pt}{\CrossH} & \cmd\CrossH & \raisebox{-7pt}{\CrossV} & \cmd\CrossV \\
+ & & & & & \\
+\raisebox{-7pt}{\CurveTL} & \cmd\CurveTL & \raisebox{-7pt}{\CurveTR} & \cmd\CurveTR & \raisebox{-7pt}{\CurveBL} & \cmd\CurveBL \\
+ & & & & & \\
+\raisebox{-7pt}{\CurveBR} & \cmd\CurveBR & \raisebox{-7pt}{\Graveltrap} & \cmd\Graveltrap & \\
+\end{tabular}
+\end{center}
+
+\subparagraph{\texttt{pitlane}}
+The command \cs{pitlane}\margcs{\cmd\pitlane\{\marg{column}\}\{\marg{row}\}\\\{\marg{direction}\}} draws the pit lane in grid cell \{\marg{column}\}\{\marg{row}\} with \{\marg{direction}\} V or H.
+\subparagraph{\texttt{parkinglot}}
+The command \cs{parkinglot}\margcs{\cmd\parkinglot\{\marg{column}\}\{\marg{row}\}} draws the parking lot in grid cell \{\marg{column}\}\{\marg{row}\}.
+\subparagraph{\texttt{trackH}}
+The command \cs{trackH}\margcs{\cmd\trackH\{\marg{csv list}\}} typesets the track tiles below the grid indicating how many different tiles are in the respective column. It expects a comma-separated list as an argument with the format \texttt{straights/curves/intersections}.
+\subparagraph{\texttt{trackV}}
+The command \cs{trackV}\margcs{\cmd\trackV\{\marg{csv list}\}} typesets the track tiles left to the grid.
+\subparagraph{\texttt{track}}
+The command \cs{track}\margcs{\cmd\track\{\marg{Ti\textit{k}Z path}\}} draws the race track given by \marg{Ti\textit{k}Z path}. The design of the race track is based on \href{http://tex.stackexchange.com/users/3708/frederic}{Frédéric}'s answer to this \href{http://tex.stackexchange.com/questions/115923/crossing-paths-in-tikz-without-intersection}{question} on \TeX.sx. The design with auto-generated bridges will only work, if the path is not constructed with an intersection point. It's recommended to start the path on a standard straight and define the path from corner to corner with \cmd\xtikzpath.
+
+\subparagraph{\texttt{resukosetup}}
+With the command \cs{resukosetup}\margcs{\cmd\resukosetup\{\marg{options}\}} you can reset the options with global scope.
\paragraph{Schatzsuche}
\label{sec:pscschatzsuche}
\subparagraph{\texttt{Diamond}}
@@ -2650,6 +3217,10 @@ With the command \cs{tunnelsetup}\margcs{\cmd\tunnelsetup\{\marg{options}\}} you
\label{sec:setcell}
With\margcs{\cmd\setcell\{\{\marg{column}\}\{\marg{row}\}\\\{\marg{element}\}} the \cmd\setcell\ command, you can set \marg{element} into cell \marg{column}\marg{row} as central node. It is aware of the current values of the surrounding environment options \envoption{rows}, \envoption{columns}, \envoption{scale} and \envoption{fontsize}. Furthermore, a check if \marg{element} is within the grid is applied.
+\subparagraph{\texttt{setcells}}
+\label{sec:setcells}
+With\margcs{\cmd\setcells\{\marg{csv list}\}\{\marg{element}\}} the \cmd\setcells\ command, you can set \marg{element} into several cells by using the \texttt{column}/\texttt{row} format in \marg{csv list}. It works for numbers, letters and most graphical objects, with the exception of commands like \cmd\KKR, which is not a graphic itself, but drawing something into the grid.
+
\subparagraph{\texttt{setbigcell}}
\label{sec:setbigcell}
The\margcs{\cmd\setbigcell[\oarg{fontsize}]\{\{\marg{column}\}\\\{\marg{row}\}\{\marg{element}\}} \cmd\setbigcell\ command sets \marg{element} into a big (\texttt{$2\times2$}) cell \marg{column}\marg{row} as central node. The optional argument \oarg{fontsize} is set to 'Huge' by default.
@@ -2730,6 +3301,15 @@ With\margcs{\cmd\tikzpath\{\marg{column}\}\{\marg{row}\}\\\{\marg{csv list}\}} t
This command will frame grid cell \texttt{(2,2)} green.
+\subparagraph{\texttt{xtikzpath}}
+\label{sec:xtikzpath}
+The\margcs{\cmd\xtikzpath\{\marg{column}\}\{\marg{row}\}\\\{\marg{csv list}\}} \cmd\xtikzpath\ command is an evolution of the \cmd\tikzpath\ command with slightly different input syntax. In the \marg{csv list} argument, it expects pairs in the form \texttt{direction/length}. Therefore, you can easily define paths from corner to corner.
+
+\begin{lstlisting}
+\framearea{green}{\xtikzpath{2}{2}{8/2,6/2,2/2,4/2}}
+\end{lstlisting}
+
+This command will frame an area defined by the grid cells \texttt{(2,2)} and \texttt{(3,3)} green.
\paragraph{Presentation}
\subparagraph{\texttt{titleformat}}
\label{sec:titleformat}
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}%