I have some text in a table and I want to add a forced line break. I want to insert a forced line break without having to specify the column width, i.e. something like the following:

Foo bar & Foo <forced line break here> bar & Foo bar \\

I know that \\ inserts a line break in most cases, but here it starts a new table row instead.

A similar question was asked before: How to break a line in a table

19 Answers 19


Strangely, no answer (unless I've misread them) mentions a package that is dedicated to this precise question: makecell, which allows for common formatting of certain cells, thanks to its \thead and \makecell commands, and for line breaks inside these cells. The horizontal and vertical alignments can chosen independently from those of the table they're included in. The default is cc, but you can change it globally in the preamble with


where v is one of t,c,b and h one of l,c,r. Alternatively, for a single cell, you can use the \makecell or \thead commands with the optional argument [vh].

So here is a demo:




    \begin{tabular}{ | c | c | c |}
      \thead{A Head} & \thead{A Second \\ Head} & \thead{A Third \\ Head} \\
      Some text &  \makecell{Some really \\ longer text}  & Text text text  \\


Compiled MWE

  • 26
    This is certainly the best answer! – kjetil b halvorsen Nov 27 '14 at 12:35
  • 30
    This is great, it works without specifying a width and does not need confusing hacks. Maybe worth to mention that the example here contains much more than is actually necessary to answer the question: just adding \usepackage{makecell} and using \makecell{...\\...} is sufficient to get a linebreak in the cell. – luator May 11 '15 at 9:48
  • 2
    It makes me happy to have contributed the 100th upvote. – Mico Apr 3 '17 at 17:21
  • 3
    This answer is satisfying to read. Psychotherapy has to consider it. – Diaa Apr 17 '17 at 20:29
  • 12
    As explained, if it's for all you document, \renewcommand{\cellalign}{l} (it will remain vertically centred), or, for some specific cells, makecell[l]{ ... } or \thead[l]{ ... }. – Bernard Feb 26 '18 at 13:04

It's a quite old question, but I'll add my answer anyway, as the method I suggest didn't appear in the others

Foo bar & \begin{tabular}[x]{@{}c@{}}Foo\\bar\end{tabular} & Foo bar \\

where x is either t, c, or b to force the desired vertical alignment.

In case this is needed in more than a couple of places, it's better to define a command


so the table line before can be one of

Foo bar & \specialcell{Foo\\bar} & Foo bar \\    % vertically centered
Foo bar & \specialcell[t]{Foo\\bar} & Foo bar \\ % aligned with top rule
Foo bar & \specialcell[b]{Foo\\bar} & Foo bar \\ % aligned with bottom rule

More variations are possible, for instance specifying also the horizontal alignment in the special cell.

Notice the @{} to suppress added space before and after the cell text.

  • 27
    For those wanting to control the horizontal alignment, change c@ to l@ or r@ (or make it another parameter like the vertical alignment?). Thanks egreg – Dolan Antenucci Apr 19 '12 at 13:31
  • 8
    \parbox will do the same, but you have set a width: \parbox[t]{5cm}{foo\\bar} – Born2Smile Dec 8 '12 at 14:11
  • 2
    @Born2Smile There's the varwidth environment (package of the same name), but it's overkill. – egreg Dec 8 '12 at 14:15
  • 18
    This wins the prize for the most incomprehensible answer. – Ricky Robinson Jan 13 '14 at 13:00
  • 12
    Egreg's solution is one of the most interesting and efficient I ever seen for line breaking at tables! Thanks. However, I made a slight change to specify the alignment directly from the command \specialcell: \newcommand{\specialcell}[3][c]{% \begin{tabular}[#1]{@{}#2@{}}#3\end{tabular}}% which should be called by \specialcell{<align>}{text1\\text2} where <align> must be replaced by the desired position: l (left), c (center), r (right). Despite this mod, all credits to @egreg. – Carlos Viegas Apr 13 '15 at 0:40

It really is no wonder why LaTeX is said to be complicated! Just look at your answers to such an easy question! How about an easy solution to an every day problem?


\begin{tabular}{|l|l|} \hline
    \pbox{20cm}{This is the first \\ cell} & second \\ \hline
    3rd & and the last cell \\ \hline

which looks like:

split cell with pbox

Note that the width supplied to \pbox is a maximum width. If the content is shorter the length of the longest line is taken.

  • 23
    This may be an obvious question. What is the 20cm for, and is there a way to remove it? (automatically choose the correct value) – AnnanFay Dec 2 '13 at 4:38
  • 1
    The \pbox solution is great. Alignment might be a bit tricky. If you run into trouble using this solution, see here tex.stackexchange.com/a/55861/13450 – Christian Apr 8 '14 at 17:23
  • 2
    How to center the new line? – CroCo Sep 19 '14 at 14:22
  • 2
    Well, it’s still overly complicated because it’s a fixed width, but on the other hand I don’t want to be Mr Complainy Pants. – Lenar Hoyt Dec 18 '14 at 20:00
  • 7
    I gave a downvote because this answer presented in a condescending way. – dinosaur Feb 11 '17 at 17:51

You can switch your cell layout to paragraph to use the \newline command.

Test & foo \newline bar \\


Use the following commands instead of p if you want to specify the alignment as well:

  • 11
    I did. I tried both \newline and \linebreak, but they only work in paragraph mode. cims.nyu.edu/cgi-comment/info2html?(latex)%5Cnewline – Denilson Sá Maia Aug 28 '10 at 0:56
  • Hmm. I thought it did. I could have sworn I've done this before. The only thing I can think of right now is to put a single column tabular within the other tabular. E.g., Foo bar & \begin{tabular}{c} Foo \\ bar \end{tabular} & foo bar \\ – frabjous Aug 28 '10 at 2:59
  • 1
    @frabjous: Could you clarify the status of this answer? Does it work, and if so, how? (A complete MWE would be good.) – doncherry Jun 9 '12 at 15:06
  • 37
    @doncherry: This answer works, iff your column type is p{width} or X (in a tabularx environment). It does not work with c, l or r columns, as requested by the asker, though. – Fritz Aug 28 '12 at 13:11
  • 2
    @doncherry I added a work around which will allow you to specify the alignment as well. – Matthias Jan 26 '17 at 13:24

Use the tabularx environment instead of tabular, and then use \newline where you want line breaks within a cell.

    Section:   &  This is my     \newline
                  long paragraph \\

The tabularx environment has a special column type, X, in addition to the usual ones, and its first argument is the desired width of the table. The X column will have the necessary width in order to make the whole table the desired width.

Note: \newline will not take effect in columns of standard type.

Details on tabularx can be found here.

  • Nice one, I hadn't realised tabularx supported this, thanks for mentioning it. – sharky Feb 23 '12 at 4:02
  • 2
    By far the easiest solution! – mtsz Oct 9 '12 at 21:33
  • How does this work? I'm not getting the desired output. – CroCo Mar 28 '15 at 1:56
  • @CroCo, add the \usepackage... line in your main.tex and the rest of the code shown works perfectly. +1 for this answer, which does not only work for \newline but also allows many other commands and even environments \begin{...} ... \end{...}, which was all very forbidden in the normal tabular environment. – Steeven May 1 '15 at 14:35
  • 5
    @carandraug, note that the question asks specifically for a forced line break, so the explicit \newline is not pointless. – Will Jan 14 '16 at 17:19

Here's a very simple way to do it, using Plain TeX commands within the tabular environment:

here&\vtop{\hbox{\strut top line}\hbox{\strut botline}}&more\\

table produced with code above

By using hboxes within the vtop we've stayed in vertical mode and therefore the width of the text in the hboxes determines the width of the vtop. This way we don't need to know the width of the text in advance. \strut will maintain the right space above and below the text in the hbox.

  • 1
    Hi Amy, and welcome to TeX.sx. You might want to read Welcome to TeX.SX! and note that signing your posts is not necessary since your name appears at the bottom automatically. See also Rules about linking to external pages. With respect to this particular answer, how is it different from TH's answer? – Alan Munn Sep 10 '13 at 20:08
  • 2
    Thank you! This works when you are in a multicell but they are left aligned (even through I defined it to be in the centre). Is there a way around this? – user2822693 May 14 '14 at 16:41
  • The nice thing about this answer is that \vtop{\hbox{\strut top line}\hbox{\strut botline}} can be used within Pandoc Markdown tables. – Serge Stroobandt Oct 21 '14 at 11:11
  • @SergeStroobandt not only that. It can be used everywhere! (because is TeX) I just needed some line break in \text of \alignat environment and worked perfectly. Thanks for this robust and simple answer! – loved.by.Jesus Jan 4 '16 at 11:07
  • Definitely the best answer on this page ! – Gabriel Romon Feb 26 '19 at 11:09
a&\vbox{\hbox{\strut ASDF}\hbox{\strut ASDF}\hbox{\strut This is my
really long line}}&c

The \strut is essential for spacing.

  • This looks like good method. Maybe too much to ask, but is there any easy way to adjust vertical justification in the cells? E.g., so single line cells are even with top of multi-line cell? Or so all are vertically centered? – Herbert Sitz Aug 28 '10 at 15:33
  • 3
    Replace \vbox with \vtop to get alignment at the top. – TH. Aug 29 '10 at 0:49
  • 2
    Great answer. How do you center horizontally? – denilw Oct 21 '10 at 20:47
  • 1
    @denilw: Oops. I misread and wrote a previous comment (now deleted). If you want to center the lines, the easiest way is to compute the width of the widest \hbox and use that as the width of the other \hboxes. Something like \vbox{\setbox0\hbox{\strut This is the widest one.}\hbox to\wd0{\hss\strut ASDF\hss}\copy0\hbox to\wd0{\hss\strut asdf\hss}} – TH. Oct 21 '10 at 21:05
  • Why is "ASDF" used for the strut? – einpoklum Feb 25 '17 at 13:54

You can also just fake it:

Foo bar & Foo & Foo bar \\
~       & bar &  ~      \\

This is a really old question, but since this was linked from a recent question on separating content and presentation, I'll add a ConTeXt answer for comparision.

In ConTeXt, \crlf adds a forced line-break, so achieving a forced line-break in a table is as simple as just adding \crlf in the appropriate place. Here is the complete example:

% Setup for rules at the top and bottom
\startsetups table:rules

% Setups for middle alignment
\startsetups table:middle


\startTABLE[setups={table:rules, table:middle}]
  \NC Foo bar \NC Foo \crlf Bar \NC Foo bar \NC \NR
  \NC Foo bar \NC Foo \crlf Bar \NC Foo bar \NC \NR


which gives:

enter image description here

  • 1
    your source code does not match what the illustration shows. – Kurt Pfeifle Nov 17 '13 at 13:28
  • @KurtPfeifle: It does for me! Which version of context are you using? – Aditya Nov 17 '13 at 20:34
  • Sorry, didn't see your question earlier. My context is v. 0.60 (2013.04.20 01:15). However, now re-testing your code, I can confirm that your code works. I have to withdraw my previous statement. Can't remember now what caused me to make it. – Kurt Pfeifle Feb 11 '14 at 19:30
  • As usual, ConTeXt is easiest with its \crlf (carriage return linefeed) command. – Serge Stroobandt Oct 21 '14 at 12:28

Here I use stacks to accomplish it. Several things are noteworthy:

  1. I demonstrate \Longstack , \Longunderstack and \Centerstack, which give three different alignments.

  2. In order not to squeeze against the vertical margins, a \strutlongstacks{T} declaration was issued. Alternately, one might wrap a stack inside an \addstackgap[<gap>]{content} to add a vertical buffer above/below the stack.

  3. Not shown is the ability to set the horizontal alignment of the stacked content with an optional argument, or to change the EOL character (from \\ to another user-specified token)

Here is the MWE.

Foo bar & \Longstack{ Foo \\ bar \\ baz} & Foo bar \\
Foo bar & \Longunderstack{ Foo \\ bar \\ baz} & Foo bar \\
Foo bar & \Centerstack{ Foo \\ bar} & Foo bar \\

enter image description here

  • This is gorgeous! I'm wondering why it has so few votes... – CarLaTeX Apr 28 '17 at 7:39
  • 1
    @CarLaTeX Thanks for the kind words. I think that I give so many answers with stacks, people are of the opinion, "you seen one, you seen 'em all." I am a victim of my own success. – Steven B. Segletes Apr 28 '17 at 9:52
  • It's really a pity that people stop at the first answers! :) – CarLaTeX Apr 28 '17 at 10:36

How about using \parbox in a custom command

  \parbox{\mylength}{#1 \\ #2}%
Foo bar & \boxup{Foo}{bar} & Foo bar \\

This takes two arguments with the assumption that the first line is longer than the second. It would be possible to refine the code to work through an arbitrary number of lines and find the longest. If that's of interest I'll write something, probably using expl3 for the looping.

  • Gives me issues with too little vertical spacing. \vspace only helps for the bottom margin. – Aleksandr Levchuk Oct 23 '11 at 22:09

I believe I have the simplest answer here:

If you are using a paragraph column in a table, you can put text in an alignment environment and the table does not pick up the \\ as a new table row, so you can use it normally. For example:

        Some text over here \\ 
        newline! \\ 
        \bigskip all the way down 
        Lorem ipsum dolor sit amet, consectetur 
        adipisicing elit, sed do eiusmod
        tempor incididunt ut labore et dolore 
        magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco laboris 
        nisi ut aliquip ex ea commodo\\ \bigskip
        consequat. Duis aute irure dolor in 
        reprehenderit in voluptate velit esse
        cillum dolore eu fugiat nulla pariatur. 
        Excepteur sint occaecat cupidatat non
        proident, sunt in culpa qui officia 
        deserunt mollit anim id est laborum.\\ 
        \bigskip \bigskip lorem ipsum\\

Will give you a table with line breaks using the \\ command.

  • 5
    I think the explanation is wrong - I just tried {flushleft} in a l column, and it fails; I think the reason why this example works is because it has p{2in} column type, which sets the width in advance.. – sdaau Jul 10 '14 at 1:08

I think multirow is a simple elegant solution, at least for simple tables.

For example, I tried a few of the suggestions above but I found this worked the best:

    \caption{RESTful Resources}
    \begin{tabular}{l l l}
        Resource & Methods & Description \\
        \multirow{2}{*}{Resource1} & \multirow{2}{*}{POST, PUT} 
            & This resource contains ...\\
          & & \emph{Media types: text/plain, application/json}\\
        \multirow{2}{*}{Resource2} & \multirow{2}{*}{POST, PUT} 
            & This resource contains ...\\
          & & \emph{Media types: text/plain, application/json} \\

I don't have direct help on how to add a linebreak, but using the multirow package may provide different route to same desired end. You can read a tutorial here:


But I have a feeling the \parbox answer in the similar question you linked is what you're looking for. I think using a box in the cell is going to be simplest and best way, was there something about that that wasn't working for you?

If you want to use parbox without having to hardcode in a width, here's one way that works for me. Not perfect, since it requires you to know beforehand the text of the longest line in the multi-line column, but it does work:

% define new length and set to length of longest line
\settowidth{\longline}{longest line in table}\\


one line & \parbox[t]{\longline}{longest line in table \\ and another line} & more text \\
second line here& and what & more text 
  • \parbox works, but it requires me to type the desired column width. Thus, I lose the auto-column-size that happens otherwise. I bet \multirow will work, but the source-code will be a lot messy. – Denilson Sá Maia Aug 28 '10 at 1:39
  • 1
    Gotcha. Added code sample to my question that uses column autosizing with parbox and is probably cleaner than using multirow package. I think there must be a better way, but at least it works. . . – Herbert Sitz Aug 28 '10 at 4:38

Good afternoon, when I was younger I was typesetting a tabular environment inside a tabular environment. Since we have TikZ I use tikzpicture environment inside tabulars, or even tikzpicture inside tikzpicture. I prefer putting simple TikZ nodes next and below each other, but it depends on actual task. I enclose an MWE with fast text height correction.

\tikzset{inner sep=0pt}
\begin{tabular}{|l|l|} \hline
  \node[align=left, text height=4.5ex]{This is the\\[3pt]first cell};
    & second \\ \hline
    3rd & and the last cell \\ \hline


  • \tikz \node[align=left, text height=4.5ex]{This is the\\[3pt]first cell}; is a more brief variant. – Ali Dec 2 '19 at 22:04

Personally, I prefer to use \usepackage{multirow} \multirow{"number of rows"}{"width"}{"contents"} for everything else except the information that should be on different rows.

For example:

 \begin{tabular}{p{2.5cm}@{\hskip 0mm}  p{5cm}@{\hskip 4mm} p{5cm} }
     Parameter & Description & Used by\\
     \multirow{2}{*}{Accuracy}&1. The error rate or frequency of correctness of sensor readings.  & \\[0.3cm]
     & 2. The degree of correspondence of measured values to actual values.& \\[0.3cm]

enter image description here

  • This works even without the multirow. – ankhi Apr 11 '18 at 5:37

This approach isn't so different from some of the others already given, except that it "externalises" all of the design decisions from the table definition itself (that is, leaving it cleaner to write and read each table should you want to include multiple tables like this throughout your doc or docs).

Preliminaries (presumably in your preamble):

\usepackage{array} % needed if you're going to use \\ together with centering,
                   % raggedright, raggedleft in your column specifier (see
                   % manuals on \arraybackslash)
  \settowidth{\mywidestcolwidth}{\mycellformat #1}


\setmywidestcolwidth{foo baz bar}
foo bar baz&

foo baz bar


foo baz bar

baz\\ \hline

Skip the \mycellformat and \parskip if you have no need for them (although not necessary in your case, I included \parskip since it's useful to visually distinguish paragraphs from one another since paragraph indentation is automatically switched off in tables, and added \mycellformat to allow for uniform document-wide table design settings).


You can use minipage:

This is the first line
second line
  • 1
    You have to specify width in advance, though... – sdaau Jul 10 '14 at 1:06

It seems there is a rather simple solution. Just wrap the text into currly braces and use \raggedright like this:

{\raggedright \bfseries WS 2016 \\(average)}

Here is a simple example:

  Some Longer Column &
  {\raggedright \bfseries Line \\Break} \\\hline
  This is a wide line with some text & Small \\\hline

This gives:

enter image description here

  • The only answer which actually works rigtht without messing with my other table cells! – user Apr 11 '19 at 1:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.