1

I want to add a footnote to figure caption.

I'm using the svjour3 document class.

\RequirePackage{amsmath}
\documentclass[natbib]{svjour3}
\usepackage{appendix}
\usepackage{graphicx}
\usepackage{rotating}

\setlength{\rotFPtop}{0pt plus 1fil}% <- add this line after loading rotating
\setlength{\rotFPbot}{0pt plus 1fil}% <- maybe its better to add this line too

\usepackage{caption}
\usepackage{amsmath}
\usepackage{lineno}
\usepackage{booktabs,makecell, multirow}
\usepackage{tikz-qtree,ulem}
\usepackage{subfigure}
\usepackage{float}
\usepackage{tablefootnote}
%\usepackage[utf8x]{inputenc}
\usepackage{color, colortbl}
\definecolor{Gray}{gray}{0.90}

\newcommand*\patchAmsMathEnvironmentForLineno[1]{%
\expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
\expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
\renewenvironment{#1}%
{\linenomath\csname old#1\endcsname}%
{\csname oldend#1\endcsname\endlinenomath}}% 
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%
\patchAmsMathEnvironmentForLineno{#1}%
\patchAmsMathEnvironmentForLineno{#1*}}%
\AtBeginDocument{%
\patchBothAmsMathEnvironmentsForLineno{equation}%
\patchBothAmsMathEnvironmentsForLineno{align}%
\patchBothAmsMathEnvironmentsForLineno{flalign}%
\patchBothAmsMathEnvironmentsForLineno{alignat}%
\patchBothAmsMathEnvironmentsForLineno{gather}%
\patchBothAmsMathEnvironmentsForLineno{multline}%
}

\newcommand*{\affaddr}[1]{#1} % No op here. Customize it for different styles.
\newcommand*{\affmark}[1][*]{\textsuperscript{#1}}

\usepackage[linesnumbered,ruled]{algorithm2e}
\usepackage{floatpag}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{color, colortbl}
\definecolor{Gray}{gray}{0.90}

\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
\usepackage[margin=2cm]{geometry}


\begin{document}

    \begin{figure}
      \begin{minipage}{\textwidth}
        ...
        \caption[Compact Routing Example]%
        {Compact Routing\footnote{something} Example}
      \end{minipage}
    \end{figure}

\end{document}

The caption is displayed in the middle of the page and the footnote superscript is a and the footnote is displayed at the bottom of the figure. However, I also have footnotes within the text which are displayed at the bottom of the page. I'd like the figure and regular text footnotes to be in the same spot (at the bottom of the page).

How can I achieve that?

  • When I use this source, there is a footnote: image. What source svjour3.cls are you using? Can your provide a minimal example that replicates your (incorrect) behaviour? – Werner Oct 12 '18 at 0:11
  • @Werner please check the edited message – user2869180 Oct 12 '18 at 0:24
  • This is the output, as expected. So, I guess, what do you mean by "it's not working". – Werner Oct 12 '18 at 0:27
  • @Werner in the same page i have other \footnote i get them in the bottom of the page listed as 1 and 2 etc. But the footnote for the image it come just after the image as you get. iwant to be listed with the other on ein the bottom of the page and using the same supercript format – user2869180 Oct 12 '18 at 0:30
1

My suggestion here would be to place the \footnotemark and \footnotetext close to one another in the source code, hoping that the content (figure and accompanying footnote text) will be on the same page.

enter image description here

\documentclass{svjour3}

\usepackage{graphicx,lipsum}

\begin{document}

\begin{figure}
  \centering
  \includegraphics[width = .5\linewidth]{example-image}
  \caption[Compact Routing Example]%
    {Compact Routing\footnotemark{} Example}
\end{figure}

\footnotetext[\value{footnote}]{Figure footnote.}%
Here is another footnote\footnote{Text footnote.}.
\lipsum[1-3]

\end{document}
0

That the expected for a footnote in a minipage. You should think in this type of boxes just special (mini)pages, so they have their own footnotes.

On the other hand, a \caption is the worse place for a footnote, because without the optional argument will be mandatory (try to remove ("[Compact Routing Example]") and moreover, is inside a float: without the minipage, you will obtain a numeric mark but no the footnote text.

There are at least two tricks to make like like a "normal footnote" inside a caption:

1) Use \footnotemark\ inside the caption and \footnotetext{text} outside the float.

2) Use the footnote package and wrap the float in the savenotes environment.

Minimal working example with both solutions commented, try to uncomment one or another:

\documentclass{article}
\usepackage{footnote}
\usepackage{lipsum}
\begin{document}
\title{footnotes everywhere}
\maketitle
\lipsum*[1]\footnote{text foonote}
%\begin{savenotes}
\begin{figure}[h]
\centering\fbox{\begin{minipage}{8cm}
%\caption[CRE]{Compact Routing\footnotemark\ Example}  % without savenotes
%\caption[CRE]{Compact Routing\footnote{caption footnote} Example} % with savenotes
\end{minipage}}
\end{figure}
%\end{savenotes}
\footnotetext{caption footnotetext} % without savenotes
\lipsum[2-6]
\end{document}

But remember: the floats float. If the float is loaded in a page, but moved to another you will end with the mark in that page and the footnote text in another. Just try to change the [h] option to [t] in the figure environment. Then you will float too, Georgie.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.