Search code examples
latextabular

How to split a cell in a table in latex?


I am wanting to create a table as a header in LaTeX. 3 columns, the first cell must span two rows, the second cell must span two rows and the third cell must be split between the two rows. So 4 cells total but 3 columns like the picture below. Im having trouble with the spacing when I try and split the last column into two rows.

Table picture


Solution

  • One first sketch:

    \documentclass{article}
    \usepackage{multirow}
    
    \begin{document}
    
    \begin{tabular}{|c|c|c|}
    \hline
    \multirow{2}{*}{Some text A} & \multirow{2}{*}{Some text B} & Some text C\\
    \cline{3-3}
     & & Some text D\\
    \hline
    \end{tabular}
    
    \end{document}
    

    This gives you:

    screenshot of table

    It is not clear to me if you want your middle column to be larger than the two on the sides. Anyway, see this other answer of mine!