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

latex table and new lines

265 views
Skip to first unread message

Luca Ferrari

unread,
Aug 12, 2002, 8:58:37 AM8/12/02
to
Hi,
I'm new to LaTex and my problem is related to the tables: when I create a
table with two coloumns and in one of these write a long text Latex never
goes to ne line so that the table is cutted. In other words Latex writes
all the text on a single line. I've tried to insert the '\\' into the
coloumn text but it's not what I want. Ho can I force Latex to automatic
new lines?
Thanks.


--
Luca Ferrari,
fluc...@libero.it

Wald

unread,
Aug 12, 2002, 9:16:28 AM8/12/02
to

"Luca Ferrari" <fluc...@libero.it> wrote in message
news:1iO59.59582$lu5.1...@twister1.libero.it...

> Hi,
> I'm new to LaTex and my problem is related to the tables: when I create a
> table with two coloumns and in one of these write a long text Latex never
> goes to ne line so that the table is cutted.

You can specify the column to be of p-type (fixed width, justified). Like
this:

begin{tabular}{p{5cm} p{5cm}}
very very very very very very very very very very very very very very very
very long text & just a bit more
\end{tabular}

> In other words Latex writes
> all the text on a single line. I've tried to insert the '\\' into the
> coloumn text but it's not what I want.

\\ in a tabular environment has a different meaning, it ends a table row.
\newline does what you intend to do.

Regards,
Wald


Lars Madsen

unread,
Aug 12, 2002, 10:12:58 AM8/12/02
to
Luca Ferrari wrote:

\begin{tabular}{cp{5cm}}
....
\end{tabular}

now the 2. column will have a width of 5cm and it will break the line
acordingly

--

/daleif
F2.10 - Institut for Matematiske Fag, Matematisk Afdeling
Århus Universitet

Martin Schulze

unread,
Aug 12, 2002, 12:28:02 PM8/12/02
to
> when I create a
> table with two coloumns and in one of these write a long text Latex never
> goes to ne line so that the table is cutted. In other words Latex writes
> all the text on a single line.

c, l, and r are no-line-break-columns. Use p{...} if you want lines to
be broken. Use package ltablex if you want LaTeX to calculate column
widths.

Martin

Martin Schulze

unread,
Aug 12, 2002, 1:12:33 PM8/12/02
to
> when I create a table with two coloumns and in one of these write a
> long text Latex never goes to ne line so that the table is cutted. In
> other words Latex writes all the text on a single line.

c, l, and r are no-line-break-columns. Use p{...} if you want lines to

Martin Schulze

unread,
Aug 12, 2002, 2:35:01 PM8/12/02
to
> when I create a table with two coloumns and in one of these write a
> long text Latex never goes to ne line so that the table is cutted. In
> other words Latex writes all the text on a single line.

c, l, and r are no-line-break-columns. Use p{...} if you want lines to

Peter Wilson

unread,
Aug 12, 2002, 3:32:55 PM8/12/02
to

"Luca Ferrari" <fluc...@libero.it> wrote in message
news:1iO59.59582$lu5.1...@twister1.libero.it...

You have to specify a fixed width column (using the p{width} specifier)
otherwise LaTeX doesn't know where to break long lines.

Peter W.


0 new messages