# in-cell newlines (in tabular environments)?

I'm working on a table containing multi-line cells and I wonder if the following concept is supported by LaTeX.

The concept itself is simple: allow a cell to span multiple lines by increasing the line height (similar to how it works in Office suites when you press Ctrl-Enter or Alt-Enter to wrap the current cell). Using \\ doesn't work as it causes LaTeX to go to the next table row.

Thus what would be required is an equivalent of \\ which is scoped to a table cell. Is this implemented already (I suppose not in LaTeX, but perhaps there are packages)?

I realize that the same can be achieved with \multirow, but I don't find that approach very user-friendly.

-

Sure, just use \newline instead of \\:

\documentclass{article}
\begin{document}
\begin{tabular}{|p{5cm}|p{5cm}|}
\hline
foo & foo \\
\hline
line\newline break & another \newline break \\
\hline
\end{tabular}
\end{document}

-
Only works if you use p and specify the size of the (of all?!) column(s) – Nils Mar 9 '11 at 11:18
Or \linebreak which has the advantage to give the correct alignment when \centering or \raggedleft is used in the column. – Ulrike Fischer Apr 16 '11 at 14:09