[Tex/LaTex] Difference between \\ and \tabularnewline

line-breakingtables

What is the difference between \\ and \tabularnewline?
Is it same as the difference between \\ and newline?

Is \tabularnewline preferred over \\ when creating tables?

Best Answer

If your tabular contains p-columns, then there is a ambiguity: Does \\ should end a line inside a cell or should it end a tabular row? The use of \newline and \tabularnewline make that clear, the first ends the line in a cell, the latter the row of the table.

See also \arraybackslash of package array that can be used to reset the meaning of \\ to be \tabularnewline, from the documentation:

\arraybackslash: Restore \\ for use in array and tabular environment (after \raggedright etc.).

\def\arraybackslash{\let\\\tabularnewline}