# Split and merge the table cells

I want to create the following type of table for my paper.

How can I do it?

Thank you.

• For horizontal rules not across the whole line you can use \cline{4-7}. To merge cells horizontally you can use \multicolumn{<count>}{<align>}{<contents>}. To merge cells vertically you can use \usepackage{multirow} and \multirow{<count>}{<width>}{<contents>} (use * for <width> to use the contents' natural width). Nov 6, 2019 at 11:27
• Please clarify what it is about the table shown in the screenshot that you wish to reproduce. Maybe the centering of the letter "F" above 6 columns? The irregular column widths? The fact that the contents of almost all cells are left-aligned? Please be specific.
– Mico
Nov 6, 2019 at 11:38

Recreating your table (but with only natural width columns) you can use the following to get the lines like in your example:

\documentclass[]{article}

\begin{document}
\begin{tabular}{|*{10}{l|}}
\hline
A & B & C & D & \multicolumn{6}{c|}{F} \\
&   &   &   & \multicolumn{6}{c|}{}  \\
\cline{5-10}
&   &   &   & a & b & c & d & e & f \\
&   &   &   &   &   &   &   &   &   \\
\hline
1 & 1.1 & - & - & - & - & - & - & - & - \\
\hline
2 & 1.2 & - & - & - & - & - & - & - & - \\
\hline
3 & 1.3 & - & - & - & - & - & - & - & - \\
\hline
\end{tabular}
\end{document}


But: it is considered bad typography to use tables with vertical rules and too many horizontal ones, therefore I'd advice to use the rules provided by booktabs and that you read booktabs documentation (there are a lot of helpful tips concerning good looking tables):

\documentclass[]{article}

\usepackage{multirow}
\usepackage{booktabs}

{%
\multirow{2}{*}[-0.5\dimexpr\aboverulesep+\belowrulesep+\cmidrulewidth\relax]{#1}%
}

\begin{document}
\begin{tabular}{*{10}{l}}
\toprule