[Tex/LaTex] Remove border of top left table cell

rulestables

I want to remove the border of the top left table cell (top-border and left border of this cell). My table looks like this:

\begin{table}[!ht]  
    \centering
    \begin{tabular}{|c|c|c|c|}    \hline
             &  Item1 & Item2 & Item3 \\ \hline
    Group1 & 0.8 & 0.1 & 0.1 \\ \hline
    Group2 & 0.1 & 0.8 & 0.1 \\ \hline
    Group3 & 0.1 & 0.1 & 0.8 \\ \hline
    Group4 & 0.34& 0.33& 0.33 \\ \hline
    \end{tabular}
\end{table}

Does somebody have a hint how i can do this?

Best Answer

You need to use a column-specific line \cline as well as a \multicolumn{1}{c|} entry to remove the rules from the top left cell:

enter image description here

\documentclass{article}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\begin{document}
\begin{table}[!ht]  
  \centering
  \begin{tabular}{|c|c|c|c|}
    \cline{2-4}
    \multicolumn{1}{c|}{} & Item1 & Item2 & Item3 \\ \hline
    Group1 & 0.8   & 0.1   & 0.1  \\ \hline
    Group2 & 0.1   & 0.8   & 0.1  \\ \hline
    Group3 & 0.1   & 0.1   & 0.8  \\ \hline
    Group4 & 0.34  & 0.33  & 0.33 \\ \hline
  \end{tabular}

  \bigskip

  \begin{tabular}{cccc}
    \toprule
           & Item1 & Item2 & Item3 \\ \midrule
    Group1 & 0.8   & 0.1   & 0.1  \\
    Group2 & 0.1   & 0.8   & 0.1  \\
    Group3 & 0.1   & 0.1   & 0.8  \\
    Group4 & 0.34  & 0.33  & 0.33 \\ \bottomrule
  \end{tabular}
\end{table}
\end{document}​

I've also added a booktabs variant, which is still clear in terms of the presentation, and looks cleaner.

Related Question