# longtable with mysterious line

I have the following code to make a longtable:

\documentclass{article}
%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

%% Sets page size and margins
\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

%% Useful packages
\usepackage{multirow}
\usepackage{booktabs}

\usepackage{longtable}

\usepackage{array}
\usepackage{setspace}

%%%endfloat stuff
\usepackage[nomarkers, nofiglist, notablist]{endfloat}
\AtBeginDelayedFloats{\renewcommand{\baselinestretch}{1.5}} %linespacing in captions

\DeclareDelayedFloatFlavor{sidewaysfigure}{figure} %to have right numbering when using endfloat
\DeclareDelayedFloatFlavor{sidewaystable}{table}
\DeclareDelayedFloatFlavor{longtable}{table}
%https://tex.stackexchange.com/questions/297717/sidewaysfigure-wrong-numbering

\begin{document}

\LTcapwidth=\textwidth
{\setlength\tabcolsep{4pt}\small
\begin{longtable}{p{4cm}|p{5cm}|c|c}
\toprule%\hline\hline
\textbf{Measure} & \textbf{Meaning} & \textbf{Correlation} & \textbf{References}\\ \hline
\multicolumn{4}{r}{\ldots continued}\\ \hline
\textbf{Measure} & \textbf{Meaning} & \textbf{Correlation} & \textbf{References}\\ \hline
\endhead % all the lines above this will be repeated on every page
\hline
\multicolumn{4}{r}{continued \ldots}\\
\endfoot
\caption{caaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\newline\hspace{\textwidth}
ptioooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooon}
\endlastfoot
Heterogeneity in-degree distribution  &  Degree distribution (in- and out-degree distribution for directed networks) is the frequency distribution of node degree across all nodes, and is a descriptor of the heterogeneity of the network. A network is considered highly homogeneous when nodes are all of very similar degree, and highly heterogeneous when there is high variability in the number of links per node.  &  $+$  &  reference   \\
\hline\hline

\newpage

Heterogeneity in-degree distribution  &  Degree distribution (in- and out-degree distribution for directed networks) is the frequency distribution of node degree across all nodes, and is a descriptor of the heterogeneity of the network. A network is considered highly homogeneous when nodes are all of very similar degree, and highly heterogeneous when there is high variability in the number of links per node.  &  $+$  &  reference   \\
\hline\bottomrule
\label{table:measures}
\end{longtable}
}

\end{document}


Can someone, please, explain to me why there is this line in the output?

• Move the \label at \end{longtable} up, it creates a cell. – Ulrike Fischer Jan 3 '18 at 9:48
• That table is an abuse of the booktabs package. – TeXnician Jan 3 '18 at 9:48
• @UlrikeFischer thanks! that solved the issue. – shamalaia Jan 3 '18 at 9:53
• You should never use vertical lines with booktabs. In most tables they serve no purpose – daleif Jan 3 '18 at 9:54
• Because normally if you load booktabs you want "nice" tables. As the manual says you cannot accomplish this with vertical rules. See e.g. your toprule not connected with the vertical rules. Furthermore you do not make use of \midrule, but use the poorly spaced hline instead. – TeXnician Jan 3 '18 at 9:55