LaTeX and the Logic of Sectioning
In LaTeX, sections and subsections lack closing tags. So a section with a subsection followed by another section would be represented like so:
\section{A Section}
\subsection{A Subsection}
\section{Another Section}
A lack of closing tags, however, is far from being structurally innocent. Suppose, instead, we had sections and subsections represented like LaTeX environments:
\begin{section}{A Section} \begin{subsection}{A Subsection} […]