90

Instead of the default icons or the text option, I would like to have numbered entries in my bibliography.

I added the line:

\setbeamertemplate{bibliography item}{}

to get rid of the icons, but can't figure out how to get numbers to display in their place. The references in the content slides are numbered, but without the corresponding number in the bibliography it's not very helpful.

MWE:

\documentclass[t]{beamer}

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{bibliography item}{}
\setbeamertemplate{frametitle continuation}[from second]

\setbeamertemplate{footline}{
    \hspace*{0.1cm}
    \text{short title}
    \hspace{1cm}
    \insertshortauthor
    \hspace{3.5cm}
    \insertsectionhead
    \hfill
    \insertframenumber
    /
    \inserttotalframenumber
    \hspace{0.1cm}
}

\title{a title}
\author[me]{my full name}
\institute{where I work}
\date{today}

\begin{document}

\begin{frame}
    \titlepage
\end{frame}

\begin{frame}
    \frametitle{1st slide}
    Some text. \cite{ref_1} More interesting text. \cite{ref_2} Some even more interesting stuff. \cite{ref_3} 
\end{frame}

\begin{frame}[allowframebreaks]
\frametitle{References}
    \tiny{\bibliographystyle{abbrv} }
    \bibliography{refs}
\end{frame}

\end{document}

Bib file:

@inproceedings{ref_1,
  title={title 1},
  author={A. Author},
  booktitle={book title},
  year={2010}
}
@article{ref_2,
  title={title 2},
  author={B. Author},
  journal={Journal},
  volume={35},
  number={10},
  pages={1217--1256},
  year={2010},
  publisher={Publisher}
}
@incollection{ref_3,
  title={title 3},
  author={C. Author},
  booktitle={book title},
  pages={595--606},
  year={2012},
  publisher={publisher}
}

Resulting bibliography:

The bibliography I get using the supplied code. No numbers next to the entry.

2 Answers 2

107

Edited answer

This works independently of the bibliography style, and with biblatex as well.

According to the beamer documentation, subsection 10.6, you can use

\setbeamertemplate{bibliography item}{\insertbiblabel}

instead of

\setbeamertemplate{bibliography item}{}

so that the bib label is inserted for each bib item.

The result is:

enter image description here

Original answer

This works in the particular case of the OP, because using the bibliography style abbrv, \insertbiblabel inserts [\theenumiv].

I think the beamer class uses the counter enumiv to number the items in the thebibliography environment as the standard classes.

So, substituting the line

\setbeamertemplate{bibliography item}{}

with

\setbeamertemplate{bibliography item}{[\theenumiv]}

you should obtain what you want:

enter image description here

6
  • Awesome! But out of curiosity, is this listed somewhere in the documentation? I looked, but couldn't find anything. Commented Jul 16, 2013 at 16:21
  • If you mean in the beamer documentation, the answer is no. I've used a trick with the enumiv counter. Commented Jul 16, 2013 at 16:25
  • 8
    In fact, you can simply use \setbeamertemplate{bibliography item}{\insertbiblabel}. Commented May 16, 2014 at 0:33
  • When using biblatex+biber, karlkoellers answer results in all items labelled [0], but @GonzaloMedina's answer works correctly.
    – gerrit
    Commented Jun 25, 2014 at 16:42
  • For me (biblatex+biber) neither method works. This seems to come from the fact that my style is authoryear. I then use \footcite and I like the way this looks. It seems though that you need to use numerics style in order for this to work. Is there a solution using the authoryear style. Would it be possible to insert the footcite number in the same way you insert the biblabel?
    – Kvothe
    Commented Sep 25, 2017 at 9:30
14

The accepted answer didn't work with biblatex as all reference numbers became zero. What worked was to substitute the line:

\setbeamertemplate{bibliography item}{}

in the code example with:

\setbeamertemplate{bibliography item}[text]

and that works with both bibtex and biblatex.

3
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. People usually give a minimal working example - please do so too.
    – strpeter
    Commented May 13, 2014 at 7:02
  • This answer does not work in the code set-up of the question. Commented May 13, 2014 at 8:08
  • 2
    It does work in the code set-up of the question, I just double-checked it. The answer I posted works with both bibtex and biblatex, but the accepted answer only works with bibtex. Since this method took a while to find I thought I'd post it in case anyone else wanted to use biblatex to do the same.
    – cazgp
    Commented May 15, 2014 at 23:18

You must log in to answer this question.

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