# \endhead in tabulary: “Undefined control sequence. \end{tabulary}”

I am using the packages tabulary, booktabs and longtable. However when using \endhead I get the stated error.

\begin{tabulary}{\linewidth}{RRRR}
\toprule
$U$ [kV] & $\lambda$ [$10^{-11}\,$m] & $\theta$ [$^\circ$] & $d$ [$10^{-11}\,$m]\\\midule\midrule
1 & 2 & 3 & 4\\
\end{tabulary}

• tabulary doesn't have an \endhead command. – David Carlisle Jun 30 '15 at 15:45

You misquote the error message in your title. It is not \end{tabulary} that is undefined.

The first two errors in your document are

! Undefined control sequence.

So the first is a simple typo \midule is undefined and should be \midrule.
The second says that \LT@save@row is undefined, which is an internal longtable command which latex tried to execute as part of \endhead which is only defined for longtable.