I am trying to create a 4x2 table with two multi-row cells, which join cells (1,2) and (2,2) and (1,3) and (2,3) respectively.

The 1st multi-row cell should contain 2 lines and the second 3 lines:

| A | B | D | G |
+---+   | E +---+
| H | C | F | I |

Here is my first attempt:

A & \multirow{2}{*}{B \\ C} & \multirow{2}{*}{D \\ E \\ F} & G \\ \cline{1-1}\cline{4-4}
H &   &    & I \\ \hline\hline

The error (on the multirow line) I get is

! LaTeX Error: Something's wrong--perhaps a missing \item.

and the newlines (\\) inside multirows are ignored.

I also tried putting tabular inside multirow (as per How to add a forced line break inside a table cell):

A & \multirow{2}{*}{\begin{tabular}{c} B \\ C \end{tabular}} &
  \multirow{2}{*}{\begin{tabular}{c} D \\ E \\ F \end{tabular}} & G 
   \\ \cline{1-1}\cline{4-4}
H &   &    & I \\ \hline\hline

and there were no errors, but F was placed below the last two horizontal lines (i.e., the two rows in the table cannot accommodate the 3 rows in the 2nd multirow cell):

| A | B | D | G |
+---+   |   +---+
| H | C | E | I |

The 3rd attempt was to pass an actual width in cm instead of {*} to multirow. This works in my case (because the chunks into which I break the multi-row cells have the same width), but the 3rd line (F) is still below the table - i.e., the table height is not increased to accommodate the multi-row cells.

So, my questions are:

  • how can I tell multirow where to break lines?
  • how do I tell tabular to make space for the multi-row cells?
  • Your initial sentence, regarding how the table shoul be formated is awfully hard to read/understand. Maybe it would be good to either provide a real image or at least some kind of ascii sketch.
    – inVader
    Commented Dec 4, 2015 at 18:39
  • But as far as I understand you want to have two separate rows ind the first and last column, and one row (spanning two lines), another one (spanning three lines) in the second and third coulmn?
    – inVader
    Commented Dec 4, 2015 at 18:41
  • @inVader: yes, and I added the ascii art; it is better now?
    – sds
    Commented Dec 4, 2015 at 19:10

1 Answer 1


I propose this solution. I loaded hhline for better intersecting double lines, and stackengine. The spacing required by multirow cells can be obtained with the cellspace package, which defines a minimal vertical padding for cells of columns with a qualifier prefixed by the letter S.

In case you really need line breaks in a \multirow the makecell package defines a\multirowcell command that allows for line breaks:




  A &
  B & \multirow{2}{*} {\setstackgap{L}{2.05ex}\Centerstack{D\\E\\F}}
  & G \\ %
  H & C & & I \\


enter image description here

  • To get baselines to align better, you might try \setstackgap{S}{3pt}\renewcommand\arraystretch{1.6} Commented Dec 4, 2015 at 21:33
  • Yes, but I don't like to use \arraystretch: as a result, the contents of a cell is no more vertically centred.I think it's better to play with \cellspacetop/bottomlimit.
    – Bernard
    Commented Dec 4, 2015 at 21:42
  • @Steven B. Segletes: by the way, I first tried \Centerstack, instead of these nested \stackunder, but all $3$ letters were superimposed. Did I miss something?
    – Bernard
    Commented Dec 4, 2015 at 21:45
  • The default longstack gap is \baselineskip, which tabular sets to zero . The fix, which I will implement if/when the package is revised, is to \setstackgap{L}{\normalbaselineskip} instead of \setstackgap{L}{\baselineskip}. Of course, the fix can be manually performed by the user, as well. Commented Dec 4, 2015 at 21:59
  • Fine! Is the default row spacing in array or matrix the same as\normalbaselineskip?
    – Bernard
    Commented Dec 4, 2015 at 22:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .