Consider the following m(non-)we:
\documentclass{standalone}
\begin{document}
Foo & Bar
\end{document}
The build will fail with
! Misplaced alignment tab character &.
while it will generate a perfectly fine PDF when removing the &
character from the code.
Even plain TeX behaves like that and
Foo & Bar
\bye
yields the same error.
I have only ever seen &
used in tabular and array environments, never outside of it. Why is that?
Couldn't one define e.g. \tabular
and \endtabular
so that &
is only special inside the environment, and just a normal character outside of these environments?
Why does &
outside of tabular and array environments have to break the document?
To rephrase the question: WTF is an alignment tab character and where do we usually put it?
&
is a character with special code and reserved for alignment purposes, it acts a delimiter for table cells and allows for nested alignment groups. If it's not&
it must have been another symbol or macro. This is by design of TeX already. If you want the literal&
, then use\&
. See also chapter 22 of The TeXBook&
, so\starttext A & B \stoptext
works and prints "A & B". But there you have other macros for separating cells (see e.g. wiki.contextgarden.net/Tables_Overview).\&
for a printed ampersand.\def\firm{Foo & Bar}
, which would be usable outside of tabulars. What would you expect to happen if\firm
occurs within a tabular?