% One-page environment chooser.
\section{The Choice of Layout}\label{ch:chooser}

When you sit down to typeset a tensor network, your very first design
decision is to select the right environment.  A simple yet profound principle
will guide you: \textbf{choose from topology, not appearance.}

\medskip
{\small
\noindent
\begin{tabularx}{\linewidth}{@{}
  >{\raggedright\arraybackslash}p{24mm}
  >{\raggedright\arraybackslash}p{39mm}
  >{\raggedright\arraybackslash}X@{}}
\toprule
Layout & Use it when & Recognition test \\
\midrule
\tnenv{tenkz} & The picture is a tensor network with regular contractions. &
Rows are layers, columns are lattice sites, and neighbouring nodes contract. \\
\bottomrule
\end{tabularx}
}
\medskip

In \pkg{}, the overwhelming majority of diagrams in quantum many-body physics
begin with \tnenv{tenkz}.  A one-dimensional Matrix Product State (MPS), a
Matrix Product Operator (MPO), a two-dimensional Projected Entangled Pair State
(PEPS), or a double-layer norm network is not a separate, ad-hoc layout: each
is simply a \tnenv{tenkz} picture equipped with an appropriate frame---such as
the default 1D chain, the convenient \tnkey{lattice=} and \tnkey{planes} options
for 2D quantum lattices, or a declared geometric basis for oblique projections.

\paragraph{Resist changing layouts for style.}
It is often tempting to switch environments whenever a diagram looks slightly
different, but remember that the layout establishes the shared metric, node
skins, semantic roles, labels, and contraction policies across every figure in
your paper.  An MPS chain does not cease to be an MPS merely because
it runs vertically on the page!  Choose the layout that reflects the underlying
physical contraction geometry, and then declare your stylistic preferences
through its public keys.

\paragraph{When none fits.}
What should you do if you encounter a diagram that seems to defy the standard
grammar?  Before reaching for raw TikZ drawing commands or inventing ad-hoc
syntax, pause to identify the missing mathematical class.  In the \pkg{} design
philosophy, a new key requires at least three independent, manifested consumers
in the literature, while a new command requires a genuinely new grammatical
class.  Until an extension clears that gate, treat the need as a capability
request, rather than burying uncanonical drawing hacks inside your document.
