1

I am using share latex and trying to create a long table. When I generated the long table an extra vertical row is created at the end visible in the attached image. I would appreciate any help. Thanks in advance.Verticl line missing at the end and

\documentclass{article}
\usepackage{threeparttable}
\usepackage{longtable}




\begin{document}



\begin{longtable}{|p{2cm}| p{4cm}|p{5cm}|}
    \caption{Features used by Bebei}\\

    \hline
    \textbf{ index}& \textbf{Features name}  & \textbf{Explanation}\\
    \hline
    \endfirsthead
    \multicolumn{3}{c}%
    {\tablename\ \thetable\ -- \textit{Continued from previous page}} \tabularnewline
    \hline
   \textbf{ index}& \textbf{Features name}  & \textbf{Explanation}\\
    \hline
    \endhead
    \hline \multicolumn{3}{r}{\textit{Continued on next page}} \\
    \endfoot
    \hline
    \endlastfoot

        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        %\hline



    \label{tab:bebeifeatures}
\end{longtable}


       \end{document}
  • 3
    it's the \label making an empty cell stick it in another cell or in the argument to caption or pretty much anywhere other than where it is:-) – David Carlisle Nov 11 '16 at 7:50
  • @DavidCarlisle, You are right label is the culprit. Thanks for your help. I might have to find other way to refer the table. – curious Nov 11 '16 at 21:43
  • 1
    why do you need another way to refer to the table? you can use \label just place it in an existing cell not a new cell on its own. – David Carlisle Nov 11 '16 at 21:53
  • 4
    I'm voting to close this question as off-topic because OP says it's been solved in comments – Moriambar Jun 9 '17 at 17:58
  • 1
    @DavidCarlisle You should convert that to an answer – Andrew Swann Jun 9 '17 at 18:38
1

As pointed out by David Carlisle \label was creating the extra vertical line. The solution is to add the \label to an existing cell.

enter image description here

\documentclass{article}
\usepackage{threeparttable}
\usepackage{longtable}    
\begin{document}
\begin{longtable}{|p{2cm}| p{4cm}|p{5cm}|}
    \caption{Features used by Bebei}\\

    \hline
    \textbf{ index}& \textbf{Features name}  & \textbf{Explanation}\\
    \hline
    \endfirsthead
    \multicolumn{3}{c}%
    {\tablename\ \thetable\ -- \textit{Continued from previous page}} \tabularnewline
    \hline
   \textbf{ index}& \textbf{Features name}  & \textbf{Explanation}\\
    \hline
    \endhead
    \hline \multicolumn{3}{r}{\textit{Continued on next page}} \\
    \endfoot
    \hline
    \endlastfoot

        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for testing\\
        \hline
        1 & Number of objects & This is supposed to be the  largest sentence i am using for \label{tab:bebeifeatures}\\
        \hline
        %\hline


\end{longtable}
\end{document}

Your Answer

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

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