2

In order to limit the space occupied by citations in a beamer presentation, I would like to limit the list of authors to print only the first surname when used in the footnotes field, but I struggle in finding a way to do that.

Starting from Uniform citation numbers in Beamer with Biblatex, how to modify the hypercite bibmacro in the MWE to print only selected fields, i.e. first author's surname and title?

MWE:

\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 \footcite command to use the reference number
\renewcommand{\footcite}[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}, \footcite{Knuth92} and \footcite{ConcreteMath}\footnote{A second footnote}
\end{frame}


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

\end{document}

1 Answer 1

1

To print only the first author's surname in the footnote, you could use the quick and dirty way and use \printnames[][1-1]{author}.

MWE:

\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
    \printnames[][1-1]{author}
    \setunit{\addcomma\addspace}
    \printfield{title}}}}

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

% Redefine the \footcite command to use the reference number
\renewcommand{\footcite}[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}, \footcite{Knuth92} and \footcite{ConcreteMath}\footnote{A second footnote}
\end{frame}


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

\end{document}

enter image description here

4
  • Just as a curiosity, is there a general way to search in the biblatex manual? With biblatex I find myself quite lost, much much more than with the Tikz manual, I don't know why... Oct 20, 2017 at 22:00
  • For example, why \setunit{\addcomma\addspace}? Oct 20, 2017 at 22:04
  • 2
    @Alex Probably there good way to search it - however I am not one of the few enlightened people :) Oct 20, 2017 at 22:07
  • 3
    @Alex \setunit{\addcomma\addspace} is something I learned from reading the source of existing biblatex styles rather then look it up in the manual. Another good learning resource is to read as many answers by tex.stackexchange.com/users/35864/moewe as possible. Oct 20, 2017 at 22:08

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.