Graphics, Figures & TablesHow to avoid excessive table frame at the end of table?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

How to avoid excessive table frame at the end of table?

Post by yoyoimut »

strangetable.jpg
strangetable.jpg (23.4 KiB) Viewed 1159 times
Hi,

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply