18

Depending on the theme of a beamer-document, footnotes will either be placed inside or outside of a block-environment. It would like to do combine a style, which places the footnotes inside a block-environment e.g. Copenhagen, with footnotes outside of blocks. Strangely, no option I have tried for \setbeamertemplate{blocks}[option] seems to do that - whether I used default, circles, rectangles,nor inmargin. Is there any other way to tell beamer that footnotes should be placed at the bottom of the frame?

On the left you can see the desired result with theme Berlin, both footnotes are at the bottom of the frame. On the right you see the the outcome with theme Copenhagen that unfortunately places one footnote inside the block-environment, which I would like avoid.

enter image description here

UPDATE: So here is my new MWE with some code from here:

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{csquotes}
\usetheme{Copenhagen}
\usepackage[style=numeric-comp, backend=biber, citetracker=true,sorting=none]{biblatex}
\usepackage{hyperref}
\addbibresource{biblatex-examples.bib}
\setbeamertemplate{navigation symbols}{}

\makeatletter
\newtoggle{cbx@togcite}
% Citation number in brackets
\renewcommand\@makefntext[1]{%
  \iftoggle{cbx@togcite}
    {{\normalfont[\@thefnmark]}\enspace #1}
    {{\normalfont\@thefnmark}\enspace #1}%
  \global\togglefalse{cbx@togcite}}

\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}
     {}
     {\BibliographyWarning{Ignoring prenote argument}}%
   \iffieldundef{postnote}
     {}
     {\BibliographyWarning{Ignoring postnote argument}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{sfcite}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}}

\newbibmacro*{sfcite}{%
  \ifciteseen
  {}
  {\xappto\cbx@citehook{%
   \global\toggletrue{cbx@togcite}%
   \noexpand\footnotetext[\thefield{labelnumber}]{%
     \fullcite{\thefield{entrykey}}\addperiod}}}}

