Graphics, Figures & TablesIntroduce footnotes imediately after one picture

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

Introduce footnotes imediately after one picture

Post by tdcpina »

Hi!

I pretend introduce a footnote imediately under one picture.
Anyone knows how to do it?

Thanks a lot in advance,

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Introduce footnotes imediately after one picture

Post by gmedina »

Hi,

you could use a minipage environment inside the figure environment. The following simple example illustrates this approach:

Code: Select all

\documentclass{article}

\begin{document}

\begin{figure}[!ht]%
\begin{minipage}{\textwidth}
  \centering
  \rule{5cm}{2cm}%to simulate an actual figure
  \caption{test figure with a footnote\protect\footnote{test footnote}}%
  \label{fig:test}%
\end{minipage}
\end{figure}

\end{document}
I used \rule to simulate a figure; of course, you can use the standard \includegraphics command once the graphicx package has been loaded.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

Introduce footnotes imediately after one picture

Post by tdcpina »

Dear Gmedina,

It works. But the footnote appears in double.

The code I introduced is this:

Code: Select all

\begin{figure}
\begin{minipage}{\textwidth}
  \centering
  \includegraphics[width=0.60\textwidth]{D:/Faculdade/Tese/Imagens_Gráficos/Energia/Energia_1.JPG}
  \caption{Distribution of final energy consumption over transport modes in 2004, Source: Eurostat 2006\footnote{EU-25 may be divided into EU-15(Belgium, Denmark, Germany, Greece, Spain, France, Ireland, Italy, Luxembourg, Netherlands, Austria, Portugal, Finland, Sweden, United Kingdom) and EU-10 (Cyprus,Czech Republic, Estonia, Hungary, Latvia, Lithuania, Malta, Poland, Slovakia, Slovenia).\\
EEA-30 is EU-25 plus Norway, Iceland, Bulgaria, Romania, Turkey}}
  \label{fig:Energia_1}
\end{minipage}
\end{figure}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Introduce footnotes imediately after one picture

Post by localghost »

tdcpina wrote:[...] But the footnote appears in double. [...]
Clarify what you mean when saying "double". Usually the footnote mark is not to appear in the ToC. Therefor it is better to use the optional short form of the caption.

Code: Select all

\caption[short version for ToC entry]{Long version with footnote\footnote{Footnote to a figure caption}}
This prevents from trouble with the fragile \footnote command in the moving argument of the \caption command.


Best regards
Thorsten¹
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Introduce footnotes imediately after one picture

Post by gmedina »

Hi,
tdcpina wrote:...It works. But the footnote appears in double...

The code I introduced is this:

Code: Select all

\begin{figure}
\begin{minipage}{\textwidth}
  \centering
  \includegraphics[width=0.60\textwidth]{D:/Faculdade/Tese/Imagens_Gráficos/Energia/Energia_1.JPG}
  \caption{Distribution of final energy consumption over transport modes in 2004, Source: Eurostat 2006\footnote{EU-25 may be divided into EU-15(Belgium, Denmark, Germany, Greece, Spain, France, Ireland, Italy, Luxembourg, Netherlands, Austria, Portugal, Finland, Sweden, United Kingdom) and EU-10 (Cyprus,Czech Republic, Estonia, Hungary, Latvia, Lithuania, Malta, Poland, Slovakia, Slovenia).\\
EEA-30 is EU-25 plus Norway, Iceland, Bulgaria, Romania, Turkey}}
  \label{fig:Energia_1}
\end{minipage}
\end{figure}
Yes, I could reproduce this odd behaviour (you can safely suppress the change line command \\; it has no effect inside a footnote); anyway, you can solve the mentioned problem by loading the caption package:

Code: Select all

\documentclass{report}
\usepackage{caption}
\usepackage{graphicx}

\begin{document}

\begin{figure}
\begin{minipage}{\textwidth}
  \centering
  \includegraphics[width=0.60\textwidth]{D:/Faculdade/Tese/Imagens_Gráficos/Energia/Energia_1.JPG}
  \caption{Distribution of final energy consumption over transport modes in 2004, Source: Eurostat 2006\protect\footnote{EU-25 may be divided into EU-15(Belgium, Denmark, Germany, Greece, Spain, France, Ireland, Italy, Luxembourg, Netherlands, Austria, Portugal, Finland, Sweden, United Kingdom) and EU-10 (Cyprus,Czech Republic, Estonia, Hungary, Latvia, Lithuania, Malta, Poland, Slovakia, Slovenia). EEA-30 is EU-25 plus Norway, Iceland, Bulgaria, Romania, Turkey}}
  \label{fig:Energia_1}
\end{minipage}
\end{figure}
    
 \end{document}
Do not forget the \protect command when using fragile commands (such as \footnote) inside \caption; in fact, the suggestion by localghost of using the optional argument of \caption is a better option.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
tdcpina
Posts: 39
Joined: Wed Apr 15, 2009 4:22 pm

Re: Introduce footnotes imediately after one picture

Post by tdcpina »

Hi!

Thank you! It really works I did the protection. But it worked well without it. I've read the explanation about protection but I can understand it very well, anyway I'll put always in fragil commands.

Without \\ I can't do the paragraph in the footnote. It worked in the footnote like in the "normal text".
Post Reply