2

I want to reset(i.e. renew) footnote counter to be 0(or 1) for each frame in beamer class. So that the footnote counter starts 1 at the every beginning of the frame.

Here is my code ;

\documentclass{beamer}
\usetheme{Copenhagen}
\usecolortheme{beaver}

\usepackage[utf8]{inputenc}

%%% Footnotes
\makeatletter
\def\@fnsymbol#1{\ensuremath{\ifcase#1\or
*\or **\or ***\or
\star\or\star\star\or\star\star\star\or
\dagger\or\dagger\dagger\or\dagger\dagger\dagger
\else\@ctrerr\fi}}

\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\makeatother
%\counterwithin*{footnote}{frame}

\begin{document}
%
\begin{frame}
\frametitle{A frame}
Today's digital economy is built on intricate chians of basic algorithms.
And I want to put a footnote here\footnote{This is a description of the word `here'} and there\footnote{This is another description. Note that the footnotemark is not the standard one. I altered it in preamble.}
\end{frame}

%
\begin{frame}
\frametitle{Another frame}
This is another frame.
And I want to put another footnote here\footnote{This is the third footnote of the entire document, but the first of this frame. So I want to denote the footnotemark as the first one instead of third one.}.
\end{frame}
\end{document}

I tried \counterwithin*{footnote}{frame} but unsuccessfully, with the following error message

! LaTeX Error: No counter 'frame' defined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.17 \counterwithin*{footnote}{frame}

? 

And

\makeatletter
\@addtoreset{footnote}{frame}
\makeatother

doesn't work either.

Can you please help me? Thank you for advance.

1 Answer 1

7

With \AtBeginEnvironment, it works, so just add these two lines:

\AtBeginEnvironment{frame}{\setcounter{footnote}{0}}

enter image description here

2
  • I see. But is the package etoolbox necessary? It seems that it works without the package. Thank you!
    – shyzealot
    Feb 29, 2020 at 16:18
  • 1
    You're right. I had forgotten it has been incorporated to the latex kernel. Fixed.
    – Bernard
    Feb 29, 2020 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .