summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/CHANGES8
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/README18
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.pdfbin0 -> 96732 bytes
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.tex365
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku_README2
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt8
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/createlpsudoku91
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/lpsmag175
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty213
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/simple.smc7
10 files changed, 878 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES
index 3dd34f65a54..4d55edef736 100644
--- a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES
@@ -1,3 +1,11 @@
+== Logicpuzzle bundel (v1.6) ==
+
+-- lpsudoku.sty (v1.0) --
+
+21/03/2013 added lpsmag [jk]
+20/03/2013 added createlpsudoku [jk]
+18/03/2013 added lpsudoku.sty [jk]
+
== Logicpuzzle bundel (v1.5) ==
-- chaossudoku.sty (v1.0) --
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/README b/Master/texmf-dist/doc/latex/logicpuzzle/README
index 448580f6b8b..6fa17bb8740 100644
--- a/Master/texmf-dist/doc/latex/logicpuzzle/README
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/README
@@ -7,18 +7,18 @@ puzzles. At the moment the following puzzles are supported:
* Hakyuu (aka Seismic, Ripple Effect, ...)
* Skyline (aka Skycrapers, Wolkenkratzer, Hochhäuser, ...)
incl. Skyline Sudoku and Skyline Sudoku (N*N) variants
+* Sudoku
* more to come
License: LPPL
-Changes in v1.5:
+Changes in v1.6:
-- added support for Chaos Sudoku puzzle
- https://bitbucket.org/kleberj/logicpuzzle/wiki/ChaosSudoku
+- added support for Sudoku puzzle
+ created Sudoku magazines
+ https://bitbucket.org/kleberj/logicpuzzle/wiki/Sudoku
-- 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
+- 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
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.pdf
new file mode 100644
index 00000000000..a60927e9066
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.tex b/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.tex
new file mode 100644
index 00000000000..4d387b9b3d1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku.tex
@@ -0,0 +1,365 @@
+% pdflatex --shell-escape logo.tex
+% run twice: 1. download qrcode.png 2. include the pic
+% or download http://i.imgur.com/KAunnuS.png and rename it to qrcode.png
+%
+\documentclass[a4paper]{ltxdoc}%
+\usepackage[english]{babel}%
+\usepackage[latin1]{inputenc}%
+\usepackage[T1]{fontenc}%
+\usepackage{textcomp}%
+\usepackage{lmodern}%
+\usepackage{bera}%
+\usepackage{microtype}%
+\usepackage{ltxdocext}%
+\usepackage{listings}
+\usepackage{nicefrac}
+\usepackage{filecontents}
+\usepackage{marginnote}%
+\usepackage[svgnames,rgb]{xcolor}%
+\usepackage[automark,nouppercase]{scrpage2}
+\usepackage[width=5cm,scale=0.55,fontsize=normalsize]{lpsudoku}%
+\usepackage{hyperref}
+%
+\setlength{\headheight}{1.1\baselineskip}%
+\AtBeginDocument{\IfFileExists{qrcode.png}{}{\write18{wget -O qrcode.png http://i.imgur.com/KAunnuS.png}}}%
+\hypersetup{colorlinks=true,urlcolor=NavyBlue,linkcolor=NavyBlue,citecolor=CornflowerBlue,naturalnames=true,hypertexnames=false}%
+\lstset{language=[LaTeX]TeX,numbers=left,numberstyle=\tiny,basicstyle=\ttfamily\normalsize,frame=single,backgroundcolor=\color{LightGoldenrodYellow},keywordstyle=\color{Blue},emph={easy,last,puzzlebackground,puzzleforeground,center,lpsudoku,left,shape,fill,inner,sep,draw,rounded,corners,thick}, emphstyle=\color{Tomato},emph={[2]scale},emphstyle={[2]\color{OliveDrab}},morekeywords={page,startpuzzles,startsolutions,typesetpage,typesetsolpage,framearea,fillarea,lpsudokucell,setrow,LP@cvoffset,titleformat,definecounterstyle,marginnote,tikz,node,puzzlecounter,color,[,]}}
+\makeatletter
+\renewcommand{\maketitle}%
+{%
+ \thispagestyle{empty}%
+ \pagecolor{Ivory}%
+ \begin{titlepage}%
+ \begin{tikzpicture}[remember picture,overlay]%
+ \node[yshift=-2cm] at (current page.north west)%
+ {%
+ \begin{tikzpicture}[remember picture, overlay]%
+ \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle%
+ (\paperwidth,2cm);%
+ \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node%
+ {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};%
+ \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node%
+ {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};%
+ \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node%
+ {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};%
+ \draw[anchor=west,yshift=-13cm,xshift=3cm,color=NavyBlue] (0,0) node%
+ {\usebox\logo};%
+ \draw[anchor=west,yshift=-17cm,xshift=3cm,color=NavyBlue] (0,0) node%
+ {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};%
+ \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node%
+ {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};%
+ \end{tikzpicture}%
+ };%
+ \node[yshift=0cm] at (current page.south west)%
+ {%
+ \begin{tikzpicture}[remember picture, overlay]%
+ \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);%
+ \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);%
+ \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node%
+ {\parbox{15cm}{\large\sffamily{\@refline}}};%
+ \end{tikzpicture}%
+ };%
+ \end{tikzpicture}%
+ \end{titlepage}%
+ \pagecolor{white}%
+}%
+%
+\newcommand*{\@tikzhead}[1]%
+{%
+ \begin{tikzpicture}[remember picture,overlay]%
+ \node[yshift=-2cm] at (current page.north west)%
+ {%
+ \begin{tikzpicture}[remember picture, overlay]%
+ \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);%
+ \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node%
+ {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};%
+ \node[anchor=east,xshift=.9\paperwidth,rectangle,%
+ rounded corners=15pt,inner sep=11pt,fill=NavyBlue]%
+ {\color{white}\textsc{#1}};%
+ \end{tikzpicture}%
+ };%
+ \end{tikzpicture}%
+}%
+\clearscrheadings%
+\ihead{\@tikzhead{\headmark}}%
+\cfoot{\upshape\thepage}%
+\pagestyle{scrheadings}%
+%
+%\newcommand*{\headline}[1]{\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}%
+\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}%
+%
+\renewcommand{\headfont}{\normalfont\mdseries\scshape}
+%
+\gdef\@subtitle{}%
+\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}%
+\gdef\@fileversion{}%
+\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}%
+\gdef\@author{}%
+\providecommand*{\Author}[1]{\gdef\@author{#1}}%
+\gdef\@authorline{Package author:}%
+\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}%
+\gdef\@refline{}%
+\providecommand*{\Refline}[1]{\gdef\@refline{#1}}%
+\gdef\and{\unskip{}, }%
+\newcommand\doubledash{-\kern0.5pt-}
+\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}}
+\makeatother
+%
+\def\filename{lpsudoku.sty}%
+\def\XeLaTeX{Xe\LaTeX}%
+%
+\newenvironment{optionlist}
+{\begin{trivlist}\setlength\leftskip{2em}}
+{\end{trivlist}}
+\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3}
+%
+\makeatletter%
+\renewcommand\tableofcontents%
+{%
+ %\section*{\contentsname}%
+ \@mkboth{%
+ \MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
+ \@starttoc{toc}%
+}%
+%
+\newcommand\styleoption{\name@idx{style option}}%
+\newcommand\stylename{\name@idx{document style}}%
+\def\name@idx#1#2{%
+ {\ttfamily#2}%
+ \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}%
+}%
+\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}%
+\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}%
+\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}%
+%
+\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}}
+%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}}
+%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}}
+\makeatother
+%
+\setlength\parindent{0pt}%
+\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Sudoku logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}%
+%
+\begin{document}
+\begin{filecontents}{lpsudoku.bib}
+@misc{bib:web:logigpuzzle,
+ author = {Josef Kleber},
+ note = {\href{https://bitbucket.org/kleberj/logicpuzzle/}(https://bitbucket.org/kleberj/logicpuzzle/)},
+ title = {The logicpuzzle bundle},
+ year = {2013},
+ }
+
+@misc{bib:wiki:createlpsudoku,
+ author = {Josef Kleber},
+ note = {\href{http://jklatex.square7.de/wiki/doku.php?id=createlpsudoku}(http://jklatex.square7.de/wiki/doku.php?id=createlpsudoku)},
+ title = {createlpsudoku},
+ year = {2013},
+ }
+
+@misc{bib:wiki:lpsmag,
+ author = {Josef Kleber},
+ note = {\href{http://jklatex.square7.de/wiki/doku.php?id=lpsmag}(http://jklatex.square7.de/wiki/doku.php?id=lpsmag)},
+ title = {lpsmag},
+ year = {2013},
+ }
+
+@misc{bib:wiki:howtosudoku,
+ author = {Josef Kleber},
+ note = {\href{http://jklatex.square7.de/wiki/doku.php?id=sudoku_magazine}(http://jklatex.square7.de/wiki/doku.php?id=sudoku\_magazine)},
+ title = {How to create a Sudoku magazine},
+ year = {2013},
+ }
+
+@misc{bib:web:qqwing,
+ author = {Stephen Ostermiller},
+ note = {\href{http://ostermiller.org/qqwing/}(http://ostermiller.org/qqwing/)},
+ title = {QQwing -- Sudoku Generator and Solver},
+ year = {2011},
+ }
+
+@misc{bib:web:hodoku,
+ author = {Bernhard Hobiger},
+ note = {\href{http://hodoku.sourceforge.net/en/index.php}(http://hodoku.sourceforge.net/en/index.php)},
+ title = {HoDoKu},
+ year = {2012},
+ }
+\end{filecontents}
+\bibliographystyle{alphadin}
+\title{\filename}%
+\Subtitle{A style file for typesetting Sudoku logic puzzles}%
+\author{Josef Kleber}
+\Fileversion{v1.0}
+\Refline{\href{mailto:josef.kleber@gmx.de}{\texttt{josef.kleber@gmx.de}}\\\href{https://bitbucket.org/kleberj/logicpuzzle/}{\texttt{https://bitbucket.org/kleberj/logicpuzzle/}}}
+\newsavebox\logo
+\savebox\logo{%
+\begin{lpsudoku}
+ \setrow{9}{{},2,6,{},{},{},{},{},{}}
+ \setrow{8}{{},{},{},{},{},{},1,7,{}}
+ \setrow{7}{{},{},3,1,{},6,{},{},{}}
+ \setrow{6}{{},6,{},{},5,{},8,{},3}
+ \setrow{5}{{},{},9,2,6,1,7,{},{}}
+ \setrow{4}{5,{},4,{},8,{},{},6,{}}
+ \setrow{3}{{},{},{},8,{},4,3,{},{}}
+ \setrow{2}{{},4,8,{},{},{},{},{},{}}
+ \setrow{1}{{},{},{},{},{},{},9,4,{}}
+ \end{lpsudoku}
+ \hspace{1,5cm}
+ \begin{lpsudoku}
+ \setrow{9}{1,2,6,5,7,8,4,3,9}
+ \setrow{8}{4,8,5,9,3,2,1,7,6}
+ \setrow{7}{7,9,3,1,4,6,5,8,2}
+ \setrow{6}{2,6,1,4,5,7,8,9,3}
+ \setrow{5}{8,3,9,2,6,1,7,5,4}
+ \setrow{4}{5,7,4,3,8,9,2,6,1}
+ \setrow{3}{6,5,2,8,9,4,3,1,7}
+ \setrow{2}{9,4,8,7,1,3,6,2,5}
+ \setrow{1}{3,1,7,6,2,5,9,4,8}
+\end{lpsudoku}
+}%
+\maketitle
+\tableofcontents
+\clearpage
+
+\section{The puzzle}
+
+Well, it's Sudoku -- nothing to explain! Fill each row and column with numbers from 1 to 9. Here's a little self-explanatory example:
+
+\begin{center}
+ \usebox\logo
+\end{center}
+
+\bigskip
+\begin{lstlisting}
+\begin{center}
+ \begin{lpsudoku}
+ \setrow{9}{{},2,6,{},{},{},{},{},{}}
+ \setrow{8}{{},{},{},{},{},{},1,7,{}}
+ \setrow{7}{{},{},3,1,{},6,{},{},{}}
+ \setrow{6}{{},6,{},{},5,{},8,{},3}
+ \setrow{5}{{},{},9,2,6,1,7,{},{}}
+ \setrow{4}{5,{},4,{},8,{},{},6,{}}
+ \setrow{3}{{},{},{},8,{},4,3,{},{}}
+ \setrow{2}{{},4,8,{},{},{},{},{},{}}
+ \setrow{1}{{},{},{},{},{},{},9,4,{}}
+ \end{lpsudoku}
+ \hspace{1,5cm}
+ \begin{lpsudoku}
+ \setrow{9}{1,2,6,5,7,8,4,3,9}
+ \setrow{8}{4,8,5,9,3,2,1,7,6}
+ \setrow{7}{7,9,3,1,4,6,5,8,2}
+ \setrow{6}{2,6,1,4,5,7,8,9,3}
+ \setrow{5}{8,3,9,2,6,1,7,5,4}
+ \setrow{4}{5,7,4,3,8,9,2,6,1}
+ \setrow{3}{6,5,2,8,9,4,3,1,7}
+ \setrow{2}{9,4,8,7,1,3,6,2,5}
+ \setrow{1}{3,1,7,6,2,5,9,4,8}
+ \end{lpsudoku}
+\end{lstlisting}
+\lstset{basicstyle=\ttfamily\normalsize}
+\clearpage
+
+\section{Options}
+\begin{optionlist}
+ \optitem{\styleoption{width}}{9.1cm}{sets the width of the minipage, in which the grid is typeset. 9 cells of width 1cm plus a litle extra for lines.}
+ \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage. To get a width of 5cm you need to scale by $\nicefrac{5}{9}$}
+ \optitem{\styleoption{fontsize}}{Large}{specifies the size of the numbers next to the grid. Here, the usual \LaTeX\ sizes are used. Possible values: \texttt{tiny}, \texttt{scriptsize}, \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}, \texttt{large}, \underline{\texttt{Large}}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}}
+ \optitem{\styleoption{title}}{}{sets the title of a puzzle.}
+ \optitem{\styleoption{titleindent}}{0cm}{defines the indent of the title.}
+ \optitem{\styleoption{titlewidth}}{9.1cm}{specifies the width of the box the title is set in.}
+ \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.}
+ \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right}
+ \optitem{\styleoption{cvoffset}}{-24pt}{sets the vertical offset of the counters in the margin.}
+\end{optionlist}
+
+\section{Environments}
+\subsection{\texttt{lpsudoku}}
+The \env{lpsudoku}\footnote{named \env{lpsudoku} -- as well as the style file -- to avoid naming conflict with already existing \package{sudoku.sty} } environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{lpsudoku}\oarg{options}\\\dots\\\enve{lpsudoku}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created.
+\section{Commands}
+\subsection{In the grid and around}
+\subsubsection{\texttt{lpsudokucell}}
+The command \cs{lpsudokucell}\margcs{\cmd\lpsudokucell\{\marg{column}\}\{\marg{row}\}\\\{\marg{number}\}} sets the \marg{number} of the grid cell \marg{column} \marg{row}.
+\subsubsection{\texttt{setrow}}
+The command \cs{setrow}\margcs{\cmd\setrow\{\marg{row}\}\{\marg{csv list}\}} sets the contents of \marg{row}. It expects a comma-separated list.
+\subsubsection{\texttt{setcolumn}}
+The command \cs{setcolumn}\margcs{\cmd\setcolumn\{\marg{column}\}\{\marg{csv list}\}} sets the contents of \marg{column}.
+\subsection{Presentation}
+\subsubsection{\texttt{definecounterstyle}}
+The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows:
+
+\begin{lstlisting}
+\definecounterstyle{left}{
+ \begingroup\reversemarginpar\marginnote{
+ \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt,
+ draw,rounded corners=3pt,thick]
+ {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup}
+}
+\end{lstlisting}
+
+To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}.
+\subsubsection{\texttt{puzzlecounter}}
+The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle.
+\subsubsection{\texttt{titleformat}}
+With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows:
+
+\begin{lstlisting}
+\titleformat{\centering\Large\color{blue}}
+\end{lstlisting}
+\subsection{Miscellaneous}
+\subsubsection{\texttt{lpsudokusetup}}
+With the command \cs{lpsudokusetup}\margcs{\cmd\lpsudokusetup\{\marg{options}\}} you can reset the options with global scope.
+\subsubsection{\texttt{setpuzzlecounter}}
+With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions.
+
+\clearpage
+\section{Supporting \texttt{bash} scripts}
+\subsection{createlpsudoku}
+The \texttt{createlpsudoku} \cite{bib:wiki:createlpsudoku} \texttt{bash} script can transform Sudoku format files into \env{lpsudoku} environments. It can process files in the so called one line 81 format\footnote{processing of several sudokus in 81 format (one in each line) is possible} (option -e (default)) and in simple sudoku format (option -s)
+
+\medskip
+Usage: \texttt{createlpsudoku [options] [-o output] -i input}
+
+\medskip
+It expects an input file with the option \texttt{-i}. You can specify an output file with the option \texttt{-o}. Otherwise it writes to \texttt{stdout}. Furthermore, the following options are possible:
+
+\medskip
+\begin{tabular}{ll}
+-w & write Windows line endings (CR/LF) to file \\
+-v & prints version number \\
+-h & prints help \\
+\end{tabular}
+
+\subsection{lpsmag}
+
+With the \texttt{lpsmag} \cite{bib:wiki:lpsmag} \texttt{bash} script you can half automatically produce a Sudoku magazine using the \LaTeX\ package \package{lpsudoku.sty} and the \texttt{createlpsudoku} bash script.
+
+\medskip
+Usage: \texttt{lpsmag configfile}
+
+\medskip
+The script needs an installed \href{http://ostermiller.org/qqwing/}{QQwing} \cite{bib:web:qqwing} and a config file for defining the magazine's contents:
+
+\begin{lstlisting}
+page p1 easy
+page p2 easy
+startpuzzles
+typesetpage p1
+typesetpage p2
+startsolutions
+typesetsolpage p1 p2 last
+\end{lstlisting}
+
+This config file will be sourced into the \texttt{lpsmag bash} script and contains calls of \texttt{lpsmag} functions. Make sure, that the config file has UNIX line endings (LF). For a detailed documentation I refer to the following \href{http://jklatex.square7.de/wiki/doku.php?id=lpsmag}{wiki} \cite{bib:wiki:lpsmag} entry.
+
+After running \texttt{lpsmag} you will find a \texttt{lpsmag.tex} in your working directory. Just run \texttt{pdflatex lpsmag.tex} twice and you finally get for example this \href{https://bitbucket.org/kleberj/logicpuzzle/downloads/lpsmag.pdf}{\texttt{lpsmag.pdf}}.
+
+\section{Examples \& Solutions}
+You\IfFileExists{qrcode.png}{\marginnote{\href{https://bitbucket.org/kleberj/logicpuzzle/}{\includegraphics[height=2cm]{qrcode.png}}}[-28pt]}{} can download application examples and their solutions from the \href{https://bitbucket.org/kleberj/logicpuzzle/}{project page} \cite{bib:web:logigpuzzle}.
+
+{
+\clearpage
+\raggedright
+\nocite{*}
+\bibliography{lpsudoku}
+\addcontentsline{toc}{section}{\refname}
+}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku_README b/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku_README
new file mode 100644
index 00000000000..4e325733fd2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/lpsudoku/lpsudoku_README
@@ -0,0 +1,2 @@
+The package enables the user to typeset Sudoku logic puzzles
+Fill each row and column with numbers from 1 to 9. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt
index da7a6466e6b..c75cb918614 100644
--- a/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt
@@ -8,8 +8,14 @@ battleship.sty
bokkusu.sty
chaossudoku.sty
hakyuu.sty
+lpsudoku.sty
skyline.sty
+-- bash scripts --
+
+createlpsudoku
+lpsmag
+
-- Documentation --
battleship.pdf
@@ -20,6 +26,8 @@ chaossudoku.pdf
chaossudoku.tex
hakyuu.pdf
hakyuu.tex
+lpsudoku.pdf
+lpsudoku.tex
skyline.pdf
skyline.tex
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/createlpsudoku b/Master/texmf-dist/tex/latex/logicpuzzle/createlpsudoku
new file mode 100644
index 00000000000..7738198e33a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/logicpuzzle/createlpsudoku
@@ -0,0 +1,91 @@
+#!/bin/bash
+#
+# createlpsudoku [options] [-o output] -i input
+#
+# transforms Sudokus in 81 format (-e) or Simple Sudoku format (-s)
+# into lpsudoku environments for lpsudoku.sty
+#
+# License: LPPL
+#
+FORMAT="81"
+VERSION="v1.1"
+LINEENDINGS="UNIX"
+IFILE=""
+OFILE=""
+#
+typeset -i SLBEGIN=1
+typeset -i SLEND=9
+typeset -i COUNT=9
+#
+while getopts "eshwvi:o:" FLAG
+do
+ case "$FLAG" in
+ e) FORMAT="81";;
+ s) FORMAT="ss";;
+ w) LINEENDINGS="WINDOWS";;
+ i) IFILE="$OPTARG";;
+ o) OFILE="$OPTARG";;
+ h) echo "`basename $0` [options] [-o output] -i input"; exit 0;;
+ v) echo "`basename $0` $VERSION (C) 2013 Josef Kleber"; exit 0;;
+ esac
+done
+#
+if [ -z "$IFILE" ]
+then
+ echo "no input file"
+ echo "Usage: `basename $0` [options] [-o output] -i input"
+ exit 1
+fi
+#
+if [ ! -e "$IFILE" ]
+then
+ echo "ERROR: input file $IFILE does not exist"
+ exit 1
+fi
+#
+if [ -n "$OFILE" ]
+then
+ exec 1> $OFILE
+fi
+#
+if [ "$FORMAT" = "ss" ]
+then
+ echo "\begin{lpsudoku}"
+ for SDLINE in `cat $IFILE | sed -e '1d' -e'5d' -e'9d' -e'13,200d' | sed -e 's/|//g' | sed -e's/^[[:space:]]//g'`
+ do
+ ROWARG=`echo $SDLINE | sed -e's/\./{},/g' -e's/\([[:digit:]]\)/\1,/g' | sed -e's/,$//'`
+ echo " \setrow{$COUNT}{$ROWARG}"
+ ((COUNT--))
+ done
+ echo "\end{lpsudoku}"
+ echo
+fi
+#
+if [ "$FORMAT" = "81" ]
+then
+ for SUDOKU in `cat $IFILE | sed -e's/#.*//'`
+ do
+ echo "\begin{lpsudoku}"
+ while [ $COUNT -gt 0 ]
+ do
+ SDLINE=`echo $SUDOKU | cut -c${SLBEGIN}-${SLEND}`
+ ROWARG=`echo $SDLINE | sed -e's/\./{},/g' -e's/\([[:digit:]]\)/\1,/g' | sed -e's/,$//'`
+ echo " \setrow{$COUNT}{$ROWARG}"
+ ((COUNT--))
+ ((SLBEGIN+=9))
+ ((SLEND+=9))
+ done
+ SLBEGIN=1
+ SLEND=9
+ COUNT=9
+ echo "\end{lpsudoku}"
+ echo
+ done
+fi
+#
+if [ -n "$OFILE" -a "$LINEENDINGS" = "WINDOWS" ]
+then
+ unix2dos -q $OFILE
+fi
+#
+exit 0 \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpsmag b/Master/texmf-dist/tex/latex/logicpuzzle/lpsmag
new file mode 100644
index 00000000000..9e7725b1b47
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/logicpuzzle/lpsmag
@@ -0,0 +1,175 @@
+#!/bin/bash
+#
+# lpsmag CONFIGFILE
+#
+# creates a LaTeX file for the production
+# a Sudoku magazine with lpsudoku.sty
+#
+# License: LPPL
+#
+CONFIGFILE="$1"
+TEXFILE="lpsmag.tex"
+TEXFILEBAK="${TEXFILE}.bak"
+typeset -i COUNT=0
+SUDOKUPP="6"
+SUDOKUPPD="12"
+#
+if [ -z "$CONFIGFILE" ]
+then
+ echo "no config file"
+ echo "Usage: `basename $0` configfile"
+ exit 1
+fi
+#
+exec 1> $TEXFILE
+#
+startpuzzles()
+{
+ echo "\lpsudokusetup{scale=0.75,width=6.8cm,fontsize=Large,cvoffset=-24pt}"
+ echo "\setpuzzlecounter{1}"
+}
+#
+startsolutions()
+{
+ echo "\lpsudokusetup{scale=0.5,width=4.6cm,fontsize=normalsize}"
+ echo "\setpuzzlecounter{1}"
+}
+#
+page()
+{
+ local name="$1"
+ local difficulty="$2"
+ qqwing --generate $SUDOKUPP --one-line --difficulty $difficulty >${name}.81
+ cat ${name}.81 | qqwing --solve --one-line >${name}_sol.81
+}
+#
+typesetpage()
+{
+ local name="$1"
+ local last="$2"
+ local puzzlenummer="uneven"
+ COUNT=0
+ echo "%startpage"
+ for puzzle in `cat ${name}.81`
+ do
+ ((COUNT++))
+ echo $puzzle >puzzle.81
+ createlpsudoku -i puzzle.81
+ if [ "$puzzlenummer" = "uneven" ]
+ then
+ echo "\hfill"
+ # toggle even/uneven
+ puzzlenummer="even"
+ else
+ # no \vfill after last lpsudoku
+ # environment of the page
+ if [ $COUNT -lt $SUDOKUPP ]
+ then
+ echo "\vfill"
+ else
+ if [ "$last" != "last" ]
+ then
+ echo "\clearpage"
+ fi
+ fi
+ puzzlenummer="uneven"
+ fi
+ done
+}
+#
+tspfor()
+{
+ local name="$1"
+ local last="$2"
+ local puzzlepos="one"
+ for puzzle in `cat ${name}.81`
+ do
+ ((COUNT++))
+ if [ $COUNT -eq 1 -o $COUNT -eq 7 ]
+ then
+ echo "%startpage"
+ fi
+ echo $puzzle >puzzle.81
+ createlpsudoku -i puzzle.81
+ if [ "$puzzlepos" = "one" ]
+ then
+ echo "\hfill"
+ puzzlepos="two"
+ elif [ "$puzzlepos" = "two" ]
+ then
+ echo "\hfill"
+ puzzlepos="three"
+ else
+ if [ $COUNT -lt $SUDOKUPPD ]
+ then
+ echo "\vfill"
+ puzzlepos="one"
+ else
+ if [ "$last" = "last" ]
+ then
+ puzzlepos="one"
+ else
+ echo "\clearpage"
+ puzzlepos="one"
+ fi
+ fi
+ fi
+ done
+}
+#
+typesetsolpage()
+{
+ local name1="$1_sol"
+ local name2="$2_sol"
+ local last="$3"
+ COUNT=0
+ tspfor $name1 $last
+ tspfor $name2 $last
+}
+#
+addcounterstyle()
+{
+ grep -ne'startpage' $TEXFILE | cut -d':' -f1 >csl.tmp
+ for linenumber in `cat csl.tmp`
+ do
+ COUNT="$linenumber"
+ ((COUNT++))
+ echo "$COUNT a [counterstyle=left]" >>sed.tmp
+ echo "$linenumber d" >>sed.tmp
+ done
+ sed -f sed.tmp $TEXFILE >$TEXFILEBAK
+ rm $TEXFILE
+ mv $TEXFILEBAK $TEXFILE
+}
+#
+addpercent()
+{
+ sed -e's/$/%/' $TEXFILE >$TEXFILEBAK
+ rm $TEXFILE
+ mv $TEXFILEBAK $TEXFILE
+}
+#
+deleteauxfiles()
+{
+ rm *.81
+ rm *.tmp
+}
+#
+cat >preamble.tmp <<EOF
+\documentclass[a4paper]{article}%
+\usepackage[bottom=3cm,top=3cm,left=2.7cm,right=2.7cm]{geometry}
+\usepackage[width=5cm,scale=0.55,fontsize=normalsize]{lpsudoku}%
+EOF
+#
+cat preamble.tmp
+echo "\begin{document}"
+#
+. $CONFIGFILE
+#
+echo "\end{document}"
+#
+addcounterstyle
+addpercent
+deleteauxfiles
+exit 0
+# \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty b/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty
new file mode 100644
index 00000000000..dfc892e468e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/logicpuzzle/lpsudoku.sty
@@ -0,0 +1,213 @@
+%%
+%% 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{lpsudoku}[2013/03/22 lpsudoku.sty v1.0 - Josef Kleber (C) 2013]%
+%
+\RequirePackage{logicpuzzle}%
+%
+% options
+\newcommand*\LP@SDK@width{9.1cm}%
+\newcommand*\LP@SDK@fontsize\Large%
+\newcommand*\LP@SDK@rows{9}%
+\newcommand*\LP@SDK@columns{9}%
+\newcommand*\LP@SDK@scale{1}%
+\newcommand*\LP@SDK@bgcolor{}%
+\newcommand*\LP@SDK@cvoffset{-24pt}%
+\newcommand*\LP@SDK@title{}%
+\newcommand*\LP@SDK@titleindent{0cm}%
+\newcommand*\LP@SDK@titlewidth{9.1cm}%
+%
+\newcounter{LP@SDK@rows}%
+\newcounter{LP@SDK@columns}%
+%
+\setcounter{LP@SDK@rows}{\LP@SDK@rows}%
+\setcounter{LP@SDK@columns}{\LP@SDK@columns}%
+\stepcounter{LP@SDK@rows}%
+\stepcounter{LP@SDK@columns}%
+%
+\define@key{lpsudoku.sty}{scale}[1]%
+{%
+ \renewcommand*\LP@SDK@scale{#1}%
+}%
+%
+\define@key{lpsudoku.sty}{counterstyle}[none]%
+{%
+ \renewcommand*\LP@counterstyle{#1}%
+}%
+%
+\define@key{lpsudoku.sty}{bgcolor}[]%
+{%
+ \renewcommand*\LP@SDK@bgcolor{#1}%
+}%
+%
+\define@choicekey*{lpsudoku.sty}{fontsize}[\LP@SDK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]%
+{%
+ \ifcase\nr\relax%
+ \renewcommand*\LP@SDK@fontsize{\tiny}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\scriptsize}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\footnotesize}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\small}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\normalsize}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\large}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\Large}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\LARGE}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\huge}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\Huge}%
+ \fi%
+}%
+%
+\define@key{lpsudoku.sty}{width}[9.1cm]%
+{%
+ \renewcommand*\LP@SDK@width{#1}%
+}%
+%
+\define@key{lpsudoku.sty}{title}[]%
+{%
+ \renewcommand*\LP@SDK@title{#1}%
+}%
+%
+\define@key{lpsudoku.sty}{cvoffset}[-24pt]%
+{%
+ \renewcommand*\LP@SDK@cvoffset{#1}%
+}%
+%
+\define@key{lpsudoku.sty}{titleindent}[0cm]%
+{%
+ \renewcommand*\LP@SDK@titleindent{#1}%
+}%
+%
+\define@key{lpsudoku.sty}{titlewidth}[9.1cm]%
+{%
+ \renewcommand*\LP@SDK@titlewidth{#1}%
+}%
+%
+\define@key{lpsudoku}{scale}%
+{%
+ \renewcommand*\LP@SDK@scale{#1}%
+}%
+%
+\define@key{lpsudoku}{bgcolor}%
+{%
+ \renewcommand*\LP@SDK@bgcolor{#1}%
+}%
+%
+\define@key{lpsudoku}{counterstyle}%
+{%
+ \renewcommand*\LP@counterstyle{#1}%
+}%
+%
+\define@choicekey*{lpsudoku}{fontsize}[\LP@SDK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]%
+{%
+ \ifcase\nr\relax%
+ \renewcommand*\LP@SDK@fontsize{\tiny}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\scriptsize}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\footnotesize}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\small}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\normalsize}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\large}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\Large}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\LARGE}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\huge}%
+ \or%
+ \renewcommand*\LP@SDK@fontsize{\Huge}%
+ \fi%
+}%
+%
+\define@key{lpsudoku}{width}%
+{%
+ \renewcommand*\LP@SDK@width{#1}%
+}%
+%
+\define@key{lpsudoku}{title}%
+{%
+ \renewcommand*\LP@SDK@title{#1}%
+}%
+%
+\define@key{lpsudoku}{cvoffset}%
+{%
+ \renewcommand*\LP@SDK@cvoffset{#1}%
+}%
+%
+\define@key{lpsudoku}{titleindent}%
+{%
+ \renewcommand*\LP@SDK@titleindent{#1}%
+}%
+%
+\define@key{lpsudoku}{titlewidth}%
+{%
+ \renewcommand*\LP@SDK@titlewidth{#1}%
+}%
+%
+\ExecuteOptionsX{width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}%
+%
+\ProcessOptionsX\relax%
+%
+\let\lpsudokucell\setcell%
+%
+\newcommand*\lpsudokusetup[1]%
+{%
+ \setkeys{lpsudoku.sty}{#1}%
+}%
+%
+\newenvironment{lpsudoku}[1][]%
+{%
+ \setkeys{lpsudoku}{#1}%
+ \LP@set@package{lpsudoku}%
+ \LP@set@env@prefix{LP@SDK}%
+ \setcounter{LP@SDK@rows}{\LP@SDK@rows}%
+ \setcounter{LP@SDK@columns}{\LP@SDK@columns}%
+ \stepcounter{LP@SDK@rows}%
+ \stepcounter{LP@SDK@columns}%
+ \begin{minipage}[t]{\LP@SDK@width}%
+ \ifthenelse{\equal{\LP@SDK@title}{}}%
+ {\par\enspace\par}% empty
+ {\enspace\par\noindent\hspace{\LP@SDK@titleindent}\parbox{\LP@SDK@titlewidth}{\strut\LP@titleformat\LP@SDK@title}\vspace{3mm}\par}%
+ \begin{tikzpicture}[scale=\LP@SDK@scale]%
+ \LP@drawbackground{1}{1}{\LP@SDK@columns}{\LP@SDK@rows}{\LP@SDK@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@SDK@columns}{\LP@SDK@rows}{1cm}%
+ \LP@drawsudokugrid%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@counterstyle}%
+ \stepcounter{LP@puzzlecounter}%
+ \end{minipage}%
+}%
+%
+\endinput% \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/simple.smc b/Master/texmf-dist/tex/latex/logicpuzzle/simple.smc
new file mode 100644
index 00000000000..0ec2d162199
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/logicpuzzle/simple.smc
@@ -0,0 +1,7 @@
+page p1 easy
+page p2 easy
+startpuzzles
+typesetpage p1
+typesetpage p2
+startsolutions
+typesetsolpage p1 p2 last \ No newline at end of file