\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
> \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>
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.
--