How-toOctober 30, 20266 min read

How to Add a Line Break Inside a LaTeX Table Cell

Line break in a LaTeX table cell: why double backslash ends the row, and how a p column with newline, makecell, or a nested tabular fixes it.

latextablesmakecellnewlinetabular
On this page
  1. Method 1: a p column with \newline
  2. Method 2: \makecell from the makecell package
  3. Method 3: a nested tabular
  4. A complete example you can compile
  5. FAQ
  6. Further reading

Put the cell in a p{width} column and use \newline, wrap the text in \makecell{first\\ second} from the makecell package, or nest a small tabular inside the cell. A plain \\ does not work in a normal cell because inside a table it ends the row, not the line.

Inside tabular, \\ marks the end of a row. Typing First line\\ Second line in a cell therefore finishes the row after "First line" and puts "Second line" in the first column of the next row. To get a break inside the cell you need a method that ends the line but not the row.

Method 1: a p column with \newline

Declare the column as p{4cm} (a top-aligned paragraph column with a fixed width) and put \newline where the break should go. The text also wraps by itself at the column width, so this suits descriptions and notes.

Method 2: \makecell from the makecell package

Load makecell and wrap the cell text in \makecell{First line\\ Second line}. Inside \makecell the \\ breaks the line within the cell. It works in ordinary l, c and r columns, so you keep a compact table with no fixed width.

Method 3: a nested tabular

Put a one-column tabular inside the cell: \begin{tabular}[t]{@{}l@{}}First line\\ Second line\end{tabular}. The [t] aligns its top line with the rest of the row and @{} removes the extra padding. It needs no extra package, but it is the most typing.

A complete example you can compile

\documentclass{article}
\usepackage{array}
\usepackage{makecell}
\begin{document}

1. A \verb|p{4cm}| column with \verb|\newline|

\begin{tabular}{|l|p{4cm}|}
\hline
Name & Description \\
\hline
Alpha & First line\newline Second line \\
\hline
\end{tabular}

\bigskip
2. \verb|\makecell| in a normal column

\begin{tabular}{|l|c|}
\hline
Name & Description \\
\hline
Beta & \makecell{First line\\ Second line} \\
\hline
\end{tabular}

\bigskip
3. A nested \verb|tabular| inside the cell

\begin{tabular}{|l|l|}
\hline
Name & Description \\
\hline
Gamma & \begin{tabular}[t]{@{}l@{}}First line\\ Second line\end{tabular} \\
\hline
\end{tabular}

\end{document}

We compiled this file as-is with Tectonic 0.17.0 on October 30, 2026, and inspected the rendered page. In that output each of the three tables shows "First line" and "Second line" stacked inside one cell. We did not compile it with other engines or package versions.

FAQ

How do I put a line break in a LaTeX table cell?

Use \newline in a p{width} column, \makecell{first\\ second} with the makecell package, or a nested tabular. The example above was compile-tested with Tectonic 0.17.0 and contains all three.

Why does \\ start a new row instead of a new line?

In a tabular, \\ is the row terminator, so using it inside a cell cuts the row short. The three methods above avoid that by breaking the line without ending the row.

What is the difference between \newline and \\ in a table?

In a p{width} column \newline breaks the line inside the cell, while \\ still ends the row. In a plain l, c or r column \newline does not give a reliable in-cell break, so use \makecell or a nested tabular there.

Does \makecell need a package?

Yes. Add \usepackage{makecell} to the preamble. The example on this page used Tectonic 0.17.0, which fetched the package on first compile; on a local TeX install, check that makecell is present.

How do I wrap long text in a cell without forcing a break?

Use a p{width} column, for example p{4cm}. Text wraps automatically at that width, so you only need \newline where you want a break at a specific word.

Further reading

Companion guides in this series cover typing backslashes and tildes, citing websites with BibTeX, and bold math symbols. More how-tos are on the Bibby AI blog. Source question: How to add a forced line break inside a table cell? on TeX Stack Exchange.

Write your next paper in Bibby AI. LaTeX-native editing in the browser, free to start. Compare plans on the pricing page.

Last updated: October 30, 2026. By the Bibby AI editorial team.

Try a LaTeX Editor Built for Researchers

AI-powered writing, smart citations, no compile timeouts. Join 12,500+ researchers from academia and industry using Bibby AI.

Start Writing Free

Want to discuss this topic or need help with your paper?

Book a Free Call