Graphics, Figures & TablesSpurious Lines in Cells spanning multiple Columns and Rows

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
hjbahirat
Posts: 15
Joined: Mon Jul 27, 2009 7:24 am

Spurious Lines in Cells spanning multiple Columns and Rows

Post by hjbahirat »

Hello,

I am trying to create a table that uses the following line of code.

Code: Select all

\multicolumn{2}{|c|}{\multirow{2}{*}{Technology}}
I get a spurious line in the table output. I am not sure how to eliminate this line.

The following is the MWE.

Code: Select all

\documentclass[11pt]{report}
\usepackage{multirow}

\begin{document}

\begin{table}[htb]
\centering
\caption{Table}
\begin{tabular}{|c|c|c|c|c|c|c|c|}
\hline 
\multirow{2}{*}{Study Name}&\multicolumn{2}{|c|}{\multirow{2}{*}{Technology}} & $\lambda$ & r & U &\multirow{2}{*}{ABCD}  &ABCD \\ \cline{4-6}\cline{8-8}
&&& $abcd$ &abcd & abcd &  &abcd\\ \hline  
\end{tabular}
\label{table01}
\end{table}

\end{document}
Any help is appreciated.
Last edited by cgnieder on Mon Aug 12, 2013 1:40 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Spurious Lines in Cells spanning multiple Columns and Rows

Post by Johannes_B »

Hi, this is a good MWE. Please make a mental note to use the code button next time. This gives fancy markup and the possibility to "Open in WriteLaTeX".

Code: Select all

\documentclass[11pt]{report}
\usepackage{multirow}
\usepackage{caption}  % Please note the difference in spacing

\begin{document}

\begin{table}[!htb]
  \centering
  \caption{Table}
  \begin{tabular}{|c|cc|c|c|c|c|c|}
    \hline
    \multirow{2}{*}{Study Name}
    &\multicolumn{2}{c|}{\multirow{2}{*}{Technology}} 
    & $\lambda$ & r 
    & U 
    &\multirow{2}{*}{ABCD} 
    &ABCD \\
    \cline{4-6}\cline{8-8}
    &&& $abcd$ &abcd & abcd & &abcd\\ \hline
&&&&&&&\\ \hline
&&&&&&&\\ \hline
&&&&&&&\\ \hline
  \end{tabular}
  \label{table01}
\end{table}

\end{document}
There is one | too much in the preamble of your {tabular} preamble. However, a nice table with data (not speaking of lists) should not contain many rules. The documentation of booktabs gives a good introduction on how to typeset tabular material.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply