# Why the horizontal line behaves differently in supertabular and tabular?

I have a problem using the supertabular package. Basically the horizontal lines, instead of stopping at the end of the table, continue until the end of the page.

This is a self-explaining screenshot. The first is a supertabular, the second is a tabular:

And here's the code. I tried to cut it in order to make it as short as possible but still keeping it functioning. What am I doing wrong? I'm not very expert at LaTeX so I might be missing something.

\documentclass[a4paper,12pt]{book}

\usepackage{supertabular}
\usepackage{array}
\usepackage[]{geometry}
%\newcolumntype{v}[1]{>{\raggedright \arraybackslash\hspace{0pt}}p{#1}}

\begin{document}

\hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \tabularnewline
}
\tabletail{%
}

\begin{supertabular*}{\textwidth}{ | c | c | c | c | c | c | c | c | c | c | c | c | }
\hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \tabularnewline
\hline
\end{supertabular*}

\begin{tabular}{ | c | c | c | c | c | c | c | c | c | c | c | c | }
\hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11  \\ \hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11  \\ \hline
\end{tabular}

\end{document}
-
In your supertabular you have told it to be as wide as the \textwidth, so it's doing what you're telling it to! –  cmhughes Jan 19 '12 at 17:42
@cmhughes I tried removing it, but if I do it gives me an error. What should I specify instead of that? –  Alenanno Jan 19 '12 at 17:43
Use \begin{supertabular}{|c|c... instead of \begin{supertabluar*}{\textwidth}... –  cmhughes Jan 19 '12 at 17:45
@cmhughes That worked! If you post that as an answer I can accept it. Thanks. :) Like I said, I am not that expert. When you post it, could you include what is that * meaning? Or some links would be good too. –  Alenanno Jan 19 '12 at 17:49

You are using supertabular* which is used in the same way as tabular*, i.e, it takes a width as its first argument.

You have specified the width of your supertabular* as \textwidth, so your \hline is drawn across the width of the page.

From your question, it sounds like you would prefer to use the supertabular environment, which does not take a width as its first argument. In the context of your example, it sounds like you want the following code:

\begin{supertabular}{ | c | c | c | c | c | c | c | c | c | c | c | c | }
\hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \tabularnewline
\hline
\end{supertabular}