diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/CHANGES | 14 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/README | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.pdf | bin | 0 -> 95561 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.tex | 293 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku_README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.pdf | bin | 0 -> 96705 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.tex | 303 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu_README | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty | 232 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty | 232 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/logicpuzzle.sty | 35 |
13 files changed, 1121 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES index 6334544da58..3dd34f65a54 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES +++ b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES @@ -1,3 +1,17 @@ +== Logicpuzzle bundel (v1.5) == + +-- chaossudoku.sty (v1.0) -- + +14/03/2013 added chaossudoku.sty [jk] + +-- hakyuu.sty (v1.0) -- + +13/03/2013 added hakyuu.sty [jk] + +-- logicpuzzle.sty (v1.2a) -- + +13/03/2013 Bugfix: added pgf layer LPbgcolor for drawing colored background [jk] + == Logicpuzzle bundel (v1.4) == -- skyline.sty (v1.0) -- diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/README b/Master/texmf-dist/doc/latex/logicpuzzle/README index fbe0ecf9a42..448580f6b8b 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/README +++ b/Master/texmf-dist/doc/latex/logicpuzzle/README @@ -3,16 +3,22 @@ puzzles. At the moment the following puzzles are supported: * Battleship (aka Bimaru, Marinespiel, Batalla Naval, ...) * Bokkusu (aka Kakurasu, Feldersummenrätsel, ...) +* Chaos Sudoku +* Hakyuu (aka Seismic, Ripple Effect, ...) * Skyline (aka Skycrapers, Wolkenkratzer, Hochhäuser, ...) incl. Skyline Sudoku and Skyline Sudoku (N*N) variants * more to come License: LPPL -Changes in v1.4: +Changes in v1.5: -- added support for Skyline puzzle - https://bitbucket.org/kleberj/logicpuzzle/wiki/Skyline +- added support for Chaos Sudoku puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/ChaosSudoku -- added new commands to logicpuzzle.sty - see: CHANGES
\ No newline at end of file +- added support for Hakyuu puzzle + https://bitbucket.org/kleberj/logicpuzzle/wiki/Hakyuu + +- Bugfix: logicpuzzle.sty + now background color is drawn on its own + LPbgcolor pgf layer
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README index 55326b59850..9d4a0e26c9e 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README +++ b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README @@ -1,5 +1,5 @@ The package enables the user to typeset Bokkusu logic puzzles -(aka Kakurasu, Feldersummenrätsel, ...). +(aka Kakurasu, Feldersummenrätsel, ...). Black out some of the grid cells. The numbers on the left and the bottom edge of the grid indicate the values of the cells for adding up. The numbers on the right and the top edge of the grid diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.pdf Binary files differnew file mode 100644 index 00000000000..4438996d757 --- /dev/null +++ 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 new file mode 100644 index 00000000000..2be4b984e49 --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku.tex @@ -0,0 +1,293 @@ +\documentclass[a4paper]{ltxdoc}% +\usepackage[english]{babel}% +\usepackage[latin1]{inputenc}% +\usepackage[T1]{fontenc}% +\usepackage{textcomp}% +\usepackage{lmodern}% +\usepackage{bera}% +\usepackage{ccicons} +\usepackage{microtype}% +\usepackage{ltxdocext}% +\usepackage{listings} +\usepackage{marginnote}% +\usepackage[svgnames,rgb]{xcolor}% +\usepackage[automark,nouppercase]{scrpage2} +\usepackage[width=5cm,scale=0.84,fontsize=normalsize]{chaossudoku}% +\usepackage{hyperref} +% +\setlength{\headheight}{1.1\baselineskip}% +% +\hypersetup{colorlinks=true,urlcolor=NavyBlue,linkcolor=NavyBlue,citecolor=CornflowerBlue,naturalnames=true,hypertexnames=false}% +\lstset{language=[LaTeX]TeX,numbers=left,numberstyle=\tiny,basicstyle=\ttfamily\scriptsize,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,chaossudoku,left,shape,fill,inner,sep,draw,rounded,corners,thick}, emphstyle=\color{Tomato},emph={[2]Wheat,HotPink,GreenYellow,LightBlue,LightSalmon,LightYellow,green,sudoku,rows,columns,scale},emphstyle={[2]\color{OliveDrab}},morekeywords={framearea,fillarea,chaossudokucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} +\makeatletter +\renewcommand{\maketitle}% +{% + \thispagestyle{empty}% + \pagecolor{Ivory}% + \begin{titlepage}% + \begin{tikzpicture}[remember picture,overlay]% + \node[yshift=-2cm] at (current page.north west)% + {% + \begin{tikzpicture}[remember picture, overlay]% + \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% + (\paperwidth,2cm);% + \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% + \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% + \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% + \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\includegraphics[height=5cm]{logo.png}};% + \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% + \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% + \end{tikzpicture}% + };% + \node[yshift=0cm] at (current page.south west)% + {% + \begin{tikzpicture}[remember picture, overlay]% + \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% + \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% + \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\large\sffamily{\@refline}}};% + \end{tikzpicture}% + };% + \end{tikzpicture}% + \end{titlepage}% + \pagecolor{white}% +}% +% +\newcommand*{\@tikzhead}[1]% +{% + \begin{tikzpicture}[remember picture,overlay]% + \node[yshift=-2cm] at (current page.north west)% + {% + \begin{tikzpicture}[remember picture, overlay]% + \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% + \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% + \node[anchor=east,xshift=.9\paperwidth,rectangle,% + rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% + {\color{white}\textsc{#1}};% + \end{tikzpicture}% + };% + \end{tikzpicture}% +}% +\clearscrheadings% +\ihead{\@tikzhead{\headmark}}% +\cfoot{\upshape\thepage}% +\pagestyle{scrheadings}% +% +%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% +\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% +% +\renewcommand{\headfont}{\normalfont\mdseries\scshape} +% +\gdef\@subtitle{}% +\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% +\gdef\@fileversion{}% +\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% +\gdef\@author{}% +\providecommand*{\Author}[1]{\gdef\@author{#1}}% +\gdef\@authorline{Package author:}% +\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% +\gdef\@refline{}% +\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% +\gdef\and{\unskip{}, }% +\newcommand\doubledash{-\kern0.5pt-} +\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} +\makeatother +% +\def\filename{chaossudoku.sty}% +\def\XeLaTeX{Xe\LaTeX}% +% +\newenvironment{optionlist} +{\begin{trivlist}\setlength\leftskip{2em}} +{\end{trivlist}} +\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} +% +\makeatletter% +\renewcommand\tableofcontents% +{% + %\section*{\contentsname}% + \@mkboth{% + \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% + \@starttoc{toc}% +}% +% +\newcommand\styleoption{\name@idx{style option}}% +\newcommand\stylename{\name@idx{document style}}% +\def\name@idx#1#2{% + {\ttfamily#2}% + \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% +}% +\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% +\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% +\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% +% +\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} +%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} +%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} +\makeatother +% +\setlength\parindent{0pt}% +\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Chaos Sudoku logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% +% +\begin{document} +\title{\filename}% +\Subtitle{A style file for typesetting Chaos\\Sudoku logic puzzles}% +\author{Josef Kleber} +\Fileversion{v1.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/}}} +\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} + \chaossudokucell{1}{1}{3} + \chaossudokucell{1}{5}{4} + \chaossudokucell{3}{2}{4} + \chaossudokucell{4}{2}{5} + \chaossudokucell{5}{5}{2} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} + \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} + \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} + \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} + \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} + \end{puzzlebackground} + \end{chaossudoku} + \hspace{1,5cm} + \begin{chaossudoku} + \setrow{5}{4,3,5,1,2} + \setrow{4}{2,1,3,4,5} + \setrow{3}{5,4,2,3,1} + \setrow{2}{1,2,4,5,3} + \setrow{1}{3,5,1,2,4} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} + \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} + \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} + \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} + \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} + \end{puzzlebackground} + \end{chaossudoku} +\end{center} + +\bigskip +\begin{lstlisting} +\begin{center} + \begin{chaossudoku} + \chaossudokucell{1}{1}{3} + \chaossudokucell{1}{5}{4} + \chaossudokucell{3}{2}{4} + \chaossudokucell{4}{2}{5} + \chaossudokucell{5}{5}{2} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} + \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} + \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} + \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} + \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} + \end{puzzlebackground} + \end{chaossudoku} + \hspace{1,5cm} + \begin{chaossudoku} + \setrow{5}{4,3,5,1,2} + \setrow{4}{2,1,3,4,5} + \setrow{3}{5,4,2,3,1} + \setrow{2}{1,2,4,5,3} + \setrow{1}{3,5,1,2,4} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,2)--(2,2)--(2,3)--(4,3)--(4,1)--(1,1)} + \fillarea{HotPink!30}{(1,2)--(1,6)--(3,6)--(3,5)--(2,5)--(2,2)--(1,2)} + \fillarea{GreenYellow}{(2,3)--(2,5)--(3,5)--(3,4)--(5,4)--(5,2)--(4,2)--(4,3)--(2,3)} + \fillarea{LightBlue}{(3,4)--(3,6)--(6,6)--(6,5)--(5,5)--(5,4)--(3,4)} + \fillarea{LightYellow}{(4,1)--(4,2)--(5,2)--(5,5)--(6,5)--(6,1)--(4,1)} + \end{puzzlebackground} + \end{chaossudoku} +\end{center} +\end{lstlisting} +\lstset{basicstyle=\ttfamily\normalsize} +\clearpage + +\section{Options} +\begin{optionlist} + \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} + \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} + \optitem{\styleoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} + \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} + \optitem{\styleoption{fontsize}}{Large}{specifies the size of the numbers next to the grid. Here, the usual \LaTeX\ sizes are used. Possible values: \texttt{tiny}, \texttt{scriptsize}, \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}, \texttt{large}, \underline{\texttt{Large}}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}} + \optitem{\styleoption{title}}{}{sets the title of a puzzle.} + \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} + \optitem{\styleoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} + \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} + \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} + \optitem{\styleoption{cvoffset}}{-22pt}{sets the vertical offset of the counters in the margin.} +\end{optionlist} + +\section{Environments} +\subsection{\texttt{chaossudoku}} +The \env{chaossudoku} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{chaossudoku}\oarg{options}\\\dots\\\enve{chaossudoku}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. +\subsection{\texttt{puzzlebackground}} +The \env{puzzlebackground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzlebackground}\\\dots\\\enve{puzzlebackground}} allows you to place elements behind the main layer. This is for example usefull for the \cmd\fillarea\ command. +\subsection{\texttt{puzzleforeground}} +The \env{puzzleforeground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzleforeground}\\\dots\\\enve{puzzleforeground}} allows you to place elements in front of the main layer. This is for example usefull for the \cmd\framearea\ command. +\clearpage +\section{Commands} +\subsection{In the grid and around} +\subsubsection{\texttt{chaossudokucell}} +The command \cs{chaossudokucell}\margcs{\cmd\chaossudokucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column} \marg{row}. +\subsubsection{\texttt{setrow}} +The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list. +\subsubsection{\texttt{setcolumn}} +The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}. +\subsubsection{\texttt{framearea}} +The command \cs{framearea}\margcs{\cmd\framearea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} frames the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. + +\begin{lstlisting} +\framearea{green}{(2,2)--(2,3)--(3,3)--(3,2)--(2,2)} +\end{lstlisting} + +This command will color the frame of the grid cell \texttt{(2,2)} green. You should consider using this command in the \env{puzzleforeground} environment. + +\subsubsection{\texttt{fillarea}} +The command \cs{fillarea}\margcs{\cmd\fillarea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} fills the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. You should consider using this command in the \env{puzzlebackground} environment. +\subsection{Presentation} +\subsubsection{\texttt{definecounterstyle}} +The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: + +\begin{lstlisting} +\definecounterstyle{left}{ + \begingroup\reversemarginpar\marginnote{ + \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, + draw,rounded corners=3pt,thick] + {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} +} +\end{lstlisting} + +To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. +\subsubsection{\texttt{puzzlecounter}} +The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. +\subsubsection{\texttt{titleformat}} +With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: + +\begin{lstlisting} +\titleformat{\centering\Large\color{blue}} +\end{lstlisting} +\subsection{Miscellaneous} +\subsubsection{\texttt{chaossudokusetup}} +With the command \cs{chaossudokusetup}\margcs{\cmd\chaossudokusetup\{\marg{options}\}} you can reset the options with global scope. +\subsubsection{\texttt{setpuzzlecounter}} +With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. + +\section{Examples \& Solutions} +You\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}. +\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku_README b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku_README new file mode 100644 index 00000000000..53bbb0fe52d --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/chaossudoku/chaossudoku_README @@ -0,0 +1,4 @@ +The package enables the user to typeset Chaos Sudoku logic puzzles +Fill the cells of an area with numbers from 1 to N of the N*N grid. +Each number can appear only once - in each area, column, row or +diagonal if indicated.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.pdf Binary files differnew file mode 100644 index 00000000000..6cf6a4e7111 --- /dev/null +++ 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 new file mode 100644 index 00000000000..d4577cd2a2a --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu.tex @@ -0,0 +1,303 @@ +\documentclass[a4paper]{ltxdoc}% +\usepackage[english]{babel}% +\usepackage[latin1]{inputenc}% +\usepackage[T1]{fontenc}% +\usepackage{textcomp}% +\usepackage{lmodern}% +\usepackage{bera}% +\usepackage{ccicons} +\usepackage{microtype}% +\usepackage{ltxdocext}% +\usepackage{listings} +\usepackage{marginnote}% +\usepackage[svgnames,rgb]{xcolor}% +\usepackage[automark,nouppercase]{scrpage2} +\usepackage[width=5cm,scale=0.84,fontsize=normalsize]{hakyuu}% +\usepackage{hyperref} +% +\setlength{\headheight}{1.1\baselineskip}% +% +\hypersetup{colorlinks=true,urlcolor=NavyBlue,linkcolor=NavyBlue,citecolor=CornflowerBlue,naturalnames=true,hypertexnames=false}% +\lstset{language=[LaTeX]TeX,numbers=left,numberstyle=\tiny,basicstyle=\ttfamily\scriptsize,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={puzzlebackground,puzzleforeground,center,hakyuu,left,shape,fill,inner,sep,draw,rounded,corners,thick}, emphstyle=\color{Tomato},emph={[2]Wheat,HotPink,GreenYellow,LightBlue,LightSalmon,LightYellow,green,sudoku,rows,columns,scale},emphstyle={[2]\color{OliveDrab}},morekeywords={framearea,fillarea,hakyuucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}} +\makeatletter +\renewcommand{\maketitle}% +{% + \thispagestyle{empty}% + \pagecolor{Ivory}% + \begin{titlepage}% + \begin{tikzpicture}[remember picture,overlay]% + \node[yshift=-2cm] at (current page.north west)% + {% + \begin{tikzpicture}[remember picture, overlay]% + \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle% + (\paperwidth,2cm);% + \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};% + \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};% + \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};% + \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\includegraphics[height=5cm]{logo.png}};% + \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};% + \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};% + \end{tikzpicture}% + };% + \node[yshift=0cm] at (current page.south west)% + {% + \begin{tikzpicture}[remember picture, overlay]% + \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);% + \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% + \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\large\sffamily{\@refline}}};% + \end{tikzpicture}% + };% + \end{tikzpicture}% + \end{titlepage}% + \pagecolor{white}% +}% +% +\newcommand*{\@tikzhead}[1]% +{% + \begin{tikzpicture}[remember picture,overlay]% + \node[yshift=-2cm] at (current page.north west)% + {% + \begin{tikzpicture}[remember picture, overlay]% + \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);% + \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node% + {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};% + \node[anchor=east,xshift=.9\paperwidth,rectangle,% + rounded corners=15pt,inner sep=11pt,fill=NavyBlue]% + {\color{white}\textsc{#1}};% + \end{tikzpicture}% + };% + \end{tikzpicture}% +}% +\clearscrheadings% +\ihead{\@tikzhead{\headmark}}% +\cfoot{\upshape\thepage}% +\pagestyle{scrheadings}% +% +%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}% +\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}% +% +\renewcommand{\headfont}{\normalfont\mdseries\scshape} +% +\gdef\@subtitle{}% +\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}% +\gdef\@fileversion{}% +\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}% +\gdef\@author{}% +\providecommand*{\Author}[1]{\gdef\@author{#1}}% +\gdef\@authorline{Package author:}% +\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}% +\gdef\@refline{}% +\providecommand*{\Refline}[1]{\gdef\@refline{#1}}% +\gdef\and{\unskip{}, }% +\newcommand\doubledash{-\kern0.5pt-} +\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}} +\makeatother +% +\def\filename{hakyuu.sty}% +\def\XeLaTeX{Xe\LaTeX}% +% +\newenvironment{optionlist} +{\begin{trivlist}\setlength\leftskip{2em}} +{\end{trivlist}} +\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3} +% +\makeatletter% +\renewcommand\tableofcontents% +{% + %\section*{\contentsname}% + \@mkboth{% + \MakeUppercase\contentsname}{\MakeUppercase\contentsname}% + \@starttoc{toc}% +}% +% +\newcommand\styleoption{\name@idx{style option}}% +\newcommand\stylename{\name@idx{document style}}% +\def\name@idx#1#2{% + {\ttfamily#2}% + \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% +}% +\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}% +\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}% +\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}% +% +\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}} +%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}} +%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}} +\makeatother +% +\setlength\parindent{0pt}% +\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Hakyuu logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}% +% +\begin{document} +\title{\filename}% +\Subtitle{A style file for typesetting Hakyuu logic puzzles}% +\author{Josef Kleber} +\Fileversion{v1.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/}}} +\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} + \hakyuucell{1}{5}{2} + \hakyuucell{3}{5}{6} + \hakyuucell{4}{5}{5} + \hakyuucell{4}{4}{4} + \hakyuucell{1}{3}{3} + \hakyuucell{2}{2}{2} + \hakyuucell{5}{2}{5} + \hakyuucell{4}{1}{1} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} + \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)} + \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)} + \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)} + \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)} + \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)} + \end{puzzlebackground} + \end{hakyuu} + \hspace{1,5cm} + \begin{hakyuu} + \setrow{5}{2,3,6,5,4} + \setrow{4}{1,7,3,4,2} + \setrow{3}{3,1,2,1,3} + \setrow{2}{1,2,1,3,5} + \setrow{1}{2,3,4,1,2} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} + \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)} + \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)} + \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)} + \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)} + \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)} + \end{puzzlebackground} + \end{hakyuu} +\end{center} + +\bigskip +\begin{lstlisting} +\begin{center} + \begin{hakyuu} + \hakyuucell{1}{5}{2} + \hakyuucell{3}{5}{6} + \hakyuucell{4}{5}{5} + \hakyuucell{4}{4}{4} + \hakyuucell{1}{3}{3} + \hakyuucell{2}{2}{2} + \hakyuucell{5}{2}{5} + \hakyuucell{4}{1}{1} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} + \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)} + \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)} + \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)} + \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)} + \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)} + \end{puzzlebackground} + \end{hakyuu} + \hspace{1,5cm} + \begin{hakyuu} + \setrow{5}{2,3,6,5,4} + \setrow{4}{1,7,3,4,2} + \setrow{3}{3,1,2,1,3} + \setrow{2}{1,2,1,3,5} + \setrow{1}{2,3,4,1,2} + \begin{puzzlebackground} + \fillarea{Wheat}{(1,1)--(1,4)--(2,4)--(2,1)--(1,1)} + \fillarea{HotPink!30}{(1,4)--(1,6)--(6,6)--(6,5)--(3,5)--(3,4)--(1,4)} + \fillarea{GreenYellow}{(2,4)--(3,4)--(3,5)--(5,5)--(5,4)--(4,4)--(4,3)--(2,3)--(2,4)} + \fillarea{LightBlue}{(5,5)--(6,5)--(6,3)--(4,3)--(4,4)--(5,4)--(5,5)} + \fillarea{LightSalmon!50}{(2,2)--(2,3)--(5,3)--(5,2)--(2,2)} + \fillarea{LightYellow}{(2,1)--(2,2)--(5,2)--(5,3)--(6,3)--(6,1)--(2,1)} + \end{puzzlebackground} + \end{hakyuu} +\end{center} +\end{lstlisting} +\lstset{basicstyle=\ttfamily\normalsize} +\clearpage + +\section{Options} +\begin{optionlist} + \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.} + \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid} + \optitem{\styleoption{width}}{5.1cm}{sets the width of the minipage, in which the grid is typeset.} + \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.} + \optitem{\styleoption{fontsize}}{Large}{specifies the size of the numbers next to the grid. Here, the usual \LaTeX\ sizes are used. Possible values: \texttt{tiny}, \texttt{scriptsize}, \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}, \texttt{large}, \underline{\texttt{Large}}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}} + \optitem{\styleoption{title}}{}{sets the title of a puzzle.} + \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.} + \optitem{\styleoption{titlewidth}}{5.1cm}{specifies the width of the box the title is set in.} + \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.} + \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right} + \optitem{\styleoption{cvoffset}}{-22pt}{sets the vertical offset of the counters in the margin.} +\end{optionlist} + +\section{Environments} +\subsection{\texttt{hakyuu}} +The \env{hakyuu} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{hakyuu}\oarg{options}\\\dots\\\enve{hakyuu}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created. +\subsection{\texttt{puzzlebackground}} +The \env{puzzlebackground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzlebackground}\\\dots\\\enve{puzzlebackground}} allows you to place elements behind the main layer. This is for example usefull for the \cmd\fillarea\ command. +\subsection{\texttt{puzzleforeground}} +The \env{puzzleforeground} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{puzzleforeground}\\\dots\\\enve{puzzleforeground}} allows you to place elements in front of the main layer. This is for example usefull for the \cmd\framearea\ command. +\clearpage +\section{Commands} +\subsection{In the grid and around} +\subsubsection{\texttt{hakyuucell}} +The command \cs{hakyuucell}\margcs{\cmd\hakyuucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column}\marg{row}. +\subsubsection{\texttt{setrow}} +The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list. +\subsubsection{\texttt{setcolumn}} +The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}. +\subsubsection{\texttt{framearea}} +The command \cs{framearea}\margcs{\cmd\framearea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} frames the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. + +\begin{lstlisting} +\framearea{green}{(2,2)--(2,3)--(3,3)--(3,2)--(2,2)} +\end{lstlisting} + +This command will color the frame of the grid cell \texttt{(2,2)} green. You should consider using this command in the \env{puzzleforeground} environment. + +\subsubsection{\texttt{fillarea}} +The command \cs{fillarea}\margcs{\cmd\fillarea\{\marg{color}\}\{\marg{\cmd\tikz\ path}\}} fills the area given by \marg{\cmd\tikz\ path} with color \marg{color}. The reference for coordinates is the bottom left corner of the cell. You should consider using this command in the \env{puzzlebackground} environment. +\subsection{Presentation} +\subsubsection{\texttt{definecounterstyle}} +The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows: + +\begin{lstlisting} +\definecounterstyle{left}{ + \begingroup\reversemarginpar\marginnote{ + \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt, + draw,rounded corners=3pt,thick] + {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup} +} +\end{lstlisting} + +To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}. +\subsubsection{\texttt{puzzlecounter}} +The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle. +\subsubsection{\texttt{titleformat}} +With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows: + +\begin{lstlisting} +\titleformat{\centering\Large\color{blue}} +\end{lstlisting} +\subsection{Miscellaneous} +\subsubsection{\texttt{hakyuusetup}} +With the command \cs{hakyuusetup}\margcs{\cmd\hakyuusetup\{\marg{options}\}} you can reset the options with global scope. +\subsubsection{\texttt{setpuzzlecounter}} +With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions. + +\section{Examples \& Solutions} +You\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}. +\end{document} diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu_README b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu_README new file mode 100644 index 00000000000..2157dc54718 --- /dev/null +++ b/Master/texmf-dist/doc/latex/logicpuzzle/hakyuu/hakyuu_README @@ -0,0 +1,5 @@ +The package enables the user to typeset Hakyuu logic puzzles +(aka Seismic, Ripple Effect, ...). +Fill the cells of an area with numbers from 1 to SIZE of the area. +If there are two cells with the same number N in a row or a column, +there must be at least N cells between those two cells
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt index f57337cafe9..da7a6466e6b 100644 --- a/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt +++ b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt @@ -6,6 +6,8 @@ This work consists of the following files: logicpuzzle.sty battleship.sty bokkusu.sty +chaossudoku.sty +hakyuu.sty skyline.sty -- Documentation -- @@ -14,6 +16,10 @@ battleship.pdf battleship.tex bokkusu.pdf bokkusu.tex +chaossudoku.pdf +chaossudoku.tex +hakyuu.pdf +hakyuu.tex skyline.pdf skyline.tex diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty new file mode 100644 index 00000000000..6f6ab6204bf --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/chaossudoku.sty @@ -0,0 +1,232 @@ +%% +%% 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{chaossudoku}[2013/03/16 chaossudoku.sty v1.0 - 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}% +}% +% +\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% +% +\ProcessOptionsX\relax% +% +\let\chaossudokucell\setcell% +% +\newcommand*\chaossudokusetup[1]% +{% + \setkeys{chaossudoku.sty}{#1}% +}% +% +\newenvironment{chaossudoku}[1][]% +{% + \setkeys{chaossudoku}{#1}% + \LP@set@package{chaossudoku}% + \LP@set@env@prefix{LP@CS}% + \setcounter{LP@CS@rows}{\LP@CS@rows}% + \setcounter{LP@CS@columns}{\LP@CS@columns}% + \stepcounter{LP@CS@rows}% + \stepcounter{LP@CS@columns}% + \begin{minipage}[t]{\LP@CS@width}% + \ifthenelse{\equal{\LP@CS@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@CS@titleindent}\parbox{\LP@CS@titlewidth}{\strut\LP@titleformat\LP@CS@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@CS@scale]% + \LP@drawbackground{1}{1}{\LP@CS@columns}{\LP@CS@rows}{\LP@CS@bgcolor}% + \LP@drawgrid{1}{1}{\LP@CS@columns}{\LP@CS@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@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 new file mode 100644 index 00000000000..07ace4e5bc3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/hakyuu.sty @@ -0,0 +1,232 @@ +%% +%% 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{hakyuu}[2013/03/16 hakyuu.sty v1.0 - 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}% +}% +% +\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% +% +\ProcessOptionsX\relax% +% +\let\hakyuucell\setcell% +% +\newcommand*\hakyuusetup[1]% +{% + \setkeys{hakyuu.sty}{#1}% +}% +% +\newenvironment{hakyuu}[1][]% +{% + \setkeys{hakyuu}{#1}% + \LP@set@package{hakyuu}% + \LP@set@env@prefix{LP@HY}% + \setcounter{LP@HY@rows}{\LP@HY@rows}% + \setcounter{LP@HY@columns}{\LP@HY@columns}% + \stepcounter{LP@HY@rows}% + \stepcounter{LP@HY@columns}% + \begin{minipage}[t]{\LP@HY@width}% + \ifthenelse{\equal{\LP@HY@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\LP@HY@titleindent}\parbox{\LP@HY@titlewidth}{\strut\LP@titleformat\LP@HY@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\LP@HY@scale]% + \LP@drawbackground{1}{1}{\LP@HY@columns}{\LP@HY@rows}{\LP@HY@bgcolor}% + \LP@drawgrid{1}{1}{\LP@HY@columns}{\LP@HY@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@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 1d2fa7358fb..edb04f40e5f 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/09 logicpuzzle.sty v1.2 - Josef Kleber (C) 2013]% +\ProvidesPackage{logicpuzzle}[2013/03/16 logicpuzzle.sty v1.2a - Josef Kleber (C) 2013]% % \RequirePackage{xkeyval}% \RequirePackage{ifthen}% @@ -28,9 +28,12 @@ \RequirePackage{marginnote}% \RequirePackage{tikz}% \usetikzlibrary{decorations.pathmorphing}% -\pgfdeclarelayer{LPbackground} -\pgfdeclarelayer{LPforeground} -\pgfsetlayers{LPbackground,main,LPforeground} +\pgfdeclarelayer{LPbgcolor}% +\pgfdeclarelayer{LPbackgroundtwo}% +\pgfdeclarelayer{LPbackground}% +\pgfdeclarelayer{LPforeground}% +\pgfdeclarelayer{LPforegroundtwo}% +\pgfsetlayers{LPbgcolor,LPbackgroundtwo,LPbackground,main,LPforeground,LPforegroundtwo}% % \newcounter{LP@counti}% \newcounter{LP@countii}% @@ -101,14 +104,14 @@ % \newcommand*\LP@drawsudokugrid% {% - \draw[ultra thick] (1,1) -- (1,10); - \draw[ultra thick] (4,1) -- (4,10); - \draw[ultra thick] (7,1) -- (7,10); - \draw[ultra thick] (10,1) -- (10,10); - \draw[ultra thick] (1,1) -- (10,1); - \draw[ultra thick] (1,4) -- (10,4); - \draw[ultra thick] (1,7) -- (10,7); - \draw[ultra thick] (1,10) -- (10,10); + \draw[ultra thick] (1,1) -- (1,10);% + \draw[ultra thick] (4,1) -- (4,10);% + \draw[ultra thick] (7,1) -- (7,10);% + \draw[ultra thick] (10,1) -- (10,10);% + \draw[ultra thick] (1,1) -- (10,1);% + \draw[ultra thick] (1,4) -- (10,4);% + \draw[ultra thick] (1,7) -- (10,7);% + \draw[ultra thick] (1,10) -- (10,10);% }% % % #1 grid x min @@ -125,7 +128,9 @@ \setcounter{LP@countii}{#4}% max row \stepcounter{LP@counti}% \stepcounter{LP@countii}% - \draw[fill=#5] (#1,#2) rectangle (\value{LP@counti},\value{LP@countii});% + \begin{pgfonlayer}{LPbgcolor}% + \draw[fill=#5] (#1,#2) rectangle (\value{LP@counti},\value{LP@countii});% + \end{pgfonlayer}{LPbgcolor}% }% }% % @@ -347,12 +352,12 @@ % \newcommand*\framearea[2]% {% - \draw[ultra thick,color=#1] #2; + \draw[ultra thick,color=#1] #2;% }% % \newcommand*\fillarea[2]% {% - \draw[ultra thick,fill=#1] #2 ; + \draw[ultra thick,fill=#1] #2 ;% }% % \newenvironment{puzzlebackground}% |