1

I have a longtable spreading over 2 pages. Unfortunately, since I decided to use the booktabs package, I get a duplicate line separator between the table header of the second page and the next table entry. I found solutions like adding a * behind the \\ but they didn't work.

I want to remove the annoying dashed line on the second page:

visualization of example

My minimal example:

\documentclass[a4paper, 12pt]{article}
\usepackage{longtable}
\usepackage{arydshln}
\usepackage{booktabs}

\begin{document}
\vspace*{17cm}

\begin{longtable}[c]{@{}llll@{}}\toprule
\# & A & B & C\\
\midrule
\endhead
1 & A & B & C \\
\hdashline
2 & A & B & C \\
\hdashline
A & A & B & C \\
\hdashline
3 & A & B & C \\
\hdashline
4 & A & B & C \\
\hdashline
5 & A & B & C\\
\hdashline
6 & A & B & C\\
\hdashline
7 & A & B & C \\
\bottomrule
\end{longtable}

\end{document}
  • Do you know \endfirsthead etc. commands? But in this case, it's sufficient to interchange \midrule and \endhead, in my point of view – user31729 Jul 30 '15 at 15:00
  • I believe that arydshline breaks a little bit the advantages of booktabs, reducing the space, perhaps this only my impression – user31729 Jul 30 '15 at 15:07
  • I've tracked the 'error' back that the page break occurs right before a \hdashline, such that this is shifted to the next page, making a double line with the midrule from \endhead – user31729 Jul 30 '15 at 15:19
  • @ChristianHupfer: no, then I have a dashed line as separator and not the midrule I want to have. Which other package do you suggest for dashed lines? – flp Jul 30 '15 at 15:19
  • For dashed lines I have no other suggestion, it can be cured of course. I've some idea in mind ;-) – user31729 Jul 30 '15 at 15:21

Your Answer

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

Browse other questions tagged or ask your own question.