# Creating gap in \hline of tabular [duplicate]

Often I read questions asking how to remove the gap between two \hlines in a table, but I like the gap and want to create it in the \hline as well, to have an equal effect for the column and row titles.

The code below makes a standard table

\documentclass{article}
\begin{document}
\begin{center}
\begin{tabular}{|c||c|c|c|}\hline
& A & B & C\\\hline\hline
A & 1 & 2 & 3\\\hline
B & 4 & 5 & 6\\\hline
C & 7 & 8 & 9\\\hline
\end{tabular}
\end{center}
\end{document}


The image shows what I am trying to accomplish.

Does a simple way to create this table exsist?

## marked as duplicate by David Carlisle tables StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Mar 2 '16 at 20:01

If such a setup is really needed use \cline{...} for the rules and add a very small 'empty' column as the 2nd one.

The empty row can be done with \multicolumn{5}{c}{} \\[-0.8\normalbaselineskip], for example.

\documentclass{article}

\begin{document}

\begin{center}
\begin{tabular}{|c|@{}p{2pt}@{}|c|c|c|}
\cline{3-5}
\multicolumn{1}{c}{}  & &  A & B & C\\
\cline{3-5}
\multicolumn{5}{c}{} \\[-0.8\normalbaselineskip]
\cline{1-1} \cline{3-5}
A && 1 & 2 & 3 \\
\cline{1-1} \cline{3-5}
B && 4 & 5 & 6\\
\cline{1-1} \cline{3-5}
C && 7 & 8 & 9\\
\cline{1-1} \cline{3-5}
\end{tabular}
\end{center}
\end{document}


• Thank you Christian! What is the reasoning to say "if it is really needed"? Is this typographically incorrect, or is it in your opinion not astatically pleasing? – Douwe66 Mar 2 '16 at 20:12
• @Douwe66: typographically incorrect is a stretchable term. There might be occasions where such a table is nice (i.e. in a fill - in form, for example), or in education to show some specific content. I would not use it for larger tables, however – user31729 Mar 2 '16 at 20:15