I want to use \whiledo{}{} to create a long table.
However, I got a strange excessive table frame at the end of the table as shown in the above figure.
When I did not use the \whiledo{}{} and populated the table manually, the problem did not occur.
So the source of problem is the \whiledo{}{}, I think

Code: Select all
\documentclass{book}
\usepackage{array,longtable,ifthen}
\begin{document}
\newcounter{xxx}
\newcommand{\row}{x & y\\\hline}
\begin{longtable}{|m{5cm}|m{5cm}|}\hline
\whiledo{\value{xxx}<5}{\stepcounter{xxx}\row}%
\end{longtable}
\begin{longtable}{|m{5cm}|m{5cm}|}\hline
\row\row\row\row\row%
\end{longtable}
\end{document}
Thank you in advance.
regards,
Yuko