LaTeX users online

In total there are 24 users online :: 0 registered, 0 hidden and 24 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 24 guests

Problems with \footnote in \caption (in table or figure env)

LaTeX Forum: General

Add tags LaTeX specific issues not fitting into one of the other forums of this category.

Postby jimisola on Mon Mar 17th, 2008

Hi!

I've read several post in the forum regarding footnotes but none that seem to solve my problem.

I want to a \footnote in a table-tabulary caption, but only the marker (e.g. "1" shows). The marker links to the first page of my document.
So, I added \footnotetext{abcd} immediately after the table and it worked somewhat:

1. the footnote text appears, but it sometimes appear on the wrong page
2. I get a bunch of errors/warnings

Regards,
Jimisola
Attachments
test-latex.tex
minimal working example
(3.37 KiB) Downloaded 271 times
jimisola
 
Posts: 22
Joined: Sat Feb 2nd, 2008

Postby jimisola on Thu Mar 20th, 2008

I found a couple of pages providing solutions to this problem (I haven't verified the solution yet though):

  • http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ftncapt
  • http://radio.wihome.net/wiki/?article=LaTeX:tablefootnotes
  • http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footintab
jimisola
 
Posts: 22
Joined: Sat Feb 2nd, 2008

Postby Stefan_K on Thu Mar 20th, 2008

Hi jimisola,

the threeparttable package should be a good solution.

Stefan
User avatar
Stefan_K
Site Admin
 
Posts: 7474
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Postby jimisola on Thu Mar 20th, 2008

Stefan_K wrote:the threeparttable package should be a good solution.
Stefan


I saw that being mentioned in other places, but I'm already using tabulary and I need to use that. Can I use threeparttable together with tabulary?

At the moment I used footnotemark and footnotetext but the footnotes are on the wrong places.

While I have your attention, I also have a problem with figures, table and boxedminipage floating around in the wrong order.
I've added \usepackage{float} and used [!h]

\noindent\begin{boxedminipage}[!h]{\textwidth}
\begin{table}[!h]
\begin{figure}[!h]

but they still show in the wrong order. What else can I do?
jimisola
 
Posts: 22
Joined: Sat Feb 2nd, 2008

Postby Juanjo on Thu Mar 20th, 2008

I've had a look at the file you attach in your first post. Several coments are in order:
  • It is not a minimal working example. Obviously it is not minimal (most of the code can be dropped) and it is not working: since you include a \footnote command in \caption, you need to \protect it to be able to compile without errors (i.e. you should add \protect just before \footnote). Of course, \footnote does not work, but that's a different problem.
  • Since you use the h descriptor for the table environment, you do not really want your table to float. It seems that you'd like to place it in a specific point of the document. So why not consider the table as a "non-float"? If this is feasible, the nonfloat package may be of help. Please, look at the following example, inspired in your problem, the comments in one of the pages of the TeX Faq you mention later and an example in the manual of nonfloat.
    Code: Select all  •  Open in online LaTeX editor
    \documentclass{article}
    \usepackage{nonfloat}
    \begin{document}

    \listoftables

    \section{First example}

    The footnote for the caption goes below the table.\\[\intextsep]

    \begin{minipage}{\textwidth}
       \centering
       \begin{tabular}{|c|}
          \hline  Tabular stuff here \\ \hline
       \end{tabular}
       \tabcaption[Text of the caption (first example)]{Text of the caption
           (first example)\footnote{Text of the footnote (first example)}}
     \end{minipage}
     \\[\intextsep]
     
     \section{Second example}

    The footnote for the caption goes at the bottom.\\[\intextsep]
    \begin{minipage}{\textwidth}
       \centering
       \begin{tabular}{|c|}
          \hline  Tabular stuff here \\ \hline
       \end{tabular}
       \tabcaption[Text of the caption (second example)]{Text of the caption (second example)\footnotemark}
     \end{minipage}
     \\[\intextsep]
    \footnotetext{Text of the footnote (second example)}
     
     \end{document
    }

  • Off topic: article class for writing a thesis?
User avatar
Juanjo
 
Posts: 656
Joined: Sat Jan 27th, 2007

Postby sommerfee on Thu Mar 20th, 2008

Juanjo wrote:\usepackage{nonfloat}


I do not recommended the usage of the nonfloat package. Beside the fact that its documentation tells wrong things (floats placed with [H] are not limited to have captions beneath the float, how should they, [H] is a placement parameter and therefore has nothing to do with the contents of the float), it changes the float placement parameters (\textfraction etc., and also \@fptop etc.) and has no option to suppress that. Furthermore it defines a command called \topcaption which conflicts with \topcaption offered by the supertabular package.

I recommend the usage of the capt-of package instead, it simply defines \captionof, if that is all you need, this is the perfect package for you.
Last edited by sommerfee on Thu Mar 20th, 2008, edited 1 time in total.
User avatar
sommerfee
 
Posts: 497
Joined: Mon Apr 9th, 2007

Postby jimisola on Thu Mar 20th, 2008

Hi Juanjo!

Thank you for replying.

Juanjo wrote:I've had a look at the file you attach in your first post. Several coments are in order:
  • It is not a minimal working example. Obviously it is not minimal (most of the code can be dropped) and it is not working: since you include a \footnote command in \caption, you need to \protect it to be able to compile without errors (i.e. you should add \protect just before \footnote). Of course, \footnote does not work, but that's a different problem.
  • Since you use the h descriptor for the table environment, you do not really want your table to float. It seems that you'd like to place it in a specific point of the document. So why not consider the table as a "non-float"? If this is feasible, the nonfloat package may be of help. Please, look at the following example, inspired in your problem, the comments in one of the pages of the TeX Faq you mention later and an example in the manual of nonfloat.


Sorry, about the lack of a proper MWE. I included usepackage declarations etc because I was not sure whether the affected something else. And to have it working with my "usepackage" declarations did not make much sense. About it not work, missed out on that.

Anyway, I'd read up on footnotes and captions in the FAQ before I saw your post and managed to get it right. Well, almost they show and they have the right numbering but the footnotetext is not always (seldom to be honest) on the same page as the footnotemark.

I was not aware of the nonfloat package. I've only used LaTeX twice before (for another thesis and software documentation) and I'm fully aware that I'm not aware of all useful packages yet.

I tried out the nonfloat page and it did the works (thank you!). So, I think I'll stick with that from now instead of the non-promisable [!h] or [!H] options.

However, I had two issues:

  • "\\[\intextsep]": It seems as if \\[\intextsep] cannot be on a line of its own because I get an error. But, in the nonfloat-en.pdf it's on a line alone.
  • the problem with footnotetext showing up on the wrong packages persist even with nonfloat and I've followed your example as far as I can see.


Juanjo wrote:
  • Off topic: article class for writing a thesis?


What do you suggest then - report?
Have used article with my previous thesis (160 pages) and it worked out fine.
I read up on the difference between the two and except for report allowing the use of chapters I did not find much difference.
But, if there is any other reason to change then I'm all ears.

Regards,
Jimisola
jimisola
 
Posts: 22
Joined: Sat Feb 2nd, 2008

Postby jimisola on Thu Mar 20th, 2008

sommerfee wrote:
Juanjo wrote:\usepackage{nonfloat}


I do not recommended the usage of the nonfloat package. Beside the fact that its documentation tells wrong things (floats placed with [H] are not limited to have captions beneath the float, how should they, [H] is a placement parameter and therefore has nothing to do with the contents of the float), it changes the float placement parameters (\textfraction etc., and also \@fptop etc.) and has no option to suppress that. Furthermore it defines a command called \topcaption which conflicts with \topcaption coming from the supertabular package.

I recommend the usage of the capt-of package instead, it simply defines \captionof, if that is all you need, this is the perfect package for you.


Thank you for the feedback. I'll had a look at capt-of and I have to be honest, I don't know if \captionof is all I need.
If I understood it right, it lets me leave out \begin{figure|table} which are floats.

To sum it up my current problems are:

1) figures and tables are out of order (I need them in a specific order)
2) some of my captions has footnote/footnotemark in them
3) these footnotetext are not shown on the page where the footnotemark is

