I make a table by the following code in which a cell of the talbe is consctructed by a \makebox. Cells at the same line are seperated by \vrule. lines are seperated by \hrule.

In this example, I want horizontal rules made by \hrule to appear at the cell 11 and 13 other than 12 which means two horizontal rules made by \hrule are in the same line.

How can I do it?

    \makebox[\dimexpr 1in - 0.4pt][c]{\parbox{\dimexpr 1in - 2.4pt}{11}}%
    \makebox[\dimexpr 2in - 0.4pt][c]{\parbox{\dimexpr 2in - 2.4pt}{12}}%
    \makebox[\dimexpr 1in - 0.4pt][c]{\parbox{\dimexpr 1in - 2.4pt}{13}}%
    \hrule width 1in \hspace{2in} \hrule width 1in %of cause this is a wrong way.
    \makebox[\dimexpr 1in - 0.4pt][c]{\parbox{\dimexpr 1in - 2.4pt}{21}}

Second version:

I tried to use \framebox like this, but why is the cell21 not at the second line? That is to say, why does it fail to feedline automatically?

    \framebox[\dimexpr 1in][c]{\parbox{\dimexpr 1in - 2.4pt}{11}}%
    \framebox[\dimexpr 2in][c]{\parbox{\dimexpr 2in - 2.4pt}{12}}%
    \framebox[\dimexpr 1in][c]{\parbox{\dimexpr 1in}{13}}%
    \framebox[\dimexpr 1in][c]{\parbox{\dimexpr 1in - 2.4pt}{21}}
  • same comment as last time. \hrule is a tex vertical mode primitive and so you can not have two on the same line. You could use the latex \rule or use \framebox instead of \makebox and let latex add the rules. Commented Feb 4, 2022 at 14:12
  • I tried framebox, What causes the problem of my second version?
    – lyl
    Commented Feb 4, 2022 at 15:22
  • like all latex boxes, \framebox is positioned by the same logic as a letter and you have 4 in a row like XXXX with no space or linebreak specified so naturally you get 4 on the same line. Commented Feb 4, 2022 at 15:29
  • If the content 11 changes to 11\\11a, the line fails to align horizontally. As the content of any cell can not be known in advance, any good idea for this problem?
    – lyl
    Commented Feb 4, 2022 at 16:26
  • you want all the parboxes to be \parbox[t] if you want the boxes to align on top baseline Commented Feb 4, 2022 at 16:43

1 Answer 1


You had specified no break points between the boxes. I believe the desired output is

enter image description here



    \framebox[\dimexpr 1in][c]{\parbox[t]{\dimexpr 1in - 2.4pt}{11}}%
    \framebox[\dimexpr 2in][c]{\parbox[t]{\dimexpr 2in - 2.4pt}{12}}%
    \framebox[\dimexpr 1in][c]{\parbox[t]{\dimexpr 1in}{13}}\\%
    \framebox[\dimexpr 1in][c]{\parbox[t]{\dimexpr 1in - 2.4pt}{21}}

You must log in to answer this question.

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