Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

strange error using tabular

170 views
Skip to first unread message

wil

unread,
Oct 20, 2008, 1:35:36 AM10/20/08
to
Hi folks,

For the following simple latex file:

\documentclass{article}
\usepackage{array}
\begin{document}
\begin{tabular}{l p{6cm}}
[1] & abc \\
[2] & def
\end{tabular}
\end{document}

I cannot compile it successfully, and got the following error

! Illegal unit of measure (pt inserted).
<to be read again>
>
l.8 [2]
& def
?
! Illegal unit of measure (pt inserted).
<to be read again>
\advance
l.8 [2]
& def
?

Apparently, the item "[2]" somehow is interpreted as a length or
something. I can't figure it what is wrong with the table. Any idea?

Thanks a lot for your help.

wil.


François Patte

unread,
Oct 20, 2008, 2:36:39 AM10/20/08
to
Le 20.10.2008 07:35, wil a écrit :
> Hi folks,
>
> For the following simple latex file:
>
> \documentclass{article}
> \usepackage{array}
> \begin{document}
> \begin{tabular}{l p{6cm}}
> [1] & abc \\
> [2] & def

Last lines are the culprit because latex reads as if it was:

[1] & abc \\[2]

which means newline +2units space and as the units are not there it
complains. Change to:

[1] & abc \\\relax
[2] & def


--
François Patte
Université Paris Descartes

wil

unread,
Oct 20, 2008, 6:38:24 AM10/20/08
to

Thanks François


On Oct 20, 2:36 am, François Patte

0 new messages