4

I have a problem in my multirow and multicolumn table. As you can see in the figure, there is an extra horizontal line over the first column. Can anybody tell me how to remove it. I constructed the entire table with the help of articles given in Latex WikiBooks.

This is my code:

\documentclass[letterpaper, 10 pt, conference]{ieeeconf}  
\IEEEoverridecommandlockouts                              
\overrideIEEEmargins      
\usepackage{multirow}

\begin{document}

\maketitle
\thispagestyle{empty}
\pagestyle{empty}
%-----------------------------------------------%
\begin{table}[!t]   \label{table:accuracy}
\centering
\caption{Title.}
\begin{tabular}{| c | c | c | c | c |} \cline{1-4}

& \multicolumn{3}{ c| }{A} \\
\hline 

\multicolumn{1}{|p{1cm}|}{\centering A= \\ $[B,C]$} & \multirow{2}{*}{C} & \multirow{2} {*}{D} & \multicolumn{1}{|p{1.5cm}|}{\centering E+ \\ F} & \multicolumn{1}{|p{1.8cm}|} {\centering G+\\+H+I}  \\  
\hline \hline 
$[4,1]$        &    30.22\%  &   46.67\%  &  44.27\%  &  30.48\%   \\
$[4,2]$      &    76.94\%  &   73.27\%  &  80.03\%  &  38.47\%   \\         
$[4,3]$      &    55.22\%  &   68.75\%  &  71.66\%  &  57.29\%   \\         
$[4,4]$      &    98.98\%  &   79.52\%  &  82.59\%  &  21.84\%   \\
$[5,2]$      &    36.94\%  &   56.48\%  &  63.25\%  &  47.40\%   \\     
$[5,3]$      &    63.99\%  &   53.30\%  &  51.70\%  &  59.32\%   \\         
$[5,4]$      &    46.46\%  &   39.06\%  &  39.94\%  &  59.91\%   \\         
$[6,4]$      &    96.80\%  &   96.80\%  &  100\%    &  98.17\%     \\
\hline
\multicolumn{1}{|p{1cm}|}{\centering R \\ S}  &  \multirow{2}{*}{56.37\%} &  \multirow{2}{*}{58.33\%} &  \multirow{2}{*}{\textbf{60.15\%}}  &  \multirow{2}{*}{\textbf{51.76\%}} \\     
\hline
\end{tabular}
\end{table}

\end{document}

The top figure shows how it is currently, and how I would like it to be:

enter image description here

3
  • Please edit your question to be a complete document and show the image from that document, your fragment can't be run but presumably doesn't generate that image as Guided filter and other text is not shown. Jun 9, 2014 at 20:33
  • @DavidCarlisle Oh yes sorry. Done.
    – Autonomous
    Jun 9, 2014 at 20:38
  • Now it should run as a standalone too. I hope.
    – Autonomous
    Jun 9, 2014 at 20:42

1 Answer 1

3

You had the column count incorrect in you \cline (also don't use \label before \caption. I used the standard article as I didn't hav ethe conference class you are using

\documentclass[letterpaper, 10 pt, conference]{article}  

\usepackage{multirow}

\begin{document}


\thispagestyle{empty}
\pagestyle{empty}
%-----------------------------------------------%
\begin{table}
\centering
\caption{Title.}\label{table:accuracy}
\smallskip
\begin{tabular}{| c | c | c | c | c |} \cline{2-4}

\multicolumn{1}{c|}{}
& \multicolumn{3}{ c| }{A} \\
\hline 

\multicolumn{1}{|p{1cm}|}{\centering A= \\ $[B,C]$} & \multirow{2}{*}{C} & \multirow{2} {*}{D} & \multicolumn{1}{|p{1.5cm}|}{\centering E+ \\ F} & \multicolumn{1}{|p{1.8cm}|} {\centering G+\\+H+I}  \\  
\hline \hline 
$[4,1]$        &    30.22\%  &   46.67\%  &  44.27\%  &  30.48\%   \\
$[4,2]$      &    76.94\%  &   73.27\%  &  80.03\%  &  38.47\%   \\         
$[4,3]$      &    55.22\%  &   68.75\%  &  71.66\%  &  57.29\%   \\         
$[4,4]$      &    98.98\%  &   79.52\%  &  82.59\%  &  21.84\%   \\
$[5,2]$      &    36.94\%  &   56.48\%  &  63.25\%  &  47.40\%   \\     
$[5,3]$      &    63.99\%  &   53.30\%  &  51.70\%  &  59.32\%   \\         
$[5,4]$      &    46.46\%  &   39.06\%  &  39.94\%  &  59.91\%   \\         
$[6,4]$      &    96.80\%  &   96.80\%  &  100\%    &  98.17\%     \\
\hline
\multicolumn{1}{|p{1cm}|}{\centering R \\ S}  &  \multirow{2}{*}{56.37\%} &  \multirow{2}{*}{58.33\%} &  \multirow{2}{*}{\textbf{60.15\%}}  &  \multirow{2}{*}{\textbf{51.76\%}} \\     
\hline
\end{tabular}
\end{table}

\end{document}
2
  • I had tried this. It was this line: \multicolumn{1}{c|}{} which made the difference. Could you tell me what this does?
    – Autonomous
    Jun 9, 2014 at 20:53
  • 1
    @ParagS.Chandakkar it replaces the table default |c| template for that cell by c| so you get no vertical rule on the left. Jun 9, 2014 at 21:06

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.