Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

Wrong numbers

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
\addtobeamertemplate{footnote}{\vspace{-6pt}}{\vspace{6pt}} 
\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?

share|improve this question

2 Answers 2

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}:

enter image description here

\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
\addtobeamertemplate{footnote}{\vspace{-6pt}}{\vspace{6pt}} 
\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}
share|improve this answer

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
\addtobeamertemplate{footnote}{\vspace{-6pt}}{\vspace{6pt}} 
\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}
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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