4

I've been trying to change the behavior of the footnotes in beamer. I can change the "footnote" template fine, but I'm having trouble changing the marker in both places. Ideally, I'd like to have flexible control, but here's a simple example.

If I want to use [1] instead of ^1. After seeing how-do-i-change-footnote-font-size-in-beamer-presentation, this is what I tried:

\documentclass{beamer}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makefnmark}{\insertfootnotemark{#1}}{\insertfootnotemark{[#1]}}{}{}
\makeatother
\setbeamertemplate{footnote}{%
    [\insertfootnotemark] \insertfootnotetext
}

\begin{document}

\begin{frame}{Footnote test}
    Hello World.\footnote{Hello Back}
\end{frame}

\end{document}

but the output from pdflatex didn't seem to change. I've seen lots of folks messing with the color (see adding-color-to-the-footnote-mark-in-beamer), but not too much with the style from what I've looked at.

1
  • It would be great if you'd pick a 'more memorable' user name: these userXXXX ones are okay to start with, but keeping a track of who is who gets difficult!
    – Joseph Wright
    Commented Mar 24, 2012 at 7:33

1 Answer 1

6

You were not far off, but beamer is not very flexible about some things (mainly ones which are discouraged in the manual). Here, there are a couple of patches needed

\documentclass{beamer}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makefnmark}{\@textsuperscript}{\@makefnmark@aux}{}{}
\newcommand*{\@makefnmark@aux}[1]{[#1]}
\makeatother
\setbeamertemplate{footnote}{%
    \leavevmode \insertfootnotemark~\insertfootnotetext
}

\begin{document}

\begin{frame}{Footnote test}
    Hello World.\footnote{Hello Back}
\end{frame}

\end{document}

The idea is first to remove the \@textsuperscript from \@makefnmark, then to also deal with the fact that we then need a space where the footnote is actually printed. That needs a \leavevmode, which really should be in the underlying code I guess, but clearly is not!

0

You must log in to answer this question.

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