There are several situations where TeX stacks or aligns a number of objects into
a one or two dimensional grids. In most cases, these are built upon
low-level primitives, like
\halign, and so share characteristics:
using & to separate alignment columns;
\cr to separate rows.
Yet, there are many different markup patterns and environments
used for quite different purposes from tabular text to math arrays
to composing symbols and so it is worth recognizing the intended semantics in each case,
while still processing them as TeX would.
In this chapter, we will describe some of the special complications presented by alignments and the strategies used to infer and represent the appropriate semantic structures, particularly for math.