When Knuth came up with the catcode table, he dedicated the character &
to catcode 4, the alignment tab. It happens rarely that people change these default catcodes and I guess most users have accustomed themselves to typesetting tabulated material by denoting the alignment points with &
. Plain TeX users type
\halign{\hfil#\hfil&\hfil#\hfil\cr
A & B \cr
C & D \cr
}
\bye
and LaTeX users enjoy the simplified `tabular interface
\documentclass{article}
\begin{document}
\begin{tabular}{cc}
A & B \\
C & D \\
\end{tabular}
\end{document}
but in ConTeXt MkIV one has
\starttext
\starttabulate[|c|c|]
\NC A \NC B \NR
\NC C \NC D \NR
\stoptabulate
\stoptext
I wonder why, because \NC..\NR
are more tokens to type than &..\cr
, especially with that redundant \NC
in the beginning of the line and it makes, in my opinion, the source less readable. I also noticed that &
has catcode 12 (other) in a ConTeXt document.
But, everything is there for a reason, so the question is: Why does ConTeXt choose to use \NC..\NR
instead of &..\cr
and why is the catcode of &
12?
&
to be used to produce&
and it gives far more flexibility in controlling tabular layouts (just as latex uses\\
avoiding the primitive\cr
to end rows.misplaced alignment tab character
errors? Perhaps this blog post by Aditya is of interest: randomdeterminism.wordpress.com/2011/09/04/…&
was more like an\otimes
), and with rather severe limitations on memory knuth was trying to be as efficient as possible in that respect. even so, the input was head and shoulders above other existing alternatives. unless you used the earlier systems, you won't appreciate that.