Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 22 down vote accepted

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.

share|improve this answer
1  
+1 for booktabs in the battle against eye-anticandy –  Brent.Longborough Jul 26 '12 at 21:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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