3

I am trying to include a bibliography in a Beamer presentation. The ideal behaviour would be to have:

  • A complete bibliography in the end, with all the cited items and the IEEEtran like style
  • On each frame, the possibility to add a full citation in the footnotes: this should be without a footnote number, but should use the reference number in brackets, allowing anyway to have footnotes with a superscript number and above the references in that slide (like having two blocks in the footnotes, the real footnotes before and the references after).

What I have been able to obtain is the following, which only uses footnote numbers, which is inconsistent and I think is a bit messy for the reader. Moreover, if there is any suggestion on different ways of citing in slides, it is more than welcome.

\documentclass[10pt]{beamer}
\usepackage[utf8]{inputenc}

\usepackage{filecontents}
\begin{filecontents}{MWE.bib}
@article{Knuth92,
        author = "D.E. Knuth",
        title = "Two notes on notation",
        journal = "Amer. Math. Monthly",
        volume = "99",
        year = "1992",
        pages = "403--422",
}

@book{ConcreteMath,
        author = "R.L. Graham and D.E. Knuth and O. Patashnik",
        title = "Concrete mathematics",
        publisher = "Addison-Wesley",
        address = "Reading, MA",
        year = "1989"
}

@unpublished{Simpson,
        author = "H. Simpson",
        title = "Proof of the {R}iemann {H}ypothesis",
        note = "preprint (2003), available at
        \texttt{http://www.math.drofnats.edu/riemann.ps}",
        year = "2003"
}
\end{filecontents}

\usetheme{Warsaw}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[frame number] %% Add total slide number
\setbeamertemplate{bibliography item}{\insertbiblabel} %% Remove book symbol from references and add number
\usepackage[style=ieee,backend=bibtex]{biblatex}
\addbibresource{MWE.bib}

\begin{document}

\begin{frame}{Some references}
Some references 
\cite{Knuth92,Simpson,ConcreteMath}
\cite{Knuth92}\footfullcite{Knuth92}
\cite{ConcreteMath}\footfullcite{ConcreteMath}
\end{frame}


\begin{frame}[t,allowframebreaks]{References} %% Aligned top
\printbibliography[heading=none]
\end{frame}

\end{document}

enter image description here enter image description here


I edited the MWE with the huge help from @moewe. Now a little additional detail: how complicated would be to move all the footnotes before the footnote citations? Therefore, all the footnotes and then all the references in that page (using \footfullcite) (here the footnote 2 to be before [1])?

The modified code is in the following:

\documentclass[10pt]{beamer}
\usepackage[utf8]{inputenc}

\usepackage{filecontents}
\begin{filecontents}{MWE.bib}
@article{Knuth92,
        author = "D.E. Knuth",
        title = "Two notes on notation",
        journal = "Amer. Math. Monthly",
        volume = "99",
        year = "1992",
        pages = "403--422",
}

@book{ConcreteMath,
        author = "R.L. Graham and D.E. Knuth and O. Patashnik",
        title = "Concrete mathematics",
        publisher = "Addison-Wesley",
        address = "Reading, MA",
        year = "1989"
}

@unpublished{Simpson,
        author = "H. Simpson",
        title = "Proof of the {R}iemann {H}ypothesis",
        note = "preprint (2003), available at
        \texttt{http://www.math.drofnats.edu/riemann.ps}",
        year = "2003"
}
\end{filecontents}

\usetheme[progressbar=frametitle,numbering=fraction]{metropolis}
\setbeamertemplate{bibliography item}{\insertbiblabel} %% Remove book symbol from references and add number
\usepackage[style=ieee,backend=bibtex,citetracker=true]{biblatex}
\addbibresource{MWE.bib}

% See https://tex.stackexchange.com/a/396754/28146
\makeatletter
\newbibmacro*{hypercite}{%
  \renewcommand{\@makefntext}[1]{\noindent\normalfont##1}%
  \footnotetext{%
    \blxmkbibnote{foot}{%
    \printtext[labelnumberwidth]{%
      \printfield{prefixnumber}%
      \printfield{labelnumber}}%
    \addspace
    \fullcite{\thefield{entrykey}}}}}

\DeclareCiteCommand{\hypercite}%
  {\usebibmacro{cite:init}}
  {\usebibmacro{hypercite}}
  {}
  {\usebibmacro{cite:dump}}

% Redefine the \footfullcite command to use the reference number
\renewcommand{\footfullcite}[1]{\cite{#1}\hypercite{#1}}
\makeatother

\begin{document}

\begin{frame}{Some references}
Some references non cited in the footnotes, \cite{Knuth92,Simpson,ConcreteMath} and some cited also in the footnotes\footnote{A footnote}, \footfullcite{Knuth92} and \footfullcite{ConcreteMath}\footnote{A second footnote}
\end{frame}


\begin{frame}[t,allowframebreaks]{References} %% Aligned top
\printbibliography[heading=none]
\end{frame}

\end{document}

And the result is: enter image description here enter image description here

1 Answer 1

3

You can use the following inspired by Help with additional parameter for DeclareCiteCommand

\documentclass[10pt]{beamer}
\usepackage[%
    backend=biber,
    style=ieee,
    citetracker=true,
    ]{biblatex}

\usetheme{Warsaw}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{bibliography item}{\insertbiblabel}

\makeatletter
\newbibmacro*{hypercite}{%
  \renewcommand{\@makefntext}[1]{\noindent\normalfont##1}%
  \footnotetext{%
    \blxmkbibnote{foot}{%
    \printtext[labelnumberwidth]{%
      \printfield{prefixnumber}%
      \printfield{labelnumber}}%
    \addspace
    \fullcite{\thefield{entrykey}}}}}

\DeclareCiteCommand{\hypercite}%
  {\usebibmacro{cite:init}}
  {\usebibmacro{hypercite}}
  {}
  {\usebibmacro{cite:dump}}
\makeatother

\addbibresource{biblatex-examples.bib}

\begin{document}
\begin{frame}{Some references}
Some references 
Lorem\footnote{Duizend}
\cite[1]{sigfridsson,wilde} and \cite[2]{sigfridsson}A\hypercite{sigfridsson}B and \cite[3]{worman} and \cite[4]{geer}
\end{frame}


\begin{frame}[t,allowframebreaks]{References}
\printbibliography[heading=none]
\end{frame}
\end{document}

slide one

This defines a new command \hypercite that has no output save for a footnote with the full citation of the source.

12
  • 1
    @Alex Just try it. With backend=bibtex the example works just as well, but of course Biber is to be preferred. The 'p. 2' is the page number of the reference, it comes from the [2] in \cite[2]{sigfridsson}, if you only \cite{sigfridsson} there is no 'p. 2'.
    – moewe
    Oct 18, 2017 at 10:53
  • 1
    @Alex Yep, fixed.
    – moewe
    Oct 18, 2017 at 11:36
  • 1
    @Alex It adds a space. Otherwise there would be no space between the number in brackets and the name in the footnote.
    – moewe
    Oct 18, 2017 at 11:52
  • 1
    @Alex It's on p. 211 in version 3.7 of the biblatex documentation.
    – moewe
    Oct 18, 2017 at 12:01
  • 1
    @Alex Well, if you don't use \footfullcite and don't plan on using it, you can certainly do that. Just make a note of it so you don't get confused when you open the file years later and wonder why \footfullcite does not work as usual.
    – moewe
    Oct 18, 2017 at 12:12

You must log in to answer this question.

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