I am typesetting a table that will have some footnotes in it. Since I
want these footnotes to appear right after the table rather than at
the bottom of the page, I thought I could embed table within a
minipage, something like:
\begin{minipage}{\linewidth}
\begin{table}
\caption{Bla bla bla.}
\centering
\begin{tabular}{ll}
A & B \\
C & D \\
\end{tabular}
\end{table}
\end{minipage}
However, on compilation, I get the following error messages:
test.tex:461:Not in outer par mode. \caption
test.tex:462:Not in outer par mode. \centering
test.tex:463:Not in outer par mode. \begin
I am a bit confused because I thought this will be a way to ensure the
footnotes in the table stay with the table. If I do not use the
minipage environment, everything compiles perfectly (no errors).
Apparently, \caption and other environments are not at the right
place as it stands. I would appreciate if someone could guide me on
how to solve the problem. Regards,
Tariq
I just got around the above problem by messing around with the above
code. The following now compiles:
\begin{table}
\caption{Bla bla bla.}
\centering
\begin{minipage}{\linewidth}
\begin{tabular}{ll}
A & B\\
C & D \\
\end{tabular}
\end{minipage}
\end{table}
However, I am having another issue. I cannot seem to be able to put
\footnote within \caption because tex stops running, complaining that
all text ignored from that point on.:
test.tex:85:Incomplete \iffalse; all text was ignored after line 461.
\input{Chapters/Tools}
test.tex:0:Incomplete \iffalse; all text was ignored after line 95.
This is quite strange because line 461 (where \footnote command
occurs) is nowhere near line 95
How should I add \footnote within the \caption so it shows up right
after the table? The problem is not solved yet; it has taken on a
different shape. Thanks in advance for any suggestions.
Regards,
Tariq
\footnotetext and footnotemark may help you
Pluto
Thanks for posting the suggestion. I am sorry to say that when I try
\footnotemark{1}\footnotetext{A foot note} within the \caption
command, I still get the same errors as I reported earlier. Any other
suggestions I could try? Regards,
Tariq
As a table note, rather than a footnote.
threeparttable.sty
\footnotetext{A foot note} must be outside I think. I know it works
for tables for instance.
Donald
Thanks for the suggestions. However, when I tried \tnote{A note} from
threeparttable within the \caption command, actually nothing shows up
in its place in the the output. I am kind of getting frustrated (have
spent the entire afternoon on this) with the shitty piece of work
LaTeX does on footnotes in tables. I think I was aware of this serious
limitation and that's why have avoided these like plague so far. I do
appreciate your help. Regards,
Tariq
> However, I am having another issue. I cannot seem to be able to put
> \footnote within \caption because tex stops running, complaining that
> all text ignored from that point on.:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ftncapt
--
Ulrike Fischer
Ulrike
Thanks for the link. However, I tried the solution suggested (I am
trying to avoid ccaption packages etc) but I get the same two errors
as before, viz.
test.tex:86:Incomplete \iffalse; all text was ignored after line 462.
\input{Chapter/Tools}
test.tex:0:Incomplete \iffalse; all text was ignored after line 96.
What I do not understand is that the \footnote is entered at line 462
in the source file but tex is also complaining about ignoring from
line 96 (the second error). I have absolutely no earthly idea as to
why this is happening. Without the \footnote within \caption command,
the file compiles just fine.
I am also using the caption package; is there known to be some
conflict from caption package?
Regards,
Tariq
>>> However, I am having another issue. I cannot seem to be able to put
>>> \footnote within \caption because �tex stops running, complaining that
>>> all text ignored from that point on.:
>>
>> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ftncapt
> Thanks for the link. However, I tried the solution suggested
Which one? Use the optional argument of \caption works fine for me:
\documentclass{article}
\usepackage{caption}
\begin{document}
\listoftables
\begin{table}
\centering
\begin{minipage}{\linewidth}
\caption[blabla]{Bla bla bla.\footnote{a}}
\begin{tabular}{ll}
A & B\\
C & D \\
\end{tabular}
\end{minipage}
\end{table}
\end{document}
> What I do not understand is that the \footnote is entered at line 462
> in the source file but tex is also complaining about ignoring from
> line 96 (the second error).
You obviously have more than one source file, or the error comes
from and auxiliary file (e.g. lot) or what ever.
> I have absolutely no earthly idea as to
> why this is happening. Without the \footnote within \caption command,
> the file compiles just fine.
Make a complete minimal document that demonstrates the problem.
>
> I am also using the caption package; is there known to be some
> conflict from caption package?
No, but it is easy to test: remove the caption package and related
commands from your document and run it.
--
Ulrike Fischer
Ulrike
Yes, I do have the project file and the other source files being input
with \include. Using optional argument to \caption command removed the
errors and the footnote does appear nicely at the end of the minipage
environment. I had the idea that optional argument to \caption command
was, well "optional". Obviously, there is a need for that here.
The only thing I would now like to do would be to remove the little
footnoterule that appears above the text of the footnote in the
output. As such, it does not look good because it appears right below
the bottomrule of the table. I believe there is a way to get rid of it
but I am not sure. Would you happen to know off your head? I could put
that code within an environment to limit its scope and remove this
particular footnote rule.
I appreciate your help in resolving my problem. Regards,
Tariq
> Using optional argument to \caption command removed the
> errors and the footnote does appear nicely at the end of the minipage
> environment. I had the idea that optional argument to \caption command
> was, well "optional". Obviously, there is a need for that here.
Sure. It is optional as long as you don't use commands in the
caption text which can break and which you don't want in the list of
tables anyway -- which is why the FAQ I sent you suggests
\caption[Caption for LOF]%
{Real caption\footnote{blah}}
I really don't understand why you didn't try this. Please make a
suggestion how the FAQ could be rephrased.
>
> The only thing I would now like to do would be to remove the little
> footnoterule that appears above the text of the footnote in the
> output. As such, it does not look good because it appears right below
> the bottomrule of the table. I believe there is a way to get rid of it
> but I am not sure. Would you happen to know off your head?
\begin{minipage}{\linewidth}
\renewcommand\footnoterule{}%
\caption[blabla]{Bla bla bla.\footnote{a}}
....
--
Ulrike Fischer
Thanks for all your suggestions.
On Feb 27, 11:44 am, Ulrike Fischer <ne...@nililand.de> wrote:
> Sure. It is optional as long as you don't use commands in the
> caption text which can break and which you don't want in the list of
> tables anyway -- which is why the FAQ I sent you suggests
>
> \caption[Caption for LOF]%
> {Real caption\footnote{blah}}
>
> I really don't understand why you didn't try this. Please make a
> suggestion how the FAQ could be rephrased.
>
Well, I might have gone this route, eventually but the help page
seemed to suggest that the optional argument is needed because
otherwise footnotes will appear at two places. That seemed like good
enough reason to use optional argument, but the problem I ran into was
not the one pointed out at the FAQ. I agree; I should amke a little
suggestion for FAQ about this, just to clarify. .
> \begin{minipage}{\linewidth}
> \renewcommand\footnoterule{}%
> \caption[blabla]{Bla bla bla.\footnote{a}}
> ....
Great; this worked as I wanted.
Your suggestions and advice is always well appreciated on this forum.
I wish I will be of help to others some day like you. Keep up such
good work. Regards,
Tariq
> Thanks for the suggestions. However, when I tried \tnote{A note} from
> threeparttable within the \caption command, actually nothing shows up
> in its place in the the output.
It wouldn't. The \tnote syntax is not like \footnote. The
documentation
(right in threeparttable.sty) is very short, so it should not take
long to
read it all.
You have your \footnote in minipage working anyway, but for
threeparttable it would be
\begin{threeparttable}
\caption{The table title\tnote{a}}
\begin{tabular}
...
\end{tabular}
\begin{tablenotes}
\tnote{a} The note from the caption
\end{tablenotes}
\end{threeparttable}
Donald Arseneau
the faq does actually link to various other places.
i had taken it that you would be sending a proposed change to the
faq. none such has arrived (perhaps it's been mis-directed to a
non-faq address).
anyway, i've done a bit of work on the answer, and have put an interim
version on the web at
http://www.tex.ac.uk/cgi-bin/texfaq2html-beta?label=ftncapt
i would welcome any comment you might make.
notes: 1. there's a missing parenthesis in there, which i know about.
2. the beta address is *never* guaranteed -- it's there just for
testing, and sometimes doesn't even work...
--
Robin Fairbairns, Cambridge
Robin
I am sorry that considerable time has elapsed since my last post; I
had to go through a surgery and that kept me out for a while. Now that
I am beginning to catch up on things, I will again look into it. I
have a feeling that the changes you have made will most likely be
enough. Regards,
Tariq