I know that if you define a width in a table's column, you can get automatic word-wrapping. However, I need to control where newlines should happen in a specific table cell.
Thus, how can I insert manual line breaks in a LaTeX table cell?
I know that if you define a width in a table's column, you can get automatic word-wrapping. However, I need to control where newlines should happen in a specific table cell.
Thus, how can I insert manual line breaks in a LaTeX table cell?
You could do it like this:
\documentclass{report}
\begin{document}
\begin{tabular}{|l|l|}
\hline
A & B \\
& C \\
\hline
D & E \\
\hline
\end{tabular}
\end{document}
which produces:
Usually, you use a column definition like p{3cm}
instead of l
, and then use \newline
instead of \\
in the cell body.