2

I'm working on a beamer presentation and I want to use Natbib for references. However, regardless of what bib key I put into the \cite command, the same reference label gets printed in the output file.

Here's my preamble with a minimal working example.

\documentclass[9pt]{beamer}
\usepackage{natbib}
\usefonttheme{professionalfonts} 
\usefonttheme{serif} 
\usepackage[urw-garamond]{mathdesign}
\usepackage[osfI]{garamondx}
\usepackage{ragged2e}
\usepackage{etoolbox}
\usepackage{amsthm}



\beamerdefaultoverlayspecification{<+->}
\mode<presentation>
\usetheme{dresden}
\usecolortheme{seahorse}

\bibliographystyle{apalike}

\AtBeginSection[]
{
    \begin{frame}
    \frametitle{Overview}
    \tableofcontents[currentsection]
    \end{frame}
}

\begin{document}
    \begin{frame}
    \cite{Arntzenius2003-ARNOWW}

    \cite{Boolos1971-BOOTIC}
\end{frame}
\begin{frame}
    \bibliography{C:/Users/Public/References/dump.bib} 
\end{frame}
\end{document}

This is the output:

enter image description here

Can anyone help me?

  • 1
    Welcome to TeX.SX! natbib does not allow you to make that differentiation, mainly because BibTeX doesnt; it just truncates the author list. For the differentiation you want you'd need to use BibLaTeX and Biber. – Phelype Oleinik May 7 at 19:09
  • @PhelypeOleinik wouldn't it be likely that the Boolos1971-BOOTIC reference has different authors (and a different year), and should therefore be shown? @Antonio, can you show the contents of these two items in the .bib file? – Marijn May 7 at 20:40
  • @Marijn Hm... Judging by the citation key, you are probably correct... – Phelype Oleinik May 7 at 20:41
  • @Marijn that's correct and my problem is exactly that even though the keys have different contents the same output gets printed. The content of Arntzenius2003-ARNOWW is @Article{Arntzenius2003-ARNOWW, author = {Frank Arntzenius and Ned Hall}, title = {{On What We Know About Chance}}, journal = {British Journal for the Philosophy of Science}, year = {2003}, volume = {54}, number = {2}, pages = {171--179}, groups = {Deference,Chance }, publisher = {Br Soc Philosophy Sci}, } – Antonio May 8 at 8:58
  • @Marijn and the content of Boolos1971-BOOTIC is @Article{Boolos1971-BOOTIC, author = {George Boolos}, title = {{The Iterative Conception of Set}}, journal = {Journal of Philosophy}, year = {1971}, volume = {68}, number = {8}, pages = {215--231}, doi = {10.2307/2025204}, file = {:Boolos1971-BOOTIC - The Iterative Conception of Set.pdf:PDF}, groups = {Philosophy of Logic and Mathematics, Philosophy of Set Theory}, publisher = {Journal of Philosophy Inc}, } – Antonio May 8 at 8:59
1

The issue is caused by a combination of overlays and cite keys. Because the default overlay specification is <+-> the bibliography is shown incrementally. This means that the first bibliography item is shown on two slides, and the id is therefore duplicated. This confuses hyperref and the output becomes incorrect - it shouldn't be, this is a bug.

As a workaround you can switch off the overlay specification for the bibliography slide, i.e., reset it to the default value of <*> (show everything on a slide simultaneously). For a list of references that may be a preferable way of presenting in general.

MWE:

\documentclass[9pt]{beamer}
\usepackage{natbib}

\beamerdefaultoverlayspecification{<+->}
\mode<presentation>
\usetheme{Dresden}
\usecolortheme{seahorse}

\bibliographystyle{apalike}

\begin{document}
    \begin{frame}
    \cite{Arntzenius2003-ARNOWW}

    \cite{Boolos1971-BOOTIC}
\end{frame}
\beamerdefaultoverlayspecification{<*>}
\begin{frame}
    \bibliography{phil.bib} 
\end{frame}
\end{document}

Result:

enter image description here

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.