diff options
56 files changed, 2580 insertions, 5147 deletions
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES index 3e9a4baae9f..e7f8c73ac65 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES +++ b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES @@ -1,3 +1,11 @@ +== Logicpuzzle bundel (v2.0) == + +30/04/2013 moved package contents to logicpuzzle.sty [jk] + +23/04/2013 added tunnel environment and \portal, \tube [jk] + +22/04/2013 added minesweeper environment and \Mine [jk] + == Logicpuzzle bundel (v1.9) == -- slitherlink.sty (v1.0) -- diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/README b/Master/texmf-dist/doc/latex/logicpuzzle/README index 01d8e4df68a..93678e66b2f 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/README +++ b/Master/texmf-dist/doc/latex/logicpuzzle/README @@ -11,20 +11,25 @@ puzzles. At the moment the following puzzles are supported: Square Wisdom, Sukendo, Caldoku, ...) * Killer Sudoku (aka Samunapure, Sum Number Place, Sumdoku, Gebietssummen, ...) -* Laser Beam (aka Laserstrahl, ...) +* Laser Beam (aka Laserstrahl, ...) +* Minesweeper (aka Minensuche, ...) * Skyline (aka Skycrapers, Wolkenkratzer, Hochhäuser, ...) incl. Skyline Sudoku and Skyline Sudoku (N*N) variants * Slitherlink (aka Fences, Number Line, Dotty Dilemma, Sli-Lin, Takegaki, Great Wall of China, Loop the Loop, Rundweg, Gartenzaun, ...) * Sudoku +* Tunnel License: LPPL -Changes in v1.9: +Changes in v2.0: -- added support for Laser Beam puzzle - https://bitbucket.org/kleberj/logicpuzzle/wiki/LaserBeam +- added support for Minesweeper puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/Minesweeper -- added support for Slitherlink puzzle - https://bitbucket.org/kleberj/logicpuzzle/wiki/Slitherlink +- added support for Tunnel puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/Tunnel + +- moved package contents to logicpuzzle.sty and lpenv.sty + merged docs into logicpuzzle.pdf
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf Binary files differdeleted file mode 100644 index 62b9ab1601d..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex deleted file mode 100644 index 2b859633b3b..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex +++ /dev/null @@ -1,285 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=4cm,shipcolor=Teal,scale=0.66,fontsize=large, -sbindent=0.6cm,sbwidth=3.4cm]{battleship}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={center,battleship,mathstyle,style,left,shape,fill,inner,sep,draw,rounded,corners,thick}, emphstyle=\color{Tomato},emph={[2]rows,columns,width,shipcolor,fontsize,scale,sbindent,sbwidth,sbshipscale},emphstyle={[2]\color{LawnGreen}},morekeywords={titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,LP@cvoffset,placeship,placesegment,ship,shipH,shipV,shipbox,Ship,ShipC,ShipL,ShipR,ShipB,ShipT,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{battleship.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Battleship logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Battleship logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.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{% -\begin{battleship} - \placesegment{4}{1}{\ShipR} - \shipH{4,1,2,2,2} - \shipV{3,1,4,0,3} - \shipbox{3,3,2,2,1} - \end{battleship} - \hspace{1cm} - \begin{battleship} - \placeship{V}{1}{1}{3} - \placeship{H}{1}{5}{2} - \placeship{H}{3}{1}{2} - \placeship{H}{3}{3}{3} - \placeship{H}{5}{5}{1} - \shipH{4,1,2,2,2} - \shipV{3,1,4,0,3} - \end{battleship} -} - -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} - -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. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{battleship} - \placesegment{4}{1}{\ShipR} - \shipH{4,1,2,2,2} - \shipV{3,1,4,0,3} - \shipbox{3,3,2,2,1} - \end{battleship} - \hspace{1cm} - \begin{battleship} - \placeship{V}{1}{1}{3} - \placeship{H}{1}{5}{2} - \placeship{H}{3}{1}{2} - \placeship{H}{3}{3}{3} - \placeship{H}{5}{5}{1} - \shipH{4,1,2,2,2} - \shipV{3,1,4,0,3} - \end{battleship} -\end{center} -\end{lstlisting} -\clearpage -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid.} - \optitem{shipcolor}{green}{sets the color of the ship segments.} - \optitem{\styleoption{width}}{6cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0.75cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.15cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{sbindent}}{0.75cm}{defines the indent of the ship box below the grid.} -\optitem{\styleoption{sbwidth}}{5.15cm}{specifies the width of the minipage, in which the ships are typeset.} - \optitem{\styleoption{sbshipscale}}{1}{scales the size of the ships in the ship box.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{battleship}} -The \env{battleship} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{battleship}\oarg{options}\\\dots\\\enve{battleship}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created that you can fill with ships using other commands. -\section{Commands} -\subsection{Ships, water, islands, ...} -\subsubsection{\texttt{placeship}} -With the command \cs{placeship}\margcs{\cmd\placeship\{\marg{direction}\}\\\{\marg{column}\}\{\marg{row}\}\{\marg{length}\}} you can place complete ships in the grid. It expects the specification of the direction as horizontal (H) or vertical (V). Furthermore, it requires the starting coordinates and the length of the ship. -\subsubsection{\texttt{placesegment}} -The command \cs{placesegment}\margcs{\cmd\placesegment\{\marg{column}\}\{\marg{row}\}\\\{\marg{ship segment}\}} is used for the placement of ship segments in the grid. In the mandatory argument \marg{ship segment}, you can use the following commands: - -\begin{center} -\begin{tabular}{lccl} -\cs{Ship} & \scalebox{.5}{\Ship} & \scalebox{.5}{\ShipC} & \cs{ShipC} \\ -\cs{ShipL} & \scalebox{.5}{\ShipL} & \scalebox{.5}{\ShipR} & \cs{ShipR} \\ -\cs{ShipB} & \scalebox{.5}{\ShipB} & \scalebox{.5}{\ShipT} & \cs{ShipT} \\ -\end{tabular} -\end{center} -\subsubsection{\texttt{ship}} -The command \cs{ship} was replaced by the \cs{placesegment} command. The command \cs{ship} is deprecated and should not be used longer. It may still be used, but it is not recommended. -\subsubsection{\texttt{placewater}} -With the command \cs{placewater}\margcs{\cmd\placewater\{\marg{column}\}\{\marg{row}\}} you can place water markers ( \raisebox{2pt}{\Water} ) in the grid. -\subsubsection{\texttt{placeisland}} -With the command \cs{placeisland}\margcs{\cmd\placeisland\{\marg{column}\}\{\marg{row}\}} you can place islands ( \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}} ) in the grid. The island outlines are created randomly: \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}}, \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}}, \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}}, ... -\subsection{Presentation} -\subsubsection{\texttt{shipH}} -The command \cs{shipH}\margcs{\cmd\shipH\{\marg{csv list}\}} typesets the horizontal numbers above the grid. It expects a comma-separated list as an argument. -\subsubsection{\texttt{shipV}} -The command \cs{shipV}\margcs{\cmd\shipV\{\marg{csv list}\}} typesets the vertical numbers beside the grid. It also expects a comma separated list. -\subsubsection{\texttt{shipbox}} -The command \cs{shipbox}\margcs{\cmd\shipbox\{\marg{csv list}\}} defines the number and size of the ships, which are typeset under the grid. -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{battleshipsetup}} -With the command \cs{battleshipsetup}\margcs{\cmd\battleshipsetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{classicgame}} -The command \cs{classicgame}\margcs{\cmd\classicgame\{\marg{csv list}\}} typesets a game sheet for playing classic Battleship. It expects a comma separated list with the number and sizes of the ships. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. - -You can also download a \href{https://bitbucket.org/kleberj/battleship/downloads/classicsheet.pdf}{game sheet} for playing the classic Battleship. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship_README b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship_README deleted file mode 100644 index 689553021fa..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship_README +++ /dev/null @@ -1,5 +0,0 @@ -The package enables the user to typeset Battleship logic puzzles -(aka Bimaru, Marinespiel, Batalla Naval, ...). -You have to find the positions of ships in a grid. Numbers next -to the grid reveal the number of ship segments in the respective -columns and rows.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdf Binary files differdeleted file mode 100644 index 375397247c5..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex deleted file mode 100644 index 00e4acd3650..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex +++ /dev/null @@ -1,271 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=5cm,scale=0.73,fontsize=normalsize]{bokkusu}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={center,bokkusu,left,shape,fill,inner,sep,draw,rounded,corners,thick}, emphstyle=\color{Tomato},emph={[2]rows,columns,width,fontsize,scale},emphstyle={[2]\color{LawnGreen}},morekeywords={valueH,valueV,sumH,sumV,LP@cvoffset,fillrow,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{bokkusu.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Bokkusu logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Bokkusu logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.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{% -\begin{bokkusu} - \valueH{1,2,3,4,5} - \valueV{1,2,3,4,5} - \sumH{7,1,11,9,6} - \sumV{2,12,5,13,?} - \end{bokkusu} - \hspace{1cm} - \begin{bokkusu} - \valueH{1,2,3,4,5} - \valueV{1,2,3,4,5} - \sumH{7,1,11,9,6} - \sumV{2,12,5,13,?} - \fillrow{5}{0,0,1,0,0} - \fillrow{4}{1,0,1,1,1} - \fillrow{3}{1,0,0,1,0} - \fillrow{2}{0,0,1,1,1} - \fillrow{1}{0,1,0,0,0} - \end{bokkusu} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} - -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. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{bokkusu} - \valueH{1,2,3,4,5} - \valueV{1,2,3,4,5} - \sumH{7,1,11,9,6} - \sumV{2,12,5,13,?} - \end{bokkusu} - \hspace{1cm} - \begin{bokkusu} - \valueH{1,2,3,4,5} - \valueV{1,2,3,4,5} - \sumH{7,1,11,9,6} - \sumV{2,12,5,13,?} - \fillrow{5}{0,0,1,0,0} - \fillrow{4}{1,0,1,1,1} - \fillrow{3}{1,0,0,1,0} - \fillrow{2}{0,0,1,1,1} - \fillrow{1}{0,1,0,0,0} - \end{bokkusu} -\end{center} -\end{lstlisting} -\clearpage - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{width}}{6.7cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0.75cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.85cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{color}}{black}{specifies the color for coloring the cells.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-38pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{bokkusu}} -The \env{bokkusu} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{bokkusu}\oarg{options}\\\dots\\\enve{bokkusu}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{valueH}} -The command \cs{valueH}\margcs{\cmd\valueH\{\marg{csv list}\}} typesets the numbers left to the grid indicating the values of the cells. It expects a comma-separated list as an argument. -\subsubsection{\texttt{valueV}} -The command \cs{valueV}\margcs{\cmd\valueV\{\marg{csv list}\}} typesets the numbers below the grid specifying the values of the cells. It also expects a comma separated list. -\subsubsection{\texttt{sumH}} -The command \cs{sumH}\margcs{\cmd\sumH\{\marg{csv list}\}} typesets the numbers right to the grid indicating the sums of the values of the colored cells. It expects a comma-separated list. -\subsubsection{\texttt{sumV}} -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. -\subsubsection{\texttt{fillcell}} -The command \cs{fillcell}\margcs{\cmd\fillcell\{\marg{column}\}\{\marg{row}\}} fills the grid cell \marg{column}\marg{row} with the color specified with the option \styleoption{color}. -\subsubsection{\texttt{fillrow}} -The command \cs{fillrow}\margcs{\cmd\fillrow\{\marg{row}\}\{\marg{csv list}\}} fills a grid row. In \marg{csv list} 1 means 'fill' and 0 means 'don't fill'. -\subsubsection{\texttt{fillcolumn}} -The command \cs{fillcolumn}\margcs{\cmd\fillcolumn\{\marg{column}\}\{\marg{csv list}\}} fills a grid column. -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{bokkususetup}} -With the command \cs{bokkususetup}\margcs{\cmd\bokkususetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README deleted file mode 100644 index 9d4a0e26c9e..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README +++ /dev/null @@ -1,6 +0,0 @@ -The package enables the user to typeset Bokkusu logic puzzles -(aka Kakurasu, Feldersummenrätsel, ...). -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. diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.pdf Binary files differdeleted file mode 100644 index 2dac6d24596..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.tex b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.tex deleted file mode 100644 index a7e29b4ba07..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.tex +++ /dev/null @@ -1,302 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=5cm,scale=0.84,fontsize=normalsize]{chaossudoku}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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\scriptsize,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,chaossudoku,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},emphstyle={[2]\color{OliveDrab}},morekeywords={framearea,fillarea,chaossudokucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{chaossudoku.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Chaos Sudoku logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Chaos\\Sudoku logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.1} -\Refline{\href{mailto:josef.kleber@gmx.de}{\texttt{josef.kleber@gmx.de}}\\\href{https://bitbucket.org/kleberj/logicpuzzle/}{\texttt{https://bitbucket.org/kleberj/logicpuzzle/}}} -\newsavebox\logo -\savebox\logo{% -\begin{chaossudoku} - \chaossudokucell{1}{1}{3} - \chaossudokucell{1}{5}{4} - \chaossudokucell{3}{2}{4} - \chaossudokucell{4}{2}{5} - \chaossudokucell{5}{5}{2} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} - \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} - \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} - \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} - \end{puzzlebackground} - \end{chaossudoku} - \hspace{1,5cm} - \begin{chaossudoku} - \setrow{5}{4,3,5,1,2} - \setrow{4}{2,1,3,4,5} - \setrow{3}{5,4,2,3,1} - \setrow{2}{1,2,4,5,3} - \setrow{1}{3,5,1,2,4} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} - \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} - \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} - \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} - \end{puzzlebackground} - \end{chaossudoku} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} - -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. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{chaossudoku} - \chaossudokucell{1}{1}{3} - \chaossudokucell{1}{5}{4} - \chaossudokucell{3}{2}{4} - \chaossudokucell{4}{2}{5} - \chaossudokucell{5}{5}{2} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} - \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} - \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} - \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} - \end{puzzlebackground} - \end{chaossudoku} - \hspace{1,5cm} - \begin{chaossudoku} - \setrow{5}{4,3,5,1,2} - \setrow{4}{2,1,3,4,5} - \setrow{3}{5,4,2,3,1} - \setrow{2}{1,2,4,5,3} - \setrow{1}{3,5,1,2,4} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} - \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} - \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} - \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} - \end{puzzlebackground} - \end{chaossudoku} -\end{center} -\end{lstlisting} -\lstset{basicstyle=\ttfamily\normalsize} -\clearpage - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{chaossudoku}} -The \env{chaossudoku} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{chaossudoku}\oarg{options}\\\dots\\\enve{chaossudoku}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\subsection{\texttt{puzzlebackground}} -The \env{puzzlebackground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzlebackground}\\\dots\\\enve{puzzlebackground}} allows you to place elements behind the main layer. This is for example usefull for the \cmd\fillarea\ command. -\subsection{\texttt{puzzleforeground}} -The \env{puzzleforeground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzleforeground}\\\dots\\\enve{puzzleforeground}} allows you to place elements in front of the main layer. This is for example usefull for the \cmd\framearea\ command. -\clearpage -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{chaossudokucell}} -The command \cs{chaossudokucell}\margcs{\cmd\chaossudokucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column} \marg{row}. -\subsubsection{\texttt{setrow}} -The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list. -\subsubsection{\texttt{setcolumn}} -The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}. -\subsubsection{\texttt{framearea}} -The command \cs{framearea}\margcs{\cmd\framearea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} frames the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. - -\begin{lstlisting} -\framearea{green}{(2,2)--(2,3)--(3,3)--(3,2)--(2,2)} -\end{lstlisting} - -This command will color the frame of the grid cell \texttt{(2,2)} green. You should consider using this command in the \env{puzzleforeground} environment. - -\subsubsection{\texttt{fillarea}} -The command \cs{fillarea}\margcs{\cmd\fillarea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} fills the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. You should consider using this command in the \env{puzzlebackground} environment. -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{chaossudokusetup}} -With the command \cs{chaossudokusetup}\margcs{\cmd\chaossudokusetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku_README b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku_README deleted file mode 100644 index 53bbb0fe52d..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku_README +++ /dev/null @@ -1,4 +0,0 @@ -The package enables the user to typeset Chaos Sudoku logic puzzles -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.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.pdf Binary files differdeleted file mode 100644 index fd5a10dbb63..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.tex b/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.tex deleted file mode 100644 index 1cadfee807f..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.tex +++ /dev/null @@ -1,272 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=5.3cm,fontsize=large]{ddsudoku}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,ddsudoku,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},emphstyle={[2]\color{OliveDrab}},morekeywords={framepuzzle,filldiagonals,framearea,fillarea,ddsudokucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{ddsudoku.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting 2D-Sudoku logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting 2D-Sudoku logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.0} -\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{% - \begin{ddsudoku} - \framepuzzle - \filldiagonals[orange!50] - \ddsudokucell{1}{5}{1} - \ddsudokucell{1}{4}{3} - \ddsudokucell{2}{3}{4} - \ddsudokucell{4}{1}{3} - \ddsudokucell{4}{3}{2} - \ddsudokucell{5}{4}{4} - \end{ddsudoku} - \hspace{1,5cm} - \begin{ddsudoku} - \framepuzzle - \filldiagonals[orange!50] - \setrow{5}{1,3,4,5,2} - \setrow{4}{3,2,5,1,4} - \setrow{3}{5,4,3,2,1} - \setrow{2}{2,5,1,4,3} - \setrow{1}{4,1,2,3,5} - \end{ddsudoku} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} - -Fill every row, every column and each of the two diagonals -- if indicated -- with numbers from 1 to SIZE of the grid. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{ddsudoku} - \framepuzzle - \filldiagonals[orange!50] - \ddsudokucell{1}{5}{1} - \ddsudokucell{1}{4}{3} - \ddsudokucell{2}{3}{4} - \ddsudokucell{4}{1}{3} - \ddsudokucell{4}{3}{2} - \ddsudokucell{5}{4}{4} - \end{ddsudoku} - \hspace{1,5cm} - \begin{ddsudoku} - \framepuzzle - \filldiagonals[orange!50] - \setrow{5}{1,3,4,5,2} - \setrow{4}{3,2,5,1,4} - \setrow{3}{5,4,3,2,1} - \setrow{2}{2,5,1,4,3} - \setrow{1}{4,1,2,3,5} - \end{ddsudoku} -\end{center} -\end{lstlisting} -\lstset{basicstyle=\ttfamily\normalsize} -\clearpage - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{ddsudoku}} -The \env{ddsudoku} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{ddsudoku}\oarg{options}\\\dots\\\enve{ddsudoku}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{ddsudokucell}} -The command \cs{ddsudokucell}\margcs{\cmd\ddsudokucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column}\marg{row}. -\subsubsection{\texttt{setrow}} -The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list. -\subsubsection{\texttt{setcolumn}} -The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}. -\subsubsection{\texttt{filldiagonals}} -With\margcs{\cmd\filldiagonals[\oarg{color}]} the \cmd\filldiagonals\ command, you can fill the diagonals with the color specified with the optional argument \oarg{color} (default: yellow!20). Furthermore, it checks for a quadratic grid, otherwise an error message is issued. -\subsubsection{\texttt{framepuzzle}} -With\margcs{\cmd\framepuzzle[\oarg{color}]} the \cmd\framepuzzle\ command, you can frame the grid (thicker line) with the color specified with the optional argument \oarg{color} (default: black). -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{ddsudokusetup}} -With the command \cs{ddsudokusetup}\margcs{\cmd\ddsudokusetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku_README b/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku_README deleted file mode 100644 index ee12ceea707..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku_README +++ /dev/null @@ -1,4 +0,0 @@ -The package enables the user to typeset 2D-Sudoku logic puzzles -(aka Magiequadrat, Diagon, ...) -Fill every row, every column and each of the two diagonals -– if indicated – with numbers from 1 to SIZE of the grid.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.pdf Binary files differdeleted file mode 100644 index 9de49d4c68b..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.tex b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.tex deleted file mode 100644 index c510f370f70..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.tex +++ /dev/null @@ -1,312 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=5cm,scale=0.84,fontsize=normalsize]{hakyuu}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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\scriptsize,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,hakyuu,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},emphstyle={[2]\color{OliveDrab}},morekeywords={framearea,fillarea,hakyuucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{hakyuu.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Hakyuu logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Hakyuu logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.1} -\Refline{\href{mailto:josef.kleber@gmx.de}{\texttt{josef.kleber@gmx.de}}\\\href{https://bitbucket.org/kleberj/logicpuzzle/}{\texttt{https://bitbucket.org/kleberj/logicpuzzle/}}} -\newsavebox\logo -\savebox\logo{% -\begin{hakyuu} - \hakyuucell{1}{5}{2} - \hakyuucell{3}{5}{6} - \hakyuucell{4}{5}{5} - \hakyuucell{4}{4}{4} - \hakyuucell{1}{3}{3} - \hakyuucell{2}{2}{2} - \hakyuucell{5}{2}{5} - \hakyuucell{4}{1}{1} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} - \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)} - \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)} - \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)} - \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)} - \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)} - \end{puzzlebackground} - \end{hakyuu} - \hspace{1,5cm} - \begin{hakyuu} - \setrow{5}{2,3,6,5,4} - \setrow{4}{1,7,3,4,2} - \setrow{3}{3,1,2,1,3} - \setrow{2}{1,2,1,3,5} - \setrow{1}{2,3,4,1,2} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} - \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)} - \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)} - \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)} - \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)} - \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)} - \end{puzzlebackground} - \end{hakyuu} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} - -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. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{hakyuu} - \hakyuucell{1}{5}{2} - \hakyuucell{3}{5}{6} - \hakyuucell{4}{5}{5} - \hakyuucell{4}{4}{4} - \hakyuucell{1}{3}{3} - \hakyuucell{2}{2}{2} - \hakyuucell{5}{2}{5} - \hakyuucell{4}{1}{1} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} - \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)} - \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)} - \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)} - \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)} - \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)} - \end{puzzlebackground} - \end{hakyuu} - \hspace{1,5cm} - \begin{hakyuu} - \setrow{5}{2,3,6,5,4} - \setrow{4}{1,7,3,4,2} - \setrow{3}{3,1,2,1,3} - \setrow{2}{1,2,1,3,5} - \setrow{1}{2,3,4,1,2} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} - \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)} - \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)} - \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)} - \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)} - \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)} - \end{puzzlebackground} - \end{hakyuu} -\end{center} -\end{lstlisting} -\lstset{basicstyle=\ttfamily\normalsize} -\clearpage - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{hakyuu}} -The \env{hakyuu} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{hakyuu}\oarg{options}\\\dots\\\enve{hakyuu}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\subsection{\texttt{puzzlebackground}} -The \env{puzzlebackground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzlebackground}\\\dots\\\enve{puzzlebackground}} allows you to place elements behind the main layer. This is for example usefull for the \cmd\fillarea\ command. -\subsection{\texttt{puzzleforeground}} -The \env{puzzleforeground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzleforeground}\\\dots\\\enve{puzzleforeground}} allows you to place elements in front of the main layer. This is for example usefull for the \cmd\framearea\ command. -\clearpage -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{hakyuucell}} -The command \cs{hakyuucell}\margcs{\cmd\hakyuucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column}\marg{row}. -\subsubsection{\texttt{setrow}} -The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list. -\subsubsection{\texttt{setcolumn}} -The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}. -\subsubsection{\texttt{framearea}} -The command \cs{framearea}\margcs{\cmd\framearea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} frames the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. - -\begin{lstlisting} -\framearea{green}{(2,2)--(2,3)--(3,3)--(3,2)--(2,2)} -\end{lstlisting} - -This command will color the frame of the grid cell \texttt{(2,2)} green. You should consider using this command in the \env{puzzleforeground} environment. - -\subsubsection{\texttt{fillarea}} -The command \cs{fillarea}\margcs{\cmd\fillarea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} fills the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. You should consider using this command in the \env{puzzlebackground} environment. -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{hakyuusetup}} -With the command \cs{hakyuusetup}\margcs{\cmd\hakyuusetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu_README b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu_README deleted file mode 100644 index 2157dc54718..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu_README +++ /dev/null @@ -1,5 +0,0 @@ -The package enables the user to typeset Hakyuu logic puzzles -(aka Seismic, Ripple Effect, ...). -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
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.pdf Binary files differdeleted file mode 100644 index 0500d44912d..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.tex b/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.tex deleted file mode 100644 index 0f4212a2ebd..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.tex +++ /dev/null @@ -1,262 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=5.3cm,fontsize=large]{hitori}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,hitori,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},emphstyle={[2]\color{OliveDrab}},morekeywords={setcolorrow,framepuzzle,filldiagonals,framearea,fillarea,hitoricell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{hitori.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Hitori logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Hitori logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.0} -\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{% - \begin{hitori} - \framepuzzle - \setcolorrow{5}{2,4,2,1,1} - \setcolorrow{4}{1,3,2,4,1} - \setcolorrow{3}{1,3,3,3,2} - \setcolorrow{2}{4,2,1,3,3} - \setcolorrow{1}{4,1,2,2,3} - \end{hitori} - \hspace{1.5cm} - \begin{hitori} - \framepuzzle - \setcolorrow{5}{2,4,0,1,0} - \setcolorrow{4}{0,3,2,4,1} - \setcolorrow{3}{1,0,3,0,2} - \setcolorrow{2}{4,2,1,3,0} - \setcolorrow{1}{0,1,0,2,3} - \end{hitori} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} - -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. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{hitori} - \framepuzzle - \setcolorrow{5}{2,4,2,1,1} - \setcolorrow{4}{1,3,2,4,1} - \setcolorrow{3}{1,3,3,3,2} - \setcolorrow{2}{4,2,1,3,3} - \setcolorrow{1}{4,1,2,2,3} - \end{hitori} - \hspace{1.5cm} - \begin{hitori} - \framepuzzle - \setcolorrow{5}{2,4,0,1,0} - \setcolorrow{4}{0,3,2,4,1} - \setcolorrow{3}{1,0,3,0,2} - \setcolorrow{2}{4,2,1,3,0} - \setcolorrow{1}{0,1,0,2,3} - \end{hitori} -\end{center} -\end{lstlisting} -\lstset{basicstyle=\ttfamily\normalsize} -\clearpage - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{hitori}} -The \env{hitori} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{hitori}\oarg{options}\\\dots\\\enve{hitori}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{setcolorrow}} -With\margcs{\cmd\setcolorrow\{\marg{row}\}\{\marg{csv list}\}} the \cmd\setcolorrow\ command, you can set the contents of a \marg{row}. Furthermore, the background of the cell is filled with color \texttt{LP@c@romannumber}\footnote{You can change these colors with the \cmd\LP@definecolor command}. With the number 0, you can black out the grid cell. -\subsubsection{\texttt{setcolorcolumn}} -With\margcs{\cmd\setcolorcolumn\\\{\marg{column}\}\{\marg{csv list}\}} the \cmd\setcolorcolumn\ command, you can set the contents of a \marg{column}. Furthermore, the background of the cell is filled with color \texttt{LP@c@romannumber}. -\subsubsection{\texttt{framepuzzle}} -With\margcs{\cmd\framepuzzle[\oarg{color}]} the \cmd\framepuzzle\ command, you can frame the grid (thicker line) with the color specified with the optional argument \oarg{color} (default: black). -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{hitorisetup}} -With the command \cs{hitorisetup}\margcs{\cmd\hitorisetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori_README b/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori_README deleted file mode 100644 index e310b0e067c..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori_README +++ /dev/null @@ -1,7 +0,0 @@ -The package enables the user to typeset Hitori logic puzzles -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.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/kendoku/kendoku.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/kendoku/kendoku.pdf Binary files differdeleted file mode 100644 index 520e1ed3d4d..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/kendoku/kendoku.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/kendoku/kendoku.tex b/Master/texmf-dist/doc/latex/logicpuzzle/kendoku/kendoku.tex deleted file mode 100644 index 92eef7f9838..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/kendoku/kendoku.tex +++ /dev/null @@ -1,374 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage{kendoku}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,kendoku,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},emphstyle={[2]\color{OliveDrab}},morekeywords={setrule,tikzpath,framearea,fillarea,kendokucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{kendoku.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Kendoku logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Kendoku logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.0} -\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{% - \begin{kendoku} - \framearea{black}{\tikzpath{1}{1}{8,8,6,2,6,2,4,4}} - \framearea{black}{\tikzpath{1}{3}{8,6,2,4}} - \framearea{black}{\tikzpath{1}{4}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{2}{2}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{2}{4}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{3}{1}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{3}{4}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{4}{1}{8,6,6,2,4,4}} - \framearea{black}{\tikzpath{4}{2}{8,6,6,2,4,4}} - \framearea{black}{\tikzpath{4}{3}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{5}{3}{8,6,2,4}} - \framearea{black}{\tikzpath{5}{4}{8,6,2,4}} - \framearea{black}{\tikzpath{5}{5}{8,6,2,4}} - \setrule{1}{2}{8\times} - \setrule{1}{3}{5} - \setrule{1}{5}{4+} - \setrule{2}{3}{60\times} - \setrule{2}{5}{2\div} - \setrule{3}{2}{2-} - \setrule{3}{5}{75\times} - \setrule{4}{1}{8+} - \setrule{4}{2}{1-} - \setrule{4}{4}{2\times} - \setrule{5}{3}{1} - \setrule{5}{5}{2} - \end{kendoku} - \hspace{1.5cm} - \begin{kendoku} - \framearea{black}{\tikzpath{1}{1}{8,8,6,2,6,2,4,4}} - \framearea{black}{\tikzpath{1}{3}{8,6,2,4}} - \framearea{black}{\tikzpath{1}{4}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{2}{2}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{2}{4}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{3}{1}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{3}{4}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{4}{1}{8,6,6,2,4,4}} - \framearea{black}{\tikzpath{4}{2}{8,6,6,2,4,4}} - \framearea{black}{\tikzpath{4}{3}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{5}{3}{8,6,2,4}} - \framearea{black}{\tikzpath{5}{4}{8,6,2,4}} - \framearea{black}{\tikzpath{5}{5}{8,6,2,4}} - \setrule{1}{2}{8\times} - \setrule{1}{3}{5} - \setrule{1}{5}{4+} - \setrule{2}{3}{60\times} - \setrule{2}{5}{2\div} - \setrule{3}{2}{2-} - \setrule{3}{5}{75\times} - \setrule{4}{1}{8+} - \setrule{4}{2}{1-} - \setrule{4}{4}{2\times} - \setrule{5}{3}{1} - \setrule{5}{5}{2} - \setrow{5}{1,4,3,5,2} - \setrow{4}{3,2,5,1,4} - \setrow{3}{5,3,4,2,1} - \setrow{2}{2,5,1,4,3} - \setrow{1}{4,1,2,3,5} - \end{kendoku} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} -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. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{kendoku} - \framearea{black}{\tikzpath{1}{1}{8,8,6,2,6,2,4,4}} - \framearea{black}{\tikzpath{1}{3}{8,6,2,4}} - \framearea{black}{\tikzpath{1}{4}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{2}{2}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{2}{4}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{3}{1}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{3}{4}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{4}{1}{8,6,6,2,4,4}} - \framearea{black}{\tikzpath{4}{2}{8,6,6,2,4,4}} - \framearea{black}{\tikzpath{4}{3}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{5}{3}{8,6,2,4}} - \framearea{black}{\tikzpath{5}{4}{8,6,2,4}} - \framearea{black}{\tikzpath{5}{5}{8,6,2,4}} - \setrule{1}{2}{8\times} - \setrule{1}{3}{5} - \setrule{1}{5}{4+} - \setrule{2}{3}{60\times} - \setrule{2}{5}{2\div} - \setrule{3}{2}{2-} - \setrule{3}{5}{75\times} - \setrule{4}{1}{8+} - \setrule{4}{2}{1-} - \setrule{4}{4}{2\times} - \setrule{5}{3}{1} - \setrule{5}{5}{2} - \end{kendoku} - \hspace{1.5cm} - \begin{kendoku} - \framearea{black}{\tikzpath{1}{1}{8,8,6,2,6,2,4,4}} - \framearea{black}{\tikzpath{1}{3}{8,6,2,4}} - \framearea{black}{\tikzpath{1}{4}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{2}{2}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{2}{4}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{3}{1}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{3}{4}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{4}{1}{8,6,6,2,4,4}} - \framearea{black}{\tikzpath{4}{2}{8,6,6,2,4,4}} - \framearea{black}{\tikzpath{4}{3}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{5}{3}{8,6,2,4}} - \framearea{black}{\tikzpath{5}{4}{8,6,2,4}} - \framearea{black}{\tikzpath{5}{5}{8,6,2,4}} - \setrule{1}{2}{8\times} - \setrule{1}{3}{5} - \setrule{1}{5}{4+} - \setrule{2}{3}{60\times} - \setrule{2}{5}{2\div} - \setrule{3}{2}{2-} - \setrule{3}{5}{75\times} - \setrule{4}{1}{8+} - \setrule{4}{2}{1-} - \setrule{4}{4}{2\times} - \setrule{5}{3}{1} - \setrule{5}{5}{2} - \setrow{5}{1,4,3,5,2} - \setrow{4}{3,2,5,1,4} - \setrow{3}{5,3,4,2,1} - \setrow{2}{2,5,1,4,3} - \setrow{1}{4,1,2,3,5} - \end{kendoku} -\end{center} -\end{lstlisting} -\lstset{basicstyle=\ttfamily\normalsize} -\clearpage - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{kendoku}} -The \env{kendoku} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{kendoku}\oarg{options}\\\dots\\\enve{kendoku}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{kendokucell}} -The command \cs{kendokucell}\margcs{\cmd\kendokucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column}\marg{row}. -\subsubsection{\texttt{setrow}} -The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list. -\subsubsection{\texttt{setcolumn}} -The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}. -\subsubsection{\texttt{setrule}} -With\margcs{\cmd\setrule\{\{\marg{column}\}\{\marg{row}\}\\\{\marg{rule}\}} the \cmd\setrule\ command, you can set a calculation rule \marg{rule} into the top left corner of cell \marg{column}\marg{row}. The rule is typeset in inline math mode. You might consider using the \cmd\times\ and \cmd\div\ commands. -\subsubsection{\texttt{framearea}} -The command \cs{framearea}\margcs{\cmd\framearea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} frames the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. - -\begin{lstlisting} -\framearea{green}{(2,2)--(2,3)--(3,3)--(3,2)--(2,2)} -\end{lstlisting} - -This command will color the frame of the grid cell \texttt{(2,2)} green. You should consider using this command in the \env{puzzleforeground} environment. - -\subsubsection{\texttt{tikzpath}} -With\margcs{\cmd\tikzpath\{\oarg{column}\}\{\oarg{row}\}\\\{\oarg{csv list}\}} the \cmd\tikzpath\ command, you can easily construct a \cmd\tikz\ path. You just need to define a starting point \marg{column}\marg{row} (bottom left corner) and a \marg{csv list} with direction indicators relative to the current position. - -\begin{center} -\begin{tabular}{rlrlrl} -7: & up left & 8: & up & 9: & up right \\ -4: & left & 5: & no change & 6: & right \\ -1: & down left & 2: & down & 3: & down right \\ -\end{tabular} -\end{center} - -\begin{lstlisting} -\framearea{green}{\tikzpath{2}{2}{8,6,2,4}} -\end{lstlisting} - -This command will frame grid cell \texttt{(2,2)} green. -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{kendokusetup}} -With the command \cs{kendokusetup}\margcs{\cmd\kendokusetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/kendoku/kendoku_README b/Master/texmf-dist/doc/latex/logicpuzzle/kendoku/kendoku_README deleted file mode 100644 index 30b9983f533..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/kendoku/kendoku_README +++ /dev/null @@ -1,9 +0,0 @@ -The package enables the user to typeset Kendoku logic puzzles -(aka Mathdoku, Calcudoku, Basic, MiniPlu, Ken Ken, - Square Wisdom, Sukendo, Caldoku, ...) -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.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/killersudoku/killersudoku.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/killersudoku/killersudoku.pdf Binary files differdeleted file mode 100644 index e60bcdaf010..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/killersudoku/killersudoku.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/killersudoku/killersudoku.tex b/Master/texmf-dist/doc/latex/logicpuzzle/killersudoku/killersudoku.tex deleted file mode 100644 index 8b56b4e0f0f..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/killersudoku/killersudoku.tex +++ /dev/null @@ -1,340 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[rows=4,columns=4,scale=1.25]{killersudoku}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,killersudoku,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},emphstyle={[2]\color{OliveDrab}},morekeywords={setrule,tikzpath,colorarea,framearea,fillarea,killersudokucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{killersudoku.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Killer Sudoku logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Killer Sudoku logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.0} -\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{% - \begin{killersudoku} - \framearea{black}{\tikzpath{1}{1}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{1}{3}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{2}{1}{8,6,6,6,2,4,4,4}} - \framearea{black}{\tikzpath{2}{3}{8,8,6,2,6,2,4,4}} - \framearea{black}{\tikzpath{3}{2}{8,6,8,6,2,2,4,4}} - \framearea{black}{\tikzpath{3}{4}{8,6,6,2,4,4}} - \begin{puzzlebackground} - \colorarea{orange!20}{\tikzpath{1}{1}{8,8,6,6,2,2,4,4}} - \colorarea{orange!20}{\tikzpath{3}{3}{8,8,6,6,2,2,4,4}} - \end{puzzlebackground} - \setrule{1}{2}{7} - \setrule{1}{4}{7} - \setrule{2}{1}{9} - \setrule{2}{4}{6} - \setrule{3}{4}{5} - \setrule{4}{3}{6} - \end{killersudoku} - \hspace{1.5cm} - \begin{killersudoku} - \framearea{black}{\tikzpath{1}{1}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{1}{3}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{2}{1}{8,6,6,6,2,4,4,4}} - \framearea{black}{\tikzpath{2}{3}{8,8,6,2,6,2,4,4}} - \framearea{black}{\tikzpath{3}{2}{8,6,8,6,2,2,4,4}} - \framearea{black}{\tikzpath{3}{4}{8,6,6,2,4,4}} - \begin{puzzlebackground} - \colorarea{orange!20}{\tikzpath{1}{1}{8,8,6,6,2,2,4,4}} - \colorarea{orange!20}{\tikzpath{3}{3}{8,8,6,6,2,2,4,4}} - \end{puzzlebackground} - \setrule{1}{2}{7} - \setrule{1}{4}{7} - \setrule{2}{1}{9} - \setrule{2}{4}{6} - \setrule{3}{4}{5} - \setrule{4}{3}{6} - \setrow{4}{3,2,4,1} - \setrow{3}{4,1,3,2} - \setrow{2}{2,4,1,3} - \setrow{1}{1,3,2,4} - \end{killersudoku} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} -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. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{killersudoku} - \framearea{black}{\tikzpath{1}{1}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{1}{3}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{2}{1}{8,6,6,6,2,4,4,4}} - \framearea{black}{\tikzpath{2}{3}{8,8,6,2,6,2,4,4}} - \framearea{black}{\tikzpath{3}{2}{8,6,8,6,2,2,4,4}} - \framearea{black}{\tikzpath{3}{4}{8,6,6,2,4,4}} - \begin{puzzlebackground} - \colorarea{orange!20}{\tikzpath{1}{1}{8,8,6,6,2,2,4,4}} - \colorarea{orange!20}{\tikzpath{3}{3}{8,8,6,6,2,2,4,4}} - \end{puzzlebackground} - \setrule{1}{2}{7} - \setrule{1}{4}{7} - \setrule{2}{1}{9} - \setrule{2}{4}{6} - \setrule{3}{4}{5} - \setrule{4}{3}{6} - \end{killersudoku} - \hspace{1.5cm} - \begin{killersudoku} - \framearea{black}{\tikzpath{1}{1}{8,8,6,6,2,4,2,4}} - \framearea{black}{\tikzpath{1}{3}{8,8,6,2,2,4}} - \framearea{black}{\tikzpath{2}{1}{8,6,6,6,2,4,4,4}} - \framearea{black}{\tikzpath{2}{3}{8,8,6,2,6,2,4,4}} - \framearea{black}{\tikzpath{3}{2}{8,6,8,6,2,2,4,4}} - \framearea{black}{\tikzpath{3}{4}{8,6,6,2,4,4}} - \begin{puzzlebackground} - \colorarea{orange!20}{\tikzpath{1}{1}{8,8,6,6,2,2,4,4}} - \colorarea{orange!20}{\tikzpath{3}{3}{8,8,6,6,2,2,4,4}} - \end{puzzlebackground} - \setrule{1}{2}{7} - \setrule{1}{4}{7} - \setrule{2}{1}{9} - \setrule{2}{4}{6} - \setrule{3}{4}{5} - \setrule{4}{3}{6} - \setrow{4}{3,2,4,1} - \setrow{3}{4,1,3,2} - \setrow{2}{2,4,1,3} - \setrow{1}{1,3,2,4} - \end{killersudoku} -\end{lstlisting} -\lstset{basicstyle=\ttfamily\normalsize} - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{killersudoku}} -The \env{killersudoku} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{killersudoku}\oarg{options}\\\dots\\\enve{killersudoku}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\subsection{\texttt{puzzlebackground}} -The \env{puzzlebackground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzlebackground}\\\dots\\\enve{puzzlebackground}} allows you to place elements behind the main layer. This is for example usefull for the \cmd\fillarea\ command. -\subsection{\texttt{puzzleforeground}} -The \env{puzzleforeground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzleforeground}\\\dots\\\enve{puzzleforeground}} allows you to place elements in front of the main layer. This is for example usefull for the \cmd\framearea\ command. -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{killersudokucell}} -The command \cs{killersudokucell}\margcs{\cmd\killersudokucell\\\{\marg{column}\}\{\marg{row}\}\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column} \marg{row}. -\subsubsection{\texttt{setrow}} -The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list. -\subsubsection{\texttt{setcolumn}} -The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}. -\subsubsection{\texttt{setrule}} -With\margcs{\cmd\setrule\{\{\marg{column}\}\{\marg{row}\}\\\{\marg{rule}\}} the \cmd\setrule\ command, you can set a calculation rule \marg{rule} into the top left corner of cell \marg{column}\marg{row}. The rule is typeset in inline math mode. You might consider using the \cmd\times\ and \cmd\div\ commands. -\subsubsection{\texttt{framearea}} -The command \cs{framearea}\margcs{\cmd\framearea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} frames the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. - -\begin{lstlisting} -\framearea{green}{(2,2)--(2,3)--(3,3)--(3,2)--(2,2)} -\end{lstlisting} - -This command will color the frame of the grid cell \texttt{(2,2)} green. You should consider using this command in the \env{puzzleforeground} environment. - -\subsubsection{\texttt{colorarea}} -The command \cs{colorarea}\margcs{\cmd\colorarea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} fills the area given by \marg{\cmd\tikz\ path} with color \marg{color}, but without frame. The reference for coordinates is the bottom left corner of the cell. You should consider using this command in the \env{puzzlebackground} environment. - -\subsubsection{\texttt{tikzpath}} -With\margcs{\cmd\tikzpath\{\oarg{column}\}\{\oarg{row}\}\\\{\oarg{csv list}\}} the \cmd\tikzpath\ command, you can easily construct a \cmd\tikz\ path. You just need to define a starting point \marg{column}\marg{row} (bottom left corner) and a \marg{csv list} with direction indicators relative to the current position. - -\begin{center} -\begin{tabular}{rlrlrl} -7: & up left & 8: & up & 9: & up right \\ -4: & left & 5: & no change & 6: & right \\ -1: & down left & 2: & down & 3: & down right \\ -\end{tabular} -\end{center} - -\begin{lstlisting} -\framearea{green}{\tikzpath{2}{2}{8,6,2,4}} -\end{lstlisting} - -This command will frame grid cell \texttt{(2,2)} green. -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{killersudokusetup}} -With the command \cs{killersudokusetup}\margcs{\cmd\killersudokusetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/killersudoku/killersudoku_README b/Master/texmf-dist/doc/latex/logicpuzzle/killersudoku/killersudoku_README deleted file mode 100644 index c3ea70ad778..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/killersudoku/killersudoku_README +++ /dev/null @@ -1,8 +0,0 @@ -The package enables the user to typeset Killer Sudoku logic puzzles -(aka Samunapure, Sum Number Place, Sumdoku, Gebietssummen, ...) -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.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/laserbeam/laserbeam.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/laserbeam/laserbeam.pdf Binary files differdeleted file mode 100644 index fc07b2e5d89..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/laserbeam/laserbeam.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/laserbeam/laserbeam.tex b/Master/texmf-dist/doc/latex/logicpuzzle/laserbeam/laserbeam.tex deleted file mode 100644 index 7e0fc53bd66..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/laserbeam/laserbeam.tex +++ /dev/null @@ -1,321 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=4cm,scale=0.59]{laserbeam}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,laserbeam,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},emphstyle={[2]\color{OliveDrab}},morekeywords={laser,mirrorH,,mirrorV,laserH,laserV,placemirror,placearrow,placecross,framepuzzle,setbigcell,setrule,tikzpath,colorarea,framearea,fillarea,laserbeamcell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{laserbeam.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Laser Beam logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Laser Beam logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.0} -\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{% - \begin{laserbeam} - \laserV{1} - \laserH{{}} - \mirrorH{{},2} - \mirrorV{{},{},{},{},{},2} - \framepuzzle[LP@c@mirror] - \placearrow{3}{1}{LeftUp} - \placearrow{6}{4}{RightUp} - \placecross{3}{3} - \end{laserbeam} - \hspace{1cm} - \begin{laserbeam} - \laserV{1} - \laserH{{}} - \mirrorH{{},2} - \mirrorV{{},{},{},{},{},2} - \framepuzzle[LP@c@mirror] - \placearrow{3}{1}{LeftUp} - \placearrow{6}{4}{RightUp} - \placecross{3}{3} - \placemirror{2}{2}{V} - \placemirror{4}{2}{H} - \placemirror{5}{5}{V} - \placemirror{3}{5}{H} - \begin{puzzlebackground} - \laser{\tikzpath{3}{1}{7,9,9,9,7,1,7,1,3,3,3,9,9}} - \end{puzzlebackground} - \end{laserbeam} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} -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. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{laserbeam} - \laserV{1} - \laserH{{}} - \mirrorH{{},2} - \mirrorV{{},{},{},{},{},2} - \framepuzzle[LP@c@mirror] - \placearrow{3}{1}{LeftUp} - \placearrow{6}{4}{RightUp} - \placecross{3}{3} - \end{laserbeam} - \hspace{1cm} - \begin{laserbeam} - \laserV{1} - \laserH{{}} - \mirrorH{{},2} - \mirrorV{{},{},{},{},{},2} - \framepuzzle[LP@c@mirror] - \placearrow{3}{1}{LeftUp} - \placearrow{6}{4}{RightUp} - \placecross{3}{3} - \placemirror{2}{2}{V} - \placemirror{4}{2}{H} - \placemirror{5}{5}{V} - \placemirror{3}{5}{H} - \begin{puzzlebackground} - \laser{\tikzpath{3}{1}{7,9,9,9,7,1,7,1,3,3,3,9,9}} - \end{puzzlebackground} - \end{laserbeam} -\end{center} -\end{lstlisting} -\lstset{basicstyle=\ttfamily\normalsize} - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{width}}{6.5cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{6.5cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-38pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{laserbeam}} -The \env{laserbeam} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{laserbeam}\oarg{options}\\\dots\\\enve{laserbeam}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\subsection{\texttt{puzzlebackground}} -The \env{puzzlebackground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzlebackground}\\\dots\\\enve{puzzlebackground}} allows you to place elements behind the main layer. -\subsection{\texttt{puzzleforeground}} -The \env{puzzleforeground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzleforeground}\\\dots\\\enve{puzzleforeground}} allows you to place elements in front of the main layer. -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{laserH}} -The command \cs{laserH}\margcs{\cmd\laserH\{\marg{csv list}\}} typesets the numbers above the grid indicating how many cells are traversed by the laser beam. It expects a comma-separated list as an argument. -\subsubsection{\texttt{laserV}} -The command \cs{laserV}\margcs{\cmd\laserV\{\marg{csv list}\}} typesets the numbers left to the grid. -\subsubsection{\texttt{mirrorH}} -The command \cs{mirrorH}\margcs{\cmd\mirrorH\{\marg{csv list}\}} typesets the numbers below the grid indicating how many mirrors are placed in the intersections of this column. -\subsubsection{\texttt{mirrorV}} -The command \cs{mirrorV}\margcs{\cmd\mirrorV\{\marg{csv list}\}} typesets the numbers right to the grid. -\subsubsection{\texttt{placearrow}} -The command \cs{placearrow}\margcs{\cmd\placearrow\{\marg{column}\}\{\marg{row}\}\\\{\marg{direction}\}} is used for the placement of arrows at the grid frame. The reference for coordinates is the bottom left corner of the cell. In the mandatory argument \marg{direction}, you can use the following indicators: LeftUp, LeftDown, RightUp, RightDown -\subsubsection{\texttt{placecross}} -With the command \cs{placecross}\margcs{\cmd\placecross\{\marg{column}\}\{\marg{row}\}} you can place a cross in the intersections of the grid. -\subsubsection{\texttt{placemirror}} -With the command \cs{placemirror}\margcs{\cmd\placemirror\{\marg{column}\}\{\marg{row}\}\\\{\marg{direction}\}} you can place mirrors in the intersections of the grid. In the mandatory argument \marg{direction}, you can use the following indicators: H, V -\subsubsection{\texttt{laser}} -The command \cs{laser}\margcs{\cmd\laser\oarg{color}\{\marg{\cmd\tikz\ path}\}} draws the laser beam given by \marg{\cmd\tikz\ path} with color \oarg{color} (default: red). The reference for coordinates is the bottom left corner of the cell. - -\begin{lstlisting} -\laser[green]{(1,2)--(2,3)--(1,4)} -\end{lstlisting} - -You should consider using this command in the \env{puzzlebackground} environment. - -\subsubsection{\texttt{tikzpath}} -With\margcs{\cmd\tikzpath\{\marg{column}\}\{\marg{row}\}\\\{\marg{csv list}\}} the \cmd\tikzpath\ command, you can easily construct a \cmd\tikz\ path. You just need to define a starting point \marg{column}\marg{row} (bottom left corner) and a \marg{csv list} with direction indicators relative to the current position. - -\begin{center} -\begin{tabular}{rlrlrl} -7: & up left & 8: & up & 9: & up right \\ -4: & left & 5: & no change & 6: & right \\ -1: & down left & 2: & down & 3: & down right \\ -\end{tabular} -\end{center} - -\begin{lstlisting} -\framearea{green}{\tikzpath{2}{2}{8,6,2,4}} -\end{lstlisting} - -This command will frame grid cell \texttt{(2,2)} green. -\subsubsection{\texttt{framepuzzle}} -With\margcs{\cmd\framepuzzle\oarg{color}} the \cmd\framepuzzle\ command, you can frame the grid (thicker line) with the color specified with the optional argument \oarg{color} (default: black). -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{laserbeamsetup}} -With the command \cs{laserbeamsetup}\margcs{\cmd\laserbeamsetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/laserbeam/laserbeam_README b/Master/texmf-dist/doc/latex/logicpuzzle/laserbeam/laserbeam_README deleted file mode 100644 index f9fcb0e8b06..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/laserbeam/laserbeam_README +++ /dev/null @@ -1,11 +0,0 @@ -The package enables the user to typeset Laser Beam logic puzzles -(aka Laserstrahl, ...). -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. diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.pdf Binary files differindex bd417dded6e..0e77a0f56d3 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.pdf +++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.tex b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.tex index b21a1845121..47aa95d394e 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.tex +++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.tex @@ -15,21 +15,12 @@ \usepackage{microtype}% \usepackage{ltxdocext}% \usepackage{listings} +\usepackage{nicefrac} +\usepackage{filecontents} \usepackage{marginnote}% \usepackage[svgnames,rgb]{xcolor}% \usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=4.5cm,scale=0.85]{ddsudoku} -\usepackage[width=4.5cm,scale=0.77,sbindent=0.65cm,sbwidth=3.6cm]{battleship} -\usepackage[width=4.5cm,scale=0.65]{bokkusu} -\usepackage[width=4.5cm,scale=0.89]{chaossudoku}% -\usepackage[width=4.5cm,scale=0.89]{hakyuu} -\usepackage[width=4.5cm,scale=0.85]{hitori} -\usepackage[width=4.5cm,scale=0.89]{kendoku} -\usepackage[width=4.5cm,scale=0.89]{killersudoku} -\usepackage[width=4.5cm,scale=0.67]{laserbeam} -\usepackage[width=4.5cm,scale=0.66]{skyline} -\usepackage[width=4.5cm,scale=0.85]{slitherlink} -\usepackage[width=4.5cm,scale=0.49]{lpsudoku} +\usepackage{logicpuzzle} \usepackage{hyperref} % \setlength{\headheight}{1.1\baselineskip}% @@ -42,12 +33,29 @@ {1.25ex \@plus .25ex}% {\normalfont\normalsize\bfseries}} \makeatother -\setcounter{secnumdepth}{4} -\setcounter{tocdepth}{4} +\setcounter{secnumdepth}{5} +\setcounter{tocdepth}{5} \makeatother \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={battleship,puzzlebackground,puzzleforeground,center,pgfonlayer,chaossudoku,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,clor,bgcolor,counterstyle,title,titleindent,titlewidth,cvoffset,width},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,ifthenelse,equal,LP@drawbackground,LP@drawgrid,LP@drawcounter,ProvidesPackage,RequirePackage,LP@BK@init@prefix,LP@BK@init@package,LP@leftcolumn,skylineL,LP@define@key,framearea,fillarea,tikzpath,setrule,colorarea,chaossudokucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} +\lstset{language=[LaTeX]TeX,numbers=left,numberstyle=\tiny, basicstyle=\ttfamily, aboveskip=\baselineskip, frame=single, backgroundcolor=\color{LightGoldenrodYellow}, keywordstyle=\color{Blue}, +emph={ddsudoku, battleship, bokkusu, chaossudoku, hakyuu, hitori, kendoku, killersudoku, laserbeam, skyline, slitherlink, lpsudoku, minesweeper, tunnel, +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}, +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, +ifthenelse, equal, LP@drawbackground, LP@drawgrid, LP@drawcounter, ProvidesPackage, +RequirePackage, LP@BK@init@prefix, LP@BK@init@package, LP@leftcolumn, skylineL, +LP@define@key, framearea, framepuzzle, fillarea, filldiagonals, tikzpath, setrule, colorarea, +ddsudokucell, chaossudokucell, hakyuucell, setrow, LP@cvoffset, titleformat, definecounterstyle, +marginnote, tikz, node, placesegment, placeship, shipH, shipV, shipbox, puzzlecounter, color, +fillrow, setcolorrow, laserV, laserH, mirrorV, mirrorH, placearrow, placecross, placemirror, +laser, skylineT, skylineB, skylineR, skylineL, skylinecell, setbigcell, slitherlinkcell, +tunnelH, tunnelV, tube, portal, Mine, ShipR, [, ]}} \makeatletter \renewcommand{\maketitle}% {% @@ -147,6 +155,7 @@ % \newcommand\layer{\name@idx{PGF layer}} \newcommand\styleoption{\name@idx{style option}}% +\newcommand\envoption{\name@idx{environment option}}% \newcommand\stylename{\name@idx{document style}}% \def\name@idx#1#2{% {\ttfamily#2}% @@ -163,10 +172,11 @@ \index{#1=\string\meta{#1} optional argument}\index{optional argument>#1=\string\meta{#1}}% }% % -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{3.1em}} -\renewcommand*\l@subsubsection{\@dottedtocline{3}{4.6em}{3.2em}} -\renewcommand*\l@paragraph{\@dottedtocline{3}{7.8em}{5em}} +%\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} +\renewcommand*\l@subsection{\@dottedtocline{2}{1.6em}{3.1em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{4.7em}{3.8em}} +\renewcommand*\l@paragraph{\@dottedtocline{3}{8.5em}{5em}} +\renewcommand*\l@subparagraph{\@dottedtocline{3}{13.5em}{6em}} \renewenvironment{theindex} {\if@twocolumn \@restonecolfalse @@ -198,42 +208,205 @@ \hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% % \begin{document} +\begin{filecontents}{logicpuzzle.bib} +@misc{bib:webbb:logigpuzzle, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/}(https://bitbucket.org/kleberj/logicpuzzle/)}, + title = {The logicpuzzle bundle}, + year = {2013}, + } + +@misc{bib:weblp:logigpuzzle, + author = {Josef Kleber}, + note = {\href{http://logicpuzzle.square7.de/}(http://logicpuzzle.square7.de/)}, + title = {{logicpuzzle -- A LaTeX style file for typesetting logic puzzles}}, + year = {2013}, + } + +@misc{bib:wiki:createlpsudoku, + author = {Josef Kleber}, + note = {\href{http://logicpuzzle.square7.de/createlpsudoku}(http://logicpuzzle.square7.de/createlpsudoku)}, + title = {createlpsudoku}, + year = {2013}, + } + +@misc{bib:wiki:lpsmag, + author = {Josef Kleber}, + note = {\href{http://logicpuzzle.square7.de/lpsmag}(http://logicpuzzle.square7.de/lpsmag)}, + title = {lpsmag}, + year = {2013}, + } + +@misc{bib:wiki:howtosudoku, + author = {Josef Kleber}, + note = {\href{http://logicpuzzle.square7.de/sudoku_magazine}(http://logicpuzzle.square7.de/sudoku\_magazine)}, + title = {{How to create a Sudoku magazine}}, + year = {2013}, + } + +@misc{bib:web:qqwing, + author = {Stephen Ostermiller}, + note = {\href{http://ostermiller.org/qqwing/}(http://ostermiller.org/qqwing/)}, + title = {{QQwing -- Sudoku Generator and Solver}}, + year = {2011}, + } + +@misc{bib:web:hodoku, + author = {Bernhard Hobiger}, + note = {\href{http://hodoku.sourceforge.net/en/index.php}(http://hodoku.sourceforge.net/en/index.php)}, + title = {{HoDoKu}}, + year = {2012}, + } + +@misc{bib:ex:ddsudoku, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-ddsudoku.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-ddsudoku.pdf)}, + title = {{Examples \& Solutions (ddsudoku)}}, + year = {2013}, + } + +@misc{bib:ex:battleship, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-battleship.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-battleship.pdf)}, + title = {{Examples \& Solutions (battleship)}}, + year = {2013}, + } + +@misc{bib:ex:bokkusu, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-bokkusu.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-bokkusu.pdf)}, + title = {{Examples \& Solutions (bokkusu)}}, + year = {2013}, + } + +@misc{bib:ex:chaossudoku, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-chaossudoku.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-chaossudoku.pdf)}, + title = {{Examples \& Solutions (chaossudoku)}}, + year = {2013}, + } + +@misc{bib:ex:hakyuu, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-hakyuu.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-hakyuu.pdf)}, + title = {{Examples \& Solutions (hakyuu)}}, + year = {2013}, + } + +@misc{bib:ex:hitori, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-hitor.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-hitori.pdf)}, + title = {{Examples \& Solutions (hitori)}}, + year = {2013}, + } + +@misc{bib:ex:kendoku, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-kendoku.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-kendoku.pdf)}, + title = {{Examples \& Solutions (kendoku)}}, + year = {2013}, + } + +@misc{bib:ex:killersudoku, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-killersudoku.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-killersudoku.pdf)}, + title = {{Examples \& Solutions (killersudoku)}}, + year = {2013}, + } + +@misc{bib:ex:laserbeam, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-laserbeam.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-laserbeam.pdf)}, + title = {{Examples \& Solutions (laserbeam)}}, + year = {2013}, + } + +@misc{bib:ex:minesweeper, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-minesweeper.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-minesweeper.pdf)}, + title = {{Examples \& Solutions (minesweeper)}}, + year = {2013}, + } + +@misc{bib:ex:skyline, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-skyline.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-skyline.pdf)}, + title = {{Examples \& Solutions (skyline)}}, + year = {2013}, + } + +@misc{bib:ex:slitherlink, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-slitherlink.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-slitherlink.pdf)}, + title = {{Examples \& Solutions (slitherlink)}}, + year = {2013}, + } + +@misc{bib:ex:lpsudoku, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-lpsudoku.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-lpsudoku.pdf)}, + title = {{Examples \& Solutions (lpsudoku)}}, + year = {2013}, + } + +@misc{bib:ex:tunnel, + author = {Josef Kleber}, + note = {\href{https://bitbucket.org/kleberj/logicpuzzle/downloads/example-tunnel.pdf}(https://bitbucket.org/kleberj/logicpuzzle/downloads/example-tunnel.pdf)}, + title = {{Examples \& Solutions (tunnel)}}, + year = {2013}, + } + +\end{filecontents} +\bibliographystyle{plain} +\ddsudokusetup{width=4.5cm,scale=0.85} +\battleshipsetup{width=4.5cm,scale=0.77,sbindent=0.65cm,sbwidth=3.6cm} +\bokkususetup{width=4.5cm,scale=0.64,fontsize=normalsize} +\chaossudokusetup{width=4.5cm,scale=0.89} +\hakyuusetup{width=4.5cm,scale=0.89} +\hitorisetup{width=4.5cm,scale=0.85} +\kendokusetup{width=4.5cm,scale=0.89} +\killersudokusetup{width=4.5cm,scale=0.89} +\laserbeamsetup{width=4.5cm,scale=0.66,fontsize=normalsize} +\minesweepersetup{width=4.5cm,scale=0.85} +\skylinesetup{width=4.5cm,scale=0.66,fontsize=normalsize} +\slitherlinksetup{width=4.5cm,scale=0.85} +\lpsudokusetup{width=4.5cm,scale=0.49,fontsize=small} +\tunnelsetup{width=4.5cm,scale=0.75} \title{\filename}% \Subtitle{A style file for typesetting logic puzzles}% \author{Josef Kleber} -\Fileversion{v1.9} +\Fileversion{v2.0} \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{% -\begin{chaossudoku} - \chaossudokucell{1}{1}{3} - \chaossudokucell{1}{5}{4} - \chaossudokucell{3}{2}{4} - \chaossudokucell{4}{2}{5} - \chaossudokucell{5}{5}{2} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} - \fillarea{LightYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} - \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} - \fillarea{GreenYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} - \end{puzzlebackground} - \end{chaossudoku} - \hspace{1,5cm} - \begin{chaossudoku} - \setrow{5}{4,3,5,1,2} - \setrow{4}{2,1,3,4,5} - \setrow{3}{5,4,2,3,1} - \setrow{2}{1,2,4,5,3} - \setrow{1}{3,5,1,2,4} + \begin{laserbeam} + \laserV{1} + \laserH{{}} + \mirrorH{{},2} + \mirrorV{{},{},{},{},{},2} + \framepuzzle[LP@c@mirror] + \placearrow{3}{1}{LeftUp} + \placearrow{6}{4}{RightUp} + \placecross{3}{3} + \end{laserbeam} + \hspace{1.5cm} + \begin{laserbeam} + \laserV{1} + \laserH{{}} + \mirrorH{{},2} + \mirrorV{{},{},{},{},{},2} + \framepuzzle[LP@c@mirror] + \placearrow{3}{1}{LeftUp} + \placearrow{6}{4}{RightUp} + \placecross{3}{3} + \placemirror{2}{2}{V} + \placemirror{4}{2}{H} + \placemirror{5}{5}{V} + \placemirror{3}{5}{H} \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} - \fillarea{LightYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} - \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} - \fillarea{GreenYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} - \end{puzzlebackground} - \end{chaossudoku} + \laser{\tikzpath{3}{1}{7,9,9,9,7,1,7,1,3,3,3,9,9}} + \end{puzzlebackground} + \end{laserbeam} } \maketitle \stepcounter{page} @@ -242,7 +415,12 @@ \setlength\parskip{6pt}% \section{Supported puzzles} +\label{sec:supppuzzle} \subsection{2D-Sudoku} +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{center} \begin{ddsudoku} \framepuzzle @@ -254,7 +432,7 @@ \ddsudokucell{4}{3}{2} \ddsudokucell{5}{4}{4} \end{ddsudoku} - \hspace{1,5cm} + \hspace{1.5cm} \begin{ddsudoku} \framepuzzle \filldiagonals[orange!50] @@ -265,7 +443,51 @@ \setrow{1}{4,1,2,3,5} \end{ddsudoku} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{ddsudoku} + \framepuzzle + \filldiagonals[orange!50] + \ddsudokucell{1}{5}{1} + \ddsudokucell{1}{4}{3} + \ddsudokucell{2}{3}{4} + \ddsudokucell{4}{1}{3} + \ddsudokucell{4}{3}{2} + \ddsudokucell{5}{4}{4} + \end{ddsudoku} + \hspace{1.5cm} + \begin{ddsudoku} + \framepuzzle + \filldiagonals[orange!50] + \setrow{5}{1,3,4,5,2} + \setrow{4}{3,2,5,1,4} + \setrow{3}{5,4,3,2,1} + \setrow{2}{2,5,1,4,3} + \setrow{1}{4,1,2,3,5} + \end{ddsudoku} +\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{Battleship} +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{center} \begin{battleship} \placesegment{4}{1}{\ShipR} @@ -284,7 +506,51 @@ \shipV{3,1,4,0,3} \end{battleship} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{battleship} + \placesegment{4}{1}{\ShipR} + \shipH{4,1,2,2,2} + \shipV{3,1,4,0,3} + \shipbox{3,3,2,2,1} + \end{battleship} + \hspace{1.5cm} + \begin{battleship} + \placeship{V}{1}{1}{3} + \placeship{H}{1}{5}{2} + \placeship{H}{3}{1}{2} + \placeship{H}{3}{3}{3} + \placeship{H}{5}{5}{1} + \shipH{4,1,2,2,2} + \shipV{3,1,4,0,3} + \end{battleship} +\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{shipcolor}{green}{sets the color of the ship segments.} + \optitem{\envoption{width}}{6cm}{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}}{0.75cm}{defines the indent of the title.} + \optitem{\envoption{titlewidth}}{5.15cm}{specifies the width of the box the title is set in.} + \optitem{\envoption{sbindent}}{0.75cm}{defines the indent of the ship box below the grid.} +\optitem{\envoption{sbwidth}}{5.15cm}{specifies the width of the minipage, in which the ships are typeset.} + \optitem{\envoption{sbshipscale}}{1}{scales the size of the ships in the ship box.} + \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{Bokkusu} +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{center} \begin{bokkusu} \valueH{1,2,3,4,5} @@ -305,7 +571,49 @@ \fillrow{5}{0,0,1,0,0} \end{bokkusu} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{bokkusu} + \valueH{1,2,3,4,5} + \valueV{1,2,3,4,5} + \sumH{7,1,11,9,6} + \sumV{2,12,5,13,?} + \end{bokkusu} + \hspace{1.5cm} + \begin{bokkusu} + \valueH{1,2,3,4,5} + \valueV{1,2,3,4,5} + \sumH{7,1,11,9,6} + \sumV{2,12,5,13,?} + \fillrow{5}{0,0,1,0,0} + \fillrow{4}{1,0,1,1,1} + \fillrow{3}{1,0,0,1,0} + \fillrow{2}{0,0,1,1,1} + \fillrow{1}{0,1,0,0,0} + \end{bokkusu} +\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.7cm}{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}}{0.75cm}{defines the indent of the title.} + \optitem{\envoption{titlewidth}}{5.85cm}{specifies the width of the box the title is set in.} + \optitem{\envoption{color}}{black}{specifies the color for coloring the cells.} + \optitem{\envoption{bgcolor}}{}{sets the background color of the grid.} + \optitem{\envoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} + \optitem{\envoption{cvoffset}}{-38pt}{sets the vertical offset of the counters in the margin.} +\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} \begin{center} \begin{chaossudoku} \chaossudokucell{1}{1}{3} @@ -321,7 +629,7 @@ \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} \end{puzzlebackground} \end{chaossudoku} - \hspace{1,5cm} + \hspace{1.5cm} \begin{chaossudoku} \setrow{5}{4,3,5,1,2} \setrow{4}{2,1,3,4,5} @@ -337,7 +645,69 @@ \end{puzzlebackground} \end{chaossudoku} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{chaossudoku} + \chaossudokucell{1}{1}{3} + \chaossudokucell{1}{5}{4} + \chaossudokucell{3}{2}{4} + \chaossudokucell{4}{2}{5} + \chaossudokucell{5}{5}{2} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1) + --(1,1)} + \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5) + --(2,2)--(1,2)} + \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4) + --(5,2)--(4,2)--(4,3)--(2,3)} + \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5) + --(5,4)--(3,4)} + \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5) + --(6,1)--(4,1)} + \end{puzzlebackground} + \end{chaossudoku} + \hspace{1.5cm} + \begin{chaossudoku} + \setrow{5}{4,3,5,1,2} + \setrow{4}{2,1,3,4,5} + \setrow{3}{5,4,2,3,1} + \setrow{2}{1,2,4,5,3} + \setrow{1}{3,5,1,2,4} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1) + --(1,1)} + \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5) + --(2,2)--(1,2)} + \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4) + --(5,2)--(4,2)--(4,3)--(2,3)} + \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5) + --(5,4)--(3,4)} + \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5) + --(6,1)--(4,1)} + \end{puzzlebackground} + \end{chaossudoku} +\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{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{center} \begin{hakyuu} \hakyuucell{1}{5}{2} @@ -357,7 +727,7 @@ \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)} \end{puzzlebackground} \end{hakyuu} - \hspace{1,5cm} + \hspace{1.5cm} \begin{hakyuu} \setrow{5}{2,3,6,5,4} \setrow{4}{1,7,3,4,2} @@ -374,7 +744,74 @@ \end{puzzlebackground} \end{hakyuu} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{hakyuu} + \hakyuucell{1}{5}{2} + \hakyuucell{3}{5}{6} + \hakyuucell{4}{5}{5} + \hakyuucell{4}{4}{4} + \hakyuucell{1}{3}{3} + \hakyuucell{2}{2}{2} + \hakyuucell{5}{2}{5} + \hakyuucell{4}{1}{1} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} + \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5) + --(3,4)--(1,4)} + \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4) + --(4,4)--(4,3)--(2,3)--(2,4)} + \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4) + --(5,4)--(5,5)} + \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2) + --(2,2)} + \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3) + --(6,1)--(2,1)} + \end{puzzlebackground} + \end{hakyuu} + \hspace{1.5cm} + \begin{hakyuu} + \setrow{5}{2,3,6,5,4} + \setrow{4}{1,7,3,4,2} + \setrow{3}{3,1,2,1,3} + \setrow{2}{1,2,1,3,5} + \setrow{1}{2,3,4,1,2} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} + \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5) + --(3,4)--(1,4)} + \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4) + --(4,4)--(4,3)--(2,3)--(2,4)} + \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4) + --(5,4)--(5,5)} + \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2) + --(2,2)} + \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3) + --(6,1)--(2,1)} + \end{puzzlebackground} + \end{hakyuu} +\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{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{center} \begin{hitori} \framepuzzle @@ -394,7 +831,47 @@ \setcolorrow{1}{0,1,0,2,3} \end{hitori} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{hitori} + \framepuzzle + \setcolorrow{5}{2,4,2,1,1} + \setcolorrow{4}{1,3,2,4,1} + \setcolorrow{3}{1,3,3,3,2} + \setcolorrow{2}{4,2,1,3,3} + \setcolorrow{1}{4,1,2,2,3} + \end{hitori} + \hspace{1.5cm} + \begin{hitori} + \framepuzzle + \setcolorrow{5}{2,4,0,1,0} + \setcolorrow{4}{0,3,2,4,1} + \setcolorrow{3}{1,0,3,0,2} + \setcolorrow{2}{4,2,1,3,0} + \setcolorrow{1}{0,1,0,2,3} + \end{hitori} +\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{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{center} \begin{kendoku} \framearea{black}{\tikzpath{1}{1}{8,8,6,2,6,2,4,4}} @@ -457,7 +934,90 @@ \setrow{1}{4,1,2,3,5} \end{kendoku} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{kendoku} + \framearea{black}{\tikzpath{1}{1}{8,8,6,2,6,2,4,4}} + \framearea{black}{\tikzpath{1}{3}{8,6,2,4}} + \framearea{black}{\tikzpath{1}{4}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{2}{2}{8,8,6,6,2,4,2,4}} + \framearea{black}{\tikzpath{2}{4}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{3}{1}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{3}{4}{8,8,6,6,2,4,2,4}} + \framearea{black}{\tikzpath{4}{1}{8,6,6,2,4,4}} + \framearea{black}{\tikzpath{4}{2}{8,6,6,2,4,4}} + \framearea{black}{\tikzpath{4}{3}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{5}{3}{8,6,2,4}} + \framearea{black}{\tikzpath{5}{4}{8,6,2,4}} + \framearea{black}{\tikzpath{5}{5}{8,6,2,4}} + \setrule{1}{2}{8\times} + \setrule{1}{3}{5} + \setrule{1}{5}{4+} + \setrule{2}{3}{60\times} + \setrule{2}{5}{2\div} + \setrule{3}{2}{2-} + \setrule{3}{5}{75\times} + \setrule{4}{1}{8+} + \setrule{4}{2}{1-} + \setrule{4}{4}{2\times} + \setrule{5}{3}{1} + \setrule{5}{5}{2} + \end{kendoku} + \hspace{1.5cm} + \begin{kendoku} + \framearea{black}{\tikzpath{1}{1}{8,8,6,2,6,2,4,4}} + \framearea{black}{\tikzpath{1}{3}{8,6,2,4}} + \framearea{black}{\tikzpath{1}{4}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{2}{2}{8,8,6,6,2,4,2,4}} + \framearea{black}{\tikzpath{2}{4}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{3}{1}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{3}{4}{8,8,6,6,2,4,2,4}} + \framearea{black}{\tikzpath{4}{1}{8,6,6,2,4,4}} + \framearea{black}{\tikzpath{4}{2}{8,6,6,2,4,4}} + \framearea{black}{\tikzpath{4}{3}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{5}{3}{8,6,2,4}} + \framearea{black}{\tikzpath{5}{4}{8,6,2,4}} + \framearea{black}{\tikzpath{5}{5}{8,6,2,4}} + \setrule{1}{2}{8\times} + \setrule{1}{3}{5} + \setrule{1}{5}{4+} + \setrule{2}{3}{60\times} + \setrule{2}{5}{2\div} + \setrule{3}{2}{2-} + \setrule{3}{5}{75\times} + \setrule{4}{1}{8+} + \setrule{4}{2}{1-} + \setrule{4}{4}{2\times} + \setrule{5}{3}{1} + \setrule{5}{5}{2} + \setrow{5}{1,4,3,5,2} + \setrow{4}{3,2,5,1,4} + \setrow{3}{5,3,4,2,1} + \setrow{2}{2,5,1,4,3} + \setrow{1}{4,1,2,3,5} + \end{kendoku} +\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{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{center} \begin{killersudoku}[columns=4,rows=4,scale=1.11] \framearea{black}{\tikzpath{1}{1}{8,8,6,6,2,4,2,4}} @@ -501,7 +1061,69 @@ \setrow{1}{1,3,2,4} \end{killersudoku} \end{center} + +\begin{lstlisting} +\begin{killersudoku} + \framearea{black}{\tikzpath{1}{1}{8,8,6,6,2,4,2,4}} + \framearea{black}{\tikzpath{1}{3}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{2}{1}{8,6,6,6,2,4,4,4}} + \framearea{black}{\tikzpath{2}{3}{8,8,6,2,6,2,4,4}} + \framearea{black}{\tikzpath{3}{2}{8,6,8,6,2,2,4,4}} + \framearea{black}{\tikzpath{3}{4}{8,6,6,2,4,4}} + \begin{puzzlebackground} + \colorarea{orange!20}{\tikzpath{1}{1}{8,8,6,6,2,2,4,4}} + \colorarea{orange!20}{\tikzpath{3}{3}{8,8,6,6,2,2,4,4}} + \end{puzzlebackground} + \setrule{1}{2}{7} + \setrule{1}{4}{7} + \setrule{2}{1}{9} + \setrule{2}{4}{6} + \setrule{3}{4}{5} + \setrule{4}{3}{6} + \end{killersudoku} + \hspace{1.5cm} + \begin{killersudoku} + \framearea{black}{\tikzpath{1}{1}{8,8,6,6,2,4,2,4}} + \framearea{black}{\tikzpath{1}{3}{8,8,6,2,2,4}} + \framearea{black}{\tikzpath{2}{1}{8,6,6,6,2,4,4,4}} + \framearea{black}{\tikzpath{2}{3}{8,8,6,2,6,2,4,4}} + \framearea{black}{\tikzpath{3}{2}{8,6,8,6,2,2,4,4}} + \framearea{black}{\tikzpath{3}{4}{8,6,6,2,4,4}} + \begin{puzzlebackground} + \colorarea{orange!20}{\tikzpath{1}{1}{8,8,6,6,2,2,4,4}} + \colorarea{orange!20}{\tikzpath{3}{3}{8,8,6,6,2,2,4,4}} + \end{puzzlebackground} + \setrule{1}{2}{7} + \setrule{1}{4}{7} + \setrule{2}{1}{9} + \setrule{2}{4}{6} + \setrule{3}{4}{5} + \setrule{4}{3}{6} + \setrow{4}{3,2,4,1} + \setrow{3}{4,1,3,2} + \setrow{2}{2,4,1,3} + \setrow{1}{1,3,2,4} + \end{killersudoku} +\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{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{center} \begin{laserbeam} \laserV{1} @@ -532,7 +1154,117 @@ \end{puzzlebackground} \end{laserbeam} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{laserbeam} + \laserV{1} + \laserH{{}} + \mirrorH{{},2} + \mirrorV{{},{},{},{},{},2} + \framepuzzle[LP@c@mirror] + \placearrow{3}{1}{LeftUp} + \placearrow{6}{4}{RightUp} + \placecross{3}{3} + \end{laserbeam} + \hspace{1cm} + \begin{laserbeam} + \laserV{1} + \laserH{{}} + \mirrorH{{},2} + \mirrorV{{},{},{},{},{},2} + \framepuzzle[LP@c@mirror] + \placearrow{3}{1}{LeftUp} + \placearrow{6}{4}{RightUp} + \placecross{3}{3} + \placemirror{2}{2}{V} + \placemirror{4}{2}{H} + \placemirror{5}{5}{V} + \placemirror{3}{5}{H} + \begin{puzzlebackground} + \laser{\tikzpath{3}{1}{7,9,9,9,7,1,7,1,3,3,3,9,9}} + \end{puzzlebackground} + \end{laserbeam} +\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.5cm}{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}}{6.5cm}{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}}{-38pt}{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{center} + \begin{minesweeper} + \framepuzzle + \setrow{5}{{},1} + \setrow{4}{{},{},3,3} + \setrow{3}{3,{},4,2} + \setrow{2}{{},{},{},{},0} + \setrow{1}{{},2} + \end{minesweeper} + \hspace{1.5cm} + \begin{minesweeper} + \framepuzzle + \setrow{5}{{},1,{},\Mine,\Mine} + \setrow{4}{{},\Mine,3,3,\Mine} + \setrow{3}{3,\Mine,4,2} + \setrow{2}{{},\Mine,\Mine,{},0} + \setrow{1}{{},2} + \end{minesweeper} +\end{center} +\begin{lstlisting} +\begin{center} + \begin{minesweeper} + \framepuzzle + \setrow{5}{{},1} + \setrow{4}{{},{},3,3} + \setrow{3}{3,{},4,2} + \setrow{2}{{},{},{},{},0} + \setrow{1}{{},2} + \end{minesweeper} + \hspace{1.5cm} + \begin{minesweeper} + \framepuzzle + \setrow{5}{{},1,{},\Mine,\Mine} + \setrow{4}{{},\Mine,3,3,\Mine} + \setrow{3}{3,\Mine,4,2} + \setrow{2}{{},\Mine,\Mine,{},0} + \setrow{1}{{},2} + \end{minesweeper} +\end{center} +\end{lstlisting} + +\subsubsection{Options} +\begin{optionlist} + \optitem{\envoption{rows}}{5}{defines the number of rows in the grid.} + \optitem{\envoption{columns}}{5}{specifies the number of columns in the grid} + \optitem{\envoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} + \optitem{\envoption{scale}}{1}{scales the size of the grid in the minipage.} + \optitem{\envoption{fontsize}}{Large}{specifies the size of the numbers next to the grid. Here, the usual \LaTeX\ sizes are used. Possible values: \texttt{tiny}, \texttt{scriptsize}, \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}, \texttt{large}, \underline{\texttt{Large}}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}} + \optitem{\envoption{title}}{}{sets the title of a puzzle.} + \optitem{\envoption{titleindent}}{0cm}{defines the indent of the title.} + \optitem{\envoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} + \optitem{\envoption{bgcolor}}{}{sets the background color of the grid.} + \optitem{\envoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} + \optitem{\envoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} +\end{optionlist} + \subsection{Skyline} +There are skyscrapers located in each cell. Try to find out the height of the skyscraper in the respective cell. There are heights of 1 to MAX in every row, every column, and in each of the two diagonals if indicated. Some cells may be empty (parks). The numbers around the grid indicate how many buildings you can see from this position when you look at the skyscraper lineup. Bear in mind that only those skyscrapers are visible which are higher than the ones in front. +\subsubsection{Example} \begin{center} \begin{skyline} \skylineB{3,{},3,1,{}} @@ -542,7 +1274,7 @@ \skylinecell{1}{3}{2} \skylinecell{4}{2}{3} \end{skyline} - \hspace{1.5cm} + \hspace{1cm} \begin{skyline} \skylineB{3,{},3,1,{}} \skylineL{{},4,3,{},{}} @@ -555,7 +1287,224 @@ \setrow{1}{3,1,2,5,4} \end{skyline} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{skyline} + \skylineB{3,{},3,1,{}} + \skylineL{{},4,3,{},{}} + \skylineT{{},{},2,{},3} + \skylineR{{},1,3,{},{}} + \skylinecell{1}{3}{2} + \skylinecell{4}{2}{3} + \end{skyline} + \hspace{1cm} + \begin{skyline} + \skylineB{3,{},3,1,{}} + \skylineL{{},4,3,{},{}} + \skylineT{{},{},2,{},3} + \skylineR{{},1,3,{},{}} + \setrow{5}{5,4,3,1,2} + \setrow{4}{4,5,1,2,3} + \setrow{3}{2,3,5,4,1} + \setrow{2}{1,2,4,3,5} + \setrow{1}{3,1,2,5,4} + \end{skyline} +\end{center} +\end{lstlisting} + +\paragraph{Variants} +\subparagraph{Skyline Sudoku} +\begin{center} + \begin{skyline}[sudoku,scale=.4] + \skylineB{4,5,2,5,2,1,2,4,3} + \skylineL{4,2,2,2,1,3,3,3,2} + \skylineT{4,1,3,2,3,5,3,2,3} + \skylineR{3,3,1,3,4,2,3,2,4} + \setrow{9}{{},{},{},8,{},{},{},7} + \setrow{8}{{},{},4,{},{},6,{},{},8} + \setrow{7}{{},2,{},7,{},{},{},{},1} + \setrow{6}{{},{},{},{},8,2} + \setrow{5}{{},{},2,{},4,{},7} + \setrow{4}{{},{},{},3,{},{},4} + \setrow{3}{{},{},{},{},1} + \setrow{2}{{},3,{},{},{},{},1,2} + \setrow{1}{{},{},5} + \end{skyline} + \hspace{1cm} + \begin{skyline}[sudoku,scale=.4] + \skylineB{4,5,2,5,2,1,2,4,3} + \skylineL{4,2,2,2,1,3,3,3,2} + \skylineT{4,1,3,2,3,5,3,2,3} + \skylineR{3,3,1,3,4,2,3,2,4} + \setrow{9}{3,9,6,8,5,1,2,7,4} + \setrow{8}{1,7,4,9,2,6,3,5,8} + \setrow{7}{5,2,8,7,3,4,9,6,1} + \setrow{6}{7,4,3,1,8,2,6,9,5} + \setrow{5}{9,8,2,6,4,5,7,1,3} + \setrow{4}{6,5,1,3,9,7,4,8,2} + \setrow{3}{8,6,7,2,1,3,5,4,9} + \setrow{2}{4,3,9,5,6,8,1,2,7} + \setrow{1}{2,1,5,4,7,9,8,3,6} + \end{skyline} +\end{center} + +\begin{lstlisting} +\begin{center} + \begin{skyline}[sudoku,scale=.4] + \skylineB{4,5,2,5,2,1,2,4,3} + \skylineL{4,2,2,2,1,3,3,3,2} + \skylineT{4,1,3,2,3,5,3,2,3} + \skylineR{3,3,1,3,4,2,3,2,4} + \setrow{9}{{},{},{},8,{},{},{},7} + \setrow{8}{{},{},4,{},{},6,{},{},8} + \setrow{7}{{},2,{},7,{},{},{},{},1} + \setrow{6}{{},{},{},{},8,2} + \setrow{5}{{},{},2,{},4,{},7} + \setrow{4}{{},{},{},3,{},{},4} + \setrow{3}{{},{},{},{},1} + \setrow{2}{{},3,{},{},{},{},1,2} + \setrow{1}{{},{},5} + \end{skyline} + \hspace{1cm} + \begin{skyline}[sudoku,scale=.4] + \skylineB{4,5,2,5,2,1,2,4,3} + \skylineL{4,2,2,2,1,3,3,3,2} + \skylineT{4,1,3,2,3,5,3,2,3} + \skylineR{3,3,1,3,4,2,3,2,4} + \setrow{9}{3,9,6,8,5,1,2,7,4} + \setrow{8}{1,7,4,9,2,6,3,5,8} + \setrow{7}{5,2,8,7,3,4,9,6,1} + \setrow{6}{7,4,3,1,8,2,6,9,5} + \setrow{5}{9,8,2,6,4,5,7,1,3} + \setrow{4}{6,5,1,3,9,7,4,8,2} + \setrow{3}{8,6,7,2,1,3,5,4,9} + \setrow{2}{4,3,9,5,6,8,1,2,7} + \setrow{1}{2,1,5,4,7,9,8,3,6} + \end{skyline} +\end{center} +\end{lstlisting} + +\subparagraph{Skyline Sudoku (N*N)} +\begin{center} + \begin{skyline}[rows=6,columns=6,scale=.58] + \skylineB{4,2,1,3,3,2} + \skylineL{3,3,4,3,2,1} + \skylineT{1,2,3,3,2,4} + \skylineR{4,1,2,2,2,3} + \skylinecell{2}{4}{1} + \skylinecell{4}{1}{4} + \skylinecell{5}{2}{3} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,3)--(4,3)--(4,1)--(1,1)} + \fillarea{HotPink!30}{(1,3)--(1,7)--(4,7)--(4,6)--(2,6) + --(2,3)--(1,3)} + \fillarea{GreenYellow}{(2,3)--(2,6)--(4,6)--(4,3)--(2,3)} + \fillarea{LightBlue}{(4,1)--(7,1)--(7,5)--(6,5)--(6,2) + --(4,2)--(4,1)} + \fillarea{LightSalmon!50}{(4,7)--(4,4)--(5,4)--(5,6)--(6,6) + --(6,5)--(7,5)--(7,7)--(4,7)} + \fillarea{LightYellow}{(4,2)--(4,4)--(5,4)--(5,6)--(6,6) + --(6,2)--(4,2)} + \end{puzzlebackground} + \end{skyline} + \hspace{1cm} + \begin{skyline}[rows=6,columns=6,scale=.58] + \skylineB{4,2,1,3,3,2} + \skylineL{3,3,4,3,2,1} + \skylineT{1,2,3,3,2,4} + \skylineR{4,1,2,2,2,3} + \setrow{6}{6,3,4,1,5,2} + \setrow{5}{5,6,2,3,1,4} + \setrow{4}{2,1,3,6,4,5} + \setrow{3}{1,4,5,2,6,3} + \setrow{2}{4,2,1,5,3,6} + \setrow{1}{3,5,6,4,2,1} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,3)--(4,3)--(4,1)--(1,1)} + \fillarea{HotPink!30}{(1,3)--(1,7)--(4,7)--(4,6)--(2,6) + --(2,3)--(1,3)} + \fillarea{GreenYellow}{(2,3)--(2,6)--(4,6)--(4,3)--(2,3)} + \fillarea{LightBlue}{(4,1)--(7,1)--(7,5)--(6,5)--(6,2) + --(4,2)--(4,1)} + \fillarea{LightSalmon!50}{(4,7)--(4,4)--(5,4)--(5,6)--(6,6) + --(6,5)--(7,5)--(7,7)--(4,7)} + \fillarea{LightYellow}{(4,2)--(4,4)--(5,4)--(5,6)--(6,6) + --(6,2)--(4,2)} + \end{puzzlebackground} + \end{skyline} +\end{center} + +\begin{lstlisting} +\begin{center} + \begin{skyline}[rows=6,columns=6,scale=.58] + \skylineB{4,2,1,3,3,2} + \skylineL{3,3,4,3,2,1} + \skylineT{1,2,3,3,2,4} + \skylineR{4,1,2,2,2,3} + \skylinecell{2}{4}{1} + \skylinecell{4}{1}{4} + \skylinecell{5}{2}{3} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,3)--(4,3)--(4,1)--(1,1)} + \fillarea{HotPink!30}{(1,3)--(1,7)--(4,7)--(4,6)--(2,6) + --(2,3)--(1,3)} + \fillarea{GreenYellow}{(2,3)--(2,6)--(4,6)--(4,3)--(2,3)} + \fillarea{LightBlue}{(4,1)--(7,1)--(7,5)--(6,5)--(6,2) + --(4,2)--(4,1)} + \fillarea{LightSalmon!50}{(4,7)--(4,4)--(5,4)--(5,6)--(6,6) + --(6,5)--(7,5)--(7,7)--(4,7)} + \fillarea{LightYellow}{(4,2)--(4,4)--(5,4)--(5,6)--(6,6) + --(6,2)--(4,2)} + \end{puzzlebackground} + \end{skyline} + \hspace{1cm} + \begin{skyline}[rows=6,columns=6,scale=.58] + \skylineB{4,2,1,3,3,2} + \skylineL{3,3,4,3,2,1} + \skylineT{1,2,3,3,2,4} + \skylineR{4,1,2,2,2,3} + \setrow{6}{6,3,4,1,5,2} + \setrow{5}{5,6,2,3,1,4} + \setrow{4}{2,1,3,6,4,5} + \setrow{3}{1,4,5,2,6,3} + \setrow{2}{4,2,1,5,3,6} + \setrow{1}{3,5,6,4,2,1} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,3)--(4,3)--(4,1)--(1,1)} + \fillarea{HotPink!30}{(1,3)--(1,7)--(4,7)--(4,6)--(2,6) + --(2,3)--(1,3)} + \fillarea{GreenYellow}{(2,3)--(2,6)--(4,6)--(4,3)--(2,3)} + \fillarea{LightBlue}{(4,1)--(7,1)--(7,5)--(6,5)--(6,2) + --(4,2)--(4,1)} + \fillarea{LightSalmon!50}{(4,7)--(4,4)--(5,4)--(5,6)--(6,6) + --(6,5)--(7,5)--(7,7)--(4,7)} + \fillarea{LightYellow}{(4,2)--(4,4)--(5,4)--(5,6)--(6,6) + --(6,2)--(4,2)} + \end{puzzlebackground} + \end{skyline} +\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{sudoku}}{false}{sets \envoption{rows} and \envoption{columns} to 9, in case of \LANGLE\textit{true}\RANGLE\ is specified. Additionally the classic Sudoku grid is drawn.} + \optitem{\envoption{width}}{6.7cm}{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}}{0.75cm}{defines the indent of the title.} + \optitem{\envoption{titlewidth}}{5.85cm}{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}}{-38pt}{sets the vertical offset of the counters in the margin.} +\end{optionlist} + \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{center} \begin{slitherlink} \setbigcell{1}{1}{4} @@ -580,7 +1529,53 @@ \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} + +\begin{lstlisting} +\begin{center} + \begin{slitherlink} + \setbigcell{1}{1}{4} + \slitherlinkcell{1}{3}{3} + \slitherlinkcell{3}{1}{3} + \slitherlinkcell{3}{3}{0} + \slitherlinkcell{3}{4}{3} + \slitherlinkcell{4}{4}{2} + \slitherlinkcell{5}{1}{0} + \slitherlinkcell{5}{2}{2} + \end{slitherlink} + \hspace{1.5cm} + \begin{slitherlink} + \setbigcell{1}{1}{4} + \slitherlinkcell{1}{3}{3} + \slitherlinkcell{3}{1}{3} + \slitherlinkcell{3}{3}{0} + \slitherlinkcell{3}{4}{3} + \slitherlinkcell{4}{4}{2} + \slitherlinkcell{5}{1}{0} + \slitherlinkcell{5}{2}{2} + \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{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.2cm}{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.2cm}{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} \begin{center} \begin{lpsudoku} \setrow{9}{{},2,6,{},{},{},{},{},{}} @@ -606,10 +1601,150 @@ \setrow{1}{3,1,7,6,2,5,9,4,8} \end{lpsudoku} \end{center} + +\begin{lstlisting} +\begin{center} + \begin{lpsudoku} + \setrow{9}{{},2,6,{},{},{},{},{},{}} + \setrow{8}{{},{},{},{},{},{},1,7,{}} + \setrow{7}{{},{},3,1,{},6,{},{},{}} + \setrow{6}{{},6,{},{},5,{},8,{},3} + \setrow{5}{{},{},9,2,6,1,7,{},{}} + \setrow{4}{5,{},4,{},8,{},{},6,{}} + \setrow{3}{{},{},{},8,{},4,3,{},{}} + \setrow{2}{{},4,8,{},{},{},{},{},{}} + \setrow{1}{{},{},{},{},{},{},9,4,{}} + \end{lpsudoku} + \hspace{1.5cm} + \begin{lpsudoku} + \setrow{9}{1,2,6,5,7,8,4,3,9} + \setrow{8}{4,8,5,9,3,2,1,7,6} + \setrow{7}{7,9,3,1,4,6,5,8,2} + \setrow{6}{2,6,1,4,5,7,8,9,3} + \setrow{5}{8,3,9,2,6,1,7,5,4} + \setrow{4}{5,7,4,3,8,9,2,6,1} + \setrow{3}{6,5,2,8,9,4,3,1,7} + \setrow{2}{9,4,8,7,1,3,6,2,5} + \setrow{1}{3,1,7,6,2,5,9,4,8} + \end{lpsudoku} +\end{lstlisting} + +\subsubsection{Options} +\begin{optionlist} + \optitem{\envoption{width}}{9.1cm}{sets the width of the minipage, in which the grid is typeset. 9 cells of width 1cm plus a litle extra for lines.} + \optitem{\envoption{scale}}{1}{scales the size of the grid in the minipage. To get a width of 5cm you need to scale by $\nicefrac{5}{9}$} + \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}}{9.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} + +\subsubsection{Supporting \texttt{bash} scripts} +\paragraph{createlpsudoku} +The \texttt{createlpsudoku} \cite{bib:wiki:createlpsudoku} \texttt{bash} script can transform Sudoku format files into \env{lpsudoku} environments. It can process files in the so called one line 81 format\footnote{processing of several sudokus in 81 format (one in each line) is possible} (option -e (default)) and in simple sudoku format (option -s) + +\medskip +Usage: \texttt{createlpsudoku [options] [-o output] -i input} + +\medskip +It expects an input file with the option \texttt{-i}. You can specify an output file with the option \texttt{-o}. Otherwise it writes to \texttt{stdout}. Furthermore, the following options are possible: + +\medskip +\begin{tabular}{ll} +-w & write Windows line endings (CR/LF) to file \\ +-v & prints version number \\ +-h & prints help \\ +\end{tabular} + +\paragraph{lpsmag} + +With the \texttt{lpsmag} \cite{bib:wiki:lpsmag} \texttt{bash} script you can half automatically produce a Sudoku magazine using the \LaTeX\ package \package{lpsudoku.sty} and the \texttt{createlpsudoku} bash script. + +\medskip +Usage: \texttt{lpsmag configfile} + +\medskip +The script needs an installed \href{http://ostermiller.org/qqwing/}{QQwing} \cite{bib:web:qqwing} and a config file for defining the magazine's contents: + +\begin{lstlisting} +page p1 easy +page p2 easy +startpuzzles +typesetpage p1 +typesetpage p2 +startsolutions +typesetsolpage p1 p2 last +\end{lstlisting} + +This config file will be sourced into the \texttt{lpsmag bash} script and contains calls of \texttt{lpsmag} functions. Make sure, that the config file has UNIX line endings (LF). For a detailed documentation I refer to the following \href{http://logicpuzzle.square7.de/lpsmag}{wiki} \cite{bib:wiki:lpsmag} entry. + +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{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{center} + \begin{tunnel} + \framepuzzle + \tunnelH{4,3,3,3,4} + \tunnelV{5,1,5,1,5} + \portal{1}{1} + \portal{5}{5} + \end{tunnel} + \hspace{1.5cm} + \begin{tunnel} + \framepuzzle + \tunnelH{4,3,3,3,4} + \tunnelV{5,1,5,1,5} + \portal{1}{1} + \portal{5}{5} + \tube{\tikzpath{1}{1}{6,6,6,6,8,8,4,4,4,4,8,8,6,6,6,6}} + \end{tunnel} +\end{center} + +\begin{lstlisting} +\begin{center} + \begin{tunnel} + \framepuzzle + \tunnelH{4,3,3,3,4} + \tunnelV{5,1,5,1,5} + \portal{1}{1} + \portal{5}{5} + \end{tunnel} + \hspace{1.5cm} + \begin{tunnel} + \framepuzzle + \tunnelH{4,3,3,3,4} + \tunnelV{5,1,5,1,5} + \portal{1}{1} + \portal{5}{5} + \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{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} + \clearpage \section{Roll out your own grid-based logic puzzle} \label{sec:rollout} -As an example we take a look at the \package{bokkusu.sty} package. First, we ignore the LPPL license stuff. +As an example we take a look at the former \package{bokkusu.sty} package. First, we ignore the LPPL license stuff. \lstset{numbers=none,basicstyle=\ttfamily\footnotesize}% \begin{lstlisting} @@ -675,7 +1810,7 @@ Finally, we define the \env{bokkusu} environment. \stepcounter{LP@BK@columns}% \end{lstlisting} -We locally set the environment options and the prefix and name of the current puzzle environment. We need to reset the counters for \styleoption{rows} and \styleoption{columns}, as they might have been altered. +We locally set the environment options and the prefix and name of the current puzzle environment. We need to reset the counters for \envoption{rows} and \envoption{columns}, as they might have been altered. \begin{lstlisting} \begin{minipage}[t]{\LP@BK@width}% @@ -718,7 +1853,7 @@ All layers can also be accessed with the generic PGF method: \begin{lstlisting} \begin{pgfonlayer}{layer} ... -\end{pgfonlayer}{layer} +\end{pgfonlayer} \end{lstlisting} \begin{tabularx}{\textwidth}{lX} @@ -729,109 +1864,239 @@ So, if you are in the need to place something behind \layer{LPbackground} or in \subsection{Environments} \label{sec:env} -\subsubsection{\texttt{puzzlebackground}} +\subsubsection{\texttt{Puzzle environments}} +\paragraph{\texttt{logicpuzzle}} +The \env{logicpuzzle} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{logicpuzzle}\oarg{options}\\\dots\\\enve{logicpuzzle}} is the generic environment for typesetting logic puzzles. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. +Furthermore, there are the puzzle environments described in section \ref{sec:supppuzzle}. They have their own set of options, that is also different option values and defaults! These can be changed with the \texttt{\textbackslash puzzlesetup} commands with global scope or in the optional argument of the environment with local scope. + +\subparagraph{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}}{}{specifies the color for coloring the cells.} + \optitem{\envoption{bgcolor}}{}{sets the background color of the grid.} + \optitem{\envoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} + \optitem{\envoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} +\end{optionlist} +\subsubsection{\texttt{Supporting environments}} +\paragraph{\texttt{puzzlebackground}} \label{sec:puzzlebackground} The \env{puzzlebackground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzlebackground}\\\dots\\\enve{puzzlebackground}} allows you to place elements behind the \layer{main} layer on the \layer{LPbackground} layer [see: \ref{sec:layer}]. This is for example usefull for the \cmd\fillarea\ [see: \ref{sec:fillarea}] command. -\subsubsection{\texttt{puzzleforeground}} +\paragraph{\texttt{puzzleforeground}} \label{sec:puzzleforeground} The \env{puzzleforeground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzleforeground}\\\dots\\\enve{puzzleforeground}} allows you to place elements in front of the \layer{main} layer on the \layer{LPforeground} layer [see: \ref{sec:layer}]. This is for example usefull for the \cmd\framearea\ [see: \ref{sec:framearea}] command. \subsection{Commands} \label{sec:commands} -\subsubsection{Initialization} -\paragraph{\texorpdfstring{\cs{LP@define@key}}{\textbackslash LP@define@key}} -\label{sec:LPdefinekey} -With\margcs{\cmd\LP@define@key\{\marg{prefix}\}\\\{\marg{package}\}\{\marg{option}\}\{\marg{default}\}} the \cmd\LP@define@key\ command, you can define the options of the package \marg{package} \textbf{and} of the environment \marg{package}. A \marg{prefix} is needed for creating different name spaces. -\begin{lstlisting} -\LP@define@key{LP@BS}{battleship}{rows}{5} -\end{lstlisting} -This code snippet defines the option \styleoption{rows} as global option for \package{battleship.sty} and as local option for environment \env{battleship} with the default value 5. This value is stored in \cmd\LP@BS@rows. - -\paragraph{\texorpdfstring{\cs{LP@define@choicekey@fontsize}}{\textbackslash LP@define@choicekey@fontsize}} -\label{sec:LPdefinechoicekeyfontsize} -With\margcs{\cmd\LP@define@choicekey@fontsize\\\{\marg{prefix}\}\{\marg{package}\}\{\marg{default}\}} the \cmd\LP@define@choicekey@fontsize\ command, you can define the choice key option \styleoption{fontsize} of the package \marg{package} \textbf{and} of the environment \marg{package}. Possible keys are: tiny, scriptsize, footnotesize, small, normalsize, large, Large, LARGE, huge, Huge +\subsubsection{Puzzle specific commands} +\label{sec:pscommands} +\paragraph{2D-Sudoku} +\label{sec:pscddsudoku} +\subparagraph{\texttt{ddsudokucell}} +\label{sec:pscddsudokucell} +The command \cs{ddsudokucell}\margcs{\cmd\ddsudokucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column}\marg{row}. +\subparagraph{\texttt{ddsudokusetup}} +With the command \cs{ddsudokusetup}\margcs{\cmd\ddsudokusetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Battleship} +\label{sec:pscbattleship} +\subparagraph{\texttt{placeship}} +With the command \cs{placeship}\margcs{\cmd\placeship\{\marg{direction}\}\\\{\marg{column}\}\{\marg{row}\}\{\marg{length}\}} you can place complete ships in the grid. It expects the specification of the direction as horizontal (H) or vertical (V). Furthermore, it requires the starting coordinates and the length of the ship. +\subparagraph{\texttt{placesegment}} +The command \cs{placesegment}\margcs{\cmd\placesegment\{\marg{column}\}\{\marg{row}\}\\\{\marg{ship segment}\}} is used for the placement of ship segments in the grid. In the mandatory argument \marg{ship segment}, you can use the following commands: -\paragraph{\texorpdfstring{\cs{LP@init@counter}}{\textbackslash LP@init@counter}} -\label{sec:LPinitcounter} -The command\margcs{\cmd\LP@init@counter\{\marg{prefix}\}} \cmd\LP@init@counter\ defines the counters \marg{prefix}@rows and \marg{prefix}@columns, initialize them with \textbackslash\marg{prefix}@rows\ and \textbackslash\marg{prefix}@columns\ and steps the counters. +\begin{center} +\begin{tabular}{lccl} +\cs{Ship} & \scalebox{.5}{\Ship} & \scalebox{.5}{\ShipC} & \cs{ShipC} \\ +\cs{ShipL} & \scalebox{.5}{\ShipL} & \scalebox{.5}{\ShipR} & \cs{ShipR} \\ +\cs{ShipB} & \scalebox{.5}{\ShipB} & \scalebox{.5}{\ShipT} & \cs{ShipT} \\ +\end{tabular} +\end{center} +\subparagraph{\texttt{ship}} +The command \cs{ship} was replaced by the \cs{placesegment} command. The command \cs{ship} is deprecated and should not be used longer. It may still be used, but it is not recommended. +\subparagraph{\texttt{placewater}} +With the command \cs{placewater}\margcs{\cmd\placewater\{\marg{column}\}\{\marg{row}\}} you can place water markers \mbox{( \raisebox{2pt}{\Water} )} in the grid. +\subparagraph{\texttt{placeisland}} +With the command \cs{placeisland}\margcs{\cmd\placeisland\{\marg{column}\}\{\marg{row}\}} you can place islands ( \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}} ) in the grid. The island outlines are created randomly: \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}}, \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}}, \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}}, ... +\subparagraph{\texttt{shipH}} +The command \cs{shipH}\margcs{\cmd\shipH\{\marg{csv list}\}} typesets the horizontal numbers above the grid. It expects a comma-separated list as an argument. +\subparagraph{\texttt{shipV}} +The command \cs{shipV}\margcs{\cmd\shipV\{\marg{csv list}\}} typesets the vertical numbers beside the grid. It also expects a comma separated list. +\subparagraph{\texttt{shipbox}} +The command \cs{shipbox}\margcs{\cmd\shipbox\{\marg{csv list}\}} defines the number and size of the ships, which are typeset under the grid. +\subparagraph{\texttt{battleshipsetup}} +With the command \cs{battleshipsetup}\margcs{\cmd\battleshipsetup\{\marg{options}\}} you can reset the options with global scope. +\subparagraph{\texttt{classicgame}} +The command \cs{classicgame}\margcs{\cmd\classicgame\{\marg{csv list}\}} typesets a game sheet for playing classic Battleship. It expects a comma separated list with the number and sizes of the ships. +\paragraph{Bokkusu} +\label{sec:pscbokkusu} +\subparagraph{\texttt{valueH}} +The command \cs{valueH}\margcs{\cmd\valueH\{\marg{csv list}\}} typesets the numbers left to the grid indicating the values of the cells. It expects a comma-separated list as an argument. +\subparagraph{\texttt{valueV}} +The command \cs{valueV}\margcs{\cmd\valueV\{\marg{csv list}\}} typesets the numbers below the grid specifying the values of the cells. It also expects a comma separated list. +\subparagraph{\texttt{sumH}} +The command \cs{sumH}\margcs{\cmd\sumH\{\marg{csv list}\}} typesets the numbers right to the grid indicating the sums of the values of the colored cells. It expects a comma-separated list. +\subparagraph{\texttt{sumV}} +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{Chaos Sudoku} +\label{sec:pscchaossudoku} +\subparagraph{\texttt{chaossudokucell}} +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{Hakyuu} +\label{sec:pschakyuu} +\subparagraph{\texttt{hakyuucell}} +The command \cs{hakyuucell}\margcs{\cmd\hakyuucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column}\marg{row}. +\subparagraph{\texttt{hakyuusetup}} +With the command \cs{hakyuusetup}\margcs{\cmd\hakyuusetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Hitori} +\label{sec:pschitori} +\subparagraph{\texttt{hitorisetup}} +With the command \cs{hitorisetup}\margcs{\cmd\hitorisetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Kendoku} +\label{sec:psckendoku} +\subparagraph{\texttt{kendokucell}} +The command \cs{kendokucell}\margcs{\cmd\kendokucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column}\marg{row}. +\subparagraph{\texttt{kendokusetup}} +With the command \cs{kendokusetup}\margcs{\cmd\kendokusetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Killer Sudoku} +\label{sec:psckillersudoku} +\subparagraph{\texttt{killersudokucell}} +The command \cs{killersudokucell}\margcs{\cmd\killersudokucell\\\{\marg{column}\}\{\marg{row}\}\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column} \marg{row}. +\subparagraph{\texttt{killersudokusetup}} +With the command \cs{killersudokusetup}\margcs{\cmd\killersudokusetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Laser Beam} +\label{sec:psclaserbeam} +\subparagraph{\texttt{laserH}} +The command \cs{laserH}\margcs{\cmd\laserH\{\marg{csv list}\}} typesets the numbers above the grid indicating how many cells are traversed by the laser beam. It expects a comma-separated list as an argument. +\subparagraph{\texttt{laserV}} +The command \cs{laserV}\margcs{\cmd\laserV\{\marg{csv list}\}} typesets the numbers left to the grid. +\subparagraph{\texttt{mirrorH}} +The command \cs{mirrorH}\margcs{\cmd\mirrorH\{\marg{csv list}\}} typesets the numbers below the grid indicating how many mirrors are placed in the intersections of this column. +\subparagraph{\texttt{mirrorV}} +The command \cs{mirrorV}\margcs{\cmd\mirrorV\{\marg{csv list}\}} typesets the numbers right to the grid. +\subparagraph{\texttt{placearrow}} +The command \cs{placearrow}\margcs{\cmd\placearrow\{\marg{column}\}\{\marg{row}\}\\\{\marg{direction}\}} is used for the placement of arrows at the grid frame. The reference for coordinates is the bottom left corner of the cell. In the mandatory argument \marg{direction}, you can use the following indicators: LeftUp, LeftDown, RightUp, RightDown +\subparagraph{\texttt{placecross}} +With the command \cs{placecross}\margcs{\cmd\placecross\{\marg{column}\}\{\marg{row}\}} you can place a cross in the intersections of the grid. +\subparagraph{\texttt{placemirror}} +With the command \cs{placemirror}\margcs{\cmd\placemirror\{\marg{column}\}\{\marg{row}\}\\\{\marg{direction}\}} you can place mirrors in the intersections of the grid. In the mandatory argument \marg{direction}, you can use the following indicators: H, V +\subparagraph{\texttt{laser}} +The command \cs{laser}\margcs{\cmd\laser[\oarg{color}]\{\marg{Ti\textit{k}Z path}\}} draws the laser beam given by \marg{Ti\textit{k}Z path} with color \oarg{color} (default: red). The reference for coordinates is the bottom left corner of the cell. -\subsubsection{Drawing grids} -\paragraph{\texorpdfstring{\cs{LP@drawgrid}}{\textbackslash LP@drawgrid}} -\label{sec:LPdrawgrid} -With\margcs{\cmd\LP@drawgrid\{\marg{xmin}\}\{\marg{ymin}\}\\\{\marg{xmax}\}\{\marg{ymax}\}\{\marg{step}\}} the \cmd\LP@drawgrid\ command, you can draw the grid (\marg{xmin},\marg{ymin}) to (\marg{xmax},\marg{ymax}) with step \marg{step}. For drawing the standard puzzle grid the step must be 1cm. +\begin{lstlisting} +\laser[green]{(1,2)--(2,3)--(1,4)} +\end{lstlisting} -\paragraph{\texorpdfstring{\cs{LP@drawsudokugrid}}{\textbackslash LP@drawsudokugrid}} -\label{sec:LPdrawsudokugrid} -The\margcs{\cmd\LP@drawsudokugrid} command \cmd\LP@drawsudokugrid\ draws the stnadard Sudoku grid, but just the thicker lines. You will have to overlay the standard grid to get a full Sudoku grid. +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{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{Skyline} +\label{sec:pscskyline} +\subparagraph{\texttt{skylineT}} +The command \cs{skylineT}\margcs{\cmd\skylineT\{\marg{csv list}\}} typesets the numbers above the grid indicating how many skycrapers are visible. It expects a comma-separated list as an argument. +\subparagraph{\texttt{skylineB}} +The command \cs{skylineB}\margcs{\cmd\skylineB\{\marg{csv list}\}} typesets the numbers below the grid. +\subparagraph{\texttt{skylineL}} +The command \cs{skylineL}\margcs{\cmd\skylineL\{\marg{csv list}\}} typesets the numbers left to the grid. +\subparagraph{\texttt{skylineR}} +The command \cs{skylineR}\margcs{\cmd\skylineR\{\marg{csv list}\}} typesets the numbers right to the grid. +\subparagraph{\texttt{skylinecell}} +The command \cs{skylinecell}\margcs{\cmd\skylinecell\{\marg{column}\}\{\marg{row}\}\\\{\marg{height}\}} sets the \marg{height} of the grid cell \marg{column}\marg{row}. +\subparagraph{\texttt{skylinesetup}} +With the command \cs{skylinesetup}\margcs{\cmd\skylinesetup\{\marg{options}\}} you can reset the options with global scope. +\paragraph{Slitherlink} +\label{sec:pscslitherlink} +\subparagraph{\texttt{slitherlinkcell}} +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{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{Tunnel} +\label{sec:psctunnel} +\subparagraph{\texttt{tunnelH}} +The command \cs{tunnelH}\margcs{\cmd\tunnelH\{\marg{csv list}\}} typesets the numbers above the grid indicating how many tube segments are in the respective column. It expects a comma-separated list as an argument. +\subparagraph{\texttt{tunnelV}} +The command \cs{tunnelV}\margcs{\cmd\tunnelV\{\marg{csv list}\}} typesets the numbers left to the grid. +\subparagraph{\texttt{portal}} +The command \cs{portal}\margcs{\cmd\portal\{\marg{column}\}\{\marg{row}\}} is used for the placement of tunnel portals in the grid. +\subparagraph{\texttt{tube}} +The command \cs{tube}\margcs{\cmd\tube\{\marg{Ti\textit{k}Z path}\}} draws the tunnel tube given by \marg{Ti\textit{k}Z path}. The reference for coordinates is the center of the cell. The design of the tube is based on \href{http://tex.stackexchange.com/users/16772/xoff}{Xoff}'s answer to this \href{http://tex.stackexchange.com/questions/109410/how-to-pimp-my-tube}{question} on \TeX.sx. -\paragraph{\texorpdfstring{\cs{LP@drawbackground}}{\textbackslash LP@drawbackground}} -\label{sec:LPdrawbackground} -With\margcs{\cmd\LP@drawbackground\{\marg{xmin}\}\\\{\marg{ymin}\}\{\marg{xmax}\}\{\marg{ymax}\}\{\marg{color}\}} the \cmd\LP@drawbackground\ command, you can draw the background color of the grid. +\begin{lstlisting} +\tube{(1.5,2.5)--(3.5,2.5)--(3.5,4.5)} +\end{lstlisting} -\subsubsection{In the grid} -\paragraph{\texorpdfstring{\cs{setcell}}{\textbackslash setcell}} +\subparagraph{\texttt{tunnelsetup}} +With the command \cs{tunnelsetup}\margcs{\cmd\tunnelsetup\{\marg{options}\}} you can reset the options with global scope. +\subsubsection{User commands} +\paragraph{In the grid} +\subparagraph{\texttt{setcell}} \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 \styleoption{rows}, \styleoption{columns}, \styleoption{scale} and \styleoption{fontsize}. Furthermore, a check if \marg{element} is within the grid is applied. +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. -\paragraph{\texorpdfstring{\cs{setbigcell}}{\textbackslash setbigcell}} +\subparagraph{\texttt{setbigcell}} \label{sec:setbigcell} -With\margcs{\cmd\setbigcell[\oarg{fontsize}]\{\{\marg{column}\}\\\{\marg{row}\}\{\marg{element}\}} the \cmd\setbigcell\ command, you can set \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. +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. -\paragraph{\texorpdfstring{\cs{LP@setcellcontent}}{\textbackslash LP@setcellcontent}} -\label{sec:LPsetcellcontent} -The\margcs{\cmd\LP@LP@setcellcontent\{\marg{column}\}\\\{\marg{row}\}\{\marg{element}\}} command \cmd\LP@setcellcontent\ is the generic command to set an arbitrary \marg{element}. - -\paragraph{\texorpdfstring{\cs{LP@setcellcontentC}}{\textbackslash LP@setcellcontentC}} -\label{sec:LPsetcellcontentC} -The\margcs{\cmd\LP@LP@setcellcontentC\{\marg{column}\}\\\{\marg{row}\}\{\marg{element}\}} command \cmd\LP@setcellcontentC\ is the generic command to set an arbitrary \marg{element} in a centered node in the bottom left corner. - -\paragraph{\texorpdfstring{\cs{setrow}}{\textbackslash setrow}} +\subparagraph{\texttt{setrow}} \label{sec:setrow} With\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} the \cmd\setrow\ command, you can set the contents of a \marg{row}. These may be numbers or letters. -\paragraph{\texorpdfstring{\cs{LP@setrowcontents}}{\textbackslash LP@setrowcontents}} -\label{sec:LPsetrowcontents} -The\margcs{\cmd\LP@setrowcontents\{\marg{csv list}\}\\\{\marg{column}\}\{\marg{row}\}} command \cmd\LP@setrowcontents\ is the generic command to set row contents. It does not necessarily start with \marg{column} 1! - -\paragraph{\texorpdfstring{\cs{setcolorrow}}{\textbackslash setcolorrow}} +\subparagraph{\texttt{setcolorrow}} \label{sec:setcolorrow} With\margcs{\cmd\setcolorrow\{\marg{row}\}\{\marg{csv list}\}} the \cmd\setcolorrow\ command, you can set the contents of a \marg{row}. Furthermore, the background of the cell is filled with color \texttt{LP@c@romannumber} [see: \ref{sec:LPdefinecolor}]. With the number 0, you can black out the grid cell. -\paragraph{\texorpdfstring{\cs{setcolumn}}{\textbackslash setcolumn}} +\subparagraph{\texttt{setcolumn}} \label{sec:setcolumn} With\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} the \cmd\setcolumn\ command, you can set the contents of a \marg{column}. These may be numbers or letters. -\paragraph{\texorpdfstring{\cs{LP@setcolumncontents}}{\textbackslash LP@setcolumncontents}} -\label{sec:LPsetcolumncontents} -The\margcs{\cmd\LP@setcolumncontents\{\marg{csv list}\}\\\{\marg{column}\}\{\marg{row}\}} command \cmd\LP@setcolumncontents\ is the generic command to set column contents. It does not necessarily start with \marg{row} 1! - -\paragraph{\texorpdfstring{\cs{setcolorcolumn}}{\textbackslash setcolorcolumn}} +\subparagraph{\texttt{setcolorcolumn}} \label{sec:setcolorcolumn} With\margcs{\cmd\setcolorcolumn\\\{\marg{column}\}\{\marg{csv list}\}} the \cmd\setcolorcolumn\ command, you can set the contents of a \marg{column}. Furthermore, the background of the cell is filled with color \texttt{LP@c@romannumber} [see: \ref{sec:LPdefinecolor}]. -\paragraph{\texorpdfstring{\cs{setrule}}{\textbackslash setrule}} +\subparagraph{\texttt{setrule}} \label{sec:setrule} With\margcs{\cmd\setrule\{\{\marg{column}\}\{\marg{row}\}\\\{\marg{rule}\}} the \cmd\setrule\ command, you can set a calculation rule \marg{rule} into the top left corner of cell \marg{column}\marg{row}. The rule is typeset in inline math mode. You might consider using the \cmd\times\ and \cmd\div\ commands. -\paragraph{\texorpdfstring{\cs{fillcell}}{\textbackslash fillcell}} +\subparagraph{\texttt{fillcell}} \label{sec:fillcell} -With\margcs{\cmd\fillcell\{\{\marg{column}\}\{\marg{row}\}} the \cmd\fillcell\ command, you can fill cell \marg{column}\marg{row} with the color defined with environment option \styleoption{color}\footnote{Therefore, you must define an option \styleoption{color} in the style file you want to use fill commands}. It is aware of the current values of the surrounding envionment options \styleoption{rows}, \styleoption{columns}, \styleoption{scale} and \styleoption{color}. Furthermore, a check if the cell is within the grid is applied. +With\margcs{\cmd\fillcell\{\{\marg{column}\}\{\marg{row}\}} the \cmd\fillcell\ command, you can fill cell \marg{column} \marg{row} with the color defined with environment option \envoption{color}\footnote{Therefore, you must define an option \envoption{color} in the style file you want to use fill commands}. It is aware of the current values of the surrounding envionment options \envoption{rows}, \envoption{columns}, \envoption{scale} and \envoption{color}. Furthermore, a check if the cell is within the grid is applied. -\paragraph{\texorpdfstring{\cs{fillrow}}{\textbackslash fillrow}} +\subparagraph{\texttt{fillrow}} \label{sec:fillrow} With\margcs{\cmd\fillrow\{\marg{row}\}\{\marg{csv list}\}} the \cmd\fillrow\ command, you can fill a \marg{row}. In \marg{csv list} '1' means 'fill' and '0' means 'don't fill'. Internally, \cmd\fillrow\ uses \cmd\fillcell\ [see: \ref{sec:fillcell}]. -\paragraph{\texorpdfstring{\cs{fillcolumn}}{\textbackslash fillcolumn}} +\subparagraph{\texttt{fillcolumn}} \label{sec:fillcolumn} With\margcs{\cmd\fillcolumn\{\marg{column}\}\{\marg{csv list}\}} the \cmd\fillcolumn\ command, you can fill a \marg{column}. In \marg{csv list} '1' means 'fill' and '0' means 'don't fill'. Internally, \cmd\fillcolumn\ uses \cmd\fillcell\ [see: \ref{sec:fillcell}]. -\paragraph{\texorpdfstring{\cs{filldiagonals}}{\textbackslash filldiagonals}} +\subparagraph{\texttt{filldiagonals}} \label{sec:filldiagonals} With\margcs{\cmd\filldiagonals[\oarg{color}]} the \cmd\filldiagonals\ command, you can fill the diagonals with the color specified with the optional argument \oarg{color} (default: yellow!20). Furthermore, it checks for a quadratic grid, otherwise an error message is issued. -\paragraph{\texorpdfstring{\cs{framearea}}{\textbackslash framearea}} +\subparagraph{\texttt{framearea}} \label{sec:framearea} -The command \cmd\framearea\margcs{\cmd\framearea\{\marg{color}\}\{\marg{tikz path}\}} frames the area given by \marg{tikz path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. +The command \cmd\framearea\margcs{\cmd\framearea\{\marg{color}\}\{\marg{Ti\textit{k}Z path}\}} frames the area given by \marg{Ti\textit{k}Z path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. \begin{lstlisting} \framearea{green}{(2,2)--(2,3)--(3,3)--(3,2)--(2,2)} @@ -839,21 +2104,21 @@ The command \cmd\framearea\margcs{\cmd\framearea\{\marg{color}\}\{\marg{tikz pat This command will color the frame of the grid cell \texttt{(2,2)} green. You should consider using this command in the \env{puzzleforeground} [see: \ref{sec:puzzleforeground}] environment. -\paragraph{\texorpdfstring{\cs{fillarea}}{\textbackslash fillarea}} +\subparagraph{\texttt{fillarea}} \label{sec:fillarea} -The command \cmd\fillarea\margcs{\cmd\fillarea\{\marg{color}\}\{\marg{tikz path}\}} fills the area given by \marg{tikz path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. You should consider using this command in the \env{puzzlebackground} [see: \ref{sec:puzzlebackground}] environment. +The command \cmd\fillarea\margcs{\cmd\fillarea\{\marg{color}\}\{\marg{Ti\textit{k}Z path}\}} fills the area given by \marg{Ti\textit{k}Z path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. You should consider using this command in the \env{puzzlebackground} [see: \ref{sec:puzzlebackground}] environment. -\paragraph{\texorpdfstring{\cs{colorarea}}{\textbackslash colorarea}} +\subparagraph{\texttt{colorarea}} \label{sec:colorarea} -The command \cmd\colorarea\margcs{\cmd\colorarea\{\marg{color}\}\{\marg{tikz path}\}} fills the area given by \marg{tikz path} with color \marg{color} -- just like \cmd\framearea\ without frame. +The command \cmd\colorarea\margcs{\cmd\colorarea\{\marg{color}\}\{\marg{Ti\textit{k}Z path}\}} fills the area given by \marg{Ti\textit{k}Z path} with color \marg{color} -- just like \cmd\framearea\ without frame. -\paragraph{\texorpdfstring{\cs{framepuzzle}}{\textbackslash framepuzzle}} +\subparagraph{\texttt{framepuzzle}} \label{sec:framepuzzle} With\margcs{\cmd\framepuzzle[\oarg{color}]} the \cmd\framepuzzle\ command, you can frame the grid (thicker line) with the color specified with the optional argument \oarg{color} (default: black). -\paragraph{\texorpdfstring{\cs{tikzpath}}{\textbackslash tikzpath}} +\subparagraph{\texttt{tikzpath}} \label{sec:tikzpath} -With\margcs{\cmd\tikzpath\{\oarg{column}\}\{\oarg{row}\}\\\{\oarg{csv list}\}} the \cmd\tikzpath\ command, you can easily construct a \cmd\tikz\ path. You just need to define a starting point \marg{column}\marg{row} (bottom left corner) and a \marg{csv list} with direction indicators relative to the current position. +With\margcs{\cmd\tikzpath\{\marg{column}\}\{\marg{row}\}\\\{\marg{csv list}\}} the \cmd\tikzpath\ command, you can easily construct a Ti\textit{k}Z path. You just need to define a starting point \marg{column}\marg{row} (bottom left corner) and a \marg{csv list} with direction indicators relative to the current position. \begin{center} \begin{tabular}{rlrlrl} @@ -869,45 +2134,8 @@ With\margcs{\cmd\tikzpath\{\oarg{column}\}\{\oarg{row}\}\\\{\oarg{csv list}\}} t This command will frame grid cell \texttt{(2,2)} green. -\paragraph{\texorpdfstring{\cs{LP@ingrid}}{\textbackslash LP@ingrid}} -\label{sec:LPingrid} -With\margcs{\cmd\LP@ingrid\\\{\marg{column}\}\{\marg{row}\}\{\marg{max column}\}\\\{\marg{max row}\}\{\marg{package}\}} the \cmd\LP@ingrid\ command, you can check if an element -- that should be placed -- is within the grid. Otherwise an error message is issued. - -\paragraph{\texorpdfstring{\cs{LP@definecolor}}{\textbackslash LP@definecolor}} -\label{sec:LPdefinecolor} -With\margcs{\cmd\LP@definecolor\\\{\marg{name}\}\{\marg{rgb color}\}} the \cmd\LP@definecolor\ command, you can define named rgb colors, especially for defining background colors of numbers used in \cmd\setcolorrow\ [see: \ref{sec:setcolorrow}] and \cmd\setcolorcolumn\ [see: \ref{sec:setcolorcolumn}]. - -The background color names follow the pattern: \texttt{LP@c@romannumber} - -\begin{lstlisting} -\LP@definecolor{LP@c@iv}{.55,1,.88} -\end{lstlisting} - -This command will define the new background color of number \colorbox[rgb]{.55,1,.88}{4}! - -\subsubsection{Around the grid} -\paragraph{\texorpdfstring{\cs{LP@leftcolumn}}{\textbackslash LP@leftcolumn}} -\label{sec:LPleftcolumn} -With\margcs{\cmd\LP@leftcolumn\{\{\marg{csv list}\}} the \cmd\LP@leftcolumn\ command, you can set the contents of the column left to the grid. The \package{skyline.sty} package uses for example: - -\begin{lstlisting} -\let\skylineL\LP@leftcolumn -\end{lstlisting} - -\paragraph{\texorpdfstring{\cs{LP@rightcolumn}}{\textbackslash LP@rightcolumn}} -\label{sec:LPrightcolumn} -With\margcs{\cmd\LP@rightcolumn\{\{\marg{csv list}\}} the \cmd\LP@rightcolumn\ command, you can set the contents of the column right to the grid. - -\paragraph{\texorpdfstring{\cs{LP@toprow}}{\textbackslash LP@toprow}} -\label{sec:LPtoprow} -With\margcs{\cmd\LP@toprow\{\{\marg{csv list}\}} the \cmd\LP@toprow\ command, you can set the contents of the row above the grid. - -\paragraph{\texorpdfstring{\cs{LP@bottomrow}}{\textbackslash LP@bottomrow}} -\label{sec:LPbottomrow} -With\margcs{\cmd\LP@bottomrow\{\{\marg{csv list}\}} the \cmd\LP@bottomrow\ command, you can set the contents of the row below the grid. - -\subsubsection{Presentation} -\paragraph{\texorpdfstring{\cs{titleformat}}{\textbackslash titleformat}} +\paragraph{Presentation} +\subparagraph{\texttt{titleformat}} \label{sec:titleformat} With\margcs{\cmd\titleformat\{\{\marg{format}\}} the \cmd\titleformat\ command, you can define the \marg{format} of the title. By default, the definition is as follows: @@ -915,15 +2143,15 @@ With\margcs{\cmd\titleformat\{\{\marg{format}\}} the \cmd\titleformat\ command, \titleformat{\centering\Large\color{blue}} \end{lstlisting} -\paragraph{\texorpdfstring{\cs{puzzlecounter}}{\textbackslash puzzlecounter}} +\subparagraph{\texttt{puzzlecounter}} \label{sec:puzzlecounter} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. +The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the general puzzle counter in textual form to use it in \cmd\definecounterstyle. -\paragraph{\texorpdfstring{\cs{setpuzzlecounter}}{\textbackslash setpuzzlecounter}} +\subparagraph{\texttt{setpuzzlecounter}} \label{sec:setpuzzlecounter} With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. -\paragraph{\texorpdfstring{\cs{definecounterstyle}}{\textbackslash definecounterstyle}} +\subparagraph{\texttt{definecounterstyle}} \label{sec:definecounterstyle} The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: @@ -936,26 +2164,120 @@ The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\ } \end{lstlisting} -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. +To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \envoption{cvoffset}. -\paragraph{\texorpdfstring{\cs{setgridlinestyle}}{\textbackslash setgridlinestyle}} +\subparagraph{\texttt{setgridlinestyle}} \label{sec:setgridlinestyle} The command \cs{setgridlinestyle}\margcs{\cmd\setgridlinestyle\{\marg{style}\}} sets the style of lines used in the grid. By default, the style is set to \texttt{solid}, whereas \package{slitherlink.sty} uses \texttt{dashed}. -\paragraph{\texorpdfstring{\cs{setnormallinewidth}}{\textbackslash setnormallinewidth}} +\subparagraph{\texttt{setnormallinewidth}} \label{sec:setnormallinewidth} With the command \cs{setnormallinewidth}\margcs{\cmd\setnormallinewidth\{\marg{dimension}\}}, you can set the width of the standard lines (default: \texttt{0.5pt}) -\paragraph{\texorpdfstring{\cs{setthicklinewidth}}{\textbackslash setthicklinewidth}} +\subparagraph{\texttt{setthicklinewidth}} \label{sec:setthicklinewidth} With the command \cs{setthicklinewidth}\margcs{\cmd\setthicklinewidth\{\marg{dimension}\}}, you can set the width of the 'thicker' lines (default: \texttt{1.5pt}) -\paragraph{\texorpdfstring{\cs{LP@drawcounter}}{\textbackslash LP@drawcounter}} + +\subsubsection{Internal commands} +\paragraph{Initialization} +\subparagraph{\texttt{LP@define@key}} +\label{sec:LPdefinekey} +With\margcs{\cmd\LP@define@key\{\marg{prefix}\}\\\{\marg{package}\}\{\marg{option}\}\{\marg{default}\}} the \cmd\LP@define@key\ command, you can define the options of the environment \marg{package}. A \marg{prefix} is needed for creating different name spaces. +\begin{lstlisting} +\LP@define@key{LP@BS}{battleship}{rows}{5} +\end{lstlisting} +This code snippet defines the option \envoption{rows} for environment \env{battleship} with the default value 5. This value is stored in \cmd\LP@BS@rows. + +\subparagraph{\texttt{LP@define@choicekey@fontsize}} +\label{sec:LPdefinechoicekeyfontsize} +With\margcs{\cmd\LP@define@choicekey@fontsize\\\{\marg{prefix}\}\{\marg{package}\}\{\marg{default}\}} this command, you can define the choice key option \envoption{fontsize} of the environment \marg{package}. Possible keys are: tiny, scriptsize, footnotesize, small, normalsize, large, Large, LARGE, huge, Huge + +\subparagraph{\texttt{LP@init@counter}} +\label{sec:LPinitcounter} +The command\margcs{\cmd\LP@init@counter\{\marg{prefix}\}} \cmd\LP@init@counter\ defines the counters \marg{prefix}@rows and \marg{prefix}@columns. Furthermore, they are initialized with \textbackslash\marg{prefix}@rows\ and \textbackslash\marg{prefix}@columns\ and steped. + +\paragraph{Drawing grids} +\subparagraph{\texttt{LP@drawgrid}} +\label{sec:LPdrawgrid} +With\margcs{\cmd\LP@drawgrid\{\marg{xmin}\}\{\marg{ymin}\}\\\{\marg{xmax}\}\{\marg{ymax}\}\{\marg{step}\}} the \cmd\LP@drawgrid\ command, you can draw the grid (\marg{xmin},\marg{ymin}) to (\marg{xmax},\marg{ymax}) with step \marg{step}. For drawing the standard puzzle grid the step must be 1cm. + +\subparagraph{\texttt{LP@drawsudokugrid}} +\label{sec:LPdrawsudokugrid} +The\margcs{\cmd\LP@drawsudokugrid} command \cmd\LP@drawsudokugrid\ draws the stnadard Sudoku grid, but just the thicker lines. You will have to overlay the standard grid to get a full Sudoku grid. + +\subparagraph{\texttt{LP@drawbackground}} +\label{sec:LPdrawbackground} +The\margcs{\cmd\LP@drawbackground\{\marg{xmin}\}\\\{\marg{ymin}\}\{\marg{xmax}\}\{\marg{ymax}\}\{\marg{color}\}} command \cmd\LP@drawbackground\ draws the background color of the grid. + +\paragraph{In the grid} +\subparagraph{\texttt{LP@setcellcontent}} +\label{sec:LPsetcellcontent} +The\margcs{\cmd\LP@LP@setcellcontent\{\marg{column}\}\\\{\marg{row}\}\{\marg{element}\}} command \cmd\LP@setcellcontent\ is the generic command to set an arbitrary \marg{element}. + +\subparagraph{\texttt{LP@setcellcontentC}} +\label{sec:LPsetcellcontentC} +The\margcs{\cmd\LP@LP@setcellcontentC\{\marg{column}\}\\\{\marg{row}\}\{\marg{element}\}} command \cmd\LP@setcellcontentC\ is the generic command to set an arbitrary \marg{element} in a centered node in the bottom left corner. + +\subparagraph{\texttt{LP@setrowcontents}} +\label{sec:LPsetrowcontents} +The\margcs{\cmd\LP@setrowcontents\{\marg{csv list}\}\\\{\marg{column}\}\{\marg{row}\}} command \cmd\LP@setrowcontents\ is the generic command to set row contents. It does not necessarily start with \marg{column} 1! + +\subparagraph{\texttt{LP@setcolumncontents}} +\label{sec:LPsetcolumncontents} +The\margcs{\cmd\LP@setcolumncontents\{\marg{csv list}\}\\\{\marg{column}\}\{\marg{row}\}} command \cmd\LP@setcolumncontents\ is the generic command to set column contents. It does not necessarily start with \marg{row} 1! + +\subparagraph{\texttt{LP@ingrid}} +\label{sec:LPingrid} +With\margcs{\cmd\LP@ingrid\\\{\marg{column}\}\{\marg{row}\}\{\marg{max column}\}\\\{\marg{max row}\}\{\marg{package}\}} the \cmd\LP@ingrid\ command, you can check if an element -- that should be placed -- is within the grid. Otherwise an error message is issued. + +\subparagraph{\texttt{LP@definecolor}} +\label{sec:LPdefinecolor} +With\margcs{\cmd\LP@definecolor\\\{\marg{name}\}\{\marg{rgb color}\}} the \cmd\LP@definecolor\ command, you can define named rgb colors, especially for defining background colors of numbers used in \cmd\setcolorrow\ [see: \ref{sec:setcolorrow}] and \cmd\setcolorcolumn\ [see: \ref{sec:setcolorcolumn}]. + +The background color names follow the pattern: \texttt{LP@c@romannumber} + +\begin{lstlisting} +\LP@definecolor{LP@c@iv}{.55,1,.88} +\end{lstlisting} + +This command will define the new background color of number \colorbox[rgb]{.55,1,.88}{4}! + +\paragraph{Around the grid} +\subparagraph{\texttt{LP@leftcolumn}} +\label{sec:LPleftcolumn} +With\margcs{\cmd\LP@leftcolumn\{\{\marg{csv list}\}} the \cmd\LP@leftcolumn\ command, you can set the contents of the column left to the grid. The \cmd\skylineL\ command for the \env{skyline} environment is for example defined as follows: + +\begin{lstlisting} +\let\skylineL\LP@leftcolumn +\end{lstlisting} + +\subparagraph{\texttt{LP@rightcolumn}} +\label{sec:LPrightcolumn} +With\margcs{\cmd\LP@rightcolumn\{\{\marg{csv list}\}} the \cmd\LP@rightcolumn\ command, you can set the contents of the column right to the grid. + +\subparagraph{\texttt{LP@toprow}} +\label{sec:LPtoprow} +With\margcs{\cmd\LP@toprow\{\{\marg{csv list}\}} the \cmd\LP@toprow\ command, you can set the contents of the row above the grid. + +\subparagraph{\texttt{LP@bottomrow}} +\label{sec:LPbottomrow} +With\margcs{\cmd\LP@bottomrow\{\{\marg{csv list}\}} the \cmd\LP@bottomrow\ command, you can set the contents of the row below the grid. + +\paragraph{Presentation} +\subparagraph{\texttt{LP@drawcounter}} \label{sec:LPdrawcounter} -The command \cs{LP@drawcounter}\margcs{\cmd\LP@drawcounter\{\marg{name}\}} draws the counter with counter style \marg{name}. +The command \cs{LP@drawcounter}\margcs{\cmd\LP@drawcounter\{\marg{name}\}} draws the puzzle counter with counter style \marg{name}. \section{Examples} You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-37pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. +{ +\clearpage +\raggedright +\nocite{*} +\bibliography{logicpuzzle} +\addcontentsline{toc}{section}{\refname} +} \clearpage \Headline{Index} \printindex diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle_README b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle_README deleted file mode 100644 index 887d51f5392..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle_README +++ /dev/null @@ -1,7 +0,0 @@ -This package provides the code base for the other packages in the -logicpuzzle bundle. -The package documentation offers a detailed description of the -commands and environments provided for the usage in the puzzle -packages. Furthermore, there is a description of a code skeleton, -which enables the user to roll out his own puzzle package. -
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.pdf Binary files differdeleted file mode 100644 index a60927e9066..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.tex b/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.tex deleted file mode 100644 index 4d387b9b3d1..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.tex +++ /dev/null @@ -1,365 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{nicefrac} -\usepackage{filecontents} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=5cm,scale=0.55,fontsize=normalsize]{lpsudoku}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -\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\normalsize,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={easy,last,puzzlebackground,puzzleforeground,center,lpsudoku,left,shape,fill,inner,sep,draw,rounded,corners,thick}, emphstyle=\color{Tomato},emph={[2]scale},emphstyle={[2]\color{OliveDrab}},morekeywords={page,startpuzzles,startsolutions,typesetpage,typesetsolpage,framearea,fillarea,lpsudokucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{lpsudoku.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Sudoku logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\begin{filecontents}{lpsudoku.bib} -@misc{bib:web:logigpuzzle, - author = {Josef Kleber}, - note = {\href{https://bitbucket.org/kleberj/logicpuzzle/}(https://bitbucket.org/kleberj/logicpuzzle/)}, - title = {The logicpuzzle bundle}, - year = {2013}, - } - -@misc{bib:wiki:createlpsudoku, - author = {Josef Kleber}, - note = {\href{http://jklatex.square7.de/wiki/doku.php?id=createlpsudoku}(http://jklatex.square7.de/wiki/doku.php?id=createlpsudoku)}, - title = {createlpsudoku}, - year = {2013}, - } - -@misc{bib:wiki:lpsmag, - author = {Josef Kleber}, - note = {\href{http://jklatex.square7.de/wiki/doku.php?id=lpsmag}(http://jklatex.square7.de/wiki/doku.php?id=lpsmag)}, - title = {lpsmag}, - year = {2013}, - } - -@misc{bib:wiki:howtosudoku, - author = {Josef Kleber}, - note = {\href{http://jklatex.square7.de/wiki/doku.php?id=sudoku_magazine}(http://jklatex.square7.de/wiki/doku.php?id=sudoku\_magazine)}, - title = {How to create a Sudoku magazine}, - year = {2013}, - } - -@misc{bib:web:qqwing, - author = {Stephen Ostermiller}, - note = {\href{http://ostermiller.org/qqwing/}(http://ostermiller.org/qqwing/)}, - title = {QQwing -- Sudoku Generator and Solver}, - year = {2011}, - } - -@misc{bib:web:hodoku, - author = {Bernhard Hobiger}, - note = {\href{http://hodoku.sourceforge.net/en/index.php}(http://hodoku.sourceforge.net/en/index.php)}, - title = {HoDoKu}, - year = {2012}, - } -\end{filecontents} -\bibliographystyle{alphadin} -\title{\filename}% -\Subtitle{A style file for typesetting Sudoku logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.0} -\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{% -\begin{lpsudoku} - \setrow{9}{{},2,6,{},{},{},{},{},{}} - \setrow{8}{{},{},{},{},{},{},1,7,{}} - \setrow{7}{{},{},3,1,{},6,{},{},{}} - \setrow{6}{{},6,{},{},5,{},8,{},3} - \setrow{5}{{},{},9,2,6,1,7,{},{}} - \setrow{4}{5,{},4,{},8,{},{},6,{}} - \setrow{3}{{},{},{},8,{},4,3,{},{}} - \setrow{2}{{},4,8,{},{},{},{},{},{}} - \setrow{1}{{},{},{},{},{},{},9,4,{}} - \end{lpsudoku} - \hspace{1,5cm} - \begin{lpsudoku} - \setrow{9}{1,2,6,5,7,8,4,3,9} - \setrow{8}{4,8,5,9,3,2,1,7,6} - \setrow{7}{7,9,3,1,4,6,5,8,2} - \setrow{6}{2,6,1,4,5,7,8,9,3} - \setrow{5}{8,3,9,2,6,1,7,5,4} - \setrow{4}{5,7,4,3,8,9,2,6,1} - \setrow{3}{6,5,2,8,9,4,3,1,7} - \setrow{2}{9,4,8,7,1,3,6,2,5} - \setrow{1}{3,1,7,6,2,5,9,4,8} -\end{lpsudoku} -}% -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} - -Well, it's Sudoku -- nothing to explain! Fill each row and column with numbers from 1 to 9. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{lpsudoku} - \setrow{9}{{},2,6,{},{},{},{},{},{}} - \setrow{8}{{},{},{},{},{},{},1,7,{}} - \setrow{7}{{},{},3,1,{},6,{},{},{}} - \setrow{6}{{},6,{},{},5,{},8,{},3} - \setrow{5}{{},{},9,2,6,1,7,{},{}} - \setrow{4}{5,{},4,{},8,{},{},6,{}} - \setrow{3}{{},{},{},8,{},4,3,{},{}} - \setrow{2}{{},4,8,{},{},{},{},{},{}} - \setrow{1}{{},{},{},{},{},{},9,4,{}} - \end{lpsudoku} - \hspace{1,5cm} - \begin{lpsudoku} - \setrow{9}{1,2,6,5,7,8,4,3,9} - \setrow{8}{4,8,5,9,3,2,1,7,6} - \setrow{7}{7,9,3,1,4,6,5,8,2} - \setrow{6}{2,6,1,4,5,7,8,9,3} - \setrow{5}{8,3,9,2,6,1,7,5,4} - \setrow{4}{5,7,4,3,8,9,2,6,1} - \setrow{3}{6,5,2,8,9,4,3,1,7} - \setrow{2}{9,4,8,7,1,3,6,2,5} - \setrow{1}{3,1,7,6,2,5,9,4,8} - \end{lpsudoku} -\end{lstlisting} -\lstset{basicstyle=\ttfamily\normalsize} -\clearpage - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{width}}{9.1cm}{sets the width of the minipage, in which the grid is typeset. 9 cells of width 1cm plus a litle extra for lines.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage. To get a width of 5cm you need to scale by $\nicefrac{5}{9}$} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{9.1cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-24pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{lpsudoku}} -The \env{lpsudoku}\footnote{named \env{lpsudoku} -- as well as the style file -- to avoid naming conflict with already existing \package{sudoku.sty} } environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{lpsudoku}\oarg{options}\\\dots\\\enve{lpsudoku}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\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}. -\subsubsection{\texttt{setrow}} -The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list. -\subsubsection{\texttt{setcolumn}} -The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}. -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{lpsudokusetup}} -With the command \cs{lpsudokusetup}\margcs{\cmd\lpsudokusetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. - -\clearpage -\section{Supporting \texttt{bash} scripts} -\subsection{createlpsudoku} -The \texttt{createlpsudoku} \cite{bib:wiki:createlpsudoku} \texttt{bash} script can transform Sudoku format files into \env{lpsudoku} environments. It can process files in the so called one line 81 format\footnote{processing of several sudokus in 81 format (one in each line) is possible} (option -e (default)) and in simple sudoku format (option -s) - -\medskip -Usage: \texttt{createlpsudoku [options] [-o output] -i input} - -\medskip -It expects an input file with the option \texttt{-i}. You can specify an output file with the option \texttt{-o}. Otherwise it writes to \texttt{stdout}. Furthermore, the following options are possible: - -\medskip -\begin{tabular}{ll} --w & write Windows line endings (CR/LF) to file \\ --v & prints version number \\ --h & prints help \\ -\end{tabular} - -\subsection{lpsmag} - -With the \texttt{lpsmag} \cite{bib:wiki:lpsmag} \texttt{bash} script you can half automatically produce a Sudoku magazine using the \LaTeX\ package \package{lpsudoku.sty} and the \texttt{createlpsudoku} bash script. - -\medskip -Usage: \texttt{lpsmag configfile} - -\medskip -The script needs an installed \href{http://ostermiller.org/qqwing/}{QQwing} \cite{bib:web:qqwing} and a config file for defining the magazine's contents: - -\begin{lstlisting} -page p1 easy -page p2 easy -startpuzzles -typesetpage p1 -typesetpage p2 -startsolutions -typesetsolpage p1 p2 last -\end{lstlisting} - -This config file will be sourced into the \texttt{lpsmag bash} script and contains calls of \texttt{lpsmag} functions. Make sure, that the config file has UNIX line endings (LF). For a detailed documentation I refer to the following \href{http://jklatex.square7.de/wiki/doku.php?id=lpsmag}{wiki} \cite{bib:wiki:lpsmag} entry. - -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}}. - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-28pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page} \cite{bib:web:logigpuzzle}. - -{ -\clearpage -\raggedright -\nocite{*} -\bibliography{lpsudoku} -\addcontentsline{toc}{section}{\refname} -} -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku_README b/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku_README deleted file mode 100644 index 4e325733fd2..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku_README +++ /dev/null @@ -1,2 +0,0 @@ -The package enables the user to typeset Sudoku logic puzzles -Fill each row and column with numbers from 1 to 9.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt index 582edab458d..b7bfbcdccce 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt +++ b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt @@ -25,35 +25,12 @@ simple.smc (config file) -- Documentation -- -battleship.pdf -battleship.tex -bokkusu.pdf -bokkusu.tex -chaossudoku.pdf -chaossudoku.tex -ddsudoku.pdf -ddsudoku.tex -hakyuu.pdf -hakyuu.tex -hitori.pdf -hitori.tex -kendoku.pdf -kendoku.tex -killersudoku.pdf -killersudoku.tex -laserbeam.pdf -laserbeam.tex -lpsudoku.pdf -lpsudoku.tex -skyline.pdf -skyline.tex -slitherlink.pdf -slitherlink.tex +logicpuzzle.pdf +logicpuzzle.tex -- Misc. Files -- README -+ package READMEs manifest.txt INSTALL CHANGES
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.pdf Binary files differdeleted file mode 100644 index aeb8906d674..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.tex b/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.tex deleted file mode 100644 index a89b46f9a36..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.tex +++ /dev/null @@ -1,450 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage[width=5cm,scale=0.73,fontsize=normalsize]{skyline}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,skyline,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},emphstyle={[2]\color{OliveDrab}},morekeywords={framearea,fillarea,skylineT,skylineB,skylineR,skylineL,skylinecell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{skyline.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Skyline logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Skyline logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.1} -\Refline{\href{mailto:josef.kleber@gmx.de}{\texttt{josef.kleber@gmx.de}}\\\href{https://bitbucket.org/kleberj/logicpuzzle/}{\texttt{https://bitbucket.org/kleberj/logicpuzzle/}}} -\newsavebox\logo -\savebox\logo{% - \begin{skyline} - \skylineB{3,{},3,1,{}} - \skylineL{{},4,3,{},{}} - \skylineT{{},{},2,{},3} - \skylineR{{},1,3,{},{}} - \skylinecell{1}{3}{2} - \skylinecell{4}{2}{3} - \end{skyline} - \hspace{1cm} - \begin{skyline} - \skylineB{3,{},3,1,{}} - \skylineL{{},4,3,{},{}} - \skylineT{{},{},2,{},3} - \skylineR{{},1,3,{},{}} - \setrow{5}{5,4,3,1,2} - \setrow{4}{4,5,1,2,3} - \setrow{3}{2,3,5,4,1} - \setrow{2}{1,2,4,3,5} - \setrow{1}{3,1,2,5,4} - \end{skyline} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} - -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. Here's a little self-explanatory example: - -\begin{center} - \usebox\logo -\end{center} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{skyline} - \skylineB{3,{},3,1,{}} - \skylineL{{},4,3,{},{}} - \skylineT{{},{},2,{},3} - \skylineR{{},1,3,{},{}} - \skylinecell{1}{3}{2} - \skylinecell{4}{2}{3} - \end{skyline} - \hspace{1cm} - \begin{skyline} - \skylineB{3,{},3,1,{}} - \skylineL{{},4,3,{},{}} - \skylineT{{},{},2,{},3} - \skylineR{{},1,3,{},{}} - \setrow{5}{5,4,3,1,2} - \setrow{4}{4,5,1,2,3} - \setrow{3}{2,3,5,4,1} - \setrow{2}{1,2,4,3,5} - \setrow{1}{3,1,2,5,4} - \end{skyline} -\end{center} -\end{lstlisting} -\clearpage - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{sudoku}}{false}{sets \styleoption{rows} and \styleoption{columns} to 9, in case of \mco{true} is specified. Additionally the classic Sudoku grid is drawn.} - \optitem{\styleoption{width}}{6.7cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0.75cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.85cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-38pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{skyline}} -The \env{skyline} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{skyline}\oarg{options}\\\dots\\\enve{skyline}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\subsection{\texttt{puzzlebackground}} -The \env{puzzlebackground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzlebackground}\\\dots\\\enve{puzzlebackground}} allows you to place elements behind the main layer. This is for example usefull for the \cmd\fillarea\ command. -\subsection{\texttt{puzzleforeground}} -The \env{puzzleforeground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzleforeground}\\\dots\\\enve{puzzleforeground}} allows you to place elements in front of the main layer. This is for example usefull for the \cmd\framearea\ command. -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{skylineT}} -The command \cs{skylineT}\margcs{\cmd\skylineT\{\marg{csv list}\}} typesets the numbers above the grid indicating how many skycrapers are visible. It expects a comma-separated list as an argument. -\subsubsection{\texttt{skylineB}} -The command \cs{skylineB}\margcs{\cmd\skylineB\{\marg{csv list}\}} typesets the numbers below the grid. -\subsubsection{\texttt{skylineL}} -The command \cs{skylineL}\margcs{\cmd\skylineL\{\marg{csv list}\}} typesets the numbers left to the grid. -\subsubsection{\texttt{skylineR}} -The command \cs{skylineR}\margcs{\cmd\skylineR\{\marg{csv list}\}} typesets the numbers right to the grid. -\subsubsection{\texttt{skylinecell}} -The command \cs{skylinecell}\margcs{\cmd\skylinecell\{\marg{column}\}\{\marg{row}\}\\\{\marg{height}\}} sets the \marg{height} of the grid cell \marg{column}\marg{row}. -\subsubsection{\texttt{setrow}} -The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the heights of \marg{row}. It expects a comma-separated list. -\subsubsection{\texttt{setcolumn}} -The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the heights of \marg{column}. -\subsubsection{\texttt{framearea}} -The command \cs{framearea}\margcs{\cmd\framearea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} frames the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. - -\begin{lstlisting} -\framearea{green}{(2,2)--(2,3)--(3,3)--(3,2)--(2,2)} -\end{lstlisting} - -This command will color the frame of the grid cell \texttt{(2,2)} green. You should consider using this command in the \env{puzzleforeground} environment. - -\subsubsection{\texttt{fillarea}} -The command \cs{fillarea}\margcs{\cmd\fillarea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} fills the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. You should consider using this command in the \env{puzzlebackground} environment. -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{skylinesetup}} -With the command \cs{skylinesetup}\margcs{\cmd\skylinesetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. -\lstset{basicstyle=\ttfamily\scriptsize} -\section{Supported variants} -\subsection{Skyline Sudoku} -\begin{center} - \begin{skyline}[sudoku,scale=.46] - \skylineB{4,5,2,5,2,1,2,4,3} - \skylineL{4,2,2,2,1,3,3,3,2} - \skylineT{4,1,3,2,3,5,3,2,3} - \skylineR{3,3,1,3,4,2,3,2,4} - \setrow{9}{{},{},{},8,{},{},{},7} - \setrow{8}{{},{},4,{},{},6,{},{},8} - \setrow{7}{{},2,{},7,{},{},{},{},1} - \setrow{6}{{},{},{},{},8,2} - \setrow{5}{{},{},2,{},4,{},7} - \setrow{4}{{},{},{},3,{},{},4} - \setrow{3}{{},{},{},{},1} - \setrow{2}{{},3,{},{},{},{},1,2} - \setrow{1}{{},{},5} - \end{skyline} - \hspace{1cm} - \begin{skyline}[sudoku,scale=.46] - \skylineB{4,5,2,5,2,1,2,4,3} - \skylineL{4,2,2,2,1,3,3,3,2} - \skylineT{4,1,3,2,3,5,3,2,3} - \skylineR{3,3,1,3,4,2,3,2,4} - \setrow{9}{3,9,6,8,5,1,2,7,4} - \setrow{8}{1,7,4,9,2,6,3,5,8} - \setrow{7}{5,2,8,7,3,4,9,6,1} - \setrow{6}{7,4,3,1,8,2,6,9,5} - \setrow{5}{9,8,2,6,4,5,7,1,3} - \setrow{4}{6,5,1,3,9,7,4,8,2} - \setrow{3}{8,6,7,2,1,3,5,4,9} - \setrow{2}{4,3,9,5,6,8,1,2,7} - \setrow{1}{2,1,5,4,7,9,8,3,6} - \end{skyline} -\end{center} - -\begin{lstlisting} -\begin{center} - \begin{skyline}[sudoku,scale=.46] - \skylineB{4,5,2,5,2,1,2,4,3} - \skylineL{4,2,2,2,1,3,3,3,2} - \skylineT{4,1,3,2,3,5,3,2,3} - \skylineR{3,3,1,3,4,2,3,2,4} - \setrow{9}{{},{},{},8,{},{},{},7} - \setrow{8}{{},{},4,{},{},6,{},{},8} - \setrow{7}{{},2,{},7,{},{},{},{},1} - \setrow{6}{{},{},{},{},8,2} - \setrow{5}{{},{},2,{},4,{},7} - \setrow{4}{{},{},{},3,{},{},4} - \setrow{3}{{},{},{},{},1} - \setrow{2}{{},3,{},{},{},{},1,2} - \setrow{1}{{},{},5} - \end{skyline} - \hspace{1cm} - \begin{skyline}[sudoku,scale=.46] - \skylineB{4,5,2,5,2,1,2,4,3} - \skylineL{4,2,2,2,1,3,3,3,2} - \skylineT{4,1,3,2,3,5,3,2,3} - \skylineR{3,3,1,3,4,2,3,2,4} - \setrow{9}{3,9,6,8,5,1,2,7,4} - \setrow{8}{1,7,4,9,2,6,3,5,8} - \setrow{7}{5,2,8,7,3,4,9,6,1} - \setrow{6}{7,4,3,1,8,2,6,9,5} - \setrow{5}{9,8,2,6,4,5,7,1,3} - \setrow{4}{6,5,1,3,9,7,4,8,2} - \setrow{3}{8,6,7,2,1,3,5,4,9} - \setrow{2}{4,3,9,5,6,8,1,2,7} - \setrow{1}{2,1,5,4,7,9,8,3,6} - \end{skyline} -\end{center} -\end{lstlisting} - -\subsection{Skyline Sudoku (N*N)} -\begin{center} - \begin{skyline}[rows=6,columns=6,scale=.65] - \skylineB{4,2,1,3,3,2} - \skylineL{3,3,4,3,2,1} - \skylineT{1,2,3,3,2,4} - \skylineR{4,1,2,2,2,3} - \skylinecell{2}{4}{1} - \skylinecell{4}{1}{4} - \skylinecell{5}{2}{3} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,3)--(1,7)--(4,7)--(4,6)--(2,6)--(2,3)--(1,3)} - \fillarea{GreenYellow}{(2,3)--(2,6)--(4,6)--(4,3)--(2,3)} - \fillarea{LightBlue}{(4,1)--(7,1)--(7,5)--(6,5)--(6,2)--(4,2)--(4,1)} - \fillarea{LightSalmon!50}{(4,7)--(4,4)--(5,4)--(5,6)--(6,6)--(6,5)--(7,5)--(7,7)--(4,7)} - \fillarea{LightYellow}{(4,2)--(4,4)--(5,4)--(5,6)--(6,6)--(6,2)--(4,2)} - \end{puzzlebackground} - \end{skyline} - \hspace{1cm} - \begin{skyline}[rows=6,columns=6,scale=.65] - \skylineB{4,2,1,3,3,2} - \skylineL{3,3,4,3,2,1} - \skylineT{1,2,3,3,2,4} - \skylineR{4,1,2,2,2,3} - \setrow{6}{6,3,4,1,5,2} - \setrow{5}{5,6,2,3,1,4} - \setrow{4}{2,1,3,6,4,5} - \setrow{3}{1,4,5,2,6,3} - \setrow{2}{4,2,1,5,3,6} - \setrow{1}{3,5,6,4,2,1} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,3)--(1,7)--(4,7)--(4,6)--(2,6)--(2,3)--(1,3)} - \fillarea{GreenYellow}{(2,3)--(2,6)--(4,6)--(4,3)--(2,3)} - \fillarea{LightBlue}{(4,1)--(7,1)--(7,5)--(6,5)--(6,2)--(4,2)--(4,1)} - \fillarea{LightSalmon!50}{(4,7)--(4,4)--(5,4)--(5,6)--(6,6)--(6,5)--(7,5)--(7,7)--(4,7)} - \fillarea{LightYellow}{(4,2)--(4,4)--(5,4)--(5,6)--(6,6)--(6,2)--(4,2)} - \end{puzzlebackground} - \end{skyline} -\end{center} - -\begin{lstlisting} -\begin{center} - \begin{skyline}[rows=6,columns=6,scale=.65] - \skylineB{4,2,1,3,3,2} - \skylineL{3,3,4,3,2,1} - \skylineT{1,2,3,3,2,4} - \skylineR{4,1,2,2,2,3} - \skylinecell{2}{4}{1} - \skylinecell{4}{1}{4} - \skylinecell{5}{2}{3} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,3)--(1,7)--(4,7)--(4,6)--(2,6)--(2,3)--(1,3)} - \fillarea{GreenYellow}{(2,3)--(2,6)--(4,6)--(4,3)--(2,3)} - \fillarea{LightBlue}{(4,1)--(7,1)--(7,5)--(6,5)--(6,2)--(4,2)--(4,1)} - \fillarea{LightSalmon!50}{(4,7)--(4,4)--(5,4)--(5,6)--(6,6)--(6,5)--(7,5) - --(7,7)--(4,7)} - \fillarea{LightYellow}{(4,2)--(4,4)--(5,4)--(5,6)--(6,6)--(6,2)--(4,2)} - \end{puzzlebackground} - \end{skyline} - \hspace{1cm} - \begin{skyline}[rows=6,columns=6,scale=.65] - \skylineB{4,2,1,3,3,2} - \skylineL{3,3,4,3,2,1} - \skylineT{1,2,3,3,2,4} - \skylineR{4,1,2,2,2,3} - \setrow{6}{6,3,4,1,5,2} - \setrow{5}{5,6,2,3,1,4} - \setrow{4}{2,1,3,6,4,5} - \setrow{3}{1,4,5,2,6,3} - \setrow{2}{4,2,1,5,3,6} - \setrow{1}{3,5,6,4,2,1} - \begin{puzzlebackground} - \fillarea{Wheat}{(1,1)--(1,3)--(4,3)--(4,1)--(1,1)} - \fillarea{HotPink!30}{(1,3)--(1,7)--(4,7)--(4,6)--(2,6)--(2,3)--(1,3)} - \fillarea{GreenYellow}{(2,3)--(2,6)--(4,6)--(4,3)--(2,3)} - \fillarea{LightBlue}{(4,1)--(7,1)--(7,5)--(6,5)--(6,2)--(4,2)--(4,1)} - \fillarea{LightSalmon!50}{(4,7)--(4,4)--(5,4)--(5,6)--(6,6)--(6,5)--(7,5) - --(7,7)--(4,7)} - \fillarea{LightYellow}{(4,2)--(4,4)--(5,4)--(5,6)--(6,6)--(6,2)--(4,2)} - \end{puzzlebackground} - \end{skyline} -\end{center} -\end{lstlisting} - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline_README b/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline_README deleted file mode 100644 index 60e4f0e3031..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline_README +++ /dev/null @@ -1,12 +0,0 @@ -The package enables the user to typeset Skyline logic puzzles -(aka Skycrapers, Wolkenkratzer, Hochhäuser, ...), -incl. Skyline Sudoku and Skyline Sudoku (N*N) variants. - -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. diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/slitherlink/slitherlink.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/slitherlink/slitherlink.pdf Binary files differdeleted file mode 100644 index 7a53a89ef9b..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/slitherlink/slitherlink.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/slitherlink/slitherlink.tex b/Master/texmf-dist/doc/latex/logicpuzzle/slitherlink/slitherlink.tex deleted file mode 100644 index 6b05fc6a553..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/slitherlink/slitherlink.tex +++ /dev/null @@ -1,324 +0,0 @@ -% pdflatex --shell-escape logo.tex -% run twice: 1. download qrcode.png 2. include the pic -% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png -% -\documentclass[a4paper]{ltxdoc}% -\usepackage[english]{babel}% -\usepackage[latin1]{inputenc}% -\usepackage[T1]{fontenc}% -\usepackage{textcomp}% -\usepackage{lmodern}% -\usepackage{bera}% -\usepackage{ccicons} -\usepackage{microtype}% -\usepackage{ltxdocext}% -\usepackage{listings} -\usepackage{marginnote}% -\usepackage[svgnames,rgb]{xcolor}% -\usepackage[automark,nouppercase]{scrpage2} -\usepackage{slitherlink}% -\usepackage{hyperref} -% -\setlength{\headheight}{1.1\baselineskip}% -% -\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,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,slitherlink,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},emphstyle={[2]\color{OliveDrab}},morekeywords={setbigcell,setrule,tikzpath,colorarea,framearea,fillarea,slitherlinkcell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} -\makeatletter -\renewcommand{\maketitle}% -{% - \thispagestyle{empty}% - \pagecolor{Ivory}% - \begin{titlepage}% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% - (\paperwidth,2cm);% - \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% - \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% - \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% - \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\usebox\logo};% - \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% - \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% - \end{tikzpicture}% - };% - \node[yshift=0cm] at (current page.south west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% - \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\large\sffamily{\@refline}}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% - \end{titlepage}% - \pagecolor{white}% -}% -% -\newcommand*{\@tikzhead}[1]% -{% - \begin{tikzpicture}[remember picture,overlay]% - \node[yshift=-2cm] at (current page.north west)% - {% - \begin{tikzpicture}[remember picture, overlay]% - \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% - \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% - {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% - \node[anchor=east,xshift=.9\paperwidth,rectangle,% - rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% - {\color{white}\textsc{#1}};% - \end{tikzpicture}% - };% - \end{tikzpicture}% -}% -\clearscrheadings% -\ihead{\@tikzhead{\headmark}}% -\cfoot{\upshape\thepage}% -\pagestyle{scrheadings}% -% -%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% -\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% -% -\renewcommand{\headfont}{\normalfont\mdseries\scshape} -% -\gdef\@subtitle{}% -\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% -\gdef\@fileversion{}% -\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% -\gdef\@author{}% -\providecommand*{\Author}[1]{\gdef\@author{#1}}% -\gdef\@authorline{Package author:}% -\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% -\gdef\@refline{}% -\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% -\gdef\and{\unskip{}, }% -\newcommand\doubledash{-\kern0.5pt-} -\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} -\makeatother -% -\def\filename{slitherlink.sty}% -\def\XeLaTeX{Xe\LaTeX}% -% -\newenvironment{optionlist} -{\begin{trivlist}\setlength\leftskip{2em}} -{\end{trivlist}} -\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} -% -\makeatletter% -\renewcommand\tableofcontents% -{% - %\section*{\contentsname}% - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \@starttoc{toc}% -}% -% -\newcommand\styleoption{\name@idx{style option}}% -\newcommand\stylename{\name@idx{document style}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% -\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% -\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% -% -\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} -%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} -%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} -\makeatother -% -\setlength\parindent{0pt}% -\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Slitherlink logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% -% -\begin{document} -\title{\filename}% -\Subtitle{A style file for typesetting Slitherlink logic puzzles}% -\author{Josef Kleber} -\Fileversion{v1.0} -\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{% - \begin{slitherlink}[bgcolor=Ivory] - \setbigcell{1}{1}{4} - \slitherlinkcell{1}{3}{3} - \slitherlinkcell{3}{1}{3} - \slitherlinkcell{3}{3}{0} - \slitherlinkcell{3}{4}{3} - \slitherlinkcell{4}{4}{2} - \slitherlinkcell{5}{1}{0} - \slitherlinkcell{5}{2}{2} - \end{slitherlink} - \hspace{1.5cm} - \begin{slitherlink}[bgcolor=Ivory] - \setbigcell{1}{1}{4} - \slitherlinkcell{1}{3}{3} - \slitherlinkcell{3}{1}{3} - \slitherlinkcell{3}{3}{0} - \slitherlinkcell{3}{4}{3} - \slitherlinkcell{4}{4}{2} - \slitherlinkcell{5}{1}{0} - \slitherlinkcell{5}{2}{2} - \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} -} -\maketitle -\tableofcontents -\clearpage - -\section{The puzzle} -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. Here's a little self-explanatory example: - -\begin{center} - \begin{slitherlink} - \setbigcell{1}{1}{4} - \slitherlinkcell{1}{3}{3} - \slitherlinkcell{3}{1}{3} - \slitherlinkcell{3}{3}{0} - \slitherlinkcell{3}{4}{3} - \slitherlinkcell{4}{4}{2} - \slitherlinkcell{5}{1}{0} - \slitherlinkcell{5}{2}{2} - \end{slitherlink} - \hspace{1.5cm} - \begin{slitherlink} - \setbigcell{1}{1}{4} - \slitherlinkcell{1}{3}{3} - \slitherlinkcell{3}{1}{3} - \slitherlinkcell{3}{3}{0} - \slitherlinkcell{3}{4}{3} - \slitherlinkcell{4}{4}{2} - \slitherlinkcell{5}{1}{0} - \slitherlinkcell{5}{2}{2} - \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} - -\bigskip -\begin{lstlisting} -\begin{center} - \begin{slitherlink} - \setbigcell{1}{1}{4} - \slitherlinkcell{1}{3}{3} - \slitherlinkcell{3}{1}{3} - \slitherlinkcell{3}{3}{0} - \slitherlinkcell{3}{4}{3} - \slitherlinkcell{4}{4}{2} - \slitherlinkcell{5}{1}{0} - \slitherlinkcell{5}{2}{2} - \end{slitherlink} - \hspace{1.5cm} - \begin{slitherlink} - \setbigcell{1}{1}{4} - \slitherlinkcell{1}{3}{3} - \slitherlinkcell{3}{1}{3} - \slitherlinkcell{3}{3}{0} - \slitherlinkcell{3}{4}{3} - \slitherlinkcell{4}{4}{2} - \slitherlinkcell{5}{1}{0} - \slitherlinkcell{5}{2}{2} - \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{lstlisting} -\lstset{basicstyle=\ttfamily\normalsize} - -\section{Options} -\begin{optionlist} - \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} - \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} - \optitem{\styleoption{width}}{5.2cm}{sets the width of the minipage, in which the grid is typeset.} - \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} - \optitem{\styleoption{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{\styleoption{title}}{}{sets the title of a puzzle.} - \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} - \optitem{\styleoption{titlewidth}}{5.2cm}{specifies the width of the box the title is set in.} - \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} - \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} - \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} -\end{optionlist} - -\section{Environments} -\subsection{\texttt{slitherlink}} -The \env{slitherlink} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{slitherlink}\oarg{options}\\\dots\\\enve{slitherlink}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. -\subsection{\texttt{puzzlebackground}} -The \env{puzzlebackground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzlebackground}\\\dots\\\enve{puzzlebackground}} allows you to place elements behind the main layer. This is for example usefull for the \cmd\fillarea\ command. -\subsection{\texttt{puzzleforeground}} -The \env{puzzleforeground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzleforeground}\\\dots\\\enve{puzzleforeground}} allows you to place elements in front of the main layer. This is for example usefull for the \cmd\framearea\ command. -\section{Commands} -\subsection{In the grid and around} -\subsubsection{\texttt{slitherlinkcell}} -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}. -\subsubsection{\texttt{setbigcell}} -With\margcs{\cmd\setbigcell[\oarg{fontsize}]\\\{\{\marg{column}\}\{\marg{row}\}\{\marg{number}\}} the \cmd\setbigcell\ command, you can set \marg{number} 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. -\subsubsection{\texttt{setrow}} -The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list. -\subsubsection{\texttt{setcolumn}} -The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}. -\subsubsection{\texttt{framearea}} -The command \cs{framearea}\margcs{\cmd\framearea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} frames the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. - -\begin{lstlisting} -\framearea{green}{(2,2)--(2,3)--(3,3)--(3,2)--(2,2)} -\end{lstlisting} - -This command will color the frame of the grid cell \texttt{(2,2)} green. You should consider using this command in the \env{puzzleforeground} environment. - -\subsubsection{\texttt{tikzpath}} -With\margcs{\cmd\tikzpath\{\oarg{column}\}\{\oarg{row}\}\\\{\oarg{csv list}\}} the \cmd\tikzpath\ command, you can easily construct a \cmd\tikz\ path. You just need to define a starting point \marg{column}\marg{row} (bottom left corner) and a \marg{csv list} with direction indicators relative to the current position. - -\begin{center} -\begin{tabular}{rlrlrl} -7: & up left & 8: & up & 9: & up right \\ -4: & left & 5: & no change & 6: & right \\ -1: & down left & 2: & down & 3: & down right \\ -\end{tabular} -\end{center} - -\begin{lstlisting} -\framearea{green}{\tikzpath{2}{2}{8,6,2,4}} -\end{lstlisting} - -This command will frame grid cell \texttt{(2,2)} green. -\subsection{Presentation} -\subsubsection{\texttt{definecounterstyle}} -The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: - -\begin{lstlisting} -\definecounterstyle{left}{ - \begingroup\reversemarginpar\marginnote{ - \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, - draw,rounded corners=3pt,thick] - {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} -} -\end{lstlisting} - -To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. -\subsubsection{\texttt{puzzlecounter}} -The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. -\subsubsection{\texttt{titleformat}} -With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: - -\begin{lstlisting} -\titleformat{\centering\Large\color{blue}} -\end{lstlisting} -\subsection{Miscellaneous} -\subsubsection{\texttt{slitherlinksetup}} -With the command \cs{slitherlinksetup}\margcs{\cmd\slitherlinksetup\{\marg{options}\}} you can reset the options with global scope. -\subsubsection{\texttt{setpuzzlecounter}} -With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. - -\section{Examples \& Solutions} -You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-31pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page}. The puzzles are originally licensed under \href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}. -\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/slitherlink/slitherlink_README b/Master/texmf-dist/doc/latex/logicpuzzle/slitherlink/slitherlink_README deleted file mode 100644 index f1f9b399091..00000000000 --- a/Master/texmf-dist/doc/latex/logicpuzzle/slitherlink/slitherlink_README +++ /dev/null @@ -1,8 +0,0 @@ -The package enables the user to typeset Slitherlink logic puzzles -(aka Fences, Number Line, Dotty Dilemma, Sli-Lin, Takegaki, -Great Wall of China, Loop the Loop, Rundweg, Gartenzaun, ...) -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.
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty b/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty index 7e5739cac8b..442cfc155f7 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty @@ -23,220 +23,13 @@ % http://en.wikipedia.org/wiki/Battleship_%28puzzle%29 % http://de.wikipedia.org/wiki/Bimaru % -\ProvidesPackage{battleship}[2013/04/10 battleship.sty v1.4a - Josef Kleber (C) 2013]% +\ProvidesPackage{battleship}[2013/04/30 battleship.sty v1.5 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@BS@init@prefix{LP@BS}% -\newcommand*\LP@BS@init@package{battleship}% -% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{rows}{5}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{columns}{5}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{shipcolor}{green}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{scale}{1}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{counterstyle}{none}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{bgcolor}{}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{width}{6cm}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{cvoffset}{-23pt}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{title}{}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{titleindent}{0.75cm}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{titlewidth}{5.15cm}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{sbindent}{0.75cm}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{sbwidth}{5.15cm}% -\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{sbshipscale}{1}% -\LP@define@choicekey@fontsize{\LP@BS@init@prefix}{\LP@BS@init@package}{{Large}}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,shipcolor,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth,sbindent,sbwidth,sbshipscale}% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@BS@init@prefix}% -% -\gdef\LP@BS@shipbox{}% -\tikzstyle{island} = [fill=yellow!30,draw, decorate, decoration={random steps,segment length=2.7pt,amplitude=1.7pt}]% -% -\newcommand*\Ship{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor] (0,0) circle (1);}% -\newcommand*\ShipC{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% -\newcommand*\ShipT{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% -\newcommand*\ShipB{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% -\newcommand*\ShipL{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% -\newcommand*\ShipR{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% -\newcommand*\Island{\tikz[scale=\LP@BS@scale]\draw[scale=.36,island] (0,0) rectangle (2,2);}% -\newcommand*\Water{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill,blue!40] (1,1) circle (0.2);}% -% versions for \shipbox without second scale -\newcommand*\@Ship{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor] (0,0) circle (1);}% -\newcommand*\@ShipC{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% -\newcommand*\@ShipT{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% -\newcommand*\@ShipB{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% -\newcommand*\@ShipL{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% -\newcommand*\@ShipR{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% -% -\newcommand*\LP@BS@printship[1]% -{% - \ifthenelse{\equal{#1}{1}}{\scalebox{\LP@BS@sbshipscale}{\@Ship}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{2}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{3}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{4}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{5}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{6}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{7}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{8}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{9}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{10}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% -}% -% -\newcommand*\LP@BS@printshipbox[1]% -{% \expandafters needed because csv list is stored in macro - \expandafter\forcsvlist\expandafter\LP@BS@printship\expandafter{#1}% -}% -% -\newcommand*\shipH[1]% -{% - \LP@setrowcontents{#1}{1}{\value{LP@BS@rows}}% -}% -% -\newcommand*\shipV[1]% -{% - \LP@setcolumncontents{#1}{0}{1}% -}% -% -\newcommand*\placesegment[3]% -{% - \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% - \LP@setcellcontent{#1}{#2}{#3}% -}% -% -\let\ship\placesegment% -% -\newcommand*\placeisland[2]% -{% - \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% - \LP@setcellcontent{#1}{#2}{\Island}% -}% -% -\newcommand*\placewater[2]% -{% - \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% - \LP@setcellcontent{#1}{#2}{\Water}% -}% -% -\newcommand*\shipbox[2][]% -{% - \setkeys{shipbox}{#1}% - \gdef\LP@BS@shipbox{#2}% -}% -% -\newcommand*\placeship[4]% -{% - \setcounter{LP@counti}{#4}% length - \ifnum\value{LP@counti}<1% - \PackageError{battleship}% - {ship length < 1}% - {The length of your ship should be at least 1}% - \fi% - \ifnum\value{LP@counti}>10% - \PackageError{battleship}% - {ship length > 10}% - {The supported max length of ships is 10!}% - \fi% - \ifnum\value{LP@counti}=1% - \placesegment{#2}{#3}{\Ship}% - \else% - \setcounter{LP@whiledo@i}{\value{LP@counti}}% - \addtocounter{LP@whiledo@i}{-2}% length of middle ship - \ifthenelse{\equal{#1}{V}}% - {% - \placesegment{#2}{#3}{\ShipB}% - \setcounter{LP@countii}{#3}% - \whiledo{\value{LP@whiledo@i}>0}% - {% - \addtocounter{LP@whiledo@i}{-1}% - \stepcounter{LP@countii}% - \placesegment{#2}{\theLP@countii}{\ShipC}% - }% - \stepcounter{LP@countii}% - \placesegment{#2}{\theLP@countii}{\ShipT}% - }% - {% - \ifthenelse{\equal{#1}{H}}% - {% - \placesegment{#2}{#3}{\ShipL}% - \setcounter{LP@counti}{#2}% - \whiledo{\value{LP@whiledo@i}>0}% - {% - \addtocounter{LP@whiledo@i}{-1}% - \stepcounter{LP@counti}% - \placesegment{\theLP@counti}{#3}{\ShipC}% - }% - \stepcounter{LP@counti}% - \placesegment{\theLP@counti}{#3}{\ShipR}% - }% - {\PackageError{battleship}% - {invalid direction (H/V)}% - {You can place your ship only\MessageBreak% - horizontally (H) or vertically (V)!}% - }% - }% - \fi% -}% -% -\newcommand*\battleshipsetup[1]% -{% - \setkeys{battleship.sty}{#1}% -}% -% -\newcommand{\classicgame}[1]% -{% - \begin{center}% - \begin{battleship}[rows=10,columns=10,width=6.5cm,title=Me,sbindent=0.65cm,titleindent=0.55cm,titlewidth=5.7cm,sbwidth=5.7cm,scale=0.59,fontsize=normalsize]% - \shipV{J,I,H,G,F,E,D,C,B,A}% - \shipH{1,2,3,4,5,6,7,8,9,10}% - \shipbox{#1}% - \end{battleship}% - \hspace{1cm}% - \begin{battleship}[rows=10,columns=10,width=6.5cm,title=Enemy,sbindent=0.65cm,titleindent=0.55cm,titlewidth=5.7cm,sbwidth=5.7cm,scale=0.59,fontsize=normalsize]% - \shipV{J,I,H,G,F,E,D,C,B,A}% - \shipH{1,2,3,4,5,6,7,8,9,10}% - \end{battleship}% - \end{center}% - \par\vspace{1cm}% - \begin{center}% - \begin{battleship}[rows=10,columns=10,width=6.5cm,title=Me,sbindent=0.65cm,titleindent=0.55cm,titlewidth=5.7cm,sbwidth=5.7cm,scale=0.59,fontsize=normalsize]% - \shipV{J,I,H,G,F,E,D,C,B,A}% - \shipH{1,2,3,4,5,6,7,8,9,10}% - \shipbox{#1}% - \end{battleship}% - \hspace{1cm}% - \begin{battleship}[rows=10,columns=10,width=6.5cm,title=Enemy,sbindent=0.65cm,titleindent=0.55cm,titlewidth=5.7cm,sbwidth=5.7cm,scale=0.59,fontsize=normalsize]% - \shipV{J,I,H,G,F,E,D,C,B,A}% - \shipH{1,2,3,4,5,6,7,8,9,10}% - \end{battleship}% - \end{center}% -}% -% -\newenvironment{battleship}[1][]% -{% - \setkeys{battleship}{#1}% - \LP@set@package{battleship}% - \LP@set@env@prefix{LP@BS}% - \shipbox{}% clear shipbox - \setcounter{LP@BS@rows}{\LP@BS@rows}% - \setcounter{LP@BS@columns}{\LP@BS@columns}% - \stepcounter{LP@BS@rows}% - \stepcounter{LP@BS@columns}% - \begin{minipage}[t]{\LP@BS@width}% - \ifthenelse{\equal{\LP@BS@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@BS@titleindent}\parbox{\LP@BS@titlewidth}{\strut\LP@titleformat\LP@BS@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@BS@scale]% - \LP@drawbackground{1}{1}{\LP@BS@columns}{\LP@BS@rows}{\LP@BS@bgcolor}% - \LP@drawgrid{1}{1}{\LP@BS@columns}{\LP@BS@rows}{1cm}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@BS@counterstyle}% - \par\hbadness=10000\medskip\noindent\hspace{\LP@BS@sbindent}\begin{minipage}{\LP@BS@sbwidth}{\hbadness=10000\RaggedRight\LP@BS@printshipbox{\LP@BS@shipbox}}\end{minipage}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{battleship}{ +Usage of package battleship.sty is deprecated\MessageBreak +\space battleship.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty b/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty index d740fb1c64b..081e2ad05a4 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty @@ -20,63 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{bokkusu}[2013/03/25 bokkusu.sty v1.2 - Josef Kleber (C) 2013]% +\ProvidesPackage{bokkusu}[2013/04/30 bokkusu.sty v1.3 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@BK@init@prefix{LP@BK}% -\newcommand*\LP@BK@init@package{bokkusu}% -% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{rows}{5}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{columns}{5}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{scale}{1}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{counterstyle}{none}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{color}{black}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{bgcolor}{}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{width}{6.7cm}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{cvoffset}{-38pt}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{title}{}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{titleindent}{0.75cm}% -\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{titlewidth}{5.85cm}% -\LP@define@choicekey@fontsize{\LP@BK@init@prefix}{\LP@BK@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,color,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@BK@init@prefix}% -% -\let\valueH\LP@bottomrow% -\let\valueV\LP@leftcolumn% -\let\sumH\LP@toprow% -\let\sumV\LP@rightcolumn% -% -\newcommand*\bokkususetup[1]% -{% - \setkeys{bokkusu.sty}{#1}% -}% -% -\newenvironment{bokkusu}[1][]% -{% - \setkeys{bokkusu}{#1}% - \LP@set@package{bokkusu}% - \LP@set@env@prefix{LP@BK}% - \setcounter{LP@BK@rows}{\LP@BK@rows}% - \setcounter{LP@BK@columns}{\LP@BK@columns}% - \stepcounter{LP@BK@rows}% - \stepcounter{LP@BK@columns}% - \begin{minipage}[t]{\LP@BK@width}% - \ifthenelse{\equal{\LP@BK@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@BK@titleindent}\parbox{\LP@BK@titlewidth}{\strut\LP@titleformat\LP@BK@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@BK@scale]% - \LP@drawbackground{1}{1}{\LP@BK@columns}{\LP@BK@rows}{\LP@BK@bgcolor}% - \LP@drawgrid{1}{1}{\LP@BK@columns}{\LP@BK@rows}{1cm}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@BK@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{bokkusu}{ +Usage of package bokkusu.sty is deprecated\MessageBreak +\space bokkusu.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty index 618cb2a83fe..1f8608aac5a 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty @@ -20,60 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{chaossudoku}[2013/03/27 chaossudoku.sty v1.1 - Josef Kleber (C) 2013]% +\ProvidesPackage{chaossudoku}[2013/04/30 chaossudoku.sty v1.2 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@CS@init@prefix{LP@CS}% -\newcommand*\LP@CS@init@package{chaossudoku}% -% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{rows}{5}% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{columns}{5}% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{scale}{1}% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{counterstyle}{none}% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{bgcolor}{}% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{width}{5.1cm}% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{cvoffset}{-23pt}% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{title}{}% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{titleindent}{0cm}% -\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{titlewidth}{5.1cm}% -\LP@define@choicekey@fontsize{\LP@CS@init@prefix}{\LP@CS@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@CS@init@prefix}% -% -\let\chaossudokucell\setcell% -% -\newcommand*\chaossudokusetup[1]% -{% - \setkeys{chaossudoku.sty}{#1}% -}% -% -\newenvironment{chaossudoku}[1][]% -{% - \setkeys{chaossudoku}{#1}% - \LP@set@package{chaossudoku}% - \LP@set@env@prefix{LP@CS}% - \setcounter{LP@CS@rows}{\LP@CS@rows}% - \setcounter{LP@CS@columns}{\LP@CS@columns}% - \stepcounter{LP@CS@rows}% - \stepcounter{LP@CS@columns}% - \begin{minipage}[t]{\LP@CS@width}% - \ifthenelse{\equal{\LP@CS@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@CS@titleindent}\parbox{\LP@CS@titlewidth}{\strut\LP@titleformat\LP@CS@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@CS@scale]% - \LP@drawbackground{1}{1}{\LP@CS@columns}{\LP@CS@rows}{\LP@CS@bgcolor}% - \LP@drawgrid{1}{1}{\LP@CS@columns}{\LP@CS@rows}{1cm}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@CS@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{chaossudoku}{ +Usage of package chaossudoku.sty is deprecated\MessageBreak +\space chaossudoku.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty index 81a85c7fcca..9c5e0233863 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty @@ -20,60 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{ddsudoku}[2013/04/05 ddsudoku.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{ddsudoku}[2013/04/30 ddsudoku.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@DDS@init@prefix{LP@DDS}% -\newcommand*\LP@DDS@init@package{ddsudoku}% -% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{rows}{5}% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{columns}{5}% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{scale}{1}% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{counterstyle}{none}% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{bgcolor}{}% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{width}{5.1cm}% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{cvoffset}{-23pt}% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{title}{}% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{titleindent}{0cm}% -\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{titlewidth}{5.1cm}% -\LP@define@choicekey@fontsize{\LP@DDS@init@prefix}{\LP@DDS@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@DDS@init@prefix}% -% -\let\ddsudokucell\setcell% -% -\newcommand*\ddsudokusetup[1]% -{% - \setkeys{ddsudoku.sty}{#1}% -}% -% -\newenvironment{ddsudoku}[1][]% -{% - \setkeys{ddsudoku}{#1}% - \LP@set@package{ddsudoku}% - \LP@set@env@prefix{LP@DDS}% - \setcounter{LP@DDS@rows}{\LP@DDS@rows}% - \setcounter{LP@DDS@columns}{\LP@DDS@columns}% - \stepcounter{LP@DDS@rows}% - \stepcounter{LP@DDS@columns}% - \begin{minipage}[t]{\LP@DDS@width}% - \ifthenelse{\equal{\LP@DDS@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@DDS@titleindent}\parbox{\LP@DDS@titlewidth}{\strut\LP@titleformat\LP@DDS@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@DDS@scale]% - \LP@drawbackground{1}{1}{\LP@DDS@columns}{\LP@DDS@rows}{\LP@DDS@bgcolor}% - \LP@drawgrid{1}{1}{\LP@DDS@columns}{\LP@DDS@rows}{1cm}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@DDS@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{ddsudoku}{ +Usage of package ddsudoku.sty is deprecated\MessageBreak +\space ddsudoku.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty b/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty index 836e055e21a..567acb1d95a 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty @@ -20,60 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{hakyuu}[2013/03/27 hakyuu.sty v1.1 - Josef Kleber (C) 2013]% +\ProvidesPackage{hakyuu}[2013/04/30 hakyuu.sty v1.2 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@HY@init@prefix{LP@HY}% -\newcommand*\LP@HY@init@package{hakyuu}% -% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{rows}{5}% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{columns}{5}% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{scale}{1}% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{counterstyle}{none}% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{bgcolor}{}% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{width}{5.1cm}% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{cvoffset}{-23pt}% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{title}{}% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{titleindent}{0cm}% -\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{titlewidth}{5.1cm}% -\LP@define@choicekey@fontsize{\LP@HY@init@prefix}{\LP@HY@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@HY@init@prefix}% -% -\let\hakyuucell\setcell% -% -\newcommand*\hakyuusetup[1]% -{% - \setkeys{hakyuu.sty}{#1}% -}% -% -\newenvironment{hakyuu}[1][]% -{% - \setkeys{hakyuu}{#1}% - \LP@set@package{hakyuu}% - \LP@set@env@prefix{LP@HY}% - \setcounter{LP@HY@rows}{\LP@HY@rows}% - \setcounter{LP@HY@columns}{\LP@HY@columns}% - \stepcounter{LP@HY@rows}% - \stepcounter{LP@HY@columns}% - \begin{minipage}[t]{\LP@HY@width}% - \ifthenelse{\equal{\LP@HY@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@HY@titleindent}\parbox{\LP@HY@titlewidth}{\strut\LP@titleformat\LP@HY@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@HY@scale]% - \LP@drawbackground{1}{1}{\LP@HY@columns}{\LP@HY@rows}{\LP@HY@bgcolor}% - \LP@drawgrid{1}{1}{\LP@HY@columns}{\LP@HY@rows}{1cm}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@HY@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{hakyuu}{ +Usage of package hakyuu.sty is deprecated\MessageBreak +\space hakyuu.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty b/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty index e8307962299..8b34dc3699c 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty @@ -20,60 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{hitori}[2013/04/05 hitori.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{hitori}[2013/04/30 hitori.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@HT@init@prefix{LP@HT}% -\newcommand*\LP@HT@init@package{hitori}% -% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{rows}{5}% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{columns}{5}% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{scale}{1}% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{counterstyle}{none}% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{bgcolor}{}% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{width}{5.1cm}% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{cvoffset}{-23pt}% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{title}{}% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{titleindent}{0cm}% -\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{titlewidth}{5.1cm}% -\LP@define@choicekey@fontsize{\LP@HT@init@prefix}{\LP@HT@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@HT@init@prefix}% -% -\let\hitoricell\setcell% -% -\newcommand*\hitorisetup[1]% -{% - \setkeys{hitori.sty}{#1}% -}% -% -\newenvironment{hitori}[1][]% -{% - \setkeys{hitori}{#1}% - \LP@set@package{hitori}% - \LP@set@env@prefix{LP@HT}% - \setcounter{LP@HT@rows}{\LP@HT@rows}% - \setcounter{LP@HT@columns}{\LP@HT@columns}% - \stepcounter{LP@HT@rows}% - \stepcounter{LP@HT@columns}% - \begin{minipage}[t]{\LP@HT@width}% - \ifthenelse{\equal{\LP@HT@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@HT@titleindent}\parbox{\LP@HT@titlewidth}{\strut\LP@titleformat\LP@HT@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@HT@scale]% - \LP@drawbackground{1}{1}{\LP@HT@columns}{\LP@HT@rows}{\LP@HT@bgcolor}% - \LP@drawgrid{1}{1}{\LP@HT@columns}{\LP@HT@rows}{1cm}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@HT@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{hitori}{ +Usage of package hitori.sty is deprecated\MessageBreak +\space hitori.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/kendoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/kendoku.sty index b537ef05292..d4b8f0da146 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/kendoku.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/kendoku.sty @@ -20,60 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{kendoku}[2013/04/12 kendoku.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{kendoku}[2013/04/30 kendoku.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@KD@init@prefix{LP@KD}% -\newcommand*\LP@KD@init@package{kendoku}% -% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{rows}{5}% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{columns}{5}% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{scale}{1}% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{counterstyle}{none}% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{bgcolor}{}% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{width}{5.1cm}% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{cvoffset}{-23pt}% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{title}{}% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{titleindent}{0cm}% -\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{titlewidth}{5.1cm}% -\LP@define@choicekey@fontsize{\LP@KD@init@prefix}{\LP@KD@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@KD@init@prefix}% -% -\let\kendokucell\setcell% -% -\newcommand*\kendokusetup[1]% -{% - \setkeys{kendoku.sty}{#1}% -}% -% -\newenvironment{kendoku}[1][]% -{% - \setkeys{kendoku}{#1}% - \LP@set@package{kendoku}% - \LP@set@env@prefix{LP@KD}% - \setcounter{LP@KD@rows}{\LP@KD@rows}% - \setcounter{LP@KD@columns}{\LP@KD@columns}% - \stepcounter{LP@KD@rows}% - \stepcounter{LP@KD@columns}% - \begin{minipage}[t]{\LP@KD@width}% - \ifthenelse{\equal{\LP@KD@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@KD@titleindent}\parbox{\LP@KD@titlewidth}{\strut\LP@titleformat\LP@KD@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@KD@scale]% - \LP@drawbackground{1}{1}{\LP@KD@columns}{\LP@KD@rows}{\LP@KD@bgcolor}% - \LP@drawgrid{1}{1}{\LP@KD@columns}{\LP@KD@rows}{1cm}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@KD@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{kendoku}{ +Usage of package kendoku.sty is deprecated\MessageBreak +\space kendoku.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/killersudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/killersudoku.sty index 5283184faa4..1743cb7b777 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/killersudoku.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/killersudoku.sty @@ -20,60 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{killersudoku}[2013/04/12 killersudoku.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{killersudoku}[2013/04/30 killersudoku.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@KSDK@init@prefix{LP@KSDK}% -\newcommand*\LP@KSDK@init@package{killersudoku}% -% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{rows}{5}% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{columns}{5}% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{scale}{1}% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{counterstyle}{none}% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{bgcolor}{}% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{width}{5.1cm}% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{cvoffset}{-23pt}% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{title}{}% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{titleindent}{0cm}% -\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{titlewidth}{5.1cm}% -\LP@define@choicekey@fontsize{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@KSDK@init@prefix}% -% -\let\killersudokucell\setcell% -% -\newcommand*\killersudokusetup[1]% -{% - \setkeys{killersudoku.sty}{#1}% -}% -% -\newenvironment{killersudoku}[1][]% -{% - \setkeys{killersudoku}{#1}% - \LP@set@package{killersudoku}% - \LP@set@env@prefix{LP@KSDK}% - \setcounter{LP@KSDK@rows}{\LP@KSDK@rows}% - \setcounter{LP@KSDK@columns}{\LP@KSDK@columns}% - \stepcounter{LP@KSDK@rows}% - \stepcounter{LP@KSDK@columns}% - \begin{minipage}[t]{\LP@KSDK@width}% - \ifthenelse{\equal{\LP@KSDK@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@KSDK@titleindent}\parbox{\LP@KSDK@titlewidth}{\strut\LP@titleformat\LP@KSDK@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@KSDK@scale]% - \LP@drawbackground{1}{1}{\LP@KSDK@columns}{\LP@KSDK@rows}{\LP@KSDK@bgcolor}% - \LP@drawgrid{1}{1}{\LP@KSDK@columns}{\LP@KSDK@rows}{1cm}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@KSDK@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{killersudoku}{ +Usage of package killersudoku.sty is deprecated\MessageBreak +\space killersudoku.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty b/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty index 9053cabca72..96cd6fe164e 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty @@ -20,70 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{laserbeam}[2013/04/20 laserbeam.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{laserbeam}[2013/04/30 laserbeam.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@LB@init@prefix{LP@LB}% -\newcommand*\LP@LB@init@package{laserbeam}% -% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{rows}{5}% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{columns}{5}% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{scale}{1}% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{counterstyle}{none}% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{bgcolor}{}% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{width}{6.5cm}% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{cvoffset}{-38pt}% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{title}{}% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{titleindent}{0cm}% -\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{titlewidth}{6.5cm}% -\LP@define@choicekey@fontsize{\LP@LB@init@prefix}{\LP@LB@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@LB@init@prefix}% -% -\let\laserH\LP@toprow% -\let\laserV\LP@leftcolumn% -\let\mirrorH\LP@bottomrow@edge% -\let\mirrorV\LP@rightcolumn@edge% -% -\newcommand*\laser[2][red]% -{% - % avoid little laser peaks outside grid - \clip (1,1) rectangle (\arabic{LP@LB@columns},\arabic{LP@LB@rows}); - \framearea{#1}{#2}% -}% -% -\newcommand*\laserbeamsetup[1]% -{% - \setkeys{laserbeam.sty}{#1}% -}% -% -\newenvironment{laserbeam}[1][]% -{% - \setkeys{laserbeam}{#1}% - \LP@set@package{laserbeam}% - \LP@set@env@prefix{LP@LB}% - \setcounter{LP@LB@rows}{\LP@LB@rows}% - \setcounter{LP@LB@columns}{\LP@LB@columns}% - \stepcounter{LP@LB@rows}% - \stepcounter{LP@LB@columns}% - \begin{minipage}[t]{\LP@LB@width}% - \ifthenelse{\equal{\LP@LB@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@LB@titleindent}\parbox{\LP@LB@titlewidth}{\strut\LP@titleformat\LP@LB@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@LB@scale]% - \LP@drawbackground{1}{1}{\LP@LB@columns}{\LP@LB@rows}{\LP@LB@bgcolor}% - \LP@drawgrid{1}{1}{\LP@LB@columns}{\LP@LB@rows}{1cm}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@LB@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{laserbeam}{ +Usage of package laserbeam.sty is deprecated\MessageBreak +\space laserbeam.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty b/Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty index f431d57fd15..dbbc3e0b7a7 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/04/20 logicpuzzle.sty v1.9 - Josef Kleber (C) 2013]% +\ProvidesPackage{logicpuzzle}[2013/05/03 logicpuzzle.sty v2.0 - Josef Kleber (C) 2013]% % \RequirePackage{xkeyval}% \RequirePackage{ifthen}% @@ -63,6 +63,7 @@ \def\LP@normallines{0.5pt}% \def\LP@thicklines{1.5pt}% \def\LP@grid@linestyle{}% +\def\LP@rel@tikzpath{}% % \newcommand*\LP@Pfive{.5}% % @@ -173,6 +174,9 @@ \LP@definecolor{LP@c@griddots}{.25,.51,.33}% \LP@definecolor{LP@c@cross}{.25,.51,.33}% \LP@definecolor{LP@c@mirror}{.8,.8,.8}% +\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}% % % drawing grids % @@ -351,6 +355,7 @@ % \newcommand*\setrow[2]% {% + \LP@set@LP@scale{\LP@env@prefix}% \LP@setrowcontents{#2}{1}{#1}% }% % @@ -395,6 +400,7 @@ % \newcommand*\setcolumn[2]% {% + \LP@set@LP@scale{\LP@env@prefix}% \LP@setcolumncontents{#2}{#1}{1}% }% % @@ -542,7 +548,7 @@ % #3 csv list of directions \newcommand*\tikzpath[3]% {% - (#1,#2)% + (#1\LP@rel@tikzpath,#2\LP@rel@tikzpath)% \foreach \LP@direction in {#3}% {% \ifnum\LP@direction=1% @@ -760,6 +766,54 @@ \end{tikzpicture}% }% % +\newcommand*\LP@Mine% +{% + \begin{tikzpicture}[scale=\LP@scale]% + \fill[color=black] (.2,.5) -- (.5,.6) -- (.5,.4) -- cycle;% + \fill[color=black] (.8,.5) -- (.5,.6) -- (.5,.4) -- cycle;% + \fill[color=black] (.5,.8) -- (.4,.5) -- (.6,.5) -- cycle;% + \fill[color=black] (.5,.2) -- (.4,.5) -- (.6,.5) -- cycle;% + \shade[ball color=black] (.5,.5) circle (.225cm);% + \end{tikzpicture}% +}% +\let\Mine\LP@Mine% +% +\newcommand*\LP@Portal% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \begin{tikzpicture}[scale=\LP@scale]% + \fill[color=black] (0,0) -- (0,1) -- (.4,.5) -- (.4,0) -- cycle;% + \fill[color=LP@c@tunnel@ii] (0,1) -- (1,1) -- (1,.5) -- (.4,.5) -- cycle;% + \fill[color=LP@c@tunnel@i] (.4,0) rectangle (1,.5);% + \draw[line width=\LP@normallines] (0,0) rectangle (1,1) ;% + \end{tikzpicture}% +}% +% +\newcommand*\portal[2]% +{% + \begin{puzzlebackground}% + \LP@setcellcontent{#1}{#2}{\LP@Portal}% + \end{puzzlebackground}% +}% +% +\newcommand*\tube[1]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \bgroup% + \def\LP@rel@tikzpath{.5}% + \begin{pgfonlayer}{LPbackgroundtwo}% + \pgfsetcornersarced{\pgfpoint{3mm}{3mm}}% + \draw[color=LP@c@tunnel!80!black, line width=.4cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel, line width=.38cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!85, line width=.35cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!70, line width=.32cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!55, line width=.29cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!45, line width=.25cm*\LP@scale] #1;% + \draw[color=LP@c@tunnel!35, line width=.2cm*\LP@scale] #1;% + \end{pgfonlayer}% + \egroup% +}% +% % get package options with prefix % \newcommand*\LP@set@LP@scale[1]% @@ -878,4 +932,6 @@ \end{minipage}% }% % +\RequirePackage{lpenv}% +% \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty b/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty new file mode 100644 index 00000000000..dc5ff8c261f --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/lpenv.sty @@ -0,0 +1,936 @@ +%% +%% Copyright (C) 2013 by: +%% Josef Kleber +%% <josef.kleber@gmx.de> +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX version +%% 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "author-maintained". +%% +%% The Current Maintainer of this work is Josef Kleber. +%% +%% This work consists of all files listed in manifest.txt. +%% +% +\ProvidesPackage{lpenv}[2013/05/03 lpenv.sty v2.0 - Josef Kleber (C) 2013]% +% +% battleship environment and options +% +\newcommand*\LP@BS@init@prefix{LP@BS}% +\newcommand*\LP@BS@init@package{battleship}% +% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{rows}{5}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{columns}{5}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{shipcolor}{green}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{scale}{1}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{counterstyle}{none}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{bgcolor}{}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{width}{6cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{title}{}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{titleindent}{0.75cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{titlewidth}{5.15cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{sbindent}{0.75cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{sbwidth}{5.15cm}% +\LP@define@key{\LP@BS@init@prefix}{\LP@BS@init@package}{sbshipscale}{1}% +\LP@define@choicekey@fontsize{\LP@BS@init@prefix}{\LP@BS@init@package}{{Large}}% +% +\LP@init@counter{\LP@BS@init@prefix}% +% +\gdef\LP@BS@shipbox{}% +\tikzstyle{island} = [fill=yellow!30,draw, decorate, decoration={random steps,segment length=2.7pt,amplitude=1.7pt}]% +% +\newcommand*\Ship{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor] (0,0) circle (1);}% +\newcommand*\ShipC{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% +\newcommand*\ShipT{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% +\newcommand*\ShipB{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% +\newcommand*\ShipL{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% +\newcommand*\ShipR{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill=\LP@BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% +\newcommand*\Island{\tikz[scale=\LP@BS@scale]\draw[scale=.36,island] (0,0) rectangle (2,2);}% +\newcommand*\Water{\tikz[scale=\LP@BS@scale]\draw[scale=.36,fill,blue!40] (1,1) circle (0.2);}% +% versions for \shipbox without second scale +\newcommand*\@Ship{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor] (0,0) circle (1);}% +\newcommand*\@ShipC{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% +\newcommand*\@ShipT{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% +\newcommand*\@ShipB{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% +\newcommand*\@ShipL{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% +\newcommand*\@ShipR{\tikz\draw[scale=.144,fill=\LP@BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% +% +\newcommand*\LP@BS@printship[1]% +{% + \ifthenelse{\equal{#1}{1}}{\scalebox{\LP@BS@sbshipscale}{\@Ship}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{2}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{3}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{4}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{5}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{6}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{7}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{8}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{9}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% + \ifthenelse{\equal{#1}{10}}{\scalebox{\LP@BS@sbshipscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% +}% +% +\newcommand*\LP@BS@printshipbox[1]% +{% \expandafters needed because csv list is stored in macro + \expandafter\forcsvlist\expandafter\LP@BS@printship\expandafter{#1}% +}% +% +\newcommand*\shipH[1]% +{% + \LP@setrowcontents{#1}{1}{\value{LP@BS@rows}}% +}% +% +\newcommand*\shipV[1]% +{% + \LP@setcolumncontents{#1}{0}{1}% +}% +% +\newcommand*\placesegment[3]% +{% + \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% + \LP@setcellcontent{#1}{#2}{#3}% +}% +% +\let\ship\placesegment% +% +\newcommand*\placeisland[2]% +{% + \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% + \LP@setcellcontent{#1}{#2}{\Island}% +}% +% +\newcommand*\placewater[2]% +{% + \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% + \LP@setcellcontent{#1}{#2}{\Water}% +}% +% +\newcommand*\shipbox[2][]% +{% + \setkeys{shipbox}{#1}% + \gdef\LP@BS@shipbox{#2}% +}% +% +\newcommand*\placeship[4]% +{% + \setcounter{LP@counti}{#4}% length + \ifnum\value{LP@counti}<1% + \PackageError{battleship}% + {ship length < 1}% + {The length of your ship should be at least 1}% + \fi% + \ifnum\value{LP@counti}>10% + \PackageError{battleship}% + {ship length > 10}% + {The supported max length of ships is 10!}% + \fi% + \ifnum\value{LP@counti}=1% + \placesegment{#2}{#3}{\Ship}% + \else% + \setcounter{LP@whiledo@i}{\value{LP@counti}}% + \addtocounter{LP@whiledo@i}{-2}% length of middle ship + \ifthenelse{\equal{#1}{V}}% + {% + \placesegment{#2}{#3}{\ShipB}% + \setcounter{LP@countii}{#3}% + \whiledo{\value{LP@whiledo@i}>0}% + {% + \addtocounter{LP@whiledo@i}{-1}% + \stepcounter{LP@countii}% + \placesegment{#2}{\theLP@countii}{\ShipC}% + }% + \stepcounter{LP@countii}% + \placesegment{#2}{\theLP@countii}{\ShipT}% + }% + {% + \ifthenelse{\equal{#1}{H}}% + {% + \placesegment{#2}{#3}{\ShipL}% + \setcounter{LP@counti}{#2}% + \whiledo{\value{LP@whiledo@i}>0}% + {% + \addtocounter{LP@whiledo@i}{-1}% + \stepcounter{LP@counti}% + \placesegment{\theLP@counti}{#3}{\ShipC}% + }% + \stepcounter{LP@counti}% + \placesegment{\theLP@counti}{#3}{\ShipR}% + }% + {\PackageError{battleship}% + {invalid direction (H/V)}% + {You can place your ship only\MessageBreak% + horizontally (H) or vertically (V)!}% + }% + }% + \fi% +}% +% +\newcommand*\battleshipsetup[1]% +{% + \setkeys{battleship.sty}{#1}% +}% +% +\newcommand{\classicgame}[1]% +{% + \begin{center}% + \begin{battleship}[rows=10,columns=10,width=6.5cm,title=Me,sbindent=0.65cm,titleindent=0.55cm,titlewidth=5.7cm,sbwidth=5.7cm,scale=0.59,fontsize=normalsize]% + \shipV{J,I,H,G,F,E,D,C,B,A}% + \shipH{1,2,3,4,5,6,7,8,9,10}% + \shipbox{#1}% + \end{battleship}% + \hspace{1cm}% + \begin{battleship}[rows=10,columns=10,width=6.5cm,title=Enemy,sbindent=0.65cm,titleindent=0.55cm,titlewidth=5.7cm,sbwidth=5.7cm,scale=0.59,fontsize=normalsize]% + \shipV{J,I,H,G,F,E,D,C,B,A}% + \shipH{1,2,3,4,5,6,7,8,9,10}% + \end{battleship}% + \end{center}% + \par\vspace{1cm}% + \begin{center}% + \begin{battleship}[rows=10,columns=10,width=6.5cm,title=Me,sbindent=0.65cm,titleindent=0.55cm,titlewidth=5.7cm,sbwidth=5.7cm,scale=0.59,fontsize=normalsize]% + \shipV{J,I,H,G,F,E,D,C,B,A}% + \shipH{1,2,3,4,5,6,7,8,9,10}% + \shipbox{#1}% + \end{battleship}% + \hspace{1cm}% + \begin{battleship}[rows=10,columns=10,width=6.5cm,title=Enemy,sbindent=0.65cm,titleindent=0.55cm,titlewidth=5.7cm,sbwidth=5.7cm,scale=0.59,fontsize=normalsize]% + \shipV{J,I,H,G,F,E,D,C,B,A}% + \shipH{1,2,3,4,5,6,7,8,9,10}% + \end{battleship}% + \end{center}% +}% +% +\newenvironment{battleship}[1][]% +{% + \setkeys{battleship}{#1}% + \LP@set@package{battleship}% + \LP@set@env@prefix{LP@BS}% + \shipbox{}% clear shipbox + \setcounter{LP@BS@rows}{\LP@BS@rows}% + \setcounter{LP@BS@columns}{\LP@BS@columns}% + \stepcounter{LP@BS@rows}% + \stepcounter{LP@BS@columns}% + \begin{minipage}[t]{\LP@BS@width}% + \ifthenelse{\equal{\LP@BS@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@BS@titleindent}\parbox{\LP@BS@titlewidth}{\strut\LP@titleformat\LP@BS@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@BS@scale]% + \LP@drawbackground{1}{1}{\LP@BS@columns}{\LP@BS@rows}{\LP@BS@bgcolor}% + \LP@drawgrid{1}{1}{\LP@BS@columns}{\LP@BS@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@BS@counterstyle}% + \par\hbadness=10000\medskip\noindent\hspace{\LP@BS@sbindent}\begin{minipage}{\LP@BS@sbwidth}{\hbadness=10000\RaggedRight\LP@BS@printshipbox{\LP@BS@shipbox}}\end{minipage}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% bokkusu environment and options +% +\newcommand*\LP@BK@init@prefix{LP@BK}% +\newcommand*\LP@BK@init@package{bokkusu}% +% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{rows}{5}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{columns}{5}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{scale}{1}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{counterstyle}{none}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{color}{black}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{bgcolor}{}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{width}{6.7cm}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{cvoffset}{-38pt}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{title}{}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{titleindent}{0.75cm}% +\LP@define@key{\LP@BK@init@prefix}{\LP@BK@init@package}{titlewidth}{5.85cm}% +\LP@define@choicekey@fontsize{\LP@BK@init@prefix}{\LP@BK@init@package}{Large}% +% +\LP@init@counter{\LP@BK@init@prefix}% +% +\let\valueH\LP@bottomrow% +\let\valueV\LP@leftcolumn% +\let\sumH\LP@toprow% +\let\sumV\LP@rightcolumn% +% +\newcommand*\bokkususetup[1]% +{% + \setkeys{bokkusu.sty}{#1}% +}% +% +\newenvironment{bokkusu}[1][]% +{% + \setkeys{bokkusu}{#1}% + \LP@set@package{bokkusu}% + \LP@set@env@prefix{LP@BK}% + \setcounter{LP@BK@rows}{\LP@BK@rows}% + \setcounter{LP@BK@columns}{\LP@BK@columns}% + \stepcounter{LP@BK@rows}% + \stepcounter{LP@BK@columns}% + \begin{minipage}[t]{\LP@BK@width}% + \ifthenelse{\equal{\LP@BK@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@BK@titleindent}\parbox{\LP@BK@titlewidth}{\strut\LP@titleformat\LP@BK@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@BK@scale]% + \LP@drawbackground{1}{1}{\LP@BK@columns}{\LP@BK@rows}{\LP@BK@bgcolor}% + \LP@drawgrid{1}{1}{\LP@BK@columns}{\LP@BK@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@BK@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% chaossudoku environment and options +% +\newcommand*\LP@CS@init@prefix{LP@CS}% +\newcommand*\LP@CS@init@package{chaossudoku}% +% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{rows}{5}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{columns}{5}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{scale}{1}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{counterstyle}{none}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{bgcolor}{}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{width}{5.1cm}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{title}{}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@CS@init@prefix}{\LP@CS@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@CS@init@prefix}{\LP@CS@init@package}{Large}% +% +\LP@init@counter{\LP@CS@init@prefix}% +% +\let\chaossudokucell\setcell% +% +\newcommand*\chaossudokusetup[1]% +{% + \setkeys{chaossudoku.sty}{#1}% +}% +% +\newenvironment{chaossudoku}[1][]% +{% + \setkeys{chaossudoku}{#1}% + \LP@set@package{chaossudoku}% + \LP@set@env@prefix{LP@CS}% + \setcounter{LP@CS@rows}{\LP@CS@rows}% + \setcounter{LP@CS@columns}{\LP@CS@columns}% + \stepcounter{LP@CS@rows}% + \stepcounter{LP@CS@columns}% + \begin{minipage}[t]{\LP@CS@width}% + \ifthenelse{\equal{\LP@CS@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@CS@titleindent}\parbox{\LP@CS@titlewidth}{\strut\LP@titleformat\LP@CS@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@CS@scale]% + \LP@drawbackground{1}{1}{\LP@CS@columns}{\LP@CS@rows}{\LP@CS@bgcolor}% + \LP@drawgrid{1}{1}{\LP@CS@columns}{\LP@CS@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@CS@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% ddsudoku environment and options +% +\newcommand*\LP@DDS@init@prefix{LP@DDS}% +\newcommand*\LP@DDS@init@package{ddsudoku}% +% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{rows}{5}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{columns}{5}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{scale}{1}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{counterstyle}{none}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{bgcolor}{}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{width}{5.1cm}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{title}{}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@DDS@init@prefix}{\LP@DDS@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@DDS@init@prefix}{\LP@DDS@init@package}{Large}% +% +\LP@init@counter{\LP@DDS@init@prefix}% +% +\let\ddsudokucell\setcell% +% +\newcommand*\ddsudokusetup[1]% +{% + \setkeys{ddsudoku.sty}{#1}% +}% +% +\newenvironment{ddsudoku}[1][]% +{% + \setkeys{ddsudoku}{#1}% + \LP@set@package{ddsudoku}% + \LP@set@env@prefix{LP@DDS}% + \setcounter{LP@DDS@rows}{\LP@DDS@rows}% + \setcounter{LP@DDS@columns}{\LP@DDS@columns}% + \stepcounter{LP@DDS@rows}% + \stepcounter{LP@DDS@columns}% + \begin{minipage}[t]{\LP@DDS@width}% + \ifthenelse{\equal{\LP@DDS@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@DDS@titleindent}\parbox{\LP@DDS@titlewidth}{\strut\LP@titleformat\LP@DDS@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@DDS@scale]% + \LP@drawbackground{1}{1}{\LP@DDS@columns}{\LP@DDS@rows}{\LP@DDS@bgcolor}% + \LP@drawgrid{1}{1}{\LP@DDS@columns}{\LP@DDS@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@DDS@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% hakyuu environment and options +% +\newcommand*\LP@HY@init@prefix{LP@HY}% +\newcommand*\LP@HY@init@package{hakyuu}% +% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{rows}{5}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{columns}{5}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{scale}{1}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{counterstyle}{none}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{bgcolor}{}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{width}{5.1cm}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{title}{}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@HY@init@prefix}{\LP@HY@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@HY@init@prefix}{\LP@HY@init@package}{Large}% +% +\LP@init@counter{\LP@HY@init@prefix}% +% +\let\hakyuucell\setcell% +% +\newcommand*\hakyuusetup[1]% +{% + \setkeys{hakyuu.sty}{#1}% +}% +% +\newenvironment{hakyuu}[1][]% +{% + \setkeys{hakyuu}{#1}% + \LP@set@package{hakyuu}% + \LP@set@env@prefix{LP@HY}% + \setcounter{LP@HY@rows}{\LP@HY@rows}% + \setcounter{LP@HY@columns}{\LP@HY@columns}% + \stepcounter{LP@HY@rows}% + \stepcounter{LP@HY@columns}% + \begin{minipage}[t]{\LP@HY@width}% + \ifthenelse{\equal{\LP@HY@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@HY@titleindent}\parbox{\LP@HY@titlewidth}{\strut\LP@titleformat\LP@HY@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@HY@scale]% + \LP@drawbackground{1}{1}{\LP@HY@columns}{\LP@HY@rows}{\LP@HY@bgcolor}% + \LP@drawgrid{1}{1}{\LP@HY@columns}{\LP@HY@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@HY@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% hitori environment and options +% +\newcommand*\LP@HT@init@prefix{LP@HT}% +\newcommand*\LP@HT@init@package{hitori}% +% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{rows}{5}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{columns}{5}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{scale}{1}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{counterstyle}{none}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{bgcolor}{}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{width}{5.1cm}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{title}{}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@HT@init@prefix}{\LP@HT@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@HT@init@prefix}{\LP@HT@init@package}{Large}% +% +\LP@init@counter{\LP@HT@init@prefix}% +% +\let\hitoricell\setcell% +% +\newcommand*\hitorisetup[1]% +{% + \setkeys{hitori.sty}{#1}% +}% +% +\newenvironment{hitori}[1][]% +{% + \setkeys{hitori}{#1}% + \LP@set@package{hitori}% + \LP@set@env@prefix{LP@HT}% + \setcounter{LP@HT@rows}{\LP@HT@rows}% + \setcounter{LP@HT@columns}{\LP@HT@columns}% + \stepcounter{LP@HT@rows}% + \stepcounter{LP@HT@columns}% + \begin{minipage}[t]{\LP@HT@width}% + \ifthenelse{\equal{\LP@HT@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@HT@titleindent}\parbox{\LP@HT@titlewidth}{\strut\LP@titleformat\LP@HT@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@HT@scale]% + \LP@drawbackground{1}{1}{\LP@HT@columns}{\LP@HT@rows}{\LP@HT@bgcolor}% + \LP@drawgrid{1}{1}{\LP@HT@columns}{\LP@HT@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@HT@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% kendoku environment and options +% +\newcommand*\LP@KD@init@prefix{LP@KD}% +\newcommand*\LP@KD@init@package{kendoku}% +% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{rows}{5}% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{columns}{5}% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{scale}{1}% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{counterstyle}{none}% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{bgcolor}{}% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{width}{5.1cm}% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{title}{}% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@KD@init@prefix}{\LP@KD@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@KD@init@prefix}{\LP@KD@init@package}{Large}% +% +\LP@init@counter{\LP@KD@init@prefix}% +% +\let\kendokucell\setcell% +% +\newcommand*\kendokusetup[1]% +{% + \setkeys{kendoku.sty}{#1}% +}% +% +\newenvironment{kendoku}[1][]% +{% + \setkeys{kendoku}{#1}% + \LP@set@package{kendoku}% + \LP@set@env@prefix{LP@KD}% + \setcounter{LP@KD@rows}{\LP@KD@rows}% + \setcounter{LP@KD@columns}{\LP@KD@columns}% + \stepcounter{LP@KD@rows}% + \stepcounter{LP@KD@columns}% + \begin{minipage}[t]{\LP@KD@width}% + \ifthenelse{\equal{\LP@KD@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@KD@titleindent}\parbox{\LP@KD@titlewidth}{\strut\LP@titleformat\LP@KD@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@KD@scale]% + \LP@drawbackground{1}{1}{\LP@KD@columns}{\LP@KD@rows}{\LP@KD@bgcolor}% + \LP@drawgrid{1}{1}{\LP@KD@columns}{\LP@KD@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@KD@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% killersudoku environment and options +% +\newcommand*\LP@KSDK@init@prefix{LP@KSDK}% +\newcommand*\LP@KSDK@init@package{killersudoku}% +% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{rows}{5}% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{columns}{5}% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{scale}{1}% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{counterstyle}{none}% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{bgcolor}{}% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{width}{5.1cm}% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{title}{}% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@KSDK@init@prefix}{\LP@KSDK@init@package}{Large}% +% +\LP@init@counter{\LP@KSDK@init@prefix}% +% +\let\killersudokucell\setcell% +% +\newcommand*\killersudokusetup[1]% +{% + \setkeys{killersudoku.sty}{#1}% +}% +% +\newenvironment{killersudoku}[1][]% +{% + \setkeys{killersudoku}{#1}% + \LP@set@package{killersudoku}% + \LP@set@env@prefix{LP@KSDK}% + \setcounter{LP@KSDK@rows}{\LP@KSDK@rows}% + \setcounter{LP@KSDK@columns}{\LP@KSDK@columns}% + \stepcounter{LP@KSDK@rows}% + \stepcounter{LP@KSDK@columns}% + \begin{minipage}[t]{\LP@KSDK@width}% + \ifthenelse{\equal{\LP@KSDK@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@KSDK@titleindent}\parbox{\LP@KSDK@titlewidth}{\strut\LP@titleformat\LP@KSDK@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@KSDK@scale]% + \LP@drawbackground{1}{1}{\LP@KSDK@columns}{\LP@KSDK@rows}{\LP@KSDK@bgcolor}% + \LP@drawgrid{1}{1}{\LP@KSDK@columns}{\LP@KSDK@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@KSDK@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% laserbeam environment and options +% +\newcommand*\LP@LB@init@prefix{LP@LB}% +\newcommand*\LP@LB@init@package{laserbeam}% +% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{rows}{5}% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{columns}{5}% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{scale}{1}% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{counterstyle}{none}% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{bgcolor}{}% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{width}{6.5cm}% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{cvoffset}{-38pt}% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{title}{}% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{titlewidth}{6.5cm}% +\LP@define@choicekey@fontsize{\LP@LB@init@prefix}{\LP@LB@init@package}{Large}% +% +\LP@init@counter{\LP@LB@init@prefix}% +% +\let\laserH\LP@toprow% +\let\laserV\LP@leftcolumn% +\let\mirrorH\LP@bottomrow@edge% +\let\mirrorV\LP@rightcolumn@edge% +% +\newcommand*\laser[2][red]% +{% + % avoid little laser peaks outside grid + \clip (1,1) rectangle (\arabic{LP@LB@columns},\arabic{LP@LB@rows}); + \framearea{#1}{#2}% +}% +% +\newcommand*\laserbeamsetup[1]% +{% + \setkeys{laserbeam.sty}{#1}% +}% +% +\newenvironment{laserbeam}[1][]% +{% + \setkeys{laserbeam}{#1}% + \LP@set@package{laserbeam}% + \LP@set@env@prefix{LP@LB}% + \setcounter{LP@LB@rows}{\LP@LB@rows}% + \setcounter{LP@LB@columns}{\LP@LB@columns}% + \stepcounter{LP@LB@rows}% + \stepcounter{LP@LB@columns}% + \begin{minipage}[t]{\LP@LB@width}% + \ifthenelse{\equal{\LP@LB@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@LB@titleindent}\parbox{\LP@LB@titlewidth}{\strut\LP@titleformat\LP@LB@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@LB@scale]% + \LP@drawbackground{1}{1}{\LP@LB@columns}{\LP@LB@rows}{\LP@LB@bgcolor}% + \LP@drawgrid{1}{1}{\LP@LB@columns}{\LP@LB@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@LB@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% lpsudoku environment and options +% +\newcommand*\LP@SDK@init@prefix{LP@SDK}% +\newcommand*\LP@SDK@init@package{lpsudoku}% +% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{rows}{9}% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{columns}{9}% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{scale}{1}% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{counterstyle}{none}% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{bgcolor}{}% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{width}{9.1cm}% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{title}{}% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@SDK@init@prefix}{\LP@SDK@init@package}{titlewidth}{9.1cm}% +\LP@define@choicekey@fontsize{\LP@SDK@init@prefix}{\LP@SDK@init@package}{Large}% +% +\LP@init@counter{\LP@SDK@init@prefix}% +% +\let\lpsudokucell\setcell% +% +\newcommand*\lpsudokusetup[1]% +{% + \setkeys{lpsudoku.sty}{#1}% +}% +% +\newenvironment{lpsudoku}[1][]% +{% + \setkeys{lpsudoku}{#1}% + \LP@set@package{lpsudoku}% + \LP@set@env@prefix{LP@SDK}% + \setcounter{LP@SDK@rows}{\LP@SDK@rows}% + \setcounter{LP@SDK@columns}{\LP@SDK@columns}% + \stepcounter{LP@SDK@rows}% + \stepcounter{LP@SDK@columns}% + \begin{minipage}[t]{\LP@SDK@width}% + \ifthenelse{\equal{\LP@SDK@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@SDK@titleindent}\parbox{\LP@SDK@titlewidth}{\strut\LP@titleformat\LP@SDK@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@SDK@scale]% + \LP@drawbackground{1}{1}{\LP@SDK@columns}{\LP@SDK@rows}{\LP@SDK@bgcolor}% + \LP@drawgrid{1}{1}{\LP@SDK@columns}{\LP@SDK@rows}{1cm}% + \LP@drawsudokugrid% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% minesweeper environment and options +% +\newcommand*\LP@MS@init@prefix{LP@MS}% +\newcommand*\LP@MS@init@package{minesweeper}% +% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{rows}{5}% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{columns}{5}% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{scale}{1}% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{counterstyle}{none}% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{bgcolor}{}% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{width}{5.1cm}% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{title}{}% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@MS@init@prefix}{\LP@MS@init@package}{titlewidth}{5.1cm}% +\LP@define@choicekey@fontsize{\LP@MS@init@prefix}{\LP@MS@init@package}{Large}% +% +\LP@init@counter{\LP@MS@init@prefix}% +% +\let\minesweepercell\setcell% +% +\newcommand*\minesweepersetup[1]% +{% + \setkeys{minesweeper.sty}{#1}% +}% +% +\newenvironment{minesweeper}[1][]% +{% + \setkeys{minesweeper}{#1}% + \LP@set@package{minesweeper}% + \LP@set@env@prefix{LP@MS}% + \setcounter{LP@MS@rows}{\LP@MS@rows}% + \setcounter{LP@MS@columns}{\LP@MS@columns}% + \stepcounter{LP@MS@rows}% + \stepcounter{LP@MS@columns}% + \begin{minipage}[t]{\LP@MS@width}% + \ifthenelse{\equal{\LP@MS@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@MS@titleindent}\parbox{\LP@MS@titlewidth}{\strut\LP@titleformat\LP@MS@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@MS@scale]% + \LP@drawbackground{1}{1}{\LP@MS@columns}{\LP@MS@rows}{\LP@MS@bgcolor}% + \LP@drawgrid{1}{1}{\LP@MS@columns}{\LP@MS@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@MS@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% skyline environment and options +% +\newcommand*\LP@SL@init@prefix{LP@SL}% +\newcommand*\LP@SL@init@package{skyline}% +% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{rows}{5}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{columns}{5}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{scale}{1}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{counterstyle}{none}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{bgcolor}{}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{width}{6.7cm}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{cvoffset}{-38pt}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{title}{}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{titleindent}{0.75cm}% +\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{titlewidth}{5.85cm}% +\LP@define@choicekey@fontsize{\LP@SL@init@prefix}{\LP@SL@init@package}{Large}% +% +\newcommand*\LP@SL@sudoku{false}% +% +\define@choicekey*{skyline.sty}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% +{% + \ifcase\nr\relax% + \renewcommand*\LP@SL@sudoku{true}% + \renewcommand*\LP@SL@rows{9}% + \renewcommand*\LP@SL@columns{9}% + \or% + \renewcommand*\LP@SL@sudoku{false}% + \fi% +}% +% +\define@choicekey*{skyline}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% +{% + \ifcase\nr\relax% + \renewcommand*\LP@SL@sudoku{true}% + \renewcommand*\LP@SL@rows{9}% + \renewcommand*\LP@SL@columns{9}% + \or% + \renewcommand*\LP@SL@sudoku{false}% + \fi% +}% +% +\LP@init@counter{\LP@SL@init@prefix}% +% +\let\skylineB\LP@bottomrow% +\let\skylineT\LP@toprow% +\let\skylineL\LP@leftcolumn% +\let\skylineR\LP@rightcolumn% +\let\skylinecell\setcell% +% +\newcommand*\skylinesetup[1]% +{% + \setkeys{skyline.sty}{#1}% +}% +% +\newenvironment{skyline}[1][]% +{% + \setkeys{skyline}{#1}% + \LP@set@package{skyline}% + \LP@set@env@prefix{LP@SL}% + \setcounter{LP@SL@rows}{\LP@SL@rows}% + \setcounter{LP@SL@columns}{\LP@SL@columns}% + \stepcounter{LP@SL@rows}% + \stepcounter{LP@SL@columns}% + \begin{minipage}[t]{\LP@SL@width}% + \ifthenelse{\equal{\LP@SL@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@SL@titleindent}\parbox{\LP@SL@titlewidth}{\strut\LP@titleformat\LP@SL@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@SL@scale]% + \LP@drawbackground{1}{1}{\LP@SL@columns}{\LP@SL@rows}{\LP@SL@bgcolor}% + \LP@drawgrid{1}{1}{\LP@SL@columns}{\LP@SL@rows}{1cm}% + \ifthenelse{\equal{\LP@SL@sudoku}{true}}% + {\LP@drawsudokugrid}% + {}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@SL@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% slitherlink environment and options +% +\newcommand*\LP@SK@init@prefix{LP@SK}% +\newcommand*\LP@SK@init@package{slitherlink}% +% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{rows}{5}% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{columns}{5}% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{scale}{1}% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{counterstyle}{none}% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{bgcolor}{}% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{width}{5.2cm}% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{title}{}% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{titlewidth}{5.2cm}% +\LP@define@choicekey@fontsize{\LP@SK@init@prefix}{\LP@SK@init@package}{Large}% +% +\LP@init@counter{\LP@SK@init@prefix}% +% +\let\slitherlinkcell\setcell% +% +\newcommand*\slitherlinksetup[1]% +{% + \setkeys{slitherlink.sty}{#1}% +}% +% +\newenvironment{slitherlink}[1][]% +{% + \setkeys{slitherlink}{#1}% + \LP@set@package{slitherlink}% + \LP@set@env@prefix{LP@SK}% + \ifthenelse{\equal{\LP@grid@linestyle}{}}% + {\setgridlinestyle{dashed}}{}% + \setcounter{LP@SK@rows}{\LP@SK@rows}% + \setcounter{LP@SK@columns}{\LP@SK@columns}% + \stepcounter{LP@SK@rows}% + \stepcounter{LP@SK@columns}% + \begin{minipage}[t]{\LP@SK@width}% + \ifthenelse{\equal{\LP@SK@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@SK@titleindent}\parbox{\LP@SK@titlewidth}{\strut\LP@titleformat\LP@SK@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@SK@scale]% + \LP@drawbackground{1}{1}{\LP@SK@columns}{\LP@SK@rows}{\LP@SK@bgcolor}% + \LP@drawgrid{1}{1}{\LP@SK@columns}{\LP@SK@rows}{1cm}% + \LP@drawgriddots% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@SK@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +% tunnel environment and options +% +\newcommand*\LP@TN@init@prefix{LP@TN}% +\newcommand*\LP@TN@init@package{tunnel}% +% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{rows}{5}% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{columns}{5}% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{scale}{1}% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{counterstyle}{none}% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{bgcolor}{}% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{width}{5.9cm}% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{cvoffset}{-23pt}% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{title}{}% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{titleindent}{0cm}% +\LP@define@key{\LP@TN@init@prefix}{\LP@TN@init@package}{titlewidth}{5.9cm}% +\LP@define@choicekey@fontsize{\LP@TN@init@prefix}{\LP@TN@init@package}{Large}% +% +\LP@init@counter{\LP@TN@init@prefix}% +% +\let\tunnelH\LP@toprow% +\let\tunnelV\LP@leftcolumn% +% +\newcommand*\tunnelsetup[1]% +{% + \setkeys{tunnel.sty}{#1}% +}% +% +\newenvironment{tunnel}[1][]% +{% + \setkeys{tunnel}{#1}% + \LP@set@package{tunnel}% + \LP@set@env@prefix{LP@TN}% + \setcounter{LP@TN@rows}{\LP@TN@rows}% + \setcounter{LP@TN@columns}{\LP@TN@columns}% + \stepcounter{LP@TN@rows}% + \stepcounter{LP@TN@columns}% + \begin{minipage}[t]{\LP@TN@width}% + \ifthenelse{\equal{\LP@TN@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@TN@titleindent}\parbox{\LP@TN@titlewidth}{\strut\LP@titleformat\LP@TN@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@TN@scale]% + \LP@drawbackground{1}{1}{\LP@TN@columns}{\LP@TN@rows}{\LP@TN@bgcolor}% + \LP@drawgrid{1}{1}{\LP@TN@columns}{\LP@TN@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@TN@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +\endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty index dfc892e468e..fb359542e8c 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty @@ -20,194 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{lpsudoku}[2013/03/22 lpsudoku.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{lpsudoku}[2013/04/30 lpsudoku.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -% options -\newcommand*\LP@SDK@width{9.1cm}% -\newcommand*\LP@SDK@fontsize\Large% -\newcommand*\LP@SDK@rows{9}% -\newcommand*\LP@SDK@columns{9}% -\newcommand*\LP@SDK@scale{1}% -\newcommand*\LP@SDK@bgcolor{}% -\newcommand*\LP@SDK@cvoffset{-24pt}% -\newcommand*\LP@SDK@title{}% -\newcommand*\LP@SDK@titleindent{0cm}% -\newcommand*\LP@SDK@titlewidth{9.1cm}% -% -\newcounter{LP@SDK@rows}% -\newcounter{LP@SDK@columns}% -% -\setcounter{LP@SDK@rows}{\LP@SDK@rows}% -\setcounter{LP@SDK@columns}{\LP@SDK@columns}% -\stepcounter{LP@SDK@rows}% -\stepcounter{LP@SDK@columns}% -% -\define@key{lpsudoku.sty}{scale}[1]% -{% - \renewcommand*\LP@SDK@scale{#1}% -}% -% -\define@key{lpsudoku.sty}{counterstyle}[none]% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@key{lpsudoku.sty}{bgcolor}[]% -{% - \renewcommand*\LP@SDK@bgcolor{#1}% -}% -% -\define@choicekey*{lpsudoku.sty}{fontsize}[\LP@SDK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\LP@SDK@fontsize{\tiny}% - \or% - \renewcommand*\LP@SDK@fontsize{\scriptsize}% - \or% - \renewcommand*\LP@SDK@fontsize{\footnotesize}% - \or% - \renewcommand*\LP@SDK@fontsize{\small}% - \or% - \renewcommand*\LP@SDK@fontsize{\normalsize}% - \or% - \renewcommand*\LP@SDK@fontsize{\large}% - \or% - \renewcommand*\LP@SDK@fontsize{\Large}% - \or% - \renewcommand*\LP@SDK@fontsize{\LARGE}% - \or% - \renewcommand*\LP@SDK@fontsize{\huge}% - \or% - \renewcommand*\LP@SDK@fontsize{\Huge}% - \fi% -}% -% -\define@key{lpsudoku.sty}{width}[9.1cm]% -{% - \renewcommand*\LP@SDK@width{#1}% -}% -% -\define@key{lpsudoku.sty}{title}[]% -{% - \renewcommand*\LP@SDK@title{#1}% -}% -% -\define@key{lpsudoku.sty}{cvoffset}[-24pt]% -{% - \renewcommand*\LP@SDK@cvoffset{#1}% -}% -% -\define@key{lpsudoku.sty}{titleindent}[0cm]% -{% - \renewcommand*\LP@SDK@titleindent{#1}% -}% -% -\define@key{lpsudoku.sty}{titlewidth}[9.1cm]% -{% - \renewcommand*\LP@SDK@titlewidth{#1}% -}% -% -\define@key{lpsudoku}{scale}% -{% - \renewcommand*\LP@SDK@scale{#1}% -}% -% -\define@key{lpsudoku}{bgcolor}% -{% - \renewcommand*\LP@SDK@bgcolor{#1}% -}% -% -\define@key{lpsudoku}{counterstyle}% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@choicekey*{lpsudoku}{fontsize}[\LP@SDK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\LP@SDK@fontsize{\tiny}% - \or% - \renewcommand*\LP@SDK@fontsize{\scriptsize}% - \or% - \renewcommand*\LP@SDK@fontsize{\footnotesize}% - \or% - \renewcommand*\LP@SDK@fontsize{\small}% - \or% - \renewcommand*\LP@SDK@fontsize{\normalsize}% - \or% - \renewcommand*\LP@SDK@fontsize{\large}% - \or% - \renewcommand*\LP@SDK@fontsize{\Large}% - \or% - \renewcommand*\LP@SDK@fontsize{\LARGE}% - \or% - \renewcommand*\LP@SDK@fontsize{\huge}% - \or% - \renewcommand*\LP@SDK@fontsize{\Huge}% - \fi% -}% -% -\define@key{lpsudoku}{width}% -{% - \renewcommand*\LP@SDK@width{#1}% -}% -% -\define@key{lpsudoku}{title}% -{% - \renewcommand*\LP@SDK@title{#1}% -}% -% -\define@key{lpsudoku}{cvoffset}% -{% - \renewcommand*\LP@SDK@cvoffset{#1}% -}% -% -\define@key{lpsudoku}{titleindent}% -{% - \renewcommand*\LP@SDK@titleindent{#1}% -}% -% -\define@key{lpsudoku}{titlewidth}% -{% - \renewcommand*\LP@SDK@titlewidth{#1}% -}% -% -\ExecuteOptionsX{width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\let\lpsudokucell\setcell% -% -\newcommand*\lpsudokusetup[1]% -{% - \setkeys{lpsudoku.sty}{#1}% -}% -% -\newenvironment{lpsudoku}[1][]% -{% - \setkeys{lpsudoku}{#1}% - \LP@set@package{lpsudoku}% - \LP@set@env@prefix{LP@SDK}% - \setcounter{LP@SDK@rows}{\LP@SDK@rows}% - \setcounter{LP@SDK@columns}{\LP@SDK@columns}% - \stepcounter{LP@SDK@rows}% - \stepcounter{LP@SDK@columns}% - \begin{minipage}[t]{\LP@SDK@width}% - \ifthenelse{\equal{\LP@SDK@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@SDK@titleindent}\parbox{\LP@SDK@titlewidth}{\strut\LP@titleformat\LP@SDK@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@SDK@scale]% - \LP@drawbackground{1}{1}{\LP@SDK@columns}{\LP@SDK@rows}{\LP@SDK@bgcolor}% - \LP@drawgrid{1}{1}{\LP@SDK@columns}{\LP@SDK@rows}{1cm}% - \LP@drawsudokugrid% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{lpsudoku}{ +Usage of package lpsudoku.sty is deprecated\MessageBreak +\space lpsudoku.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty b/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty index 676f8537962..985c014e032 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty @@ -20,91 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{skyline}[2013/03/27 skyline.sty v1.1 - Josef Kleber (C) 2013]% +\ProvidesPackage{skyline}[2013/04/30 skyline.sty v1.2 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@SL@init@prefix{LP@SL}% -\newcommand*\LP@SL@init@package{skyline}% -% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{rows}{5}% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{columns}{5}% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{scale}{1}% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{counterstyle}{none}% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{bgcolor}{}% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{width}{6.7cm}% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{cvoffset}{-38pt}% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{title}{}% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{titleindent}{0.75cm}% -\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{titlewidth}{5.85cm}% -\LP@define@choicekey@fontsize{\LP@SL@init@prefix}{\LP@SL@init@package}{Large}% -% -\newcommand*\LP@SL@sudoku{false}% -% -\define@choicekey*{skyline.sty}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% -{% - \ifcase\nr\relax% - \renewcommand*\LP@SL@sudoku{true}% - \renewcommand*\LP@SL@rows{9}% - \renewcommand*\LP@SL@columns{9}% - \or% - \renewcommand*\LP@SL@sudoku{false}% - \fi% -}% -% -\define@choicekey*{skyline}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% -{% - \ifcase\nr\relax% - \renewcommand*\LP@SL@sudoku{true}% - \renewcommand*\LP@SL@rows{9}% - \renewcommand*\LP@SL@columns{9}% - \or% - \renewcommand*\LP@SL@sudoku{false}% - \fi% -}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@SL@init@prefix}% -% -\let\skylineB\LP@bottomrow% -\let\skylineT\LP@toprow% -\let\skylineL\LP@leftcolumn% -\let\skylineR\LP@rightcolumn% -\let\skylinecell\setcell% -% -\newcommand*\skylinesetup[1]% -{% - \setkeys{skyline.sty}{#1}% -}% -% -\newenvironment{skyline}[1][]% -{% - \setkeys{skyline}{#1}% - \LP@set@package{skyline}% - \LP@set@env@prefix{LP@SL}% - \setcounter{LP@SL@rows}{\LP@SL@rows}% - \setcounter{LP@SL@columns}{\LP@SL@columns}% - \stepcounter{LP@SL@rows}% - \stepcounter{LP@SL@columns}% - \begin{minipage}[t]{\LP@SL@width}% - \ifthenelse{\equal{\LP@SL@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@SL@titleindent}\parbox{\LP@SL@titlewidth}{\strut\LP@titleformat\LP@SL@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@SL@scale]% - \LP@drawbackground{1}{1}{\LP@SL@columns}{\LP@SL@rows}{\LP@SL@bgcolor}% - \LP@drawgrid{1}{1}{\LP@SL@columns}{\LP@SL@rows}{1cm}% - \ifthenelse{\equal{\LP@SL@sudoku}{true}}% - {\LP@drawsudokugrid}% - {}% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@SL@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{skyline}{ +Usage of package skyline.sty is deprecated\MessageBreak +\space skyline.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/slitherlink.sty b/Master/texmf-dist/tex/latex/logicpuzzle/slitherlink.sty index bceeb2c85af..04a30d3f9cf 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/slitherlink.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/slitherlink.sty @@ -20,63 +20,13 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{slitherlink}[2013/04/20 slitherlink.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{slitherlink}[2013/04/30 slitherlink.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -\newcommand*\LP@SK@init@prefix{LP@SK}% -\newcommand*\LP@SK@init@package{slitherlink}% -% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{rows}{5}% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{columns}{5}% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{scale}{1}% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{counterstyle}{none}% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{bgcolor}{}% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{width}{5.2cm}% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{cvoffset}{-23pt}% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{title}{}% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{titleindent}{0cm}% -\LP@define@key{\LP@SK@init@prefix}{\LP@SK@init@package}{titlewidth}{5.2cm}% -\LP@define@choicekey@fontsize{\LP@SK@init@prefix}{\LP@SK@init@package}{Large}% -% -\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% -% -\ProcessOptionsX\relax% -% -\LP@init@counter{\LP@SK@init@prefix}% -% -\let\slitherlinkcell\setcell% -% -\newcommand*\slitherlinksetup[1]% -{% - \setkeys{slitherlink.sty}{#1}% -}% -% -\newenvironment{slitherlink}[1][]% -{% - \setkeys{slitherlink}{#1}% - \LP@set@package{slitherlink}% - \LP@set@env@prefix{LP@SK}% - \ifthenelse{\equal{\LP@grid@linestyle}{}}% - {\setgridlinestyle{dashed}}{}% - \setcounter{LP@SK@rows}{\LP@SK@rows}% - \setcounter{LP@SK@columns}{\LP@SK@columns}% - \stepcounter{LP@SK@rows}% - \stepcounter{LP@SK@columns}% - \begin{minipage}[t]{\LP@SK@width}% - \ifthenelse{\equal{\LP@SK@title}{}}% - {\par\enspace\par}% empty - {\enspace\par\noindent\hspace{\LP@SK@titleindent}\parbox{\LP@SK@titlewidth}{\strut\LP@titleformat\LP@SK@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\LP@SK@scale]% - \LP@drawbackground{1}{1}{\LP@SK@columns}{\LP@SK@rows}{\LP@SK@bgcolor}% - \LP@drawgrid{1}{1}{\LP@SK@columns}{\LP@SK@rows}{1cm}% - \LP@drawgriddots% -}% -{% - \end{tikzpicture}% - \LP@drawcounter{\LP@SK@counterstyle}% - \stepcounter{LP@puzzlecounter}% - \end{minipage}% -}% -% +\PackageWarningNoLine{slitherlink}{ +Usage of package slitherlink.sty is deprecated\MessageBreak +\space slitherlink.sty will be deleted in near future!\MessageBreak +\space Just use package logicpuzzle.sty instead! +} \endinput%
\ No newline at end of file |