# logicpuzzle

A LaTeX style file for typesetting logic puzzles

### Sidebar

CTAN

Bitbucket

jkLaTeX

TeXdoku

——

The TeX community aggregator

Impressum / Datenschutzerklärung

tentsandtrees

# Tents and Trees

The environment enables the user to typeset Tents and Trees logic puzzles (aka Zeltlager, Zeltplatz, Camping, ...). Draw tents in the grid. Next to each tree, a tent must be entered in a horizontally or vertically adjacent cell, which is associated with this tree. The numbers next to the grid indicate the quantity of tents in each row or column. No tent can stand directly next to another one, not even diagonally. Here’s a little self-explanatory example:

\begin{center}
\begin{tentsandtrees}
\framepuzzle
\tentH{1,2,1,1,2}
\tentV{2,0,2,0,3}
\setrow{4}{\Tree,{},\Tree,\Tree,\Tree}
\setrow{2}{{},\Tree}
\setrow{1}{\Tree,{},{},\Tree}
\end{tentsandtrees}
\hspace{1.5cm}
\begin{tentsandtrees}
\framepuzzle
\tentH{1,2,1,1,2}
\tentV{2,0,2,0,3}
\setrow{5}{\Tent,{},\Tent,{},\Tent,}
\setrow{4}{\Tree,{},\Tree,\Tree,\Tree}
\setrow{3}{{},\Tent,{},\Tent}
\setrow{2}{{},\Tree}
\setrow{1}{\Tree,\Tent,{},\Tree,\Tent}
\end{tentsandtrees}
\end{center}

tentsandtrees.txt · Last modified: 2015/09/06 09:52 (external edit)