What I currently use are table, figure and boxedminipage (note the use of footnote[mark|text]):

Code: Select all  •  Open in online LaTeX editor
\begin{table}[]
        \centering
    \begin{tabulary}{\textwidth}{|C|L|
}
    ...

Code: Select all  •  Open in online LaTeX editor
\begin{figure}[]
  \rule{\textwidth}{0.005in}
        \centering
            \resizebox{11cm}{!}{\includegraphics{tem-modell}}
        \caption{Schematisk Ã¶versikt av TEM-modellen}
        \label{figure_bakgrund_tem_modell}
  \rule{\textwidth}{0.005in}   
\end{figure
}


Code: Select all  •  Open in online LaTeX editor
\noindent\begin{boxedminipage}[]{\textwidth}
                        \begin{center}
                        \textbf{Definition av Undesired aircraft state}
                        \end{center}

                        Undesirable aircraft state Ã¤r definerat som en position, hastighet, attityd, tillstÃ¥nd eller konfiguration av ett flygplan som:\footnotemark
                                \begin{itemize}
                                        \item hÃ¤rstammar frÃ¥n fel av flygplansbesÃ¤ttning, \textcolor{red}{agerande/handlade} eller icke-handlande
                                        \item klar minskar sÃ¤kerhetsmarginaler
                                \end{itemize}
