I'm trying to use a longtable in landscape. I obtain a compilation error (I use XeLaTex) and I don't know where is the problem. The code is:
\begin{landscape}
\begin{longtable}{ccccccc}
\caption{My table.}
\label{tab:table} \\
\toprule
\multicolumn{1}{c}\textbf{} & \multicolumn{1}{c}\textbf{A} & \multicolumn{1}{c}\textbf{B} & \multicolumn{1}{c}\textbf{C} & \multicolumn{1}{c}\textbf{D} & \multicolumn{1}{c}\textbf{E} & \multicolumn{1}{c}\textbf{F}\\
\midrule
\endfirsthead
\multicolumn{7}{l}{\footnotesize\itshape\tablename~\thetable: continue from previous page} \\
\toprule
\multicolumn{1}{c}\textbf{} & \multicolumn{1}{c}\textbf{A} & \multicolumn{1}{c}\textbf{B} & \multicolumn{1}{c}\textbf{C} & \multicolumn{1}{c}\textbf{D} & \multicolumn{1}{c}\textbf{E} & \multicolumn{1}{c}\textbf{F}\\
\midrule
\endhead
\midrule
\multicolumn{7}{r}{\footnotesize\itshape\tablename~\thetable: continue to next page} \\
\endfoot
\bottomrule
\multicolumn{7}{r}{\footnotesize\itshape\tablename~\thetable: end} \\
\endlastfoot
% table body
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7\\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7\\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\midrule
\textbf{1} & 2 & 3 & 4 & 5 & 6 & 7 \\
\bottomrule
\end{longtable}
\end{landscape}
The error is:
Package longtable Error: Column widths have changed in table 2.1
See the longtable package documentation for explanation.
Type H <return> for immediate help.
...
l.901 \end{longtable}
Any ideas?