views:

119

answers:

1

I have a table that automatically stretched over several pages by longtable package.

\begin{longtable}{| l | l |}
 \hline
 A & B \\ \hline
 \endfirsthead
 \multicolumn{3}{l}{Table \thetable{} -- finishing} \\ \hline
 \endhead
 a1 & b1 \\ \hline
 a1 & b2 \\ \hline
 ........
\end{longtable}

Suppose that table was broken (automatically) between first and second rows. Than we have this output:

-------
|A | B|
-------
|a1|b1|
-------
<page break>
Table 1 -- finishing.
-------
|a2|b2|
-------

I want the following effect:

-------
|A | B|
-------
|a1|b1|

<page break>
Table 1 -- finishing.
-------
|a2|b2|
-------

I.e. last row of the table's first part should be unfinished (without \hline).

In general case i have a table with multiple rows with \hline after each row. What i want is to "erase" last \hline of table's first part. Or that \hline of all table's parts except the last one.

A: 

I'm not sure I get it... Isn't the ----- in

|a1|b1|
-------
<page break>

is due to the \hline at

 a1 & b1 \\ \hline

??

So the problem is that the \hline appears both at the end of the first part of the table and at the start of the second part?

aioobe
Yes, but first \hline is unacceptable for me, second one is ok.And second one is due to "\multicolumn{3}{l}{Table \thetable{} -- finishing} \\ \hline", it's not a problem.In general case i have a table with multiple rows with \hline after each row. What i want is to "erase" last \hline of table's first part. Or that \hline of all table's parts except last one.
diver_ru