# Beamer: Footnote appears twice when used in a frame title

I am trying to insert a footnote on a beamer slide, using a customized template provided by a third party. This simple code:

\begin{frame}
\frametitle{Something\footnote[frame]{text goes here}}

\end{frame}


produces two (?!) footnotes, as shown

I tried alternatively to use \footnotemark and \footnotetext, and in that case the footnote text does not appear at all on the slide, only the mark.

This behavior is specific to footnote associated with a frame title, otherwise it works normally - only one footnote appears. Is there a way to make footnote work inside the title?

• Welcome to TeX - LaTeX! We can't answer this question without seeing what the customized template is or having a full minimal document demonstrating the problem. – Andrew Swann Jun 21 '17 at 11:31
• With default beamer, this problem cannot be reproduced, please post a compilable minimal example (minimal working example (MWE)) – user36296 Jun 21 '17 at 11:46
• Thanks for your comments. @samcarter I found a couple of customized sty files, including beamerinnertheme and beamerouthertheme, but I'm not sure where to look, those files are filled with commands. Any hint where the customized template could differ from the original, which could trigger this strange behavior ? – Marina Jun 21 '17 at 12:30
• @Marina Is this template available somewhere? – user36296 Jun 21 '17 at 12:31
• @samcarter I uploaded beamerouthertheme here: link. My guess is that's the key file – Marina Jun 21 '17 at 12:40

The problem is, that your template was using \insertframetitle two times, once inside a savebox, which was then used to measure the size, and then once more when the frametitle was actually inserted. One solution could be to simply reuse the savebox when the frametitle is inserted:

\documentclass{beamer}

\usetheme[fontPath=Fonts/, imagesPath=Images/, titleHeight=1.45cm]{IMT}
\title{A title for the presentation}
\subtitle{A subtitle}
\author{An author}
\date{\today}

\usepackage[english]{babel}
%\usepackage{geometry}
\makeindex

\makeatletter
\setbeamertemplate{frametitle}%
{\newcommand*{\stilltodo}{T}
\newcommand{\mytrue}{T}
\ForEachX
{,}
{
\ifthenelse{\equal{\stilltodo}{T}}{%
\savebox{\titlebox}{
\ifblue%
\usebeamerfont*{frametitle}\thislevelitem\setstretch{.9}\insertframetitle%
\end{beamercolorbox}
\else%
\begin{beamercolorbox}[wd=\twidth,center]{}
\usebeamerfont*{frametitle}\thislevelitem\setstretch{.9}\insertframetitle%
\end{beamercolorbox}
\fi%
}

\ifthenelse{\titleheight > \ht\titlebox}{%
\renewcommand{\stilltodo}{F}%
\setlength{\titlemargin}{\titleheight}%

\vspace*{-\titleheight}%

\nointerlineskip

\begin{beamercolorbox}[wd=\textwidth,ht=.5\titlemargin,center]{}\end{beamercolorbox}

\nointerlineskip

\hfill\usebox{\titlebox} % NEW !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

%       \ifblue
%       \hfill%
%       \usebeamerfont*{frametitle}\thislevelitem\setstretch{.9}\insertframetitle
%       \end{beamercolorbox}
%       \else
%       \hfill%
%       \begin{beamercolorbox}[wd=\twidth,ht=\ht\titlebox,center, dp=0cm]{}
%       \usebeamerfont*{frametitle}\thislevelitem\setstretch{.9}\insertframetitle
%       \end{beamercolorbox}
%       \fi

}{}
}{}
}
{\LARGE,\Large,\large,\normalsize,\small,\footnotesize}
}
\makeatother

\begin{document}

\section{A Section}
\begin{frame}
\frametitle{Something\footnote[frame]{text goes here}}

\end{frame}

\end{document}