multi-sudoku
============

Version: 1.00 (2025/7/31)
Author: Luis F. Bartolo Alegre
Email: l.bartolo@campus.lmu.de
License: LaTeX project public license (LPPL), version 1.3c


Description
-----------
The multi-sudoku package provides tools to typeset Sudoku grids of various sizes in LaTeX.
Unlike typical Sudoku packages limited to the standard 9×9 grid, multi-sudoku supports multiple sizes 
ranging from 1×1 up to 49×49 grids.

Grids are created using the sudoku environment, which is based on LaTeX's native tabular environment.
The package allows easy manual entry of grid values using standard tabular syntax, with intuitive options 
to control grid size, cell dimensions, font size, and grid line thickness.


Key Features
------------
- Supports Sudoku grid sizes: 1×1, 2×2, 4×4, 9×9, 16×16, 25×25, 36×36, 49×49.
- Manual entry of Sudoku values using familiar tabular commands.
- Customisable grid size, cell length, font size, and grid line thickness.
- Lightweight: no external drawing packages (e.g., TikZ) required.
- Compatible with plain LaTeX workflows.


Requirements
------------
- LaTeX engine with the following packages installed:
  pgfkeys, array, xparse, calc, kvoptions, ifthen.
- These packages are commonly included in major LaTeX distributions like TeX Live and MiKTeX.


Installation
------------
Copy the file `multi-sudoku.sty` to a directory where LaTeX can find it,
for example your project folder or your local texmf tree.


Usage
-----
Load the package in your document preamble with:

  \usepackage{multi-sudoku}

The package loads with default options suitable for a 9×9 Sudoku grid:

  \usepackage[
    size=9x9,
    length=1.5em,
    thickness=1.5pt,
    fontsize=\small
  ]{multi-sudoku}

Options:
- size: grid size (e.g., 4x4, 16x16). Default is 9x9.
- length: length of each cell's side. Default is 1.5em.
- thickness: thickness of grid lines, especially subgrid borders. Default is 1.5pt.
- fontsize: font size inside grid cells. Default is \small.

To typeset a Sudoku grid, use the sudoku environment:

Example (blank 9x9 grid snippet):

\begin{sudoku}
  5 &   &   &   & 7 &   &   &   & 9 \nl
    &   & 3 &   &   &   & 1 &   &   \nl
    & 1 &   & 9 &   &   &   & 6 &   \NL
    ...
\end{sudoku}

Commands:
- \nl inserts a new row with a standard horizontal line.
- \NL inserts a new row preceded by a thicker horizontal line (for subgrid separation).

You may override global options locally by passing key-value options to the sudoku environment:

\begin{sudoku}[size=4x4, length=3em, thickness=1pt, fontsize=\large]
 ...
\end{sudoku}


Supported Sizes
---------------
- 1x1 (trivial single cell)
- 2x2 (pseudo-Sudoku)
- 4x4
- 9x9 (standard Sudoku)
- 16x16
- 25x25
- 36x36
- 49x49

Attempting to use unsupported sizes will cause an error.


Compatibility
-------------
- Relies on pgfkeys, array, xparse, kvoptions, ifthen.
- May conflict with other Sudoku or tabular-altering packages.
- Uses predefined column layouts and custom column types S and T. Avoid redefining these.
- Cell content should be text or math enclosed in math mode.


Support and Contact
-------------------
Please report bugs or suggestions to: l.bartolo@campus.lmu.de

Happy puzzling!