diff options
30 files changed, 1905 insertions, 1188 deletions
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES index 4d55edef736..6b063baf389 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES +++ b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES @@ -1,3 +1,24 @@ +== Logicpuzzle bundel (v1.7) == + +-- ddsudoku.sty (v1.0) -- + +28/03/2013 added ddsudoku.sty [jk] + +-- hitori.sty (v1.0) -- + +03/04/2013 added hitori.sty + +-- logicpuzzle.sty (v1.3) -- + +03/04/2013 added \setcolorrow, \setcolorcolumn [jk] + and \LP@definecolor + Bugfix: \setcolumn -> usage of \LP@setrowcontents + +02/04/2013 added documentation for logicpuzzle.sty + +28/03/2013 added \LP@init@counter, \LP@define@key and + \LP@define@choicekey@fontsize + == Logicpuzzle bundel (v1.6) == -- lpsudoku.sty (v1.0) -- diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/README b/Master/texmf-dist/doc/latex/logicpuzzle/README index 6fa17bb8740..ec7e297a0c6 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/README +++ b/Master/texmf-dist/doc/latex/logicpuzzle/README @@ -1,10 +1,12 @@ The logicpuzzle bundle allows you to typeset various logic puzzles. At the moment the following puzzles are supported: +* 2D-Sudoku (aka Magiequadrat, Diagon, ...) * Battleship (aka Bimaru, Marinespiel, Batalla Naval, ...) * Bokkusu (aka Kakurasu, Feldersummenrätsel, ...) * Chaos Sudoku * Hakyuu (aka Seismic, Ripple Effect, ...) +* Hitori * Skyline (aka Skycrapers, Wolkenkratzer, Hochhäuser, ...) incl. Skyline Sudoku and Skyline Sudoku (N*N) variants * Sudoku @@ -12,13 +14,16 @@ puzzles. At the moment the following puzzles are supported: License: LPPL -Changes in v1.6: +Changes in v1.7: -- added support for Sudoku puzzle - created Sudoku magazines - https://bitbucket.org/kleberj/logicpuzzle/wiki/Sudoku +- added support for 2D-Sudoku puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/2D-Sudoku -- added createlpsudoku and lpsmag bash scripts - for creating Sudoku magazines - http://jklatex.square7.de/wiki/doku.php?id=createlpsudoku - http://jklatex.square7.de/wiki/doku.php?id=lpsmag +- added support for Hitori puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/Hitori + +- logicpuzzle.sty + * added documentation + * added \filldiagonals, \framepuzzle, \setcolorrow, \setcolorcolumn, + \LP@definecolor, \LP@define@key, \LP@define@choicekey@fontsize + and \LP@init@counter diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf Binary files differindex 07f2a206644..62b9ab1601d 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf +++ b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex index f9b4d0d3bcf..2b859633b3b 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex +++ b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex @@ -1,3 +1,7 @@ +% 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}% @@ -18,8 +22,9 @@ sbindent=0.6cm,sbwidth=3.4cm]{battleship}% % \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\small,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,[,]}} +\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}% {% @@ -39,7 +44,7 @@ sbindent=0.6cm,sbwidth=3.4cm]{battleship}% \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% - {\includegraphics[height=5cm]{logo.png}};% + {\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% @@ -140,18 +145,11 @@ sbindent=0.6cm,sbwidth=3.4cm]{battleship}% \title{\filename}% \Subtitle{A style file for typesetting Battleship logic puzzles}% \author{Josef Kleber} -\Fileversion{v1.3} +\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/}}} -\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} - \begin{battleship} +\newsavebox\logo +\savebox\logo{% +\begin{battleship} \placesegment{4}{1}{\ShipR} \shipH{4,1,2,2,2} \shipV{3,1,4,0,3} @@ -167,6 +165,18 @@ Try to find the positions of the ships listed below the puzzle. The numbers on t \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 @@ -207,7 +217,7 @@ Try to find the positions of the ships listed below the puzzle. The numbers on t \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}}{-38pt}{sets the vertical offset of the counters in the margin.} + \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} \end{optionlist} \section{Environments} @@ -269,7 +279,7 @@ The command \cs{classicgame}\margcs{\cmd\classicgame\{\marg{csv list}\}} typeset \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\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}} 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\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/bokkusu/bokkusu.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdf Binary files differindex ce5400c6147..375397247c5 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdf +++ b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex index 6c9d2bacebb..00e4acd3650 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex +++ b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex @@ -1,3 +1,7 @@ +% 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}% @@ -17,8 +21,9 @@ % \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\small,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,[,]}} +\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}% {% @@ -38,7 +43,7 @@ \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% - {\includegraphics[height=5cm]{logo.png}};% + {\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% @@ -139,18 +144,11 @@ \title{\filename}% \Subtitle{A style file for typesetting Bokkusu logic puzzles}% \author{Josef Kleber} -\Fileversion{v1.0} +\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/}}} -\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} - \begin{bokkusu} +\newsavebox\logo +\savebox\logo{% +\begin{bokkusu} \valueH{1,2,3,4,5} \valueV{1,2,3,4,5} \sumH{7,1,11,9,6} @@ -168,6 +166,17 @@ Black out some of the grid cells. The numbers on the left and the bottom edge of \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 @@ -258,5 +267,5 @@ With the command \cs{bokkususetup}\margcs{\cmd\bokkususetup\{\marg{options}\}} y \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\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}} 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\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.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.pdf Binary files differindex 4438996d757..2dac6d24596 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.pdf +++ b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.tex b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.tex index 2be4b984e49..a7e29b4ba07 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.tex +++ b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.tex @@ -1,3 +1,7 @@ +% 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}% @@ -17,6 +21,7 @@ % \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 @@ -38,7 +43,7 @@ \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% - {\includegraphics[height=5cm]{logo.png}};% + {\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% @@ -139,18 +144,11 @@ \title{\filename}% \Subtitle{A style file for typesetting Chaos\\Sudoku logic puzzles}% \author{Josef Kleber} -\Fileversion{v1.0} +\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/}}} -\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} - \begin{chaossudoku} +\newsavebox\logo +\savebox\logo{% +\begin{chaossudoku} \chaossudokucell{1}{1}{3} \chaossudokucell{1}{5}{4} \chaossudokucell{3}{2}{4} @@ -179,6 +177,17 @@ Fill the cells of an area with numbers from 1 to N of the N*N grid. Each number \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 @@ -230,7 +239,7 @@ Fill the cells of an area with numbers from 1 to N of the N*N grid. Each number \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}}{-22pt}{sets the vertical offset of the counters in the margin.} + \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} \end{optionlist} \section{Environments} @@ -289,5 +298,5 @@ With the command \cs{chaossudokusetup}\margcs{\cmd\chaossudokusetup\{\marg{optio 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\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}} 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\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.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.pdf Binary files differnew file mode 100644 index 00000000000..fd5a10dbb63 --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.tex b/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.tex new file mode 100644 index 00000000000..1cadfee807f --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku.tex @@ -0,0 +1,272 @@ +% 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 new file mode 100644 index 00000000000..ee12ceea707 --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/ddsudoku/ddsudoku_README @@ -0,0 +1,4 @@ +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 differindex 6cf6a4e7111..9de49d4c68b 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.pdf +++ b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.tex b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.tex index d4577cd2a2a..c510f370f70 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.tex +++ b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.tex @@ -1,3 +1,7 @@ +% 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}% @@ -17,6 +21,7 @@ % \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 @@ -38,7 +43,7 @@ \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% - {\includegraphics[height=5cm]{logo.png}};% + {\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% @@ -139,18 +144,11 @@ \title{\filename}% \Subtitle{A style file for typesetting Hakyuu logic puzzles}% \author{Josef Kleber} -\Fileversion{v1.0} +\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/}}} -\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} - \begin{hakyuu} +\newsavebox\logo +\savebox\logo{% +\begin{hakyuu} \hakyuucell{1}{5}{2} \hakyuucell{3}{5}{6} \hakyuucell{4}{5}{5} @@ -184,6 +182,17 @@ Fill the cells of an area with numbers from 1 to SIZE of the area. If there are \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 @@ -240,7 +249,7 @@ Fill the cells of an area with numbers from 1 to SIZE of the area. If there are \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}}{-22pt}{sets the vertical offset of the counters in the margin.} + \optitem{\styleoption{cvoffset}}{-23pt}{sets the vertical offset of the counters in the margin.} \end{optionlist} \section{Environments} @@ -299,5 +308,5 @@ With the command \cs{hakyuusetup}\margcs{\cmd\hakyuusetup\{\marg{options}\}} you 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\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}} 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\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.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.pdf Binary files differnew file mode 100644 index 00000000000..0500d44912d --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.tex b/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.tex new file mode 100644 index 00000000000..0f4212a2ebd --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori.tex @@ -0,0 +1,262 @@ +% 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 new file mode 100644 index 00000000000..e310b0e067c --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/hitori/hitori_README @@ -0,0 +1,7 @@ +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/logicpuzzle/logicpuzzle.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.pdf Binary files differnew file mode 100644 index 00000000000..70d6cf40932 --- /dev/null +++ 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 new file mode 100644 index 00000000000..c494322db5b --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle.tex @@ -0,0 +1,537 @@ +% 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{makeidx} +\usepackage{ccicons} +\usepackage{tabularx} +\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}% +% +\let\PrintIndex\relax +\makeindex +\makeatletter +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {-2.5ex\@plus -1ex \@minus -.25ex}% + {1.25ex \@plus .25ex}% + {\normalfont\normalsize\bfseries}} +\makeatother +\setcounter{secnumdepth}{4} +\setcounter{tocdepth}{4} +\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,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{#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{logicpuzzle.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\layer{\name@idx{PGF layer}} +\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{\hbadness=10000\RaggedLeft\scriptsize #1}}% +\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% +\DeclareRobustCommand{\marg}[1]{% + \meta{#1}% + \index{#1=\string\meta{#1} mandatory argument}\index{mandatory argument>#1=\string\meta{#1}}% +}% +\DeclareRobustCommand{\oarg}[1]{% + \meta{#1}% + \index{#1=\string\meta{#1} optional argument}\index{optional argument>#1=\string\meta{#1}}% +}% +% +\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} +\renewcommand*\l@paragraph{\@dottedtocline{3}{7em}{4.7em}} +\renewenvironment{theindex} + {\if@twocolumn + \@restonecolfalse + \else + \@restonecoltrue + \fi + \columnseprule \z@ + \columnsep 35\p@ +\def\see##1##2{\textit{See} ##1}% +\def\seealso##1##2{\textit{See also} ##1}% +\long\def\cmd##1{\cs{\expandafter\cmd@to@cs\string##1}}% +\def\@url##1{\url@break\ttt{##1}\endgroup}% +\def\ttt{\begingroup\@sanitize\ttfamily\@ttt}% +\def\@ttt##1{##1\endgroup}% +\mathchardef\save@secnumdepth\c@secnumdepth +\c@secnumdepth\m@ne + \phantomsection% + \twocolumn%[\section{\indexname}]% + %\addcontentsline{toc}{section}{Index}% +\c@secnumdepth\save@secnumdepth + %\thispagestyle{plain} + \parindent\z@ + \parskip\z@ \@plus .3\p@\relax + \let\item\@idxitem} + {\if@restonecol\onecolumn\else\clearpage\fi} +\makeatother +% +\setlength\parindent{0pt}% +\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% +% +\begin{document} +\title{\filename}% +\Subtitle{A style file for typesetting logic puzzles}% +\author{Josef Kleber} +\Fileversion{v1.3} +\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{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} +} +\maketitle +\stepcounter{page} +\tableofcontents +\clearpage +\setlength\parskip{6pt}% + +\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. + +\lstset{numbers=none,basicstyle=\ttfamily\footnotesize}% +\begin{lstlisting} +\ProvidesPackage{bokkusu}[2013/03/25 bokkusu.sty v1.2 - Josef Kleber (C) 2013]% +\RequirePackage{logicpuzzle}% +\end{lstlisting} + +We wrote a package \package{bokkusu.sty} with version number v1.2 and date 2013/03/25 and added a copyright remark. We need to load the code base package \package{logicpuzzle.sty}. + +\begin{lstlisting} +\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}% +\end{lstlisting} + +We save the package prefix and name in a macro for easy change. Then we define the options for package \package{bokkusu.sty} and the environment \env{bokkusu}, which are executed afterwards to create the macros for the option values. In the end, we need to initialize the package counters. + +\begin{lstlisting} +\let\valueH\LP@bottomrow% +\let\valueV\LP@leftcolumn% +\let\sumH\LP@toprow% +\let\sumV\LP@rightcolumn% +\end{lstlisting} + +We need numbers around the grid. Therefore, we define some aliases for the existing generic commands. + +\begin{lstlisting} +\newcommand*\bokkususetup[1]% +{% + \setkeys{bokkusu.sty}{#1}% +}% +\end{lstlisting} + +We define \cmd\bokkususetup\ for resetting the global package options. + +\clearpage +Finally, we define the \env{bokkusu} environment. + +\begin{lstlisting} +\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}% +\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. + +\begin{lstlisting} + \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{lstlisting} + +We start a minipage with width \marg{width}. If the user defined a title, we typeset the title and add a vertical space. Then, we draw the puzzle with the help of \package{tikz.sty}. We start drawing the background and the grid. + +\begin{lstlisting} +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@BK@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +\end{lstlisting} + +Finally, we just end the picture for the puzzle. We draw and step the counter. As last action, we need to close the \env{minipage} environment. That's it. Easy, isn't it? You just need to copy this skelton and change or add some code for your specific puzzle. + +\section{The code} +\label{sec:code} +\lstset{basicstyle=\ttfamily\normalsize}% + +\subsection{PGF layers} +\label{sec:layer} +The \package{logicpuzzle.sty} package defines the following PGF layers: \layer{LPbgcolor}, \layer{LPbackgroundtwo}, \layer{LPbackground}, \layer{LPforeground} and \layer{LPforegroundtwo} + +Without specifying a special layer, the standard \layer{main} layer is used. The \texttt{LPback\-ground} and \layer{LPforeground} layers can be accessed with the \env{puzzlebackground} [see: \ref{sec:puzzlebackground}] and \env{puzzleforeground} [see: \ref{sec:puzzleforeground}] environments. +The \layer{LPbgcolor} is and should only be used for the background color of the grid. + +All layers can also be accessed with the generic PGF method: + +\begin{lstlisting} +\begin{pgfonlayer}{layer} + ... +\end{pgfonlayer}{layer} +\end{lstlisting} + +\begin{tabularx}{\textwidth}{lX} +Order: & \layer{LPbgcolor} $\rightarrow$ \layer{LPbackgroundtwo} $\rightarrow$ \layer{LPbackground} $\rightarrow$ \layer{main} $\rightarrow$\newline \layer{LPforeground} $\rightarrow$ \layer{LPforegroundtwo} \\ +\end{tabularx} + +So, if you are in the need to place something behind \layer{LPbackground} or in front of \layer{LPforeground}, you can use the \layer{LPbackgroundtwo} and \layer{LPforegroundtwo} layers. + +\subsection{Environments} +\label{sec:env} +\subsubsection{\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}} +\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 + +\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. + +\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. + +\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. + +\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. + +\subsubsection{In the grid} +\paragraph{\texorpdfstring{\cs{setcell}}{\textbackslash 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. + +\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{setrow}}{\textbackslash 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}} +\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}} +\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}} +\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{fillcell}}{\textbackslash 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. + +\paragraph{\texorpdfstring{\cs{fillrow}}{\textbackslash 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}} +\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}} +\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}} +\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. + +\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} [see: \ref{sec:puzzleforeground}] environment. + +\paragraph{\texorpdfstring{\cs{fillarea}}{\textbackslash 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. + +\paragraph{\texorpdfstring{\cs{framepuzzle}}{\textbackslash 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{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}} +\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: + +\begin{lstlisting} +\titleformat{\centering\Large\color{blue}} +\end{lstlisting} + +\paragraph{\texorpdfstring{\cs{puzzlecounter}}{\textbackslash 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. + +\paragraph{\texorpdfstring{\cs{setpuzzlecounter}}{\textbackslash 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}} +\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: + +\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}. + +\paragraph{\texorpdfstring{\cs{LP@drawcounter}}{\textbackslash LP@drawcounter}} +\label{sec:LPdrawcounter} +The command \cs{LP@drawcounter}\margcs{\cmd\LP@drawcounter\{\marg{name}\}} draws the 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 +\Headline{Index} +\printindex +\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle_README b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle_README new file mode 100644 index 00000000000..887d51f5392 --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/logicpuzzle/logicpuzzle_README @@ -0,0 +1,7 @@ +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/manifest.txt b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt index c75cb918614..431491eb61f 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt +++ b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt @@ -7,7 +7,9 @@ logicpuzzle.sty battleship.sty bokkusu.sty chaossudoku.sty +ddsudoku.sty hakyuu.sty +hitori.sty lpsudoku.sty skyline.sty @@ -24,8 +26,12 @@ bokkusu.pdf bokkusu.tex chaossudoku.pdf chaossudoku.tex +ddsudoku.pdf +ddsudoku.tex hakyuu.pdf hakyuu.tex +hitori.pdf +hitori.tex lpsudoku.pdf lpsudoku.tex skyline.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.pdf Binary files differindex bfaae93766e..aeb8906d674 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.pdf +++ b/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.pdf diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.tex b/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.tex index fe7201f9fe2..a89b46f9a36 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.tex +++ b/Master/texmf-dist/doc/latex/logicpuzzle/skyline/skyline.tex @@ -1,3 +1,7 @@ +% 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}% @@ -17,8 +21,9 @@ % \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\small,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,[,]}} +\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}% {% @@ -38,7 +43,7 @@ \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% - {\includegraphics[height=5cm]{logo.png}};% + {\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% @@ -139,17 +144,10 @@ \title{\filename}% \Subtitle{A style file for typesetting Skyline logic puzzles}% \author{Josef Kleber} -\Fileversion{v1.0} +\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/}}} -\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} +\newsavebox\logo +\savebox\logo{% \begin{skyline} \skylineB{3,{},3,1,{}} \skylineL{{},4,3,{},{}} @@ -170,6 +168,17 @@ There are skyscrapers located in each cell. Try to find out the height of the sk \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 @@ -212,7 +221,7 @@ There are skyscrapers located in each cell. Try to find out the height of the sk \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}}{-39pt}{sets the vertical offset of the counters in the margin.} + \optitem{\styleoption{cvoffset}}{-38pt}{sets the vertical offset of the counters in the margin.} \end{optionlist} \section{Environments} @@ -276,6 +285,7 @@ With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you 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} @@ -402,15 +412,12 @@ With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{numbe \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{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)} + \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} @@ -427,20 +434,17 @@ With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{numbe \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{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)} + \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\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}} 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\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/tex/latex/logicpuzzle/battleship.sty b/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty index af5715ab8a1..3dfde6d9a5a 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/battleship.sty @@ -23,269 +23,75 @@ % http://en.wikipedia.org/wiki/Battleship_%28puzzle%29 % http://de.wikipedia.org/wiki/Bimaru % -\ProvidesPackage{battleship}[2013/02/28 battleship.sty v1.3 - Josef Kleber (C) 2013]% +\ProvidesPackage{battleship}[2013/03/25 battleship.sty v1.4 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% -\tikzstyle{island} = [fill=yellow!30,draw, decorate, decoration={random steps,segment length=2.7pt,amplitude=1.7pt}]% -% -% options -\newcommand*\BS@width{6cm}% -\newcommand*\BS@fontsize\Large% -\newcommand*\BS@rows{5}% -\newcommand*\BS@columns{5}% -\newcommand*\BS@scale{1}% -\newcommand*\BS@bgcolor{}% -\newcommand*\BS@shipcolor{green}% -\newcommand*\BS@title{}% -\newcommand*\BS@titleindent{0.75cm}% -\newcommand*\BS@titlewidth{5.15cm}% -\newcommand*\BS@cvoffset{-23pt}% -\newcommand*\BS@SB@indent{0.75cm}% -\newcommand*\BS@SB@width{5.15cm}% -\newcommand*\BS@SB@shipboxscale{1}% -% -\newcounter{BS@rows}% -\newcounter{BS@columns}% -% -\setcounter{BS@rows}{\BS@rows}% -\setcounter{BS@columns}{\BS@columns}% -\stepcounter{BS@rows}% -\stepcounter{BS@columns}% -% -\define@key{battleship.sty}{rows}[5]% -{% - \renewcommand*\BS@rows{#1}% -}% -% -\define@key{battleship.sty}{columns}[5]% -{% - \renewcommand*\BS@columns{#1}% -}% -% -\define@key{battleship.sty}{shipcolor}[green]% -{% - \renewcommand*\BS@shipcolor{#1}% -}% -% -\define@key{battleship.sty}{scale}[1]% -{% - \renewcommand*\BS@scale{#1}% -}% -% -\define@key{battleship.sty}{counterstyle}[none]% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@key{battleship.sty}{bgcolor}[]% -{% - \renewcommand*\BS@bgcolor{#1}% -}% -% -\define@choicekey*{battleship.sty}{fontsize}[\BS@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\BS@fontsize{\tiny}% - \or% - \renewcommand*\BS@fontsize{\scriptsize}% - \or% - \renewcommand*\BS@fontsize{\footnotesize}% - \or% - \renewcommand*\BS@fontsize{\small}% - \or% - \renewcommand*\BS@fontsize{\normalsize}% - \or% - \renewcommand*\BS@fontsize{\large}% - \or% - \renewcommand*\BS@fontsize{\Large}% - \or% - \renewcommand*\BS@fontsize{\LARGE}% - \or% - \renewcommand*\BS@fontsize{\huge}% - \or% - \renewcommand*\BS@fontsize{\Huge}% - \fi% -}% -% -\define@key{battleship.sty}{width}[6cm]% -{% - \renewcommand*\BS@width{#1}% -}% -% -\define@key{battleship.sty}{title}[]% -{% - \renewcommand*\BS@title{#1}% -}% -% -\define@key{battleship.sty}{cvoffset}[-23pt]% -{% - \renewcommand*\BS@cvoffset{#1}% -}% -% -\define@key{battleship.sty}{titleindent}[0.75cm]% -{% - \renewcommand*\BS@titleindent{#1}% -}% -% -\define@key{battleship.sty}{titlewidth}[5.15cm]% -{% - \renewcommand*\BS@titlewidth{#1}% -}% -% -\define@key{battleship.sty}{sbindent}[0.75cm]% -{% - \renewcommand*\BS@SB@indent{#1}% -}% -% -\define@key{battleship.sty}{sbwidth}[5.15cm]% -{% - \renewcommand*\BS@SB@width{#1}% -}% -% -\define@key{battleship.sty}{sbshipscale}[1]% -{% - \renewcommand*\BS@SB@shipboxscale{#1}% -}% -% -\define@key{battleship}{rows}% -{% - \renewcommand*\BS@rows{#1}% -}% -% -\define@key{battleship}{columns}% -{% - \renewcommand*\BS@columns{#1}% -}% -% -\define@key{battleship}{shipcolor}% -{% - \renewcommand*\BS@shipcolor{#1}% -}% -% -\define@key{battleship}{scale}% -{% - \renewcommand*\BS@scale{#1}% -}% -% -\define@key{battleship}{bgcolor}% -{% - \renewcommand*\BS@bgcolor{#1}% -}% -% -\define@key{battleship}{counterstyle}% -{% - \renewcommand*\LP@counterstyle{#1}% -}% % -\define@choicekey*{battleship}{fontsize}[\BS@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\BS@fontsize{\tiny}% - \or% - \renewcommand*\BS@fontsize{\scriptsize}% - \or% - \renewcommand*\BS@fontsize{\footnotesize}% - \or% - \renewcommand*\BS@fontsize{\small}% - \or% - \renewcommand*\BS@fontsize{\normalsize}% - \or% - \renewcommand*\BS@fontsize{\large}% - \or% - \renewcommand*\BS@fontsize{\Large}% - \or% - \renewcommand*\BS@fontsize{\LARGE}% - \or% - \renewcommand*\BS@fontsize{\huge}% - \or% - \renewcommand*\BS@fontsize{\Huge}% - \fi% -}% -% -\define@key{battleship}{width}% -{% - \renewcommand*\BS@width{#1}% -}% -% -\define@key{battleship}{title}% -{% - \renewcommand*\BS@title{#1}% -}% -% -\define@key{battleship}{cvoffset}% -{% - \renewcommand*\BS@cvoffset{#1}% -}% -% -\define@key{battleship}{titleindent}% -{% - \renewcommand*\BS@titleindent{#1}% -}% -% -\define@key{battleship}{titlewidth}% -{% - \renewcommand*\BS@titlewidth{#1}% -}% -% -\define@key{battleship}{sbindent}% -{% - \renewcommand*\BS@SB@indent{#1}% -}% -% -\define@key{battleship}{sbwidth}% -{% - \renewcommand*\BS@SB@width{#1}% -}% -% -\define@key{battleship}{sbshipscale}% -{% - \renewcommand*\BS@SB@shipboxscale{#1}% -}% +\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% % -\gdef\BS@shipbox{}% +\LP@init@counter{\LP@BS@init@prefix}% % -\newcommand*\Ship{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor] (0,0) circle (1);}% -\newcommand*\ShipC{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% -\newcommand*\ShipT{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% -\newcommand*\ShipB{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% -\newcommand*\ShipL{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% -\newcommand*\ShipR{\tikz[scale=\BS@scale]\draw[scale=.36,fill=\BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% -\newcommand*\Island{\tikz[scale=\BS@scale]\draw[scale=.36,island] (0,0) rectangle (2,2);}% -\newcommand*\Water{\tikz[scale=\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=\BS@shipcolor] (0,0) circle (1);}% -\newcommand*\@ShipC{\tikz\draw[scale=.144,fill=\BS@shipcolor] (0,0)--(0,2)--(2,2)--(2,0)--cycle;}% -\newcommand*\@ShipT{\tikz\draw[scale=.144,fill=\BS@shipcolor](2,1)--(2,0)--(0,0)--(0,1) arc (180:0:1);}% -\newcommand*\@ShipB{\tikz\draw[scale=.144,fill=\BS@shipcolor](2,1)--(2,2)--(0,2)--(0,1) arc (180:360:1);}% -\newcommand*\@ShipL{\tikz\draw[scale=.144,fill=\BS@shipcolor](1,2)--(2,2)--(2,0)--(1,0) arc (270:90:1);}% -\newcommand*\@ShipR{\tikz\draw[scale=.144,fill=\BS@shipcolor](1,2)--(0,2)--(0,0)--(1,0) arc (270:450:1);}% -% -\newcommand*\BS@printship[1]% -{% - \ifthenelse{\equal{#1}{1}}{\scalebox{\BS@SB@shipboxscale}{\@Ship}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{2}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{3}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{4}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{5}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{6}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{7}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{8}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{9}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% - \ifthenelse{\equal{#1}{10}}{\scalebox{\BS@SB@shipboxscale}{\@ShipL\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipC\,\@ShipR}\space\allowbreak}{}% -}% +\gdef\LP@BS@shipbox{}% +\tikzstyle{island} = [fill=yellow!30,draw, decorate, decoration={random steps,segment length=2.7pt,amplitude=1.7pt}]% % -\newcommand*\BS@printshipbox[1]% +\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\BS@printship\expandafter{#1}% + \expandafter\forcsvlist\expandafter\LP@BS@printship\expandafter{#1}% }% % \newcommand*\shipH[1]% {% - \LP@setrowcontents{#1}{1}{\value{BS@rows}}% + \LP@setrowcontents{#1}{1}{\value{LP@BS@rows}}% }% % \newcommand*\shipV[1]% @@ -295,7 +101,7 @@ % \newcommand*\placesegment[3]% {% - \LP@ingrid{#1}{#2}{\BS@columns}{\BS@rows}{battleship}% + \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% \LP@setcellcontent{#1}{#2}{#3}% }% % @@ -303,20 +109,20 @@ % \newcommand*\placeisland[2]% {% - \LP@ingrid{#1}{#2}{\BS@columns}{\BS@rows}{battleship}% + \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% \LP@setcellcontent{#1}{#2}{\Island}% }% % \newcommand*\placewater[2]% {% - \LP@ingrid{#1}{#2}{\BS@columns}{\BS@rows}{battleship}% + \LP@ingrid{#1}{#2}{\LP@BS@columns}{\LP@BS@rows}{battleship}% \LP@setcellcontent{#1}{#2}{\Water}% }% % \newcommand*\shipbox[2][]% {% \setkeys{shipbox}{#1}% - \gdef\BS@shipbox{#2}% + \gdef\LP@BS@shipbox{#2}% }% % \newcommand*\placeship[4]% @@ -411,24 +217,24 @@ {% \setkeys{battleship}{#1}% \LP@set@package{battleship}% - \LP@set@env@prefix{BS}% + \LP@set@env@prefix{LP@BS}% \shipbox{}% clear shipbox - \setcounter{BS@rows}{\BS@rows}% - \setcounter{BS@columns}{\BS@columns}% - \stepcounter{BS@rows}% - \stepcounter{BS@columns}% - \begin{minipage}[t]{\BS@width}% - \ifthenelse{\equal{\BS@title}{}}% + \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{\BS@titleindent}\parbox{\BS@titlewidth}{\strut\LP@titleformat\BS@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\BS@scale]% - \LP@drawbackground{1}{1}{\BS@columns}{\BS@rows}{\BS@bgcolor}% - \LP@drawgrid{1}{1}{\BS@columns}{\BS@rows}{1cm}% + {\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@counterstyle}% - \par\hbadness=10000\medskip\noindent\hspace{\BS@SB@indent}\begin{minipage}{\BS@SB@width}{\hbadness=10000\RaggedRight\BS@printshipbox{\BS@shipbox}}\end{minipage}% + \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}% }% diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty b/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty index f7712888537..d740fb1c64b 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty @@ -20,195 +20,31 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{bokkusu}[2013/03/09 bokkusu.sty v1.1 - Josef Kleber (C) 2013]% +\ProvidesPackage{bokkusu}[2013/03/25 bokkusu.sty v1.2 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -% options -\newcommand*\BK@width{6.7cm}% -\newcommand*\BK@fontsize\Large% -\newcommand*\BK@rows{5}% -\newcommand*\BK@columns{5}% -\newcommand*\BK@scale{1}% -\newcommand*\BK@color{black}% -\newcommand*\BK@bgcolor{}% -\newcommand*\BK@cvoffset{-23pt}% -\newcommand*\BK@title{}% -\newcommand*\BK@titleindent{0.75cm}% -\newcommand*\BK@titlewidth{5.85cm}% -% -\newcounter{BK@rows}% -\newcounter{BK@columns}% -% -\setcounter{BK@rows}{\BK@rows}% -\setcounter{BK@columns}{\BK@columns}% -\stepcounter{BK@rows}% -\stepcounter{BK@columns}% -% -\define@key{bokkusu.sty}{rows}[5]% -{% - \renewcommand*\BK@rows{#1}% -}% -% -\define@key{bokkusu.sty}{columns}[5]% -{% - \renewcommand*\BK@columns{#1}% -}% -% -\define@key{bokkusu.sty}{scale}[1]% -{% - \renewcommand*\BK@scale{#1}% -}% -% -\define@key{bokkusu.sty}{counterstyle}[none]% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@key{bokkusu.sty}{color}[black]% -{% - \renewcommand*\BK@color{#1}% -}% -% -\define@key{bokkusu.sty}{bgcolor}[]% -{% - \renewcommand*\BK@bgcolor{#1}% -}% -% -\define@choicekey*{bokkusu.sty}{fontsize}[\BK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\BK@fontsize{\tiny}% - \or% - \renewcommand*\BK@fontsize{\scriptsize}% - \or% - \renewcommand*\BK@fontsize{\footnotesize}% - \or% - \renewcommand*\BK@fontsize{\small}% - \or% - \renewcommand*\BK@fontsize{\normalsize}% - \or% - \renewcommand*\BK@fontsize{\large}% - \or% - \renewcommand*\BK@fontsize{\Large}% - \or% - \renewcommand*\BK@fontsize{\LARGE}% - \or% - \renewcommand*\BK@fontsize{\huge}% - \or% - \renewcommand*\BK@fontsize{\Huge}% - \fi% -}% -% -\define@key{bokkusu.sty}{width}[6.7cm]% -{% - \renewcommand*\BK@width{#1}% -}% -% -\define@key{bokkusu.sty}{title}[]% -{% - \renewcommand*\BK@title{#1}% -}% -% -\define@key{bokkusu.sty}{cvoffset}[-38pt]% -{% - \renewcommand*\BK@cvoffset{#1}% -}% -% -\define@key{bokkusu.sty}{titleindent}[0.75cm]% -{% - \renewcommand*\BK@titleindent{#1}% -}% -% -\define@key{bokkusu.sty}{titlewidth}[5.85cm]% -{% - \renewcommand*\BK@titlewidth{#1}% -}% -% -\define@key{bokkusu}{rows}% -{% - \renewcommand*\BK@rows{#1}% -}% -% -\define@key{bokkusu}{columns}% -{% - \renewcommand*\BK@columns{#1}% -}% -% -\define@key{bokkusu}{scale}% -{% - \renewcommand*\BK@scale{#1}% -}% -% -\define@key{bokkusu}{color}% -{% - \renewcommand*\BK@color{#1}% -}% -% -\define@key{bokkusu}{bgcolor}% -{% - \renewcommand*\BK@bgcolor{#1}% -}% -% -\define@key{bokkusu}{counterstyle}% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@choicekey*{bokkusu}{fontsize}[\BK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\BK@fontsize{\tiny}% - \or% - \renewcommand*\BK@fontsize{\scriptsize}% - \or% - \renewcommand*\BK@fontsize{\footnotesize}% - \or% - \renewcommand*\BK@fontsize{\small}% - \or% - \renewcommand*\BK@fontsize{\normalsize}% - \or% - \renewcommand*\BK@fontsize{\large}% - \or% - \renewcommand*\BK@fontsize{\Large}% - \or% - \renewcommand*\BK@fontsize{\LARGE}% - \or% - \renewcommand*\BK@fontsize{\huge}% - \or% - \renewcommand*\BK@fontsize{\Huge}% - \fi% -}% -% -\define@key{bokkusu}{width}% -{% - \renewcommand*\BK@width{#1}% -}% -% -\define@key{bokkusu}{title}% -{% - \renewcommand*\BK@title{#1}% -}% -% -\define@key{bokkusu}{cvoffset}% -{% - \renewcommand*\BK@cvoffset{#1}% -}% -% -\define@key{bokkusu}{titleindent}% -{% - \renewcommand*\BK@titleindent{#1}% -}% -% -\define@key{bokkusu}{titlewidth}% -{% - \renewcommand*\BK@titlewidth{#1}% -}% +\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% @@ -223,22 +59,22 @@ {% \setkeys{bokkusu}{#1}% \LP@set@package{bokkusu}% - \LP@set@env@prefix{BK}% - \setcounter{BK@rows}{\BK@rows}% - \setcounter{BK@columns}{\BK@columns}% - \stepcounter{BK@rows}% - \stepcounter{BK@columns}% - \begin{minipage}[t]{\BK@width}% - \ifthenelse{\equal{\BK@title}{}}% + \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{\BK@titleindent}\parbox{\BK@titlewidth}{\strut\LP@titleformat\BK@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\BK@scale]% - \LP@drawbackground{1}{1}{\BK@columns}{\BK@rows}{\BK@bgcolor}% - \LP@drawgrid{1}{1}{\BK@columns}{\BK@rows}{1cm}% + {\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@counterstyle}% + \LP@drawcounter{\LP@BK@counterstyle}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty index 6f6ab6204bf..618cb2a83fe 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty @@ -20,184 +20,31 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{chaossudoku}[2013/03/16 chaossudoku.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{chaossudoku}[2013/03/27 chaossudoku.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -% options -\newcommand*\LP@CS@width{5.1cm}% -\newcommand*\LP@CS@fontsize\Large% -\newcommand*\LP@CS@rows{5}% -\newcommand*\LP@CS@columns{5}% -\newcommand*\LP@CS@scale{1}% -\newcommand*\LP@CS@bgcolor{}% -\newcommand*\LP@CS@cvoffset{-39pt}% -\newcommand*\LP@CS@title{}% -\newcommand*\LP@CS@titleindent{0cm}% -\newcommand*\LP@CS@titlewidth{5.1cm}% -% -\newcounter{LP@CS@rows}% -\newcounter{LP@CS@columns}% -% -\setcounter{LP@CS@rows}{\LP@CS@rows}% -\setcounter{LP@CS@columns}{\LP@CS@columns}% -\stepcounter{LP@CS@rows}% -\stepcounter{LP@CS@columns}% -% -\define@key{chaossudoku.sty}{rows}[5]% -{% - \renewcommand*\LP@CS@rows{#1}% -}% -% -\define@key{chaossudoku.sty}{columns}[5]% -{% - \renewcommand*\LP@CS@columns{#1}% -}% -% -\define@key{chaossudoku.sty}{scale}[1]% -{% - \renewcommand*\LP@CS@scale{#1}% -}% -% -\define@key{chaossudoku.sty}{counterstyle}[none]% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@key{chaossudoku.sty}{bgcolor}[]% -{% - \renewcommand*\LP@CS@bgcolor{#1}% -}% -% -\define@choicekey*{chaossudoku.sty}{fontsize}[\LP@CS@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\LP@CS@fontsize{\tiny}% - \or% - \renewcommand*\LP@CS@fontsize{\scriptsize}% - \or% - \renewcommand*\LP@CS@fontsize{\footnotesize}% - \or% - \renewcommand*\LP@CS@fontsize{\small}% - \or% - \renewcommand*\LP@CS@fontsize{\normalsize}% - \or% - \renewcommand*\LP@CS@fontsize{\large}% - \or% - \renewcommand*\LP@CS@fontsize{\Large}% - \or% - \renewcommand*\LP@CS@fontsize{\LARGE}% - \or% - \renewcommand*\LP@CS@fontsize{\huge}% - \or% - \renewcommand*\LP@CS@fontsize{\Huge}% - \fi% -}% -% -\define@key{chaossudoku.sty}{width}[5.1cm]% -{% - \renewcommand*\LP@CS@width{#1}% -}% -% -\define@key{chaossudoku.sty}{title}[]% -{% - \renewcommand*\LP@CS@title{#1}% -}% -% -\define@key{chaossudoku.sty}{cvoffset}[-22pt]% -{% - \renewcommand*\LP@CS@cvoffset{#1}% -}% -% -\define@key{chaossudoku.sty}{titleindent}[0cm]% -{% - \renewcommand*\LP@CS@titleindent{#1}% -}% -% -\define@key{chaossudoku.sty}{titlewidth}[5.1cm]% -{% - \renewcommand*\LP@CS@titlewidth{#1}% -}% -% -\define@key{chaossudoku}{rows}% -{% - \renewcommand*\LP@CS@rows{#1}% -}% -% -\define@key{chaossudoku}{columns}% -{% - \renewcommand*\LP@CS@columns{#1}% -}% -% -\define@key{chaossudoku}{scale}% -{% - \renewcommand*\LP@CS@scale{#1}% -}% -% -\define@key{chaossudoku}{bgcolor}% -{% - \renewcommand*\LP@CS@bgcolor{#1}% -}% -% -\define@key{chaossudoku}{counterstyle}% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@choicekey*{chaossudoku}{fontsize}[\LP@CS@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\LP@CS@fontsize{\tiny}% - \or% - \renewcommand*\LP@CS@fontsize{\scriptsize}% - \or% - \renewcommand*\LP@CS@fontsize{\footnotesize}% - \or% - \renewcommand*\LP@CS@fontsize{\small}% - \or% - \renewcommand*\LP@CS@fontsize{\normalsize}% - \or% - \renewcommand*\LP@CS@fontsize{\large}% - \or% - \renewcommand*\LP@CS@fontsize{\Large}% - \or% - \renewcommand*\LP@CS@fontsize{\LARGE}% - \or% - \renewcommand*\LP@CS@fontsize{\huge}% - \or% - \renewcommand*\LP@CS@fontsize{\Huge}% - \fi% -}% -% -\define@key{chaossudoku}{width}% -{% - \renewcommand*\LP@CS@width{#1}% -}% -% -\define@key{chaossudoku}{title}% -{% - \renewcommand*\LP@CS@title{#1}% -}% -% -\define@key{chaossudoku}{cvoffset}% -{% - \renewcommand*\LP@CS@cvoffset{#1}% -}% -% -\define@key{chaossudoku}{titleindent}% -{% - \renewcommand*\LP@CS@titleindent{#1}% -}% -% -\define@key{chaossudoku}{titlewidth}% -{% - \renewcommand*\LP@CS@titlewidth{#1}% -}% +\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]% @@ -224,7 +71,7 @@ }% {% \end{tikzpicture}% - \LP@drawcounter{\LP@counterstyle}% + \LP@drawcounter{\LP@CS@counterstyle}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty new file mode 100644 index 00000000000..81a85c7fcca --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/ddsudoku.sty @@ -0,0 +1,79 @@ +%% +%% 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{ddsudoku}[2013/04/05 ddsudoku.sty v1.0 - 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}% +}% +% +\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 07ace4e5bc3..836e055e21a 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty @@ -20,184 +20,31 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{hakyuu}[2013/03/16 hakyuu.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{hakyuu}[2013/03/27 hakyuu.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -% options -\newcommand*\LP@HY@width{5.1cm}% -\newcommand*\LP@HY@fontsize\Large% -\newcommand*\LP@HY@rows{5}% -\newcommand*\LP@HY@columns{5}% -\newcommand*\LP@HY@scale{1}% -\newcommand*\LP@HY@bgcolor{}% -\newcommand*\LP@HY@cvoffset{-39pt}% -\newcommand*\LP@HY@title{}% -\newcommand*\LP@HY@titleindent{0cm}% -\newcommand*\LP@HY@titlewidth{5.1cm}% -% -\newcounter{LP@HY@rows}% -\newcounter{LP@HY@columns}% -% -\setcounter{LP@HY@rows}{\LP@HY@rows}% -\setcounter{LP@HY@columns}{\LP@HY@columns}% -\stepcounter{LP@HY@rows}% -\stepcounter{LP@HY@columns}% -% -\define@key{hakyuu.sty}{rows}[5]% -{% - \renewcommand*\LP@HY@rows{#1}% -}% -% -\define@key{hakyuu.sty}{columns}[5]% -{% - \renewcommand*\LP@HY@columns{#1}% -}% -% -\define@key{hakyuu.sty}{scale}[1]% -{% - \renewcommand*\LP@HY@scale{#1}% -}% -% -\define@key{hakyuu.sty}{counterstyle}[none]% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@key{hakyuu.sty}{bgcolor}[]% -{% - \renewcommand*\LP@HY@bgcolor{#1}% -}% -% -\define@choicekey*{hakyuu.sty}{fontsize}[\LP@HY@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\LP@HY@fontsize{\tiny}% - \or% - \renewcommand*\LP@HY@fontsize{\scriptsize}% - \or% - \renewcommand*\LP@HY@fontsize{\footnotesize}% - \or% - \renewcommand*\LP@HY@fontsize{\small}% - \or% - \renewcommand*\LP@HY@fontsize{\normalsize}% - \or% - \renewcommand*\LP@HY@fontsize{\large}% - \or% - \renewcommand*\LP@HY@fontsize{\Large}% - \or% - \renewcommand*\LP@HY@fontsize{\LARGE}% - \or% - \renewcommand*\LP@HY@fontsize{\huge}% - \or% - \renewcommand*\LP@HY@fontsize{\Huge}% - \fi% -}% -% -\define@key{hakyuu.sty}{width}[5.1cm]% -{% - \renewcommand*\LP@HY@width{#1}% -}% -% -\define@key{hakyuu.sty}{title}[]% -{% - \renewcommand*\LP@HY@title{#1}% -}% -% -\define@key{hakyuu.sty}{cvoffset}[-22pt]% -{% - \renewcommand*\LP@HY@cvoffset{#1}% -}% -% -\define@key{hakyuu.sty}{titleindent}[0cm]% -{% - \renewcommand*\LP@HY@titleindent{#1}% -}% -% -\define@key{hakyuu.sty}{titlewidth}[5.1cm]% -{% - \renewcommand*\LP@HY@titlewidth{#1}% -}% -% -\define@key{hakyuu}{rows}% -{% - \renewcommand*\LP@HY@rows{#1}% -}% -% -\define@key{hakyuu}{columns}% -{% - \renewcommand*\LP@HY@columns{#1}% -}% -% -\define@key{hakyuu}{scale}% -{% - \renewcommand*\LP@HY@scale{#1}% -}% -% -\define@key{hakyuu}{bgcolor}% -{% - \renewcommand*\LP@HY@bgcolor{#1}% -}% -% -\define@key{hakyuu}{counterstyle}% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@choicekey*{hakyuu}{fontsize}[\LP@HY@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\LP@HY@fontsize{\tiny}% - \or% - \renewcommand*\LP@HY@fontsize{\scriptsize}% - \or% - \renewcommand*\LP@HY@fontsize{\footnotesize}% - \or% - \renewcommand*\LP@HY@fontsize{\small}% - \or% - \renewcommand*\LP@HY@fontsize{\normalsize}% - \or% - \renewcommand*\LP@HY@fontsize{\large}% - \or% - \renewcommand*\LP@HY@fontsize{\Large}% - \or% - \renewcommand*\LP@HY@fontsize{\LARGE}% - \or% - \renewcommand*\LP@HY@fontsize{\huge}% - \or% - \renewcommand*\LP@HY@fontsize{\Huge}% - \fi% -}% -% -\define@key{hakyuu}{width}% -{% - \renewcommand*\LP@HY@width{#1}% -}% -% -\define@key{hakyuu}{title}% -{% - \renewcommand*\LP@HY@title{#1}% -}% -% -\define@key{hakyuu}{cvoffset}% -{% - \renewcommand*\LP@HY@cvoffset{#1}% -}% -% -\define@key{hakyuu}{titleindent}% -{% - \renewcommand*\LP@HY@titleindent{#1}% -}% -% -\define@key{hakyuu}{titlewidth}% -{% - \renewcommand*\LP@HY@titlewidth{#1}% -}% +\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]% @@ -224,7 +71,7 @@ }% {% \end{tikzpicture}% - \LP@drawcounter{\LP@counterstyle}% + \LP@drawcounter{\LP@HY@counterstyle}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty b/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty new file mode 100644 index 00000000000..e8307962299 --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/hitori.sty @@ -0,0 +1,79 @@ +%% +%% 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{hitori}[2013/04/05 hitori.sty v1.0 - 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}% +}% +% +\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 edb04f40e5f..74d6b42cbd5 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/03/16 logicpuzzle.sty v1.2a - Josef Kleber (C) 2013]% +\ProvidesPackage{logicpuzzle}[2013/04/05 logicpuzzle.sty v1.3 - Josef Kleber (C) 2013]% % \RequirePackage{xkeyval}% \RequirePackage{ifthen}% @@ -37,7 +37,8 @@ % \newcounter{LP@counti}% \newcounter{LP@countii}% -\newcounter{LP@whiledo}% +\newcounter{LP@whiledo@i}% +\newcounter{LP@whiledo@ii}% \newcounter{LP@count@ig@i}% \newcounter{LP@count@ig@ii}% \newcounter{LP@count@ig@iii}% @@ -58,36 +59,113 @@ % \newcommand*\LP@Pfive{.5}% % -\newcommand*\LP@ingrid[5]% +% init +% +% #1 prefix +\newcommand*\LP@init@counter[1]% {% - \setcounter{LP@count@ig@i}{#1}% column - \setcounter{LP@count@ig@ii}{#2}% row - \setcounter{LP@count@ig@iii}{#3}% max column - \setcounter{LP@count@ig@iv}{#4}% max row - %#5 style - % - \ifnum\value{LP@count@ig@i}<1% - \PackageError{#5}% - {element outside of the grid}% - {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% - \fi% - \ifnum\value{LP@count@ig@ii}<1% - \PackageError{#5}% - {element outside of the grid}% - {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% - \fi% - \ifnum\value{LP@count@ig@i}>\value{LP@count@ig@iii}% - \PackageError{#5}% - {element outside of the grid}% - {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% - \fi% - \ifnum\value{LP@count@ig@ii}>\value{LP@count@ig@iv}% - \PackageError{#5}% - {element outside of the grid}% - {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% - \fi% + \newcounter{#1@rows}% + \newcounter{#1@columns}% + \setcounter{#1@rows}{\csname #1@rows\endcsname}% + \setcounter{#1@columns}{\csname #1@columns\endcsname}% + \stepcounter{#1@rows}% + \stepcounter{#1@columns}% +}% +% +% #1 package prefix +% #2 package +% #3 option +% #4 default +\newcommand*\LP@define@key[4]% +{% + \expandafter\gdef\csname#1@#3\endcsname{#4}% + \define@key{#2.sty}{#3}[#4]% + {% + \expandafter\gdef\csname#1@#3\endcsname{##1}% + }% + \define@key{#2}{#3}% + {% + \expandafter\def\csname#1@#3\endcsname{##1}% + }% +}% +% +% #1 package prefix +% #2 package +% #3 default +\newcommand*\LP@define@choicekey@fontsize[3]% +{% + \expandafter\gdef\csname#1@fontsize\endcsname{\Large}% + \define@choicekey*{#2.sty}{fontsize}[\LP@dck@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[#3]% + {% + \ifcase\nr\relax% + \expandafter\gdef\csname#1@fontsize\endcsname{\tiny}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\scriptsize}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\footnotesize}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\small}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\normalsize}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\large}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\Large}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\LARGE}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\huge}% + \or% + \expandafter\gdef\csname#1@fontsize\endcsname{\Huge}% + \fi% + }% + \define@choicekey*{#2}{fontsize}[\LP@dck@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[#3]% + {% + \ifcase\nr\relax% + \expandafter\def\csname#1@fontsize\endcsname{\tiny}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\scriptsize}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\footnotesize}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\small}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\normalsize}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\large}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\Large}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\LARGE}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\huge}% + \or% + \expandafter\def\csname#1@fontsize\endcsname{\Huge}% + \fi% + }% }% % +% colors +% +% #1 name +% #2 rgb color +\newcommand*\LP@definecolor[2]% +{% + \definecolor{#1}{rgb}{#2}% +}% +% +\LP@definecolor{LP@c@i}{.9,.9,.98}% +\LP@definecolor{LP@c@ii}{.688,.932,.932}% +\LP@definecolor{LP@c@iii}{.88,1,1}% +\LP@definecolor{LP@c@iv}{1,1,.88}% +\LP@definecolor{LP@c@v}{1,.855,.725}% +\LP@definecolor{LP@c@vi}{.498,1,0}% +\LP@definecolor{LP@c@vii}{.53,.808,.98}% +\LP@definecolor{LP@c@viii}{.196,.804,.196}% +\LP@definecolor{LP@c@ix}{1,.96,.932}% +% +% drawing grids +% % #1 grid x min % #2 grid y min % #3 grid x max @@ -114,6 +192,8 @@ \draw[ultra thick] (1,10) -- (10,10);% }% % +% drawing grid background +% % #1 grid x min % #2 grid y min % #3 grid x max @@ -134,6 +214,38 @@ }% }% % +% In the grid +% +\newcommand*\LP@ingrid[5]% +{% + \setcounter{LP@count@ig@i}{#1}% column + \setcounter{LP@count@ig@ii}{#2}% row + \setcounter{LP@count@ig@iii}{#3}% max column + \setcounter{LP@count@ig@iv}{#4}% max row + %#5 style + % + \ifnum\value{LP@count@ig@i}<1% + \PackageError{#5}% + {element outside of the grid}% + {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% + \fi% + \ifnum\value{LP@count@ig@ii}<1% + \PackageError{#5}% + {element outside of the grid}% + {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% + \fi% + \ifnum\value{LP@count@ig@i}>\value{LP@count@ig@iii}% + \PackageError{#5}% + {element outside of the grid}% + {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% + \fi% + \ifnum\value{LP@count@ig@ii}>\value{LP@count@ig@iv}% + \PackageError{#5}% + {element outside of the grid}% + {You tried to set an element at (#1,#2),\MessageBreak which is outside the grid (1,1) .. (#3,#4)}% + \fi% +}% +% % #1 column % #2 row % #3 content @@ -191,7 +303,7 @@ % \newcommand*\setcolumn[2]% {% - \LP@setrowcontents{#2}{#1}{1}% + \LP@setcolumncontents{#2}{#1}{1}% }% % \newcommand*\setcell[3]% @@ -204,6 +316,173 @@ \LP@setcellcontent{#1}{#2}{\LP@fontsize#3}% }% % +\newcommand*\setcolorrow[2]% +{% + \setcounter{LP@counti}{1}% + \setcounter{LP@countii}{#1}% + \forcsvlist\LP@setcolorrow@i{#2}% +}% +% +\newcommand*\LP@setcolorrow@i[1]% +{% + \ifthenelse{\equal{#1}{0}}% + {% + \gdef\LP@HT@color{black}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + }% + {% + \expandafter\gdef\expandafter\LP@HT@color{LP@c@\romannumeral#1}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + \setcell{\arabic{LP@counti}}{\arabic{LP@countii}}{#1}% + }% + \stepcounter{LP@counti}% +}% +% +\newcommand*\setcolorcolumn[2]% +{% + \setcounter{LP@counti}{#1}% + \setcounter{LP@countii}{1}% + \forcsvlist\LP@setcolorcolumn@i{#2}% +}% +% +\newcommand*\LP@setcolorcolumn@i[1]% +{% + \ifthenelse{\equal{#1}{0}}% + {% + \gdef\LP@HT@color{black}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + }% + {% + \expandafter\gdef\expandafter\LP@HT@color{LP@c@\romannumeral#1}% + \begin{puzzlebackground}% + \fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}% + \end{puzzlebackground}% + \setcell{\arabic{LP@counti}}{\arabic{LP@countii}}{#1}% + }% + \stepcounter{LP@countii}% +}% +% +\newcommand*\fillcell[2]% +{% + \LP@set@LP@scale{\LP@env@prefix}% + \LP@set@LP@color{\LP@env@prefix}% + \LP@set@LP@rows{\LP@env@prefix}% + \LP@set@LP@columns{\LP@env@prefix}% + \LP@ingrid{#1}{#2}{\LP@columns}{\LP@rows}{\LP@package}% + \LP@setcellcontent{#1}{#2}{\LP@Block}% +}% +% +% #1 row +% #2 csv list +\newcommand*\fillrow[2]% +{% + \setcounter{LP@counti}{1}% + \setcounter{LP@countii}{#1}% + \forcsvlist\LP@fillrow@i{#2}% +}% +% +\newcommand*\LP@fillrow@i[1]% +{% + \ifthenelse{\equal{#1}{1}}% + {\fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}}% + {}% + \stepcounter{LP@counti}% +}% +% +% #1 column +% #2 csv list +\newcommand*\fillcolumn[2]% +{% + \setcounter{LP@counti}{#1}% + \setcounter{LP@countii}{1}% + \forcsvlist\LP@fillcolumn@i{#2}% +}% +% +\newcommand*\LP@fillcolumn@i[1]% +{% + \ifthenelse{\equal{#1}{1}}% + {\fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}}% + {}% + \stepcounter{LP@countii}% +}% +% +\newcommand*\framearea[2]% +{% + \draw[ultra thick,color=#1] #2;% +}% +% +\newcommand*\fillarea[2]% +{% + \draw[ultra thick,fill=#1] #2 ;% +}% +% +\newcommand*\filldiagonals[1][yellow!20]% +{% + \LP@set@LP@columns{\LP@env@prefix}% + \LP@set@LP@rows{\LP@env@prefix}% + \LP@set@LP@scale{\LP@env@prefix}% + \setcounter{LP@counti}{\LP@columns}% + \setcounter{LP@countii}{\LP@rows}% + \stepcounter{LP@counti}% + \stepcounter{LP@countii}% + \ifnum\value{LP@counti}=\value{LP@countii}% + \begin{puzzlebackground}% + \def\LP@color{#1}% + \setcounter{LP@whiledo@i}{1}% + \setcounter{LP@whiledo@ii}{\LP@rows}% + \whiledo{\value{LP@whiledo@i}<\value{LP@counti}}% + {% + \LP@setcellcontent{\arabic{LP@whiledo@i}}{\arabic{LP@whiledo@i}}{\LP@Block}% + \LP@setcellcontent{\arabic{LP@whiledo@i}}{\arabic{LP@whiledo@ii}}{\LP@Block}% + \stepcounter{LP@whiledo@i}% + \addtocounter{LP@whiledo@ii}{-1}% + }% + \end{puzzlebackground}% + \else% + \PackageError{\LP@package}% + {non quadratic grid (\filldiagonals)}% + {You tried to fill diagonals,\MessageBreak in a non quadratic grid (1,1) .. (\arabic{LP@counti},\arabic{LP@countii})\MessageBreak doesn't make sense!}% + \fi% +}% +% +\newcommand*\framepuzzle[1][black]% +{% + \LP@set@LP@columns{\LP@env@prefix}% + \LP@set@LP@rows{\LP@env@prefix}% + \setcounter{LP@counti}{\LP@columns}% + \setcounter{LP@countii}{\LP@rows}% + \stepcounter{LP@counti}% + \stepcounter{LP@countii}% + \draw[ultra thick,color=#1] (1,1)--(1,\arabic{LP@countii});% + \draw[ultra thick,color=#1] (1,\arabic{LP@countii})--(\arabic{LP@countii},\arabic{LP@countii});% + \draw[ultra thick,color=#1] (\arabic{LP@countii},\arabic{LP@countii})--(\arabic{LP@countii},1);% + \draw[ultra thick,color=#1] (\arabic{LP@countii},1)--(1,1);% +}% +% +\newenvironment{puzzlebackground}% +{% + \begin{pgfonlayer}{LPbackground}% +}% +{% + \end{pgfonlayer}% +}% +% +\newenvironment{puzzleforeground}% +{% + \begin{pgfonlayer}{LPforeground}% +}% +{% + \end{pgfonlayer}% +}% +% +% around the grid +% \newcommand*\LP@bottomrow[1]% {% \LP@setrowcontents{#1}{1}{0}% @@ -234,6 +513,8 @@ \LP@setcolumncontents{#1}{\csname the#2@columns\endcsname}{1}% }% % +% Presentation +% \newcommand*\titleformat[1]% {% \renewcommand*\LP@titleformat{#1}% @@ -265,49 +546,7 @@ % \newcommand*\LP@Block{\tikz[scale=\LP@scale]\draw[fill=\LP@color] (0,0) rectangle (1,1);}% % -\newcommand*\fillcell[2]% -{% - \LP@set@LP@scale{\LP@env@prefix}% - \LP@set@LP@color{\LP@env@prefix}% - \LP@set@LP@rows{\LP@env@prefix}% - \LP@set@LP@columns{\LP@env@prefix}% - \LP@ingrid{#1}{#2}{\LP@columns}{\LP@rows}{\LP@package}% - \LP@setcellcontent{#1}{#2}{\LP@Block}% -}% -% -% #1 row -% #2 csv list -\newcommand*\fillrow[2]% -{% - \setcounter{LP@counti}{1}% - \setcounter{LP@countii}{#1}% - \forcsvlist\LP@fillrow@i{#2}% -}% -% -\newcommand*\LP@fillrow@i[1]% -{% - \ifthenelse{\equal{#1}{1}}% - {\fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}}% - {}% - \stepcounter{LP@counti}% -}% -% -% #1 column -% #2 csv list -\newcommand*\fillcolumn[2]% -{% - \setcounter{LP@counti}{#1}% - \setcounter{LP@countii}{1}% - \forcsvlist\LP@fillcolumn@i{#2}% -}% -% -\newcommand*\LP@fillcolumn@i[1]% -{% - \ifthenelse{\equal{#1}{1}}% - {\fillcell{\arabic{LP@counti}}{\arabic{LP@countii}}}% - {}% - \stepcounter{LP@countii}% -}% +% get package options with prefix % \newcommand*\LP@set@LP@scale[1]% {% @@ -350,30 +589,4 @@ \gdef\LP@package{#1}% }% % -\newcommand*\framearea[2]% -{% - \draw[ultra thick,color=#1] #2;% -}% -% -\newcommand*\fillarea[2]% -{% - \draw[ultra thick,fill=#1] #2 ;% -}% -% -\newenvironment{puzzlebackground}% -{% - \begin{pgfonlayer}{LPbackground}% -}% -{% - \end{pgfonlayer}% -}% -% -\newenvironment{puzzleforeground}% -{% - \begin{pgfonlayer}{LPforeground}% -}% -{% - \end{pgfonlayer}% -}% -% \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 9cb2ae6bc8a..676f8537962 100644 --- a/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty +++ b/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty @@ -20,207 +20,55 @@ %% This work consists of all files listed in manifest.txt. %% % -\ProvidesPackage{skyline}[2013/03/09 skyline.sty v1.0 - Josef Kleber (C) 2013]% +\ProvidesPackage{skyline}[2013/03/27 skyline.sty v1.1 - Josef Kleber (C) 2013]% % \RequirePackage{logicpuzzle}% % -% options -\newcommand*\SL@width{6.7cm}% -\newcommand*\SL@fontsize\Large% -\newcommand*\SL@rows{5}% -\newcommand*\SL@columns{5}% -\newcommand*\SL@scale{1}% -\newcommand*\SL@bgcolor{}% -\newcommand*\SL@sudoku{false}% -\newcommand*\SL@cvoffset{-39pt}% -\newcommand*\SL@title{}% -\newcommand*\SL@titleindent{0.75cm}% -\newcommand*\SL@titlewidth{5.85cm}% +\newcommand*\LP@SL@init@prefix{LP@SL}% +\newcommand*\LP@SL@init@package{skyline}% % -\newcounter{SL@rows}% -\newcounter{SL@columns}% +\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}% % -\setcounter{SL@rows}{\SL@rows}% -\setcounter{SL@columns}{\SL@columns}% -\stepcounter{SL@rows}% -\stepcounter{SL@columns}% +\newcommand*\LP@SL@sudoku{false}% % -\define@key{skyline.sty}{rows}[5]% -{% - \renewcommand*\SL@rows{#1}% -}% -% -\define@key{skyline.sty}{columns}[5]% -{% - \renewcommand*\SL@columns{#1}% -}% -% -\define@choicekey*{skyline.sty}{sudoku}[\SL@sudoku\nr]{true,false}[true]% +\define@choicekey*{skyline.sty}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% {% \ifcase\nr\relax% - \renewcommand*\SL@sudoku{true}% - \renewcommand*\SL@rows{9}% - \renewcommand*\SL@columns{9}% + \renewcommand*\LP@SL@sudoku{true}% + \renewcommand*\LP@SL@rows{9}% + \renewcommand*\LP@SL@columns{9}% \or% - \renewcommand*\SL@sudoku{false}% + \renewcommand*\LP@SL@sudoku{false}% \fi% }% % -\define@key{skyline.sty}{scale}[1]% -{% - \renewcommand*\SL@scale{#1}% -}% -% -\define@key{skyline.sty}{counterstyle}[none]% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@key{skyline.sty}{bgcolor}[]% -{% - \renewcommand*\SL@bgcolor{#1}% -}% -% -\define@choicekey*{skyline.sty}{fontsize}[\SL@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +\define@choicekey*{skyline}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]% {% \ifcase\nr\relax% - \renewcommand*\SL@fontsize{\tiny}% - \or% - \renewcommand*\SL@fontsize{\scriptsize}% - \or% - \renewcommand*\SL@fontsize{\footnotesize}% - \or% - \renewcommand*\SL@fontsize{\small}% - \or% - \renewcommand*\SL@fontsize{\normalsize}% - \or% - \renewcommand*\SL@fontsize{\large}% - \or% - \renewcommand*\SL@fontsize{\Large}% - \or% - \renewcommand*\SL@fontsize{\LARGE}% - \or% - \renewcommand*\SL@fontsize{\huge}% + \renewcommand*\LP@SL@sudoku{true}% + \renewcommand*\LP@SL@rows{9}% + \renewcommand*\LP@SL@columns{9}% \or% - \renewcommand*\SL@fontsize{\Huge}% + \renewcommand*\LP@SL@sudoku{false}% \fi% }% % -\define@key{skyline.sty}{width}[6.7cm]% -{% - \renewcommand*\SL@width{#1}% -}% -% -\define@key{skyline.sty}{title}[]% -{% - \renewcommand*\SL@title{#1}% -}% -% -\define@key{skyline.sty}{cvoffset}[-39pt]% -{% - \renewcommand*\SL@cvoffset{#1}% -}% -% -\define@key{skyline.sty}{titleindent}[0.75cm]% -{% - \renewcommand*\SL@titleindent{#1}% -}% -% -\define@key{skyline.sty}{titlewidth}[5.85cm]% -{% - \renewcommand*\SL@titlewidth{#1}% -}% -% -\define@key{skyline}{rows}% -{% - \renewcommand*\SL@rows{#1}% -}% -% -\define@key{skyline}{columns}% -{% - \renewcommand*\SL@columns{#1}% -}% -% -\define@choicekey*{skyline}{sudoku}[\SL@sudoku\nr]{true,false}[true]% -{% - \ifcase\nr\relax% - \renewcommand*\SL@sudoku{true}% - \renewcommand*\SL@rows{9}% - \renewcommand*\SL@columns{9}% - \or% - \renewcommand*\SL@sudoku{false}% - \fi% -}% -% -\define@key{skyline}{scale}% -{% - \renewcommand*\SL@scale{#1}% -}% -% -\define@key{skyline}{bgcolor}% -{% - \renewcommand*\SL@bgcolor{#1}% -}% -% -\define@key{skyline}{counterstyle}% -{% - \renewcommand*\LP@counterstyle{#1}% -}% -% -\define@choicekey*{skyline}{fontsize}[\SL@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% -{% - \ifcase\nr\relax% - \renewcommand*\SL@fontsize{\tiny}% - \or% - \renewcommand*\SL@fontsize{\scriptsize}% - \or% - \renewcommand*\SL@fontsize{\footnotesize}% - \or% - \renewcommand*\SL@fontsize{\small}% - \or% - \renewcommand*\SL@fontsize{\normalsize}% - \or% - \renewcommand*\SL@fontsize{\large}% - \or% - \renewcommand*\SL@fontsize{\Large}% - \or% - \renewcommand*\SL@fontsize{\LARGE}% - \or% - \renewcommand*\SL@fontsize{\huge}% - \or% - \renewcommand*\SL@fontsize{\Huge}% - \fi% -}% -% -\define@key{skyline}{width}% -{% - \renewcommand*\SL@width{#1}% -}% -% -\define@key{skyline}{title}% -{% - \renewcommand*\SL@title{#1}% -}% -% -\define@key{skyline}{cvoffset}% -{% - \renewcommand*\SL@cvoffset{#1}% -}% -% -\define@key{skyline}{titleindent}% -{% - \renewcommand*\SL@titleindent{#1}% -}% -% -\define@key{skyline}{titlewidth}% -{% - \renewcommand*\SL@titlewidth{#1}% -}% -% \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% @@ -236,25 +84,25 @@ {% \setkeys{skyline}{#1}% \LP@set@package{skyline}% - \LP@set@env@prefix{SL}% - \setcounter{SL@rows}{\SL@rows}% - \setcounter{SL@columns}{\SL@columns}% - \stepcounter{SL@rows}% - \stepcounter{SL@columns}% - \begin{minipage}[t]{\SL@width}% - \ifthenelse{\equal{\SL@title}{}}% + \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{\SL@titleindent}\parbox{\SL@titlewidth}{\strut\LP@titleformat\SL@title}\vspace{3mm}\par}% - \begin{tikzpicture}[scale=\SL@scale]% - \LP@drawbackground{1}{1}{\SL@columns}{\SL@rows}{\SL@bgcolor}% - \LP@drawgrid{1}{1}{\SL@columns}{\SL@rows}{1cm}% - \ifthenelse{\equal{\SL@sudoku}{true}}% + {\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@counterstyle}% + \LP@drawcounter{\LP@SL@counterstyle}% \stepcounter{LP@puzzlecounter}% \end{minipage}% }% |