Wiki

Clone wiki

logicpuzzle / 2D-Sudoku

2D-Sudoku

The environment enables the user to typeset 2d-Sudoku logic puzzles (aka Magiequadrat, Diagon, ...). Fill every row, every column and each of the two diagonals – if indicated – with numbers from 1 to SIZE of the grid. Here’s a little self-explanatory example:

2D-Sudoku

#!latex

\begin{center}
  \begin{ddsudoku}
    \framepuzzle
    \filldiagonals[orange!50]
    \ddsudokucell{1}{5}{1}
    \ddsudokucell{1}{4}{3}
    \ddsudokucell{2}{3}{4}
    \ddsudokucell{4}{1}{3}
    \ddsudokucell{4}{3}{2}
    \ddsudokucell{5}{4}{4}
  \end{ddsudoku}
  \hspace{1,5cm}
  \begin{ddsudoku}
    \framepuzzle
    \filldiagonals[orange!50]
    \setrow{5}{1,3,4,5,2}
    \setrow{4}{3,2,5,1,4}
    \setrow{3}{5,4,3,2,1}
    \setrow{2}{2,5,1,4,3}
    \setrow{1}{4,1,2,3,5}
  \end{ddsudoku}
\end{center}

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

Documentation (PDF)(Wiki)

Examples & Solutions (PDF)


[Home]

Updated