# Magnets

The environment enables the user to typeset Magnets logic puzzles (aka Magnetplatte, Magnetfeld, ...)
Draw magnetic and neutral plates into the grid. The magnetic plates have a positive and a negative pole, neutral plates do not. The same poles must not touch neither horizontal nor vertical. Neutral plates may touch. The numbers to the left and above the grid indicate how many plus or minus poles are present in the respective column or row.

#!TeX
\begin{magnets}
\minusH{2,1,2,2,1,2}
\minusV{2,1,3,1,2,1}
\plusH{2,1,2,2,2,1}
\plusV{1,2,1,3,2,1}
\magnetsH{2/1,2/4,2/5,2/6,3/2,3/3,4/1,4/4,5/5,5/6}
\magnetsV{1/1,1/3,1/5,2/2,4/5,5/2,6/1,6/3}
\MPH{2/6}
\PMH{5/5}
\MPV{6/3}
\end{magnets}
\hspace{1.5cm}
\begin{magnets}
\minusH{2,1,2,2,1,2}
\minusV{2,1,3,1,2,1}
\plusH{2,1,2,2,2,1}
\plusV{1,2,1,3,2,1}
\MPH{2/6,3/2,4/1}
\PMH{2/5,5/5,4/4,3/3}
\MPV{1/1,1/3,6/3}
\end{magnets}


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

Documentation (PDF)

Examples & Solutions (PDF)

[Home]

Updated