Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

A while ago I had a question about having multi-line strings in a table cell ( http://tex.stackexchange.com/questions/3748/in-cell-newlines-in-tabular-environments).

I remember seeing it working but I've just tried to use it again and ... \newline did nothing.

A test LaTeX source is below, which, despite the \newline commands, it did not split the cells on multiple lines:

alt text


    \begin{tabular}{@{}l l l l@{}}
           & \textbf{Foo} & {\textbf{Bar}} & \textbf{Baz} \\
            \textbf{Single line} & foo1 foo2 & bar1 bar2 & baz1 baz2 \\
            \textbf{Multiline} & foo1 \newline foo2 & bar1 \newline bar2 & baz1 \newline baz2 \\
    \caption {\small{bla bla}}\label{my-label}

Thanks in advance.

share|improve this question
Far from minimal example, and nothing to do with booktabs. –  Lev Bishop Oct 18 '10 at 3:52
I put the packages that I thought might influence it (and thought booktabs was used since it's imported). Sorry about \vspace, I missed it when editing the real table. –  wishihadabettername Oct 18 '10 at 4:08
You should have tried which of the packages influence it before posting the question... –  Jukka Suomela Oct 18 '10 at 12:21

1 Answer 1

up vote 6 down vote accepted

Use tabular p specifier instead of l.

\begin{tabular}{@{}l p{2cm}p{3cm}p{3cm}@{}}
    & \textbf{Foo} & {\textbf{Bar}} & \textbf{Baz} \\
    \textbf{Single line} & foo1 foo2 & bar1 bar2 & baz1 baz2 \\
    \textbf{Multiline} & foo1 \newline foo2 & bar1 \newline bar2 & baz1 \newline baz2 \\
share|improve this answer
it doesn't work. I had tried it before posting, I got "Missing number, treated as zero" on the line declaring the table header.My tabular declaration was \begin{tabular}{@{}p p p p@{}} –  wishihadabettername Oct 18 '10 at 4:09
The format is p{length}. Minimal example attached. –  Lev Bishop Oct 18 '10 at 4:17
Thank you, Lev. –  wishihadabettername Oct 18 '10 at 11:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.