Graphics, Figures & Tableslongtable, multirow | Horizontal Line still visible

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
drmCA
Posts: 31
Joined: Mon Aug 13, 2012 12:18 am

longtable, multirow | Horizontal Line still visible

Post by drmCA »

Using multirow within a longtable I am still getting a hline between the cells I am seeking to merge (across aaaa). What am I doing wrong?

Code: Select all

\documentclass{book}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{longtable}

\begin{document}
\begin{longtable}{|l|c|c|c|c|}
\caption[ABC]{ABC}
\label{tab:ABC} \\

\hline
\multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{aaaa}}} &
\multicolumn{4}{c|}{\textbf{bbbb}} \\
\hline
\multicolumn{1}{|c|}{} &
\multicolumn{1}{c|}{\textbf{ccc}} &
\multicolumn{1}{c|}{\textbf{ddd}} &
\multicolumn{1}{c|}{\textbf{eee}} &
\multicolumn{1}{c|}{\textbf{fff}} \\
\hline
\endfirsthead
                       
\multicolumn{5}{c}
{\bfseries \tablename\ \thetable{} -- continued from previous page} \\
\hline
\multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{aaaa}}} &
\multicolumn{4}{c|}{\textbf{bbbb}} \\
\hline
\multicolumn{1}{|c|}{} &
\multicolumn{1}{c|}{\textbf{ccc}} &
\multicolumn{1}{c|}{\textbf{ddd}} &
\multicolumn{1}{c|}{\textbf{eee}} &
\multicolumn{1}{c|}{\textbf{fff}} \\
\hline
\endhead

\multicolumn{5}{|r|}{{Continued on next page}} \\ \hline
\endfoot

\endlastfoot

\centering

123 & 234 &  &  & 345 \\ \hline
\end{longtable}
\end{document}}
Last edited by localghost on Thu Aug 30, 2012 10:07 pm, edited 4 times in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

longtable, multirow | Horizontal Line still visible

Post by cgnieder »

Replace the \hline you want to overwrite with \cline{2-5}

Regards
site moderator & package author
Post Reply