\newrobustcmd{\cbx@superscript}[1]{%
  \mkbibsuperscript{\mkbibbrackets{#1}}%
  \cbx@citehook%
  \global\let\cbx@citehook=\empty}

\let\cbx@citehook=\empty
\makeatother

\begin{document}
    \begin{frame}{A frame}
\begin{block}{Classic theory}
  As we already know from classic theory\sfcite{reese}, ...
  \begin{itemize}
    \item Fact 1
    \item Fact 2
  \end{itemize}
\end{block}
Now there are some new developments\sfcite{bertram} challenging the classic view.
\end{frame}
\end{document}

Update 24.02.

I found that in beamerbaseboxes.sty this minipage seems to be responsible for the footnote inside the block-environment.

\newcommand\beamerboxesrounded[2][]{%
  [...]
  % line 120
  \setbox\bmb@box=\hbox\bgroup\begin{minipage}[b]{\bmb@width}%
  \vskip2pt%
  \usebeamercolor[fg]{\bmb@lower}%
  \colorlet{beamerstructure}{upper.bg}%
  \colorlet{structure}{upper.bg}%
  %\color{.}%
}

\def\endbeamerboxesrounded{%
  \end{minipage}\egroup%

Removing the minipage is not a good solution though, since it messes up the layout. Also taking \end{minipage}\egroup% inside \newcommand\beamerboxesrounded takes the footnote to the bottom of the slide, but messes up the layout.

2
  • 2
    Do you really need more than one footnote in a frame?
    – egreg
    Feb 22, 2012 at 19:03
  • 3
    @egreg, well I use footnotes for showing references in a frame and sometimes there are more than one
    – maetra
    Feb 22, 2012 at 19:46

1 Answer 1

11

It's a very similar problem to this one

You need to use \footnotemark inside the block environment and \foocitetext{reese} immediately after it:

\begin{frame}{A frame}
  \begin{block}{Classic theory}
    As we already know from classic theory\footnotemark, ...
    \begin{itemize}
      \item Fact 1
      \item Fact 2
    \end{itemize}
  \end{block}\footcitetext{reese}
Now there are some new developments\footcite{bertram} challenging the classic view.
\end{frame}

For your particular style, this basic idea can be incorporated into \sfcite. Here footnotes outside blocks are set using the \AfterEndEnvironment hook from the etoolbox package.

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=numeric-comp,citetracker=true,sorting=none]{biblatex}
\usepackage{hyperref}

\usetheme{Copenhagen}
\setbeamertemplate{navigation symbols}{}

\DeclareCiteCommand{\footfullcitetext}
  [\let\thefootnote\relax\mkbibfootnotetext]
  {\usebibmacro{prenote}}
  {\mkbibbrackets{\thefield{labelnumber}}%
   \addnbspace%
   \usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\makeatletter
\let\cbx@citehook=\empty
\newtoggle{cbx@blockcite}

\renewcommand{\@makefntext}[1]{%
  \noindent\normalfont\@thefnmark#1}

\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}{}{\BibliographyWarning{Ignoring prenote argument}}%
   \iffieldundef{postnote}{}{\BibliographyWarning{Ignoring postnote argument}}}
  {\usebibmacro{citeindex}%
   \ifciteseen
     {\ifnumequal{\value{page}}{\csuse{cbx@page@\thefield{entrykey}}}
       {}
       {\ifnumequal{\value{framenumber}}{\csuse{cbx@frame@\thefield{entrykey}}}
          {\usebibmacro{sfcite}}
          {}}}
     {\usebibmacro{sfcite}}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}}

\newbibmacro*{sfcite}{%
  \csnumgdef{cbx@page@\thefield{entrykey}}{\value{page}}%
  \csnumgdef{cbx@frame@\thefield{entrykey}}{\value{framenumber}}%
  \xappto\cbx@citehook{%
    \noexpand\footfullcitetext{\thefield{entrykey}}}}

\newrobustcmd*{\cbx@superscript}[1]{%
  \mkbibsuperscript{\mkbibbrackets{#1}}%
  \iftoggle{cbx@blockcite}
    {}
    {\cbx@citehook%
     \global\let\cbx@citehook=\empty}}

\BeforeBeginEnvironment{block}{\global\toggletrue{cbx@blockcite}}

\def\metabox#1{\edef\theprevdepth{\the\prevdepth}\nointerlineskip
  \vbox to0pt{#1\vss}\prevdepth=\theprevdepth}

\AfterEndEnvironment{block}
  {\metabox{%
     \global\togglefalse{cbx@blockcite}%
     \cbx@citehook%
     \global\let\cbx@citehook=\empty}}

\makeatother

\addbibresource{biblatex-examples.bib}
\begin{document}
\begin{frame}[b]{First Frame}
\begin{itemize}[<+->]
  \item First citation.\sfcite{reese} Recurrent citation.\sfcite{reese}
  \item Second citation.\sfcite{springer}
  \item Recurrent citation.\sfcite{springer}
\end{itemize}
\end{frame}
\begin{frame}[b]{Second Frame}
\begin{itemize}[<+->]
  \item Third citation.\sfcite{glashow}
  \item Recurrent citation.\sfcite{reese,springer,glashow}
\end{itemize}
\end{frame}
\begin{frame}{Third frame}
\begin{block}{Block title}
Recurrent citation.\sfcite{reese} New citation.\sfcite{companion}
\end{block}
New citation.\sfcite{bertram}
Recurrent citation.\sfcite{bertram,companion}
\end{frame}
\end{document}

enter image description here

If you are willing to track footnotes manually, a simpler approach is preferable. Add only the following in your preamble:

\makeatletter
\renewcommand\@makefnmark{\hbox{\@textsuperscript{\normalfont[\@thefnmark]}}}
\renewcommand\@makefntext[1]{{\normalfont[\@thefnmark]}\enspace #1}
\makeatother

\DeclareCiteCommand{\footfullcitetext}[\mkbibfootnotetext]
  {\usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

Then input your frame as

\begin{frame}{A frame}
  \begin{block}{Classic theory}
    As we already know from classic theory\footnotemark\ ...
    \begin{itemize}
      \item Fact 1
      \item Fact 2
    \end{itemize}
  \end{block}\footfullcitetext{reese}

Now there are some new developments\footfullcite{bertram} challenging the classic view. 
\end{frame}
22
  • you're right this solves the problem for the provided MWE. I originally wanted to combine the bibstyle from here tex.stackexchange.com/questions/45406/… with the footnotes. To keep the example simple, I didn't include the relevant bibliography code, which I probably should have done. With the bibliography code, it doesn't really work well, adding a 1 inside the block and [1] outside.
    – maetra
    Feb 24, 2012 at 14:15
  • @maetra Please, make a full MWE
    – egreg
    Feb 24, 2012 at 14:19
  • I hope the MWE makes it clearer now.
    – maetra
    Feb 24, 2012 at 14:39
  • everything works fine for two citations. Although there is one drawback: If there is just \sfootnotemark \sfcitetext and no \sfcite afterwards no footnote is printed.
    – maetra
    Feb 24, 2012 at 15:48
  • 1
    @egreg \sfcitetext needs to expand \cbx@citehook and reset it to \empty. That can be done with the wrapper argument in \DeclareCiteCommand.
    – Audrey
    Feb 24, 2012 at 16:21

You must log in to answer this question.

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