# Error in a long table : overfull\hbox

I have made a long table, somehow it showed an error in the line where has a very short content (ShoL & shoulder left\).

I have checked similar questions from this forum. I can´t use tabularx under longtable environment, is that true? If yes, where should I put \begin{tabularx}? I have tried to put \begin{tabularx} after \begin{longtable} before \caption, with \usepackage:tabularx in preamble of course, but it turned out just more errors.

I have also tried the solution with \begin{sloppypar} \end{sloppypar}, also didn´t work.

The current error msg is:

! Undefined control sequence.
<argument> ...ibnameprefix {of}\isdot \ifprefchar
{} {} {\ifuseprefix {\bibn...
l.168

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Overfull \hbox (81.02432pt too wide) in paragraph at lines 168--168

\T1/lmr/m/n/12 (-20) [Ac-cessed on Septem-ber 20, 2016], Avail-able on : http:/
/www.sunyem.com/simulation/overview/.


My script is under, in order to present a short script, I have delete many lines from the table, so now it´s not that long :

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{array, booktabs, caption}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{longtable}
\setlength{\tabcolsep}{10pt}
\renewcommand{\arraystretch}{1.5}

\begin{document}
\begin{longtable}{ll}
\caption{List}
\label{tab:Ch2VCOB}\\
\hline
\multicolumn{2}{l}{Components:}

\multicolumn{2}{c}%
{{\tablename\ \thetable{} continued from previous page}} \\
\hline \multicolumn{1}{l}{}

\hline \hline
\endlastfoot
\multicolumn{1}{l}{Joints <joi>}
\tabularnewline
Free    &       free - joint beween inertial and midhip\\
Navl    &       navel - joint between lower and middle\\& trunk\\
Subs    &       substernal - joint between middle and upper \\
&       trunk\\
Cerv    &       cervicular - joint between neck and upper \\&trunk\\
Atls    &       atlas - joint between head and neck\\
ShoR    &       shoulder right\\
ElbR    &       elbow right\\
WriR    &       wrist right\\
ShoL    &       shoulder left\\
ElbL    &       elbow left\\
WriL    &       wrist left\\
HipR    &       hip right\\
KneR    &       knee right\\
AnkR    &       ankle right\\
HipL    &       hip left\\
KneL    &       knee left\\
AnkL    &       ankle left\\
\end{longtable}
\end{document}


• The example code compiles with no error and no overfull. Nov 22 '16 at 10:24
• Use the package ltxtable if you want to combine longtable with tabularx. Nov 22 '16 at 10:30
• the error message you show is unrelated to the code you have posted. Nov 22 '16 at 10:42
• The error message is unrelated to overfull boxes or tables: it is simply that you have used a command \ifprefchar that has not been defined. The line number is probably the line number of the generated bibliography file, impossible to tell from the segment you have posted (and unrelated to the code you posted) Nov 22 '16 at 13:19
• @Vivian the new question again posts code that is unrelated to the error. Look it is really easy for you to check that the example you make generates the error before you post the question. It's not possible for anyone to tell you what is wrong with code they can not see, so it has to be you that does it. Nov 24 '16 at 19:22

Try

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{caption}
\usepackage{multicol}
\usepackage{array, booktabs, multirow, longtable}
\usepackage{ltablex} %  <-- added (as suggested by Bernard in his comment)
\keepXColumns
\setlength{\tabcolsep}{10pt}
\renewcommand{\arraystretch}{1.5}

\usepackage{lipsum} % <-- added for dummy text

\begin{document}

\begin{tabularx}{\textwidth}{lX} %  <-- changed from \begin{longtable}
\caption{List}
\label{tab:Ch2VCOB}\\
\toprule
\multicolumn{2}{l}{Components:}

\caption{continued from previous page} \\
\toprule

\bottomrule
\endlastfoot
\multicolumn{1}{l}{Joints <joi>}
\tabularnewline
Free    &       free - joint beween inertial and midhip\\
Navl    &       navel - joint between lower and middle trunk\\
Subs    &       substernal - joint between middle and upper trunk\\
Cerv    &       cervicular - joint between neck and upper trunk\\
Atls    &       atlas - joint between head and neck\\
ShoR    &       shoulder right\\
test    &   \lipsum[1]  \\  % added for test if long table works
ElbR    &       elbow right\\
WriR    &       wrist right\\
ShoL    &       shoulder left\\
ElbL    &       elbow left\\
WriL    &       wrist left\\
HipR    &       hip right\\
KneR    &       knee right\\
AnkR    &       ankle right\\
HipL    &       hip left\\
KneL    &       knee left\\
AnkL    &       ankle left\\
\end{tabularx}  %  <-- changed
\end{document}


For final table form you need to compile table twice.

Edit: Many people prefer ltxtable instead of ltablex because the later turns all tabularx tables environment to longtable. For use of ltablex see David Carlisle answer here.

• I took the liberty and edited your answer: ltablex was suggested by Bernard, I suggested ltxtable. I don't recommend ltablex since it turns all tabularx to longtables, but that's only my taste. Nov 22 '16 at 10:51
• Thank you for correction. Many people recommend to use {ltxtable}. I will add this to my answer. Nov 22 '16 at 11:11
• @Vivian, sorry, but this is different problem for new question. Your MWE as well proposed solution don't generates any error. In your MWE is nothing about bibliography, so nor in mine answer. SO, I can't said anything about this. Nov 22 '16 at 11:22
• @Vivian, your error is not seems to be linked to ltablex`. You should have something in table content which cause this error. Strip down your real table to row(s), which cause it and than ask new question regarding this cause. Nov 22 '16 at 12:12
• @Vivian: The code doesn't contain any citations so the messages of bibtex are correct. Don't run bibtex with such a minimal example if you don't want to get them. Or ignore the messages. Nov 22 '16 at 13:15