我正在使用共享 latex 并尝试创建一个长表。当我生成长表时,在附图中可见的末尾会创建一个额外的垂直行。我将不胜感激任何帮助。提前致谢。
\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}
答案1
正如 David Carlisle 指出的那样,\label
创建了额外的垂直线。解决方案是将其添加\label
到现有单元格。
\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}