\end{boxedminipage}
\footnotetext{\cite{defensive-flying,FAA-losa-ac,ICAO-9803}
}



Regards,
Jimisola
jimisola
 
Posts: 22
Joined: Sat Feb 2nd, 2008

Postby balf on Thu Mar 20th, 2008

Did you think of looking at the ctable package? This is another package that handles footnotes in a table or figure environment (and many other things). It doesn't seem to cooperate with tabulary, but it does with tabularx. So maybe with some redefinitions in your preamble...

Regards,
B.A.
balf
 
Posts: 158
Joined: Sat Jan 12th, 2008

Postby jimisola on Thu Mar 20th, 2008

balf wrote:Did you think of looking at the ctable package? This is another package that handles footnotes in a table or figure environment (and many other things). It doesn't seem to cooperate with tabulary, but it does with tabularx. So maybe with some redefinitions in your preamble...


No, I haven't looked at ctable and I doubt I'll be able to use it. I seem to recall that I needed to use tabulary for my needs (see this thread http://www.latex-community.org/viewtopic.php?f=5&t=910).

A typical table of mine looks as follows. I fought hard to get the alignment, width and spacing that it has.
Do you think that I can get the table to look the exact same in tabularx?

Code: Select all  •  Open in online LaTeX editor
\begin{table}[]
        \centering
    \begin{tabulary}{\textwidth}{|C|L|}
        \hline
                                \rowcolor[gray
]{.75}
         \vphantom{\rule{0pt}{10pt}}typer av undesirable aircraft states & \vphantom{\rule{0pt}{10pt}}Exempel \\[5pt]
        \hline
        flygplanshantering & vertikal, laterala eller hastighets-deviationer\newline
                                                                                        onÃ¶diga vÃ¤derpenetreringar\newline
                                                                                        unstable approaches\newline
                                                                                        lÃ¥nga, flytande, bestÃ¤mda eller icke-centrumlinje-landingar\\\hline
        marknavigering & runway/taxiway-intrÃ¥ng\newline
                                                                         fel taxiway, ramp, gate eller hold spot\newline
                                                                         taxning Ã¶ver hastighetsbegrÃ¤nsning\\\hline
        felaktig flygplanskonfiguration & automation, motor, roder, system eller mass-balans \textcolor{red}{events}\\\hline                
                  \end{tabulary
}
  \caption[Typer av undesirable aircraft states samt exempel]%
  {Typer av undesirable aircraft states samt exempel\footnotemark}     
        \label{table_bakgrund_tem_uas_exempel}
\end{table}
\footnotetext{\cite{defensive-flying}
}


Regards,
Jimisola

Off topic:

I love LaTeX, but I have to say that all these different packages, ways to do things and different opinions on how to do it does not help.
Quite frankly, I'm certain that it would have gone faster to write this report in Word/OpenOffice despite their obvious cons.
Still, I like the output etc that LaTeX gives me and I hope that all the trouble I'm going through now will be a one-time thing.

EDIT: I had a look at ctable and I doubt it works for me 1) it does not support tabulary and 2) the footnotes are placed at the bottom of the table/figure not at the bottom of the page. I can already have that done today in a simplier manner.

People please feel free to come up with suggestions on how to solve this. As for now, I have to stop trying to fix this now - I need to focus on the actual writing of my thesis.
jimisola
 
Posts: 22
Joined: Sat Feb 2nd, 2008

Next

Return to General

LaTeX users online

Users browsing this forum: No registered users and 24 guests
http://www.latex-community.org/forum/viewtopic.php?f=5&t=1078
www.latex-community.org
crawl=CC-MAIN-2016-26
69745
application/http; msgtype=response
sha1:ZJD5HYP3E5266ZSBZWUB6MRXGELGW2YE
<urn:uuid:197b33d0-ae1c-4b6d-a0bf-3ea701c56ba3>
2016-06-28T16:46:42Z
78.46.26.59
sha1:5JJ6WCAWDHJIDDMTLO7WB5W7EERE2FTA
<urn:uuid:27ebb66f-fb5c-4fbf-b6d3-9e498795f896>
http://www.latex-community.org/forum/viewtopic.php?f=5&t=1078
response
<urn:uuid:a0ab7c7f-2639-4843-9b89-532c64f17f25>
robots: classic
hostname: ip-10-164-35-72.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2016-26
operator: CommonCrawl Admin
description: Wide crawl of the web for June 2016
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf