Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have strange problem with longtable package. Almost all my tables looks great but some of have strange lines at the end of tables. Please take a look at the picture

I create the table like that

    \begin{longtable}{|c|c|c|c|c|c|c|c|c|}
\caption{Wyniki rozpoznawania obrazów dla obrazu zapytania 004\_0001.jp w katalogu baseballbat}\\\hline
\multicolumn{2}{|c|}{\textbf{Obraz zapytanie}} & \multicolumn{3}{|c|}{\textbf{Obraz przetwarzany}} & \multicolumn{4}{|c|}{\textbf{Wynik}} \\
\hline
\textbf{Nazwa} & \textbf{N} & \textbf{Katalog} & \textbf{Nazwa} & \textbf{N} & \textbf{J} & \textbf{J} & \textbf{Czas} & \textbf{Gęstość} \\ \hline
054\_0020.jpg & 209 & ring &054\_0020.jpg & 209 & 10089.1  & celu & time & 0.98  \\ \hline
                  &  & ring  &054\_0002.jpg & 288 & 21585.7  & celu & time & 0.52  \\ \hline
                  &  & ring  &054\_0013.jpg & 213 & 10755.7  & celu & time & 0.43  \\ \hline \hline
                  &  & ring  &054\_0004.jpg & 250 & 15510.8 & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0011.jpg & 117 &  3599.62  & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0015.jpg & 256 & 13359.8  & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0019.jpg & 275 & 20456.9  & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0026.jpg & 209 & 7813.75  & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0028.jpg & 130 & 3307.91  & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0029.jpg & 275 & 17064.3 & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0037.jpg & 95  & 5653.98  & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0041.jpg & 234 & 9418.73  & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0042.jpg & 120 & 2643.69 & celu & time & 0.43  \\ \hline
                  &  & ring  &054\_0044.jpg & 114 & 2672.92 & celu & time & 0.43  \\ \hline
\label{tab:ring}
\end{longtable}

Can somebody tell me what is wrong with this code , that it produces this strange line

share|improve this question
    
Welcome to TeX.sx! This could also be caused by some other package which interferes with longtable. Please consider adding a minimal working example (MWE) that shows this behavior. –  Martin Scharrer Jun 28 '11 at 18:37

1 Answer 1

up vote 4 down vote accepted

This is caused by the \label{tab:ring} at the end. It creates a new row, but only one column, so only the vertical lines of this column are drawn. You need to place it somewhere else, at best direct after \caption (but never before it) or in the firsthead (as the manual says) or as part of another box, before the last \\ \hline should be fine.

share|improve this answer
    
Thanks a lot. It works :) –  latexLerner Jun 28 '11 at 21:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.