1

I have defined a very large supertabular. Each table-row is separated by a horizontal line (\hline). The header of the table should be separated with two lines. On the first page everything is fine, as I want.

My problem is, that on the second page, where supertabular appears, the second line of the doubled line in header is bold, caused by the hline from table cell. Is there a way to collapse this line?

Here is a minimal example.

\documentclass[a4paper,headsepline,12pt]{scrreprt}

\usepackage{supertabular}

\begin{document}
\begin{center}
\tablefirsthead{\hline
\textsc{C1} &
\textsc{C2} &
\textsc{C3} \\\hline\hline}
\tablehead{\hline
\textsc{C1} &
\textsc{C2} &
\textsc{C3} \\\hline\hline}
\tabletail{
\hline
\multicolumn{3}{|r|}{\small continues on next page}
\tablelasttail{\hline\hline}
\\
}
\bottomcaption{{very long tabular}}
\begin{supertabular}{|p{4cm}|p{7.8cm}|p{3.1cm}|}
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
A &
This text is a bit longer to get a two lined table cell &
cat\\\hline
\end{supertabular}
%\caption{Kategorisierung von XÖV-Stereotypen und Kurzbeschreibung der Semantik der Modellelemente auf Basis von \cite[S. 27 - 55]{KoordinierungsstellefurITStandards(KoSIT).2012}}
%\label{table_xoev_stereotypes}

\end{center}
\end{document}
1
  • 2
    This may be a moot point, but is it really necessary to have a horizontal line between each and every single row of the table? Personally, when I run your MWE without all those \hlines, I find it much easier to look at...
    – Mico
    Jun 14, 2012 at 11:39

1 Answer 1

3

I'd second @Mico and suggest you have a look at the booktabs manual; for a more well-known source you may also refer to the Chicago Manual of Style, which has similar suggestions.

If you don't mind losing the vertical rules (which both sources strongly recommend), here's a solution using booktabs. I think there should be a simpler solution placing only a single \hline in the header and the other one in the table body, but currently I couldn't figure it out.

Even though the CMS doesn't discourage double rules, you might want to consider replacing them by booktab's heavier \toprule and \bottomrule, respectively.

EDIT The supertabular+booktabs solution had flaws I initially hadn't noticed: it ran over pagination marks and for some reason didn't start on the first page. If there's no particular reason for using supertabular, longtable might be a better choice.

\documentclass[a4paper,headsepline,12pt]{scrreprt}

\usepackage{lipsum}
\usepackage{booktabs}
\usepackage{longtable}

\begin{document}

%print a table row
\newcommand{\row}{%
    A%
        & This text is a bit longer to get a two lined table cell%
        & cat\\\midrule}

\begin{longtable}{p{4cm}p{7.8cm}p{3.1cm}}
        \caption{A Table}\\
        \midrule
        \textsc{C1} &
        \textsc{C2} &
        \textsc{C3} \\\midrule\midrule
    \endfirsthead
        \caption{A Table (continued)}\\
        \midrule
        \textsc{C1} &
        \textsc{C2} &
        \textsc{C3} \\\midrule\midrule
    \endhead        
        \midrule
        \multicolumn{3}{r}{\small continues on next page}
    \endfoot  
        \addlinespace[-\defaultaddspace]\midrule %don't even need any \addlinespace if the \midrule is added after the table body instead of as \endlastfoot.
    \endlastfoot
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    \row{}
    A%
        & This text is a bit longer to get a two lined table cell%
        & cat\\\midrule
\end{longtable}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .