I have a very long table and want to split it into two pages, and I want the first page to say something like "to be continued" and the second one "continued from the last table." I know I have to use the \endhead and \endfirsthead codes somewhere, but I do not know where.
\documentclass[12pt,twoside]{report}
\usepackage{tabularx, booktabs,multirow,adjustbox,caption,float,subcaption, longtable}
\begin{document}
{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\begin{spacing}{1.03}
\begin{longtable}{l*{1}{c}}
\caption{Executive Constraints by Regime Type} \label{Tab:Tab 2}\\
\hline\hline\endfirsthead\hline\endhead\hline\endfoot\endlastfoot
&\multicolumn{1}{c}{(1)}\\
&\multicolumn{1}{c}{mean(sd)}\\
\hline
\textbf{Civilian Dictatorship} & \\
Legislative constraints on the executive index& 0.300 \\
& (0.240) \\
Judicial constraints on the executive index& 0.364 \\
& (0.246) \\
Range of consultation& -0.0467 \\
& (1.034) \\
Party institutionalization index& 0.502 \\
& (0.223) \\
Freedom of Expression and Alternative Sources of Information index& 0.367 \\
& (0.258) \\
Relative Experience of Core Cabinet Members & 1.029 \\
& (1.119)
\\\hline
%
\textbf{Democracy} & \\
Legislative constraints on the executive index& 0.749 \\
& (0.213) \\
Judicial constraints on the executive index& 0.770 \\
& (0.205) \\
Range of consultation& 1.560 \\
& (1.020) \\
Party institutionalization index& 0.736 \\
& (0.223) \\
Freedom of Expression and Alternative Sources of Information index& 0.850 \\
& (0.136) \\
Relative Experience of Core Cabinet Members & 1.413 \\
& (1.123) \\
\hline
\textbf{Military Dictatorship} & \\
Legislative constraints on the executive index& 0.202 \\
& (0.184) \\
Judicial constraints on the executive index& 0.270 \\
& (0.201) \\
Range of consultation& -0.619 \\
& (1.041) \\
Party institutionalization index& 0.431 \\
& (0.201) \\
Freedom of Expression and Alternative Sources of Information index& 0.279 \\
& (0.222) \\
Relative Experience of Core Cabinet Members & 0.843 \\
& (0.866) \\
\hline
\textbf{Royal Dictatorship} & \\
Legislative constraints on the executive index& 0.287 \\
& (0.254) \\
Judicial constraints on the executive index& 0.410 \\
& (0.224) \\
Range of consultation& -0.174 \\
& (0.923) \\
Party institutionalization index& 0.158 \\
& (0.170) \\
Freedom of Expression and Alternative Sources of Information index& 0.268 \\
& (0.199) \\
Relative Experience of Core Cabinet Members & 0.981 \\
& (1.355) \\
\hline
\hline\hline
\multicolumn{2}{l}{\footnotesize mean coefficients; sd in parentheses}\\
\end{longtable}
\end{spacing}
}
\end{document}```