diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/CHANGES | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/INSTALL | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/README | 23 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf | bin | 388698 -> 430713 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex | 365 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty | 191 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty | 208 |
7 files changed, 774 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES index f7d7db3a565..6794413d455 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES +++ b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES @@ -1,3 +1,14 @@ +== Logicpuzzle bundel (v2.2) == + +16/05/2013 added bridges environment [jk] + \bridgesrow, \bridgescolumn and \bridge + +15/05/2013 added starbattle environment [jk] + +14/05/2013 added sunandmoon and starsandarrows environments [jk] + \Star, \Cloud, \Moon{{T,B},{R,L}} and arrows + \Right,...,\Left,...,\RightDown + == Logicpuzzle bundel (v2.1) == 07/05/2013 reduced package counters -> LP@rows, LP@columns [jk] diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/INSTALL b/Master/texmf-dist/doc/latex/logicpuzzle/INSTALL index d9afa74b812..4d7344f9caa 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/INSTALL +++ b/Master/texmf-dist/doc/latex/logicpuzzle/INSTALL @@ -11,5 +11,6 @@ installed in your local texmf/ tree as follows: -- *.sty -> localtexmf/tex/latex/logicpuzzle/ -- *.pdf -> localtexmf/doc/latex/logicpuzzle/ -- *.tex -> localtexmf/doc/latex/logicpuzzle/ +-- scripts -> localtexmf/scripts/logicpuzzle/ Don't forget to update your FNDB (Filename database). (see: manual)
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/README b/Master/texmf-dist/doc/latex/logicpuzzle/README index 3873439b30b..bc1c0ea316d 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/README +++ b/Master/texmf-dist/doc/latex/logicpuzzle/README @@ -4,6 +4,7 @@ puzzles. At the moment the following puzzles are supported: * 2D-Sudoku (aka Magiequadrat, Diagon, ...) * Battleship (aka Bimaru, Marinespiel, Batalla Naval, ...) * Bokkusu (aka Kakurasu, Feldersummenrätsel, ...) +* Bridges (aka Brückenbau, Hashi, ...) * Chaos Sudoku * Hakyuu (aka Seismic, Ripple Effect, ...) * Hitori @@ -19,20 +20,26 @@ puzzles. At the moment the following puzzles are supported: 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, ...) + Loop the Loop, Rundweg, Gartenzaun, ...) +* Star Battle (aka Sternenschlacht, ...) +* Stars and Arrows (aka Sternenhimmel, ...) * Sudoku +* Sun and Moon (aka Sternenhaufen, Munraito, ...) * Tents and Trees (aka Zeltlager, Zeltplatz, Camping, ...) * Tunnel License: LPPL -Changes in v2.1: +Changes in v2.2: -- added support for Kakuro puzzle - https://bitbucket.org/kleberj/logicpuzzle/wiki/Minesweeper +- added support for Bridges puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/Bridges -- added support for Schatzsuche puzzle - https://bitbucket.org/kleberj/logicpuzzle/wiki/Schatzsuche +- added support for Sun and Moon puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/SunAndMoon + +- added support for Star Battle puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/StarBattle -- added support for Tents and Trees puzzle - https://bitbucket.org/kleberj/logicpuzzle/wiki/TentsAndTrees +- added support for Stars and Arrows puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/StarsAndArrows
\ 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 Binary files differindex 8e8818ff848..c59f92ebf57 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf +++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex index 2adf999008b..22ac85d0e93 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex +++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle.tex @@ -41,12 +41,12 @@ \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, -minipage, tikzpicture, puzzlebackground, puzzleforeground, center, pgfonlayer, left, +emph={ddsudoku, battleship, bokkusu, chaossudoku, hakyuu, hitori, kakuro, kendoku, killersudoku, laserbeam, skyline, slitherlink, lpsudoku, minesweeper, schatzsuche, tentsandtrees, tunnel, bridges, starsandarrows, starbattle, sunandmoon, +,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, LightYellow, green, sudoku, rows, columns, scale, layer, color, bgcolor, counterstyle, title, -titleindent, titlewidth, cvoffset, width}, +titleindent, titlewidth, cvoffset, width, grid}, emphstyle={[2]\color{OliveDrab}}, morekeywords={LP@definecolor, LP@define@choicekey@fontsize, ExecuteOptionsX, ProcessOptionsX, LP@init@counter, valueH, valueV, sumH, sumV, LP@bottomrow, LP@toprow, LP@rightcolumn, bokkususetup, setkeys, LP@set@package, LP@set@env@prefix, @@ -58,7 +58,9 @@ marginnote, tikz, node, placesegment, placeship, shipH, shipV, shipbox, puzzleco fillrow, setcolorrow, laserV, laserH, mirrorV, mirrorH, placearrow, placecross, placemirror, laser, skylineT, skylineB, skylineR, skylineL, skylinecell, setbigcell, slitherlinkcell, tunnelH, tunnelV, tube, portal, Mine, Diamond, ShipR, kakurosetup, kakurorow, KKR, Black, -Tent, Tree, definecolor, tentH, tentV, [, ]}} +Tent, Tree, definecolor, tentH, tentV, bridgesrow, starbattlecell, starsH, starsV, [, ], +RightDown, Right, LeftDown, LeftUp, Up, RightUp, Left, Star, Cloud, Moon, MoonTL, MoonR, +MoonT, colorlet, bridge}} \makeatletter \renewcommand{\maketitle}% {% @@ -375,7 +377,19 @@ Tent, Tree, definecolor, tentH, tentV, [, ]}} year = {2013}, } +@misc{bib:ex:sunandmoon, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-sunandmoon.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-sunandmoon.pdf)}, + title = {{Examples \& Solutions (sunandmoon)}}, + year = {2013}, + } +@misc{bib:ex:bridges, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-bridges.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-bridges.pdf)}, + title = {{Examples \& Solutions (bridges)}}, + year = {2013}, + } \end{filecontents} \bibliographystyle{plain} \ddsudokusetup{width=4.5cm,scale=0.85} @@ -395,10 +409,14 @@ Tent, Tree, definecolor, tentH, tentV, [, ]}} \lpsudokusetup{width=4.5cm,scale=0.49,fontsize=small} \tentsandtreessetup{width=4.5cm,scale=0.75} \tunnelsetup{width=4.5cm,scale=0.75} +\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} \title{\filename}% \Subtitle{A style file for typesetting logic puzzles}% \author{Josef Kleber} -\Fileversion{v2.1} +\Fileversion{v2.2} \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{% @@ -634,6 +652,84 @@ Black out some of the grid cells. The numbers on the left and the bottom edge of \optitem{\envoption{cvoffset}}{-38pt}{sets the vertical offset of the counters in the margin.} \end{optionlist} +\subsection{Bridges} +Connect all the islands (circles) located in the grid by bridges. The bridges may only be routed horizontally and vertically. Islands may be connected by a maximum of two bridges. The bridges must neither overlap nor cross. They may also not be built over islands. The numbers in the islands indicate how many bridges originate from this island. All islands must be fully connected. + +\subsubsection{Example} +\colorlet{LP@c@bridge}{Teal} +\begin{center} + \begin{bridges} + \framepuzzle + \bridgesrow{8}{{},4,{},{},{},5,{},2} + \bridgesrow{7}{{},{},1} + \bridgesrow{5}{{},{},3,{},4} + \bridgesrow{4}{{},3,{},1,{},2} + \bridgesrow{3}{{},{},{},{},{},{},{}} + \bridgesrow{2}{{},2,{},{},5,{},{},2} + \end{bridges} + \hspace{1.5cm} + \begin{bridges}[grid=none] + \framepuzzle + \bridgesrow{8}{{},4,{},{},{},5,{},2} + \bridgesrow{7}{{},{},1} + \bridgesrow{5}{{},{},3,{},4} + \bridgesrow{4}{{},3,{},1,{},2} + \bridgesrow{3}{{},{},{},{},{},{},{}} + \bridgesrow{2}{{},2,{},{},5,{},{},2} + \bridge[double]{\tikzpath{2}{4}{8,8,8,8,6,6,6,6,2,2,2,2}} + \bridge[double]{\tikzpath{2}{2}{6,6,6,8,8,8,4,4}} + \bridge{\tikzpath{2}{4}{6,6}} + \bridge{\tikzpath{3}{5}{8,8}} + \bridge{\tikzpath{5}{2}{6,6,6,8,8,8,8,8,8,4,4}} + \end{bridges} +\end{center} + +\begin{lstlisting} +\colorlet{LP@c@bridge}{Teal} +\begin{center} + \begin{bridges} + \framepuzzle + \bridgesrow{8}{{},4,{},{},{},5,{},2} + \bridgesrow{7}{{},{},1} + \bridgesrow{5}{{},{},3,{},4} + \bridgesrow{4}{{},3,{},1,{},2} + \bridgesrow{3}{{},{},{},{},{},{},{}} + \bridgesrow{2}{{},2,{},{},5,{},{},2} + \end{bridges} + \hspace{1.5cm} + \begin{bridges}[grid=none] + \framepuzzle + \bridgesrow{8}{{},4,{},{},{},5,{},2} + \bridgesrow{7}{{},{},1} + \bridgesrow{5}{{},{},3,{},4} + \bridgesrow{4}{{},3,{},1,{},2} + \bridgesrow{3}{{},{},{},{},{},{},{}} + \bridgesrow{2}{{},2,{},{},5,{},{},2} + \bridge[double]{\tikzpath{2}{4}{8,8,8,8,6,6,6,6,2,2,2,2}} + \bridge[double]{\tikzpath{2}{2}{6,6,6,8,8,8,4,4}} + \bridge{\tikzpath{2}{4}{6,6}} + \bridge{\tikzpath{3}{5}{8,8}} + \bridge{\tikzpath{5}{2}{6,6,6,8,8,8,8,8,8,4,4}} + \end{bridges} +\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}}{6.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{title}}{}{sets the title of a puzzle.} + \optitem{\envoption{titleindent}}{0cm}{defines the indent of the title.} + \optitem{\envoption{titlewidth}}{6.1cm}{specifies the width of the box the title is set in.} + \optitem{\envoption{color}}{green}{specifies the color for coloring the islands.} + \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{grid}}{dashed}{sets the style of the grid. Possible values: \underline{\texttt{dashed}}, \texttt{none}, \texttt{solid}} +\end{optionlist} + \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} @@ -1720,6 +1816,147 @@ Draw a closed line into the grid. This line must be on the existing dashed lines \optitem{\envoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} \end{optionlist} +\subsection{Star Battle} +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{center} + \begin{starbattle} + \framepuzzle + \framearea{black}{\tikzpath{1}{1}{8,6,8,6,6,2,6,6,2,4,4,4,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{5}{3}{8,8,6,2,2,4}} + \end{starbattle} + \hspace{1.5cm} + \begin{starbattle} + \framepuzzle + \framearea{black}{\tikzpath{1}{1}{8,6,8,6,6,2,6,6,2,4,4,4,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{5}{3}{8,8,6,2,2,4}} + \starbattlecell{1}{2}{\Star} + \starbattlecell{2}{4}{\Star} + \starbattlecell{3}{1}{\Star} + \starbattlecell{4}{5}{\Star} + \starbattlecell{5}{3}{\Star} + \end{starbattle} +\end{center} + +\begin{lstlisting} +\begin{center} + \begin{starbattle} + \framepuzzle + \framearea{black}{\tikzpath{1}{1}{8,6,8,6,6,2,6,6,2,4,4,4, + 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{5}{3}{8,8,6,2,2,4}} + \end{starbattle} + \hspace{1.5cm} + \begin{starbattle} + \framepuzzle + \framearea{black}{\tikzpath{1}{1}{8,6,8,6,6,2,6,6,2,4,4,4, + 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{5}{3}{8,8,6,2,2,4}} + \starbattlecell{1}{2}{\Star} + \starbattlecell{2}{4}{\Star} + \starbattlecell{3}{1}{\Star} + \starbattlecell{4}{5}{\Star} + \starbattlecell{5}{3}{\Star} + \end{starbattle} +\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{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{center} + \begin{starsandarrows} + \framepuzzle + \starsH{1,2,3,2,0} + \starsV{1,0,3,2,2} + \setrow{5}{\RightDown,{},\LeftDown} + \setrow{4}{{},\Right,{},{},\LeftUp} + \setrow{2}{{},\Up,{},{},{}} + \setrow{1}{\RightUp,{},{},\LeftUp,\Left} + \end{starsandarrows} + \hspace{1.5cm} + \begin{starsandarrows} + \framepuzzle + \starsH{1,2,3,2,0} + \starsV{1,0,3,2,2} + \setrow{5}{\RightDown,\Star,\LeftDown,\Star} + \setrow{4}{{},\Right,\Star,\Star,\LeftUp} + \setrow{3}{\Star,\Star,\Star} + \setrow{2}{{},\Up,{},{},{}} + \setrow{1}{\RightUp,{},\Star,\LeftUp,\Left} + \end{starsandarrows} +\end{center} + +\begin{lstlisting} +\begin{center} + \begin{starsandarrows} + \framepuzzle + \starsH{1,2,3,2,0} + \starsV{1,0,3,2,2} + \setrow{5}{\RightDown,{},\LeftDown} + \setrow{4}{{},\Right,{},{},\LeftUp} + \setrow{2}{{},\Up,{},{},{}} + \setrow{1}{\RightUp,{},{},\LeftUp,\Left} + \end{starsandarrows} + \hspace{1.5cm} + \begin{starsandarrows} + \framepuzzle + \starsH{1,2,3,2,0} + \starsV{1,0,3,2,2} + \setrow{5}{\RightDown,\Star,\LeftDown,\Star} + \setrow{4}{{},\Right,\Star,\Star,\LeftUp} + \setrow{3}{\Star,\Star,\Star} + \setrow{2}{{},\Up,{},{},{}} + \setrow{1}{\RightUp,{},\Star,\LeftUp,\Left} + \end{starsandarrows} +\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{Sudoku} Well, it's Sudoku -- nothing to explain! Fill each row and column with numbers from 1 to 9. \subsubsection{Example} @@ -1830,6 +2067,67 @@ 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{Sun and Moon} +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{center} + \begin{sunandmoon} + \framepuzzle + \setrow{5}{{},{},{},{},\Moon} + \setrow{4}{{},{},\MoonTL} + \setrow{3}{\Moon} + \setrow{2}{{},\MoonR} + \setrow{1}{{},{},{},\MoonT} + \end{sunandmoon} + \hspace{1.5cm} + \begin{sunandmoon} + \framepuzzle + \setrow{5}{{},{},\Star,\Cloud,\Moon} + \setrow{4}{{},\Star,\MoonTL,{},\Cloud} + \setrow{3}{\Moon,\Cloud,{},{},\Star} + \setrow{2}{\Cloud,\MoonR,{},\Star} + \setrow{1}{\Star,{},\Cloud,\MoonT} + \end{sunandmoon} +\end{center} + +\begin{lstlisting} +\begin{center} + \begin{sunandmoon} + \framepuzzle + \setrow{5}{{},{},{},{},\Moon} + \setrow{4}{{},{},\MoonTL} + \setrow{3}{\Moon} + \setrow{2}{{},\MoonR} + \setrow{1}{{},{},{},\MoonT} + \end{sunandmoon} + \hspace{1.5cm} + \begin{sunandmoon} + \framepuzzle + \setrow{5}{{},{},\Star,\Cloud,\Moon} + \setrow{4}{{},\Star,\MoonTL,{},\Cloud} + \setrow{3}{\Moon,\Cloud,{},{},\Star} + \setrow{2}{\Cloud,\MoonR,{},\Star} + \setrow{1}{\Star,{},\Cloud,\MoonT} + \end{sunandmoon} +\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{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} @@ -2154,6 +2452,18 @@ The command \cs{sumH}\margcs{\cmd\sumH\{\marg{csv list}\}} typesets the numbers The command \cs{sumV}\margcs{\cmd\sumV\{\marg{csv list}\}} typesets the numbers above the grid specifying the sums of the values of the colored cells. It expects a comma separated list. \subparagraph{\texttt{bokkususetup}} With the command \cs{bokkususetup}\margcs{\cmd\bokkususetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Bridges} +\label{sec:pscbridges} +\subparagraph{\texttt{bridgesrow}} +\label{sec:pscbridgesrow} +With\margcs{\cmd\bridgesrow\{\marg{row}\}\{\marg{csv list}\}} the \cmd\bridgesrow\ command, you can set the contents of a bridges \marg{row}. These are the numbers indicating how many bridges originate from this specific island. +\subparagraph{\texttt{bridgescolumn}} +\label{sec:pscbridgescolumn} +With\margcs{\cmd\bridgescolumn\{\marg{column}\}\{\marg{csv list}\}} the \cmd\bridgescolumn\ command, you can set the contents of a bridges \marg{column}. +\subparagraph{\texttt{bridge}} +With\margcs{\cmd\bridge\{\oarg{optional arguments}\}\\\{\marg{Ti\textit{k}Z path}} the \cmd\bridge\ command, you can draw the bridges between islands. With the optional argument \oarg{double} you can draw a double bridge. Furthermore, you can set the color of the bridge with the option \oarg{color}. +\subparagraph{\texttt{bridgessetup}} +With the command \cs{bridgessetup}\margcs{\cmd\bridgessetup\{\marg{options}\}} you can reset the options with global scope. \paragraph{Chaos Sudoku} \label{sec:pscchaossudoku} \subparagraph{\texttt{chaossudokucell}} @@ -2254,12 +2564,57 @@ With the command \cs{skylinesetup}\margcs{\cmd\skylinesetup\{\marg{options}\}} y The command \cs{slitherlinkcell}\margcs{\cmd\slitherlinkcell\\\{\marg{column}\}\{\marg{row}\}\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column} \marg{row}. \subparagraph{\texttt{slitherlinksetup}} With the command \cs{slitherlinksetup}\margcs{\cmd\slitherlinksetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Star Battle} +\label{sec:pscstarbattle} +\subparagraph{\texttt{starbattlecell}} +With the \cs{starbattlecell}\margcs{\cmd\starbattlecell\{\marg{column}\}\{\marg{row}\}\\\{\marg{element}\}} command, you can set an \marg{element} in the grid cell \marg{column}\marg{row}, e.g. the \cmd\Star\ command. +\subparagraph{\texttt{starbattlesetup}} +With the command \cs{starbattlesetup}\margcs{\cmd\starbattlesetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Stars and Arrows} +\label{sec:pscstarsandarrows} +\subparagraph{\texttt{starsH}} +The command \cs{starsH}\margcs{\cmd\starsH\{\marg{csv list}\}} typesets the numbers above the grid indicating how many stars are in the respective column. It expects a comma-separated list as an argument. +\subparagraph{\texttt{starsV}} +The command \cs{starsV}\margcs{\cmd\starsV\{\marg{csv list}\}} typesets the numbers left to the grid. +\subparagraph{\texttt{Star}} +The command \cs{Star}\margcs{\cmd\Star} draws a star. It can be used in commands like \cmd\setcell\ [see: \ref{sec:setcell}] or \cmd\setrow\ [see: \ref{sec:setrow}]! +\subparagraph{Arrows} +You can use the following commands to draw different arrows: + +\begin{center} +\begin{tabular}{lrlrlrlr} +\cmd\Right & \raisebox{3pt}{\Right} & \cmd\RightUp & \raisebox{-4pt}{\RightUp} & \cmd\Up & \raisebox{-7pt}{\Up} & \cmd\LeftUp & \raisebox{-4pt}{\LeftUp} \\ +\cmd\Left & \raisebox{3pt}{\Left} & \cmd\LeftDown & \raisebox{-4pt}{\LeftDown} & \cmd\Down & \raisebox{-7pt}{\Down} & \cmd\RightDown & \raisebox{-4pt}{\RightDown} \\ +\end{tabular} +\end{center} +\subparagraph{\texttt{starsandarrowssetup}} +The command \margcs{\cmd\starsandarrowssetup\{\marg{options}\}}\cs{starsandarrowssetup} resets the options with global scope. \paragraph{Sudoku} \label{sec:psclpsudoku} \subparagraph{\texttt{lpsudokucell}} 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{Sun and Moon} +\label{sec:pscsunandmoon} +\subparagraph{\texttt{Star}} +The command \cs{Star}\margcs{\cmd\Star} draws a star. It can be used in commands like \cmd\setcell\ [see: \ref{sec:setcell}] or \cmd\setrow\ [see: \ref{sec:setrow}]! +\subparagraph{\texttt{Cloud}} +The command \cs{Cloud}\margcs{\cmd\Cloud} draws a dark cloud. It can be used in commands like \cmd\setcell\ [see: \ref{sec:setcell}] or \cmd\setrow\ [see: \ref{sec:setrow}]! +\subparagraph{Howl at the Moon} +You can use the following commands to draw different iluminated moons: + +\begin{center} +\begin{tabular}{lrlrlr} +\cmd\Moon & \raisebox{-4pt}{\Moon} & \cmd\MoonT & \raisebox{-4pt}{\MoonT} & \cmd\MoonB & \raisebox{-4pt}{\MoonB} \\ + & & & & & \\ +\cmd\MoonR & \raisebox{-4pt}{\MoonR} & \cmd\MoonL & \raisebox{-4pt}{\MoonL} & \cmd\MoonTR & \raisebox{-4pt}{\MoonTR} \\ + & & & & & \\ +\cmd\MoonTL & \raisebox{-4pt}{\MoonTL} & \cmd\MoonBR & \raisebox{-4pt}{\MoonBR} & \cmd\MoonBL & \raisebox{-4pt}{\MoonBL} \\ +\end{tabular} +\end{center} +\subparagraph{\texttt{sunandmoonssetup}} +With the command \cs{sunandmoonssetup}\margcs{\cmd\sunandmoonssetup\{\marg{options}\}} you can reset the options with global scope. \paragraph{Tents and Trees} \label{sec:psctentsandtrees} \subparagraph{\texttt{tentH}} diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty index d16df95b6c8..e2800f154dd 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty @@ -19,7 +19,7 @@ %% %% This work consists of all files listed in manifest.txt. %% -\ProvidesPackage{logicpuzzle}[2013/05/10 logicpuzzle.sty v2.1 - Josef Kleber (C) 2013]% +\ProvidesPackage{logicpuzzle}[2013/05/17 logicpuzzle.sty v2.2 - Josef Kleber (C) 2013]% % \RequirePackage{xkeyval}% \RequirePackage{ifthen}% @@ -27,7 +27,7 @@ \RequirePackage{etoolbox}% \RequirePackage{marginnote}% \RequirePackage{tikz}% -\usetikzlibrary{decorations.pathmorphing,calc}% +\usetikzlibrary{decorations.pathmorphing,calc,shapes.geometric}% \pgfdeclarelayer{LPdump}% \pgfdeclarelayer{LPbgcolor}% \pgfdeclarelayer{LPbackgroundtwo}% @@ -65,6 +65,7 @@ \def\LP@normallines{0.5pt}% \def\LP@thicklines{1.5pt}% \def\LP@grid@linestyle{}% +\def\LP@draw@opacity{1}% \def\LP@rel@tikzpath{}% % \newcommand*\LP@Pfive{.5}% @@ -168,6 +169,7 @@ \definecolor{LP@c@tunnel}{rgb}{.7,.7,.7}% \definecolor{LP@c@tunnel@i}{rgb}{.8,.8,.8}% \definecolor{LP@c@tunnel@ii}{rgb}{.5,.5,.5}% +\LP@definecolor{LP@c@bridge}{1,0,0}% % % drawing grids % @@ -182,7 +184,7 @@ \setcounter{LP@countii}{#4}% max row \stepcounter{LP@counti}% \stepcounter{LP@countii}% - \draw[step=#5,line width=\LP@normallines,\LP@grid@linestyle] (#1,#2) grid (\value{LP@counti},\value{LP@countii});% + \draw[step=#5,line width=\LP@normallines,\LP@grid@linestyle,draw opacity=\LP@draw@opacity] (#1,#2) grid (\value{LP@counti},\value{LP@countii});% }% % \newcommand*\LP@drawgriddots% @@ -201,14 +203,14 @@ }% \newcommand*\LP@drawsudokugrid% {% - \draw[line width=\LP@thicklines] (1,1) -- (1,10);% - \draw[line width=\LP@thicklines] (4,1) -- (4,10);% - \draw[line width=\LP@thicklines] (7,1) -- (7,10);% - \draw[line width=\LP@thicklines] (10,1) -- (10,10);% - \draw[line width=\LP@thicklines] (1,1) -- (10,1);% - \draw[line width=\LP@thicklines] (1,4) -- (10,4);% - \draw[line width=\LP@thicklines] (1,7) -- (10,7);% - \draw[line width=\LP@thicklines] (1,10) -- (10,10);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,1) -- (1,10);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (4,1) -- (4,10);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (7,1) -- (7,10);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (10,1) -- (10,10);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,1) -- (10,1);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,4) -- (10,4);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,7) -- (10,7);% + \draw[line width=\LP@thicklines,draw opacity=\LP@draw@opacity] (1,10) -- (10,10);% }% % % drawing grid background @@ -509,6 +511,42 @@ };% }% % +\newcommand*\bridgesrow[2]% +{% + \setcounter{LP@counti}{1}% + \setcounter{LP@countii}{#1}% + \LP@set@LP@fontsize{\LP@env@prefix}% + \LP@set@LP@color{\LP@env@prefix}% + \foreach \LP@element in {#2}% + {% + \ifthenelse{\equal{\LP@element}{}}% + {}% + {% + \draw[fill=\LP@color] (\arabic{LP@counti},\arabic{LP@countii}) circle (0.5cm);% + \node[scale=\LP@scale,font=\LP@fontsize] at (\arabic{LP@counti},\arabic{LP@countii}){\LP@element};% + }% + \stepcounter{LP@counti}% + };% +}% +% +\newcommand*\bridgescolumn[2]% +{% + \setcounter{LP@counti}{#1}% + \setcounter{LP@countii}{1}% + \LP@set@LP@fontsize{\LP@env@prefix}% + \LP@set@LP@color{\LP@env@prefix}% + \foreach \LP@element in {#2}% + {% + \ifthenelse{\equal{\LP@element}{}}% + {}% + {% + \draw[fill=\LP@color] (\arabic{LP@counti},\arabic{LP@countii}) circle (0.5cm);% + \node[scale=\LP@scale,font=\LP@fontsize] at (\arabic{LP@counti},\arabic{LP@countii}){\LP@element};% + }% + \stepcounter{LP@countii}% + };% +}% +% \newcommand*\fillcell[2]% {% \LP@set@LP@scale{\LP@env@prefix}% @@ -914,6 +952,137 @@ % \let\Diamond\LP@Diamond% % +\newcommand*\LP@Star% +{% + \tikz\node[shape=star,fill=yellow,draw,scale=.8*\LP@scale,star point height=.25cm] {};% +}% +% +\let\Star\LP@Star% +% +\newcommand*\LP@ArrowA[2][red]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \pgfmathsetmacro{\LPlinewidth}{3pt*\LP@scale}% + \tikz\draw[->,line width=\LPlinewidth,rotate=#2,scale=\LP@scale,color=#1] (0.1,.5) -- (0.9,.5);% +}% +% +\newcommand*\LP@c@stararrow{red}% +\newcommand*\Right{\LP@ArrowA[\LP@c@stararrow]{0}}% +\newcommand*\RightUp{\LP@ArrowA[\LP@c@stararrow]{45}}% +\newcommand*\Up{\LP@ArrowA[\LP@c@stararrow]{90}}% +\newcommand*\LeftUp{\LP@ArrowA[\LP@c@stararrow]{135}}% +\newcommand*\Left{\LP@ArrowA[\LP@c@stararrow]{180}}% +\newcommand*\LeftDown{\LP@ArrowA[\LP@c@stararrow]{225}}% +\newcommand*\Down{\LP@ArrowA[\LP@c@stararrow]{270}}% +\newcommand*\RightDown{\LP@ArrowA[\LP@c@stararrow]{315}}% +% +\newcommand*\LP@DarkCloud{\tikz[scale=0.7*\LP@scale]\fill[color=black!60] (0,0) rectangle (1,1);}% +% +\newcommand*\LP@Moon{\tikz[scale=0.7*\LP@scale]\fill[color=black!60] (0,0) circle (0.5cm);}% +% +\newcommand*\LP@MoonR% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=black!60] (0.5,0.5) circle (0.5cm);% + \fill[color=yellow] (.5,0) arc (270:450:.5);% + \end{tikzpicture}% +}% +% +\newcommand*\LP@MoonL% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=black!60] (0.5,0.5) circle (0.5cm);% + \fill[color=yellow] (.5,0) arc (270:90:.5);% + \end{tikzpicture}% +}% +% +\newcommand*\LP@MoonT% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=black!60] (0.5,0.5) circle (0.5cm);% + \fill[color=yellow] (0,0.5) arc (180:0:.5);% + \end{tikzpicture}% +}% +% +\newcommand*\LP@MoonB% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=black!60] (0.5,0.5) circle (0.5cm);% + \fill[color=yellow] (0,0.5) arc (180:360:.5);% + \end{tikzpicture}% +}% +% +\newcommand*\LP@MoonTL% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=yellow] (0.5,0.5) circle (0.5cm);% + \fill[color=black!60] (1,.5) -- (.5,.5) -- (.5,0) arc (270:360:.5);% + \end{tikzpicture}% +}% +% +\newcommand*\LP@MoonBL% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=yellow] (0.5,0.5) circle (0.5cm);% + \fill[color=black!60] (1,.5) -- (.5,.5) -- (.5,1) arc (90:0:.5);% + \end{tikzpicture}% +}% +% +\newcommand*\LP@MoonBR% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=yellow] (0.5,0.5) circle (0.5cm);% + \fill[color=black!60] (0,.5) -- (.5,.5) -- (.5,1) arc (90:180:.5);% + \end{tikzpicture}% +}% +% +\newcommand*\LP@MoonTR% +{% + \begin{tikzpicture}[scale=0.7*\LP@scale]% + \fill[color=yellow] (0.5,0.5) circle (0.5cm);% + \fill[color=black!60] (0,.5) -- (.5,.5) -- (.5,0) arc (270:180:.5);% + \end{tikzpicture}% +}% +% +\let\Cloud\LP@DarkCloud% +\let\Moon\LP@Moon% +\let\MoonR\LP@MoonR% +\let\MoonL\LP@MoonL% +\let\MoonT\LP@MoonT% +\let\MoonB\LP@MoonB% +\let\MoonTL\LP@MoonTL% +\let\MoonBL\LP@MoonBL% +\let\MoonBR\LP@MoonBR% +\let\MoonTR\LP@MoonTR% +% +\define@key{LP@Line}{double}[double]% +{% + \def\LP@Line@double{double}% +}% +% +\define@key{LP@Line}{color}[LP@c@bridge]% +{% + \def\LP@Line@linecolor{#1}% +}% +% +\newcommand*\LP@Line[2][]% +{% + \def\LP@Line@double{}% + \def\LP@Line@linecolor{LP@c@bridge}% + \setkeys{LP@Line}{#1}% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{pgfonlayer}{LPbackgroundtwo}% + \ifthenelse{\equal{\LP@Line@double}{double}}% + {\draw[double,double distance=.1cm*\LP@scale,color=\LP@Line@linecolor, line width=.1cm*\LP@scale] #2;}% + {\draw[color=\LP@Line@linecolor, line width=.1cm*\LP@scale] #2;}% + \end{pgfonlayer}% +}% +% +\newcommand*\bridge[2][]% +{% + \LP@Line[#1]{#2}% +}% +% % get package options with prefix % \newcommand*\LP@set@LP@scale[1]% diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty b/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty index 24bc8cfa2bd..d485026b6a5 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty @@ -20,7 +20,7 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{lpenv}[2013/05/10 lpenv.sty v2.1 - Josef Kleber (C) 2013]% +\ProvidesPackage{lpenv}[2013/05/17 lpenv.sty v2.2 - Josef Kleber (C) 2013]% % % battleship environment and options % @@ -283,6 +283,67 @@ \end{minipage}% }% % +% bridges environment and options +% +\newcommand*\LP@BG@init@prefix{LP@BG}% +\newcommand*\LP@BG@init@package{bridges}% +% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{rows}{5}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{columns}{5}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{scale}{1}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{counterstyle}{none}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{grid}{dashed}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{bgcolor}{}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{color}{green}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{width}{6.1cm}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{title}{}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@BG@init@prefix}{\LP@BG@init@package}{titlewidth}{6.1cm}% +\LP@define@choicekey@fontsize{\LP@BG@init@prefix}{\LP@BG@init@package}{Large}% +% +\let\bridgescell\setcell% +% +\newcommand*\bridgessetup[1]% +{% + \setkeys{bridges.sty}{#1}% +}% +% +\newenvironment{bridges}[1][]% +{% + \setkeys{bridges}{#1}% + \LP@set@package{bridges}% + \LP@set@env@prefix{LP@BG}% + \setcounter{LP@rows}{\LP@BG@rows}% + \setcounter{LP@columns}{\LP@BG@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% + \begin{minipage}[t]{\LP@BG@width}% + \ifthenelse{\equal{\LP@BG@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@BG@titleindent}\parbox{\LP@BG@titlewidth}{\strut\LP@titleformat\LP@BG@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@BG@scale]% + \LP@drawbackground{1}{1}{\LP@BG@columns}{\LP@BG@rows}{\LP@BG@bgcolor}% + \ifthenelse{\equal{\LP@BG@grid}{none}}% + {}% + {% + \ifthenelse{\equal{\LP@BG@grid}{dashed}}% + {% + \setgridlinestyle{dashed}% + \LP@drawgrid{1}{1}{\LP@BG@columns}{\LP@BG@rows}{1cm}% + }% + {% + \LP@drawgrid{1}{1}{\LP@BG@columns}{\LP@BG@rows}{1cm}% + }% + }% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@BG@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% % chaossudoku environment and options % \newcommand*\LP@CS@init@prefix{LP@CS}% @@ -977,6 +1038,151 @@ \end{minipage}% }% % +% starbattle environment and options +% +\newcommand*\LP@SB@init@prefix{LP@SB}% +\newcommand*\LP@SB@init@package{starbattle}% +% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{rows}{5}% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{columns}{5}% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{scale}{1}% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{counterstyle}{none}% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{bgcolor}{}% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{width}{5.1cm}% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{title}{}% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@SB@init@prefix}{\LP@SB@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@SB@init@prefix}{\LP@SB@init@package}{Large}% +% +\let\starbattlecell\setcell% +% +\newcommand*\starbattlesetup[1]% +{% + \setkeys{starbattle.sty}{#1}% +}% +% +\newenvironment{starbattle}[1][]% +{% + \setkeys{starbattle}{#1}% + \LP@set@package{starbattle}% + \LP@set@env@prefix{LP@SB}% + \setcounter{LP@rows}{\LP@SB@rows}% + \setcounter{LP@columns}{\LP@SB@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% + \begin{minipage}[t]{\LP@SB@width}% + \ifthenelse{\equal{\LP@SB@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@SB@titleindent}\parbox{\LP@SB@titlewidth}{\strut\LP@titleformat\LP@SB@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@SB@scale]% + \LP@drawbackground{1}{1}{\LP@SB@columns}{\LP@SB@rows}{\LP@SB@bgcolor}% + \LP@drawgrid{1}{1}{\LP@SB@columns}{\LP@SB@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@SB@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% starsandarrows environment and options +% +\newcommand*\LP@SAA@init@prefix{LP@SAA}% +\newcommand*\LP@SAA@init@package{starsandarrows}% +% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{rows}{5}% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{columns}{5}% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{scale}{1}% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{counterstyle}{none}% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{bgcolor}{}% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{width}{5.9cm}% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{title}{}% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@SAA@init@prefix}{\LP@SAA@init@package}{titlewidth}{5.9cm}% +\LP@define@choicekey@fontsize{\LP@SAA@init@prefix}{\LP@SAA@init@package}{Large}% +% +\let\starsH\LP@toprow% +\let\starsV\LP@leftcolumn% +% +\newcommand*\starsandarrowssetup[1]% +{% + \setkeys{starsandarrows.sty}{#1}% +}% +% +\newenvironment{starsandarrows}[1][]% +{% + \setkeys{starsandarrows}{#1}% + \LP@set@package{starsandarrows}% + \LP@set@env@prefix{LP@SAA}% + \setcounter{LP@rows}{\LP@SAA@rows}% + \setcounter{LP@columns}{\LP@SAA@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% + \begin{minipage}[t]{\LP@SAA@width}% + \ifthenelse{\equal{\LP@SAA@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@SAA@titleindent}\parbox{\LP@SAA@titlewidth}{\strut\LP@titleformat\LP@SAA@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@SAA@scale]% + \LP@drawbackground{1}{1}{\LP@SAA@columns}{\LP@SAA@rows}{\LP@SAA@bgcolor}% + \LP@drawgrid{1}{1}{\LP@SAA@columns}{\LP@SAA@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@SAA@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% sunandmoon environment and options +% +\newcommand*\LP@SAM@init@prefix{LP@SAM}% +\newcommand*\LP@SAM@init@package{sunandmoon}% +% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{rows}{5}% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{columns}{5}% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{scale}{1}% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{counterstyle}{none}% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{bgcolor}{}% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{width}{5.1cm}% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{title}{}% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@SAM@init@prefix}{\LP@SAM@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@SAM@init@prefix}{\LP@SAM@init@package}{Large}% +% +\let\sunandmooncell\setcell% +% +\newcommand*\sunandmoonsetup[1]% +{% + \setkeys{sunandmoon.sty}{#1}% +}% +% +\newenvironment{sunandmoon}[1][]% +{% + \setkeys{sunandmoon}{#1}% + \LP@set@package{sunandmoon}% + \LP@set@env@prefix{LP@SAM}% + \setcounter{LP@rows}{\LP@SAM@rows}% + \setcounter{LP@columns}{\LP@SAM@columns}% + \stepcounter{LP@rows}% + \stepcounter{LP@columns}% + \begin{minipage}[t]{\LP@SAM@width}% + \ifthenelse{\equal{\LP@SAM@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@SAM@titleindent}\parbox{\LP@SAM@titlewidth}{\strut\LP@titleformat\LP@SAM@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@SAM@scale]% + \LP@drawbackground{1}{1}{\LP@SAM@columns}{\LP@SAM@rows}{\LP@SAM@bgcolor}% + \LP@drawgrid{1}{1}{\LP@SAM@columns}{\LP@SAM@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@SAM@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% % tentsandtrees environment and options % \newcommand*\LP@TAT@init@prefix{LP@TAT}% |