Wiki

Clone wiki

logicpuzzle / Hitori

Hitori

The environment enables the user to typeset Hitori logic puzzles Black out some cells according to these specifications: In each row and each column a number may only occur once or can be completely blackened. The blackened cells can touch neither horizontal nor vertical. All non blackened cells must remain connected. Each number has its own color, which otherwise has no meaning. Here’s a little self-explanatory example:

Hitori

#!latex

\begin{center}
  \begin{hitori}
    \framepuzzle
    \setcolorrow{5}{2,4,2,1,1}
    \setcolorrow{4}{1,3,2,4,1}
    \setcolorrow{3}{1,3,3,3,2}
    \setcolorrow{2}{4,2,1,3,3}
    \setcolorrow{1}{4,1,2,2,3}
  \end{hitori}
  \hspace{1.5cm}
  \begin{hitori}
    \framepuzzle
    \setcolorrow{5}{2,4,0,1,0}
    \setcolorrow{4}{0,3,2,4,1}
    \setcolorrow{3}{1,0,3,0,2}
    \setcolorrow{2}{4,2,1,3,0}
    \setcolorrow{1}{0,1,0,2,3}
  \end{hitori}
\end{center}

You will find the current release in the Downloads tab and on CTAN.

Documentation (PDF)(Wiki)

Examples & Solutions (PDF)


[Home]

Updated