# \newline not working with booktabs?

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:

\documentclass[12pt,titlepage]{article}
\RequirePackage[l2tabu,orthodox]{nag}
\usepackage[english]{babel}
\usepackage{pslatex}
\usepackage{setspace}
\setstretch{1.6}
\usepackage{booktabs}
\usepackage[final,babel]{microtype}
\usepackage[detect-all]{siunitx}
\setlist{nolistsep}
\frenchspacing

\begin{table}[htp]
\centering
\begin{tabular}{@{}l l l l@{}}
\toprule
& \textbf{Foo} & {\textbf{Bar}} & \textbf{Baz} \\
\midrule
\textbf{Single line} & foo1 foo2 & bar1 bar2 & baz1 baz2 \\
\textbf{Multiline} & foo1 \newline foo2 & bar1 \newline bar2 & baz1 \newline baz2 \\
\bottomrule
\end{tabular}
\caption {\small{bla bla}}\label{my-label}
\vspace*{-3mm}
\end{table}


-
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

Use tabular p specifier instead of l.

\documentclass{article}
\begin{document}
\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 \\
\end{tabular}
\end{document}

-
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