summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/logicpuzzle
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-02 00:08:06 +0000
committerKarl Berry <karl@freefriends.org>2013-03-02 00:08:06 +0000
commit4f2468f5b9802ecb8d04a49657a9343139044d2a (patch)
treeb87f5f4b6a0b77d8d2c0275fc3530414488ccbf8 /Master/texmf-dist/doc/latex/logicpuzzle
parent0e7c6bce26ca4d5e7110de22ca0681a5a50196c6 (diff)
logicpuzzle (1mar13)
git-svn-id: svn://tug.org/texlive/trunk@29255 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/logicpuzzle')
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/CHANGES62
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/INSTALL15
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/README17
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdfbin0 -> 80255 bytes
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex275
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship_README5
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdfbin0 -> 77758 bytes
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex262
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README6
-rw-r--r--Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt23
10 files changed, 665 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES
new file mode 100644
index 00000000000..b74f78dfd9d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/CHANGES
@@ -0,0 +1,62 @@
+== Logicpuzzle bundel (v1.3) ==
+
+-- bokkusu.sty (v1.0) --
+
+28/02/2013 added bokkusu.sty [jk]
+
+-- battleship.sty (v1.3) --
+
+27/02/2013 added option cvoffset [jk]
+ to set indiviual vertical counter offsets
+
+-- logicpuzzle.sty (v1.3) --
+
+26/02/2013 added \LP@ingrid to \fillcell [jk]
+
+26/02/2013 added \valueH, \valueV, \sumH, \sumV, \fillcell,
+ \fillrow, \fillcolumn [jk]
+
+26/02/2013 Bugfix: mix up column and row in \setXcontents [jk]
+
+-- battleship.sty (v1.2) --
+
+19/02/2013 implemented \classicgame [jk]
+ for drawing game sheets for classic Battleship
+
+18/02/2013 implemented option title [jk]
+ -> \titleformat
+
+18/02/2013 implemented option counterstyle [jk]
+ -> \puzzlecounter, \setpuzzlecounter
+ \definecounterstyle
+
+17/02/2013 implemented option bgcolor [jk]
+
+17/02/2013 moved code base for logic puzzles into logicpuzzle.sty [jk]
+
+-- battleship.sty (v1.1) --
+
+12/02/2013 added \placewater [jk]
+ puts a water marker into the grid
+
+12/02/2013 added \placeisland [jk]
+ puts an island with random outline into the grid
+
+12/02/2013 renamed \ship -> \placesegment [jk]
+ added \let\ship\placesegment
+
+11/02/2013 implemented \placeship{direction}{column}{row}{length} [jk]
+ placement of complete ship at (column,row) in direction {V|H}
+ with length length.
+
+11/02/2013 implemented \BS@ingrid [jk]
+ checks if coordinate is in the grid
+ -> PackageError
+
+10/02/2013 added \battleshipsetup [jk]
+ for resetting global options
+
+-- battleship bundle --
+
+2013/02/09 IPO of battleship on CTAN
+
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/INSTALL b/Master/texmf-dist/doc/latex/logicpuzzle/INSTALL
new file mode 100644
index 00000000000..d9afa74b812
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/INSTALL
@@ -0,0 +1,15 @@
+ logicpuzzle.sty -- INSTALL
+==============================
+
+All the files ending with .sty have to be installed where TeX can
+find them. Please refer to your TeX distribution's manual for how
+to install additional packages.
+
+According to the TeX Directory Standard (TDS), the files should be
+installed in your local texmf/ tree as follows:
+
+-- *.sty -> localtexmf/tex/latex/logicpuzzle/
+-- *.pdf -> localtexmf/doc/latex/logicpuzzle/
+-- *.tex -> localtexmf/doc/latex/logicpuzzle/
+
+Don't forget to update your FNDB (Filename database). (see: manual) \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/README b/Master/texmf-dist/doc/latex/logicpuzzle/README
new file mode 100644
index 00000000000..3adf9fcc758
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/README
@@ -0,0 +1,17 @@
+The logicpuzzle bundle allows you to typeset various logic
+puzzles. At the moment the following puzzles are supported:
+
+* Battleship (aka Bimaru, Marinespiel, Batalla Naval, ...)
+* Bokkusu (aka Kakurasu, Feldersummenrätsel, ...)
+* more to come
+
+License: LPPL
+
+Changes in v1.3:
+
+- the logicpuzzle bundle replaces the now obsolete
+ battleship package
+
+- added support for Bokkusu puzzle
+
+- added option cvoffset to battleship.sty \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf
new file mode 100644
index 00000000000..07f2a206644
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex
new file mode 100644
index 00000000000..f9b4d0d3bcf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship.tex
@@ -0,0 +1,275 @@
+\documentclass[a4paper]{ltxdoc}%
+\usepackage[english]{babel}%
+\usepackage[latin1]{inputenc}%
+\usepackage[T1]{fontenc}%
+\usepackage{textcomp}%
+\usepackage{lmodern}%
+\usepackage{bera}%
+\usepackage{ccicons}
+\usepackage{microtype}%
+\usepackage{ltxdocext}%
+\usepackage{listings}
+\usepackage{marginnote}%
+\usepackage[svgnames,rgb]{xcolor}%
+\usepackage[automark,nouppercase]{scrpage2}
+\usepackage[width=4cm,shipcolor=Teal,scale=0.66,fontsize=large,
+sbindent=0.6cm,sbwidth=3.4cm]{battleship}%
+\usepackage{hyperref}
+%
+\setlength{\headheight}{1.1\baselineskip}%
+%
+\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,[,]}}
+\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{battleship.sty}%
+\def\XeLaTeX{Xe\LaTeX}%
+%
+\makeatletter%
+\renewcommand\tableofcontents%
+{%
+ %\section*{\contentsname}%
+ \@mkboth{%
+ \MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
+ \@starttoc{toc}%
+}%
+%
+\newcommand\styleoption{\name@idx{style option}}%
+\newcommand\stylename{\name@idx{document style}}%
+\def\name@idx#1#2{%
+ {\ttfamily#2}%
+ \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}%
+}%
+\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}%
+\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}%
+\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}%
+%
+\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}}
+%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}}
+%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}}
+\makeatother
+%
+\newenvironment{optionlist}
+{\begin{trivlist}\setlength\leftskip{2em}}
+{\end{trivlist}}
+\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3}
+%
+\setlength\parindent{0pt}%
+\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Battleship logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}%
+%
+\begin{document}
+\title{\filename}%
+\Subtitle{A style file for typesetting Battleship logic puzzles}%
+\author{Josef Kleber}
+\Fileversion{v1.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/}}}
+\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}
+ \placesegment{4}{1}{\ShipR}
+ \shipH{4,1,2,2,2}
+ \shipV{3,1,4,0,3}
+ \shipbox{3,3,2,2,1}
+ \end{battleship}
+ \hspace{1cm}
+ \begin{battleship}
+ \placeship{V}{1}{1}{3}
+ \placeship{H}{1}{5}{2}
+ \placeship{H}{3}{1}{2}
+ \placeship{H}{3}{3}{3}
+ \placeship{H}{5}{5}{1}
+ \shipH{4,1,2,2,2}
+ \shipV{3,1,4,0,3}
+ \end{battleship}
+\end{center}
+
+\bigskip
+\begin{lstlisting}
+\begin{center}
+ \begin{battleship}
+ \placesegment{4}{1}{\ShipR}
+ \shipH{4,1,2,2,2}
+ \shipV{3,1,4,0,3}
+ \shipbox{3,3,2,2,1}
+ \end{battleship}
+ \hspace{1cm}
+ \begin{battleship}
+ \placeship{V}{1}{1}{3}
+ \placeship{H}{1}{5}{2}
+ \placeship{H}{3}{1}{2}
+ \placeship{H}{3}{3}{3}
+ \placeship{H}{5}{5}{1}
+ \shipH{4,1,2,2,2}
+ \shipV{3,1,4,0,3}
+ \end{battleship}
+\end{center}
+\end{lstlisting}
+\clearpage
+\section{Options}
+\begin{optionlist}
+ \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.}
+ \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid.}
+ \optitem{shipcolor}{green}{sets the color of the ship segments.}
+ \optitem{\styleoption{width}}{6cm}{sets the width of the minipage, in which the grid is typeset.}
+ \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.}
+ \optitem{\styleoption{fontsize}}{Large}{specifies the size of the numbers next to the grid. Here, the usual \LaTeX\ sizes are used. Possible values: \texttt{tiny}, \texttt{scriptsize}, \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}, \texttt{large}, \underline{\texttt{Large}}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}}
+ \optitem{\styleoption{title}}{}{sets the title of a puzzle.}
+ \optitem{\styleoption{titleindent}}{0.75cm}{defines the indent of the title.}
+ \optitem{\styleoption{titlewidth}}{5.15cm}{specifies the width of the box the title is set in.}
+ \optitem{\styleoption{sbindent}}{0.75cm}{defines the indent of the ship box below the grid.}
+\optitem{\styleoption{sbwidth}}{5.15cm}{specifies the width of the minipage, in which the ships are typeset.}
+ \optitem{\styleoption{sbshipscale}}{1}{scales the size of the ships in the ship box.}
+ \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.}
+ \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right}
+ \optitem{\styleoption{cvoffset}}{-38pt}{sets the vertical offset of the counters in the margin.}
+\end{optionlist}
+
+\section{Environments}
+\subsection{\texttt{battleship}}
+The \env{battleship} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{battleship}\oarg{options}\\\dots\\\enve{battleship}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created that you can fill with ships using other commands.
+\section{Commands}
+\subsection{Ships, water, islands, ...}
+\subsubsection{\texttt{placeship}}
+With the command \cs{placeship}\margcs{\cmd\placeship\{\marg{direction}\}\\\{\marg{column}\}\{\marg{row}\}\{\marg{length}\}} you can place complete ships in the grid. It expects the specification of the direction as horizontal (H) or vertical (V). Furthermore, it requires the starting coordinates and the length of the ship.
+\subsubsection{\texttt{placesegment}}
+The command \cs{placesegment}\margcs{\cmd\placesegment\{\marg{column}\}\{\marg{row}\}\\\{\marg{ship segment}\}} is used for the placement of ship segments in the grid. In the mandatory argument \marg{ship segment}, you can use the following commands:
+
+\begin{center}
+\begin{tabular}{lccl}
+\cs{Ship} & \scalebox{.5}{\Ship} & \scalebox{.5}{\ShipC} & \cs{ShipC} \\
+\cs{ShipL} & \scalebox{.5}{\ShipL} & \scalebox{.5}{\ShipR} & \cs{ShipR} \\
+\cs{ShipB} & \scalebox{.5}{\ShipB} & \scalebox{.5}{\ShipT} & \cs{ShipT} \\
+\end{tabular}
+\end{center}
+\subsubsection{\texttt{ship}}
+The command \cs{ship} was replaced by the \cs{placesegment} command. The command \cs{ship} is deprecated and should not be used longer. It may still be used, but it is not recommended.
+\subsubsection{\texttt{placewater}}
+With the command \cs{placewater}\margcs{\cmd\placewater\{\marg{column}\}\{\marg{row}\}} you can place water markers ( \raisebox{2pt}{\Water} ) in the grid.
+\subsubsection{\texttt{placeisland}}
+With the command \cs{placeisland}\margcs{\cmd\placeisland\{\marg{column}\}\{\marg{row}\}} you can place islands ( \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}} ) in the grid. The island outlines are created randomly: \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}}, \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}}, \raisebox{-2pt}{\resizebox{!}{10pt}{\Island}}, ...
+\subsection{Presentation}
+\subsubsection{\texttt{shipH}}
+The command \cs{shipH}\margcs{\cmd\shipH\{\marg{csv list}\}} typesets the horizontal numbers above the grid. It expects a comma-separated list as an argument.
+\subsubsection{\texttt{shipV}}
+The command \cs{shipV}\margcs{\cmd\shipV\{\marg{csv list}\}} typesets the vertical numbers beside the grid. It also expects a comma separated list.
+\subsubsection{\texttt{shipbox}}
+The command \cs{shipbox}\margcs{\cmd\shipbox\{\marg{csv list}\}} defines the number and size of the ships, which are typeset under the grid.
+\subsubsection{\texttt{definecounterstyle}}
+The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows:
+
+\begin{lstlisting}
+\definecounterstyle{left}{
+ \begingroup\reversemarginpar\marginnote{
+ \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt,
+ draw,rounded corners=3pt,thick]
+ {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup}
+}
+\end{lstlisting}
+
+To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}.
+\subsubsection{\texttt{puzzlecounter}}
+The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle.
+\subsubsection{\texttt{titleformat}}
+With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows:
+
+\begin{lstlisting}
+\titleformat{\centering\Large\color{blue}}
+\end{lstlisting}
+\subsection{Miscellaneous}
+\subsubsection{\texttt{battleshipsetup}}
+With the command \cs{battleshipsetup}\margcs{\cmd\battleshipsetup\{\marg{options}\}} you can reset the options with global scope.
+\subsubsection{\texttt{classicgame}}
+The command \cs{classicgame}\margcs{\cmd\classicgame\{\marg{csv list}\}} typesets a game sheet for playing classic Battleship. It expects a comma separated list with the number and sizes of the ships.
+\subsubsection{\texttt{setpuzzlecounter}}
+With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions.
+\section{Examples \& Solutions}
+You\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 can also download a \href{https://bitbucket.org/kleberj/battleship/downloads/classicsheet.pdf}{game sheet} for playing the classic Battleship.
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship_README b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship_README
new file mode 100644
index 00000000000..689553021fa
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/battleship/battleship_README
@@ -0,0 +1,5 @@
+The package enables the user to typeset Battleship logic puzzles
+(aka Bimaru, Marinespiel, Batalla Naval, ...).
+You have to find the positions of ships in a grid. Numbers next
+to the grid reveal the number of ship segments in the respective
+columns and rows. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdf b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdf
new file mode 100644
index 00000000000..ce5400c6147
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex
new file mode 100644
index 00000000000..6c9d2bacebb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu.tex
@@ -0,0 +1,262 @@
+\documentclass[a4paper]{ltxdoc}%
+\usepackage[english]{babel}%
+\usepackage[latin1]{inputenc}%
+\usepackage[T1]{fontenc}%
+\usepackage{textcomp}%
+\usepackage{lmodern}%
+\usepackage{bera}%
+\usepackage{ccicons}
+\usepackage{microtype}%
+\usepackage{ltxdocext}%
+\usepackage{listings}
+\usepackage{marginnote}%
+\usepackage[svgnames,rgb]{xcolor}%
+\usepackage[automark,nouppercase]{scrpage2}
+\usepackage[width=5cm,scale=0.73,fontsize=normalsize]{bokkusu}%
+\usepackage{hyperref}
+%
+\setlength{\headheight}{1.1\baselineskip}%
+%
+\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,[,]}}
+\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{bokkusu.sty}%
+\def\XeLaTeX{Xe\LaTeX}%
+%
+\newenvironment{optionlist}
+{\begin{trivlist}\setlength\leftskip{2em}}
+{\end{trivlist}}
+\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3}
+%
+\makeatletter%
+\renewcommand\tableofcontents%
+{%
+ %\section*{\contentsname}%
+ \@mkboth{%
+ \MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
+ \@starttoc{toc}%
+}%
+%
+\newcommand\styleoption{\name@idx{style option}}%
+\newcommand\stylename{\name@idx{document style}}%
+\def\name@idx#1#2{%
+ {\ttfamily#2}%
+ \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}%
+}%
+\newcommand*\margcs[1]{\marginnote{\raggedleft\scriptsize #1}}%
+\newcommand*\package[1]{\texttt{#1}\index{#1=\string\ttt{#1}}}%
+\newcommand*\mco[1]{\mbox{\LANGLE\itshape#1\RANGLE}\index{#1, class option value}\index{class option value>#1}}%
+%
+\renewcommand\@biblabel[1]{\makebox[1.5cm][l]{[#1]}}
+%\renewcommand*\l@subsection{\@dottedtocline{2}{1.2em}{2.8em}}
+%\renewcommand*\l@subsubsection{\@dottedtocline{3}{2.4em}{3.7em}}
+\makeatother
+%
+\setlength\parindent{0pt}%
+\hypersetup{pdfauthor={Josef Kleber},pdftitle={A style file for typesetting Bokkusu logic puzzles},pdfsubject={Documentation for LaTeX style \filename}}%
+%
+\begin{document}
+\title{\filename}%
+\Subtitle{A style file for typesetting Bokkusu logic puzzles}%
+\author{Josef Kleber}
+\Fileversion{v1.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}
+
+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}
+ \valueH{1,2,3,4,5}
+ \valueV{1,2,3,4,5}
+ \sumH{7,1,11,9,6}
+ \sumV{2,12,5,13,?}
+ \end{bokkusu}
+ \hspace{1cm}
+ \begin{bokkusu}
+ \valueH{1,2,3,4,5}
+ \valueV{1,2,3,4,5}
+ \sumH{7,1,11,9,6}
+ \sumV{2,12,5,13,?}
+ \fillrow{5}{0,0,1,0,0}
+ \fillrow{4}{1,0,1,1,1}
+ \fillrow{3}{1,0,0,1,0}
+ \fillrow{2}{0,0,1,1,1}
+ \fillrow{1}{0,1,0,0,0}
+ \end{bokkusu}
+\end{center}
+
+\bigskip
+\begin{lstlisting}
+\begin{center}
+ \begin{bokkusu}
+ \valueH{1,2,3,4,5}
+ \valueV{1,2,3,4,5}
+ \sumH{7,1,11,9,6}
+ \sumV{2,12,5,13,?}
+ \end{bokkusu}
+ \hspace{1cm}
+ \begin{bokkusu}
+ \valueH{1,2,3,4,5}
+ \valueV{1,2,3,4,5}
+ \sumH{7,1,11,9,6}
+ \sumV{2,12,5,13,?}
+ \fillrow{5}{0,0,1,0,0}
+ \fillrow{4}{1,0,1,1,1}
+ \fillrow{3}{1,0,0,1,0}
+ \fillrow{2}{0,0,1,1,1}
+ \fillrow{1}{0,1,0,0,0}
+ \end{bokkusu}
+\end{center}
+\end{lstlisting}
+\clearpage
+
+\section{Options}
+\begin{optionlist}
+ \optitem{\styleoption{rows}}{5}{defines the number of rows in the grid.}
+ \optitem{\styleoption{columns}}{5}{specifies the number of columns in the grid}
+ \optitem{\styleoption{width}}{6.7cm}{sets the width of the minipage, in which the grid is typeset.}
+ \optitem{\styleoption{scale}}{1}{scales the size of the grid in the minipage.}
+ \optitem{\styleoption{fontsize}}{Large}{specifies the size of the numbers next to the grid. Here, the usual \LaTeX\ sizes are used. Possible values: \texttt{tiny}, \texttt{scriptsize}, \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}, \texttt{large}, \underline{\texttt{Large}}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}}
+ \optitem{\styleoption{title}}{}{sets the title of a puzzle.}
+ \optitem{\styleoption{titleindent}}{0.75cm}{defines the indent of the title.}
+ \optitem{\styleoption{titlewidth}}{5.85cm}{specifies the width of the box the title is set in.}
+ \optitem{\styleoption{color}}{black}{specifies the color for coloring the cells.}
+ \optitem{\styleoption{bgcolor}}{}{sets the background color of the grid.}
+ \optitem{\styleoption{counterstyle}}{none}{defines the counter style. Predefined styles: none, left, right}
+ \optitem{\styleoption{cvoffset}}{-38pt}{sets the vertical offset of the counters in the margin.}
+\end{optionlist}
+
+\section{Environments}
+\subsection{\texttt{bokkusu}}
+The \env{bokkusu} environment\marginnote{\hbadness=10000\RaggedLeft\scriptsize\envb{bokkusu}\oarg{options}\\\dots\\\enve{bokkusu}} is the central core of the style file. With the optional argument of the environment, you can reset the options with local scope. Here, a blank grid is created.
+\section{Commands}
+\subsection{In the grid and around}
+\subsubsection{\texttt{valueH}}
+The command \cs{valueH}\margcs{\cmd\valueH\{\marg{csv list}\}} typesets the numbers left to the grid indicating the values of the cells. It expects a comma-separated list as an argument.
+\subsubsection{\texttt{valueV}}
+The command \cs{valueV}\margcs{\cmd\valueV\{\marg{csv list}\}} typesets the numbers below the grid specifying the values of the cells. It also expects a comma separated list.
+\subsubsection{\texttt{sumH}}
+The command \cs{sumH}\margcs{\cmd\sumH\{\marg{csv list}\}} typesets the numbers right to the grid indicating the sums of the values of the colored cells. It expects a comma-separated list.
+\subsubsection{\texttt{sumV}}
+The command \cs{sumV}\margcs{\cmd\sumV\{\marg{csv list}\}} typesets the numbers above the grid specifying the sums of the values of the colored cells. It expects a comma separated list.
+\subsubsection{\texttt{fillcell}}
+The command \cs{fillcell}\margcs{\cmd\fillcell\{\marg{column}\}\{\marg{row}\}} fills the grid cell \marg{column}\marg{row} with the color specified with the option \styleoption{color}.
+\subsubsection{\texttt{fillrow}}
+The command \cs{fillrow}\margcs{\cmd\fillrow\{\marg{row}\}\{\marg{csv list}\}} fills a grid row. In \marg{csv list} 1 means 'fill' and 0 means 'don't fill'.
+\subsubsection{\texttt{fillcolumn}}
+The command \cs{fillcolumn}\margcs{\cmd\fillcolumn\{\marg{column}\}\{\marg{csv list}\}} fills a grid column.
+\subsection{Presentation}
+\subsubsection{\texttt{definecounterstyle}}
+The command \cs{definecounterstyle}\margcs{\cmd\definecounterstyle\{\marg{name}\}\\\{\marg{definition}\}} allows you to define your own styles. For example, the style \texttt{left} is defined as follows:
+
+\begin{lstlisting}
+\definecounterstyle{left}{
+ \begingroup\reversemarginpar\marginnote{
+ \tikz\node[shape=rectangle,fill=yellow!40,inner sep=7pt,
+ draw,rounded corners=3pt,thick]
+ {\Huge\puzzlecounter};}[\LP@cvoffset]\endgroup}
+}
+\end{lstlisting}
+
+To typeset the counter into the margin we use the command \cmd\marginnote. We need to use the command \cmd\reversemarginpar\ to set the counter into the left margin. Of course, we must use this command in a group for local scope. Finally we use \cmd\puzzlecounter\ in a \cmd\tikz\ node with a vertical offset set with the option \styleoption{cvoffset}.
+\subsubsection{\texttt{puzzlecounter}}
+The command \cs{puzzlecounter}\margcs{\cmd\puzzlecounter} provides the counter in textual form to use it for example in \cmd\definecounterstyle.
+\subsubsection{\texttt{titleformat}}
+With the command \cs{titleformat}\margcs{\cmd\titleformat\{\marg{format}\}}, you can define the format of the title. By default, the definition is as follows:
+
+\begin{lstlisting}
+\titleformat{\centering\Large\color{blue}}
+\end{lstlisting}
+\subsection{Miscellaneous}
+\subsubsection{\texttt{bokkususetup}}
+With the command \cs{bokkususetup}\margcs{\cmd\bokkususetup\{\marg{options}\}} you can reset the options with global scope.
+\subsubsection{\texttt{setpuzzlecounter}}
+With the command \cs{setpuzzlecounter}\margcs{\cmd\setpuzzlecounter\{\marg{number}\}}, you can reset the puzzle counter, for example before the solutions.
+\section{Examples \& Solutions}
+You\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/bokkusu/bokkusu_README b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README
new file mode 100644
index 00000000000..55326b59850
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/bokkusu/bokkusu_README
@@ -0,0 +1,6 @@
+The package enables the user to typeset Bokkusu logic puzzles
+(aka Kakurasu, Feldersummenrätsel, ...).
+Black out some of the grid cells. The numbers on the left and
+the bottom edge of the grid indicate the values of the cells for
+adding up. The numbers on the right and the top edge of the grid
+specify the sums of the values of the colored cells.
diff --git a/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt
new file mode 100644
index 00000000000..27f44fb963f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/logicpuzzle/manifest.txt
@@ -0,0 +1,23 @@
+This work consists of the following files:
+
+
+-- Styles --
+
+logicpuzzle.sty
+battleship.sty
+bokkusu.sty
+
+-- Documentation --
+
+battleship.pdf
+battleship.tex
+bokkusu.pdf
+bokkusu.tex
+
+-- Misc. Files --
+
+README
++ package READMEs
+manifest.txt
+INSTALL
+CHANGES \ No newline at end of file