Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

minipage and longtable

1,199 views
Skip to first unread message

Riccardo 'Jack' Lucchetti

unread,
Sep 28, 2001, 1:08:59 PM9/28/01
to
Hi everyone. I need some help on a longtable environment inside a minipage.
Look at the following (minimal) LaTeX document:
----------------------------------------------------------------

\documentclass[a4paper]{article}
\usepackage{longtable}

\begin{document}

Ha\footnote{Ha}. Ha\footnote{Ha}.

\noindent
\begin{minipage}{\textwidth}
\begin{longtable}{|p{1.2in}|rrrr|}
\hline
{Test\footnote{Footnote text}} & 3 & 12 & 4 & 4 \\
\hline
\end{longtable}
\end{minipage}

Ha\footnote{Ha}.

\end{document}
--------------------------------------------------------------

Leave aside for the moment the reasons why one should want to put a longtable
inside a minipage. The trouble is, if you compile this document, you get a wrong
numbering of the footnote inside the minipage: the footnotemark starts from [a]
(as it should), but the footnotetext follows the main document and puts a nice [b]
in the output.

Bug or feature? I think it's a bug, but I'd be glad to be proven wrong.


Riccardo `Jack' Lucchetti
Dipartimento di Economia
Università di Ancona

ja...@deanovell.unian.it
http://www.econ.unian.it/lucchetti

Heiko Oberdiek

unread,
Oct 1, 2001, 2:00:21 AM10/1/01
to
On Fri, 28 Sep 2001 18:08:59 +0100, Riccardo 'Jack' Lucchetti
<ja...@deanovell.unian.it> wrote:

> \documentclass[a4paper]{article}
> \usepackage{longtable}
>
> \begin{document}
>
> Ha\footnote{Ha}. Ha\footnote{Ha}.
>
> \noindent
> \begin{minipage}{\textwidth}
> \begin{longtable}{|p{1.2in}|rrrr|}
> \hline
> {Test\footnote{Footnote text}} & 3 & 12 & 4 & 4 \\
> \hline
> \end{longtable}
> \end{minipage}
>
> Ha\footnote{Ha}.
>
> \end{document}
> --------------------------------------------------------------
>
> Leave aside for the moment the reasons why one should want to put a longtable
> inside a minipage.

But this is the cause of your trouble. Package longtable
was written to span over pages. Using longtable inside
a minipage is outside of its spec.

> The trouble is, if you compile this document, you get a wrong
> numbering of the footnote inside the minipage: the footnotemark starts from [a]
> (as it should), but the footnotetext follows the main document and puts a nice [b]
> in the output.

Replacing "longtable" by "tabular" will fix your problem.

Yours sincerely
Heiko <ober...@uni-freiburg.de>

Riccardo 'Jack' Lucchetti

unread,
Oct 2, 2001, 5:27:02 AM10/2/01
to
In article <st0grt0sc577pq9sb...@4ax.com>, Heiko Oberdiek <ober...@uni-freiburg.de> wrote:
>>
>> Leave aside for the moment the reasons why one should want to put a longtable
>> inside a minipage.
>
> But this is the cause of your trouble. Package longtable
> was written to span over pages. Using longtable inside
> a minipage is outside of its spec.
>

The files I'm working on contain lots of longtable environments because such is
the output of a translation program from RTF to LaTeX (which, by the way, is excellent;
I wish there was available a tool for going in the other direction.as effectively). Any
RTF table gets converted into a longtable, irrespective of its actual size. I thought
that the quickest way to have my tables float was to wrap them up into minipages.
Moreover, I could not find any reference to the minipage environment in the longtable
docs (I admit I haven't searched so hard).


>> The trouble is, if you compile this document, you get a wrong
>> numbering of the footnote inside the minipage: the footnotemark starts from [a]
>> (as it should), but the footnotetext follows the main document and puts a nice [b]
>> in the output.
>
> Replacing "longtable" by "tabular" will fix your problem.
>
> Yours sincerely
> Heiko <ober...@uni-freiburg.de>

Thanks a lot.


--

0 new messages