anita@sun.udel.edu (Anita Marie Hoover) (08/15/90)
The strangest problem surfaced yesterday. Here is a simple
array that someone showed me and asked why it wasn't working. Here
is the example.
\[
\begin{array}{ccc}
[A_{1} & [B_{2}] & \\
[D_{2}] & [B_{2}] & [C_{2}]
\end{array}
\]
would get the following error
! Missing number, treated as zero.
<to be read again>
D
<argument> D
_{2}
\@argarraycr [#1]->\ifnum 0=`{\fi }${}\ifdim #1
>\z@ \@xargarraycr
{#1}\else ...
l.6 [D_{2}]
& [B_{2}] & [C_{2}]
?
Well after looking at this for too long -- I realized that the
problem was that the \\ on the previous line was trying to use
the [D_{2}] as an optional argument for \\. Of course it would
cause an error, but should LaTeX really give an error? Anyway
if you do the following the problem is solved
\[
\begin{array}{ccc}
[A_{1} & [B_{2}] & \\
~[D_{2}] & [B_{2}] & [C_{2}]
\end{array}
\]
Any comments?
Anita Hoover
University of Delaware
hironobu@sra.co.jp (Hironobu Suzuki) (08/17/90)
In article <13379@sun.udel.edu> anita@sun.udel.edu (Anita Marie Hoover) writes:
%>if you do the following the problem is solved
%>
%> \[
%> \begin{array}{ccc}
%> [A_{1} & [B_{2}] & \\
%> ~[D_{2}] & [B_{2}] & [C_{2}]
%> \end{array}
%> \]
%>
%>Any comments?
Other answers
{}[D_{2}] & [B_{2}] & [C_{2}]
\relax [D_{2}] & [B_{2}] & [C_{2}]
I often use \relax than {} or ~.
~ :see The TeXbook p91
\relax :see The TeXbook p279
--hironobu
---------------------------------------------------------
Hironobu Suzuki
Software Research Associates, Inc, Japan.
Hirakawa-cho 1-1-1
Chiyoda-ku
Tokyo Japan
E-Mail: hironobu@sra.co.jp Voice: 03-942-4444