# add break line in table

I am trying to replicate the table like the below one.

I know I can use \toprule, \hline to add lines in the table. However, I do not know how a add a broken line in the table as row two and three shows between "A" and "B" or "B"& "C"

\begin{table}
\caption{CAPTION}
\label{tab:TABLENAME}
\begin{tabular}{ccl}
\toprule
A & B & C\\
\midrule

\bottomrule
\end{tabular}
\end{table}


• You could use an empty column. Aug 20 at 8:08
• @gernot but the line between row 3 and 4 is continuous Aug 20 at 8:09

You can use \cmidrule (from booktabs package) as in

\cmidrule(lr){2-3}


which will draw a line between columns 2 and 3, trimmed both left and right.

A complete example:

\documentclass{article}
\usepackage   {booktabs}
\usepackage   {lipsum} % for dummy text

\begin{document}
\lipsum[1]

\begin{table}[h]\centering
\caption{CAPTION\strut}\label{tab:TABLENAME}
\begin{tabular}{lcccccc}
\toprule
& \multicolumn{2}{c}{A} & \multicolumn{2}{c}{B} & \multicolumn{2}{c}{C}\\
\cmidrule(lr){2-3}\cmidrule(lr){4-5}\cmidrule(lr){6-7}
CATEGORIES & (1) & (2) & (1) & (2) & (1) & (2) \\
\midrule
GOOD & & & & & & \\
BAD  & & & & & & \\
\bottomrule
\end{tabular}
\end{table}

\lipsum[2]
\end{document}


• perfecr thanks! Aug 20 at 9:01