9

In the following code, I use \uncover<2->{\footnotetext[2]{footnote 2}} to uncover footnote 2 on the 2nd slide, along with text 2.

However, footnote 2 appears on the 1st slide (also on the 2nd slide).

How to fix it? (BWT, I want to keep the \uncover semantics; \only<2->{\footnotetext[2]{footnote 2}} is not what I want.)

beamer-footnote-overlay

\documentclass[beamer]{standalone}
\begin{document}
\begin{frame}{Footnote Overlay Tested}
  text 1~\footnotemark[1]

  \uncover<2->{text 2~\footnotemark[2]}

  \footnotetext[1]{footnote 1}
  \uncover<2->{\footnotetext[2]{footnote 2}}
\end{frame}
\end{document}
1
  • \footnotetext[2]{\uncover<2->{footnote 2}} hides the text of the footnote but the label is still printed... – Dai Bowen Nov 20 '16 at 11:49
11

Edit: a much simpler solution is to not worry and just let beamer do the job:

\documentclass[beamer]{standalone}
\begin{document}
\begin{frame}{Footnote Overlay Tested}
  text 1\footnote{footnote 1}

  \uncover<2->{text 2~\footnote<2->{footnote 2}}

\end{frame}
\end{document}

Original answer: A bit hacky, but does the job:

\documentclass{beamer}

\begin{document}
\begin{frame}{Footnote Overlay Tested}
  text 1~\footnotemark[1]

  \uncover<2->{text 2~\footnotemark[2]}

  \footnotetext[1]{footnote 1}

  \alt<1>{\let\thefootnote\relax\footnotetext{~}}{\footnotetext[2]{footnote 2}}
\end{frame}
\end{document}

enter image description here

4
  • So \alt<1> replaces \footnotetext[2]{footnote 2} on the first slide with \let\thefootnote\relax\footnotetext{~} which makes \thefootnote do nothing so no number is printed when \footnotetext is called and the {~} argument prints an unbreakable space rather than any visible text (so only saves enough space for single-line footnotes). – Dai Bowen Nov 20 '16 at 12:51
  • @DaiBowen Exactly! This is just a hack, so that the space of the second footnote is reserved on the first slide. For multiline footnotes this might still fail, but one could use \phantom to fix that. – samcarter_is_at_topanswers.xyz Nov 20 '16 at 12:54
  • Excellent, I'd not seen \alt before, it's not quite as elegant as if \uncover<2->{\footnotetext[2]{footnote 2}} gave the desired outcome but I can well imagine that's non-trivial to do and this gives all the desired functionality. I tried using \footnotetext{\phantom{long caption...}} but that didn't seem to reserve the correct space on the first slide. – Dai Bowen Nov 20 '16 at 12:59
  • 2
    @DaiBowen Well \alt is not really necessary, my first solutions used two \only instead, but as the OP wishes not not use \only I'm hiding it :) BTW: I guess we were all thinking much too complicate, see my edit! – samcarter_is_at_topanswers.xyz Nov 20 '16 at 13:05

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.