# Error: File ended while scanning use of \tabu@collectbody

Kile returns the error "File ended while scanning use of \tabu@collectbody" when I add this to my code.

\begin{center}
\begin{tabu} to \textwidth { | c | c | }
\hline
\underline{Variable} & \underline{Value}\\
$B(\Lambda^{+}_{c}\longrightarrowpK^{-}\pi^{+})$ & 0.0623 \cite{mt}\\
$B{\phi\longrightarrowK^{+}K^{-}$ & 0.492 \cite{mt}\\
$E_{sig}$ & 4.5127$\%$\\
$N_{norm}$ & 1 468 435 \cite{bpal}\\
$E_{norm}$ & 16.564$\%$ \cite{bpal}\\
\hline
\end{tabu}
\end{center}


I've tried messing around with different ways to make the table but they all seem to return the same/similar errors.

This code has a missing {} bracket. When I fix that, My citations all get the error "undefined". I also get these errors: Undefined control sequence \end{tabu} Double superscript \end{tabu}

• You have an unmatched { in the line $B{\phi\longrightarrowK^{+}K^{-}$ & 0.492 \cite{mt}\\  – Phelype Oleinik Aug 7 '18 at 15:29

The first problem, which causes the File ended while scanning use of \tabu@collectbody error, is the unbalanced {. This extra { makes TeX scan the file searching for a matching } which is not found, thus File ended.

The second error, Undefined control sequence, is because of the \longrightarrowpK. I couldn't find anywhere in the internet a command called \longrightarrowpK, thus I assume it is a typo, and what you actually meant is \longrightarrow pK (with a space). The same goes for \longrightarrowK on the next line.

As for the citations being undefined, it is probably a problem with the .bib file or with running BibTeX. I suggest reading Question mark or bold citation key instead of citation number or asking a new question providing a minimal working example with bibliography (MWEB).

Fixing these two problems and adding a basic preamble, it works:

\documentclass{article}

\usepackage{tabu}

\begin{document}
\pagenumbering{gobble}

\begin{center}
\begin{tabu} to \textwidth { | c | c | }
\hline
\underline{Variable} & \underline{Value}\\
$B(\Lambda^{+}_{c}\longrightarrow pK^{-}\pi^{+})$ & 0.0623 \cite{mt}\\
$B\phi\longrightarrow K^{+}K^{-}$ & 0.492 \cite{mt}\\
$E_{\mathrm{sig}}$ & 4.5127$\%$\\
$N_{\mathrm{norm}}$ & 1 468 435 \cite{bpal}\\
$E_{\mathrm{norm}}$ & 16.564$\%$ \cite{bpal}\\
\hline
\end{tabu}
\end{center}

\end{document}