21

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?

44

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.