# Bibliography numbering in Beamer with authoryear style

I use a (biblatex+biber) style=authoryear bibliography, and do my citations using \footcite{}. I like the way this looks when citing. However, in the bibliography I want the item bullets to be numbers like you can do when using the numbered style (as is explained in How do I get numbered entries in a beamer bibliography). How can I do the same thing, but using the footcite counter instead.

Requested minimal example: I want the output produced by the code below, except I want the bibliography to have an item bullet [i] where i is the number of the foot citation (instead of the document icon).

\documentclass{beamer}

\usepackage[backend=biber,
style=authoryear,
sorting=none,
bibencoding=ascii
]{biblatex}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{Knu86,
author = {Knuth, Donald E.},
year = {1986},
title = {The \TeX book},
}
@book{Aut,
author = {Author, A.},
year = {2000},
title = {A book},
}
\end{filecontents*}

% \setbeamertemplate{bibliography item}{???} % Insert something that hopefully magically fixes everything.

\begin{document}

\begin{frame}
Citation one \footcite{Knu86}
\end{frame}

\begin{frame}
Citation two \footcite{Aut}
\end{frame}

\begin{frame}
\frametitle{References}
\printbibliography
\end{frame}

\end{document}


Note that including \setbeamertemplate{bibliography item}{\insertbiblabel} would have been the solution if I had used style=authoryear.

Only footcite is used to for citations and bibliography entries are never cited twice. There is a clear one to one map from footcite numbering and the bibliography numbering so I'm hoping that a Tex expert knows how to make this work.

• can you please make a minimal working example (MWE)? – user36296 Sep 27 '17 at 12:51
• What if you cite a source twice, if you were to use footnote numbers you would get two different numbers. Do you want both numbers in the bibliography? – moewe Sep 27 '17 at 13:16
• @moewe. Good question. Currently I don't cite the same source twice so there is no issue. For a useful general solution I think adding both numbers would be an acceptable solution (Even better would be to make the footcite use the same number if a citation was already made). All of this makes the problem more complex than I need though. – Kvothe Sep 27 '17 at 15:12

Try this

\documentclass{beamer}

\usepackage[backend=biber, citestyle=numeric, bibstyle=authoryear, sorting=none, autocite=superscript, labeldateparts]{biblatex}

\setbeamertemplate{bibliography item}{\insertbiblabel}

\makeatletter
\input{numeric.bbx}
\makeatother

\newbibmacro*{aycite:shorthand}{%
\printtext[bibhyperref]{\printfield{shorthand}}}

\newbibmacro*{aycite:label}{%
\iffieldundef{label}
{\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
{\printtext[bibhyperref]{\printfield{label}}}}

\newbibmacro*{aycite:labelyear+extrayear}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperref]{\printlabeldateextra}}}

\newbibmacro*{aycite}{%
\iffieldundef{shorthand}
{\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
{\usebibmacro{aycite:label}%
\setunit{\printdelim{nonameyeardelim}}}
{\printnames{labelname}%
\setunit{\printdelim{nameyeardelim}}}%
\usebibmacro{aycite:labelyear+extrayear}}
{\usebibmacro{aycite:shorthand}}}

\DeclareCiteCommand{\supercite}
{}
{\footnote[\thefield{labelnumber}]{\usebibmacro{prenote}\usebibmacro{aycite}\usebibmacro{postnote}}}
{\supercitedelim}
{}

\begin{document}

\begin{frame}
Citation one \autocite[12]{sigfridsson}
\end{frame}

\begin{frame}
Citation two \autocite{worman}
\end{frame}

\begin{frame}
Citation three \autocite{nussbaum}
Citation four \autocite{sigfridsson}
\end{frame}

\begin{frame}
\frametitle{References}
\printbibliography
\end{frame}

\end{document}


Essentially we combine authoryear and numeric as in Combining style numeric with style authoryear in BibLaTeX, furthermore, we use \supercite to give us a footnote with the citation number. The code for the ay macros is from authoryear.cbx. Numbers are printed in the bibliography thanks to How do I get numbered entries in a beamer bibliography

• Note that this will make normal footnotes generated by \footnote and citations independent. This can be potentially confusing when you use both. – moewe Sep 27 '17 at 15:51