# Wrong numbers when using \footnotemark

When adding a footnote to a frame title in Beamer using the code from another question, I get wrong numbering. Here you can see 1 above and 0 below:

This is an imaginary example. In reality, I need footnotes to cite the source of the material.

Here is the code:

\documentclass{beamer}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}

% http://tex.stackexchange.com/questions/22323/footnote-in-block-statement
\makeatletter
\renewcommand*{\footnoterule}{\kern -3pt \hrule \@width 2in \kern 8.6pt}
\makeatother

\begin{document}
\begin{frame}{SCLP example\footnotemark}
\footnotetext{To be continued.}
An example of a soft constraint logic program.
\end{frame}
\end{document}


There is a related question "Enumeration of footnotes wrong", but if I add

\addtocounter{footnote}{+1}


before the text of my footnote, I get wrong enumeration once again: 2 above and 1 below.

On the other hand, I tried to replace numbers with stars in the whole document as described here:

\def\thefootnote{\fnsymbol{ctr}}


However, pdfLaTeX wouldn't compile this code.

What else can I try?

-

This might form part of how the frame title is set. In fact, looking at your analysis, it is clear that the frame title is set after the frame contents. As such, avoiding insertion of counter-related commands in the title might be a workable quick-fix.

Here I've forced the counter to be incremented (\stepcounter{footnote}) to allow for correct display when using \footnotetext, and only typeset the number in the frame title using \textsuperscript{\thefootnote}:

\documentclass{beamer}% http://ctan.org/pkg/beamer

%\usepackage[english]{babel}
%\usepackage[utf8]{inputenc}
%\usepackage{times}
%\usepackage[T1]{fontenc}

% http://tex.stackexchange.com/questions/22323/footnote-in-block-statement
\makeatletter
\renewcommand*{\footnoterule}{\kern -3pt \hrule \@width 2in \kern 8.6pt}
\makeatother

\begin{document}
\begin{frame}{SCLP example\textsuperscript{\thefootnote}}
\stepcounter{footnote}\footnotetext{To be continued.}
An example of a soft constraint logic program.
\end{frame}
\end{document}

-

At least in your example, \footnote works inside the frame title.

\documentclass{beamer}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}

% http://tex.stackexchange.com/questions/22323/footnote-in-block-statement
\makeatletter
\renewcommand*{\footnoterule}{\kern -3pt \hrule \@width 2in \kern 8.6pt}
\makeatother

\begin{document}
\begin{frame}{SCLP example\footnote{To be continued.}}
An example of a soft constraint logic program.
\end{frame}
\end{document}


EDIT: In response to your comment: Try to insert the following code snippet in your "full" document:

   \begin{frame}{SCLP example\addtocounter{footnote}{-1}\footnotemark}
\stepcounter{footnote}\footnotetext{To be continued.}
An example of a soft constraint logic program.
\end{frame}

-
Indeed. But in my full document \footnote adds the footnote exactly in the same block with the title and not in the footer. I think, it's style-dependent. –  sdk Mar 2 '12 at 20:44