5

I have the following reference

@book{2,
author    = "Sebastian Thrun and Wolfram Burgard and Dieter Fox",
title     = "Probabilistic Robotics",
publisher = "The MIT Press",
year      = "2006",
pages     = "309"
}

The output of this citation is

Sebastian Thrun, Wolfram Burgard, and Dieter Fox. Probabilistic Robotics. The MIT Press, 2006.

The problem is that the pages don't appear in the citation.

I'm using .bib as a plain text for holding the references as follows

main.tex

\documentclass[12p]{article}
\usepackage{hyperref}

\begin{document}


hhhhhh \cite{2}. 

\bibliography{references}{}
\bibliographystyle{plain}


\end{document}

references.bib

@book{2,
author    = "Sebastian Thrun and Wolfram Burgard and Dieter Fox",
title     = "Probabilistic Robotics",
publisher = "The MIT Press",
year      = "2006",
pages     = "309"
}
7
  • 3
    Are you sure you need the pages to be printed? It's not very common that the pages of a whole book are used in bibliographies, since they don't serve much purpose.
    – Alan Munn
    Jan 11, 2015 at 3:27
  • 3
    \bibliography{} only takes a single argument as far as I know. Also, I don't know if it matters, but \bibliographystyle usually comes first. But @AlanMunn is right: entries for books don't usually include page numbers or the total number of pages.
    – cfr
    Jan 11, 2015 at 3:29
  • 3
    @croco None of the major style guides (MLA, APA, Chicago) require pages for books, and I doubt if there are any journals in the natural sciences that require them either. I've only seen them used in very specialized contexts, e.g. the bibliography item that accompanies a review of book in a journal.
    – Alan Munn
    Jan 11, 2015 at 4:39
  • 1
    @CroCo You cite from a bibliographic item, which in this case is a book. The bibliography is meant for making the reader able to retrieve the item. If you cite a particular page from a book, then the page number should be shown at the citation, not in the bibliography.
    – egreg
    Jan 11, 2015 at 12:11
  • 1
    @egreg That depends on the subject area: in chemistry it is common to give a reference to a book page or pages, and rather less common to reference a book as a whole.
    – Joseph Wright
    Jan 11, 2015 at 12:27

2 Answers 2

6

This is by design. If we take a look at plain.bst (the \bibliographystyle you're using), and find the section for FUNCTION {book}:

FUNCTION {book}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  new.block
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      new.block
      format.number.series output
      new.sentence
      publisher "publisher" output.check
      address output
    }
    { new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.date "year" output.check
  new.block
  note output
  fin.entry
}

There is no mention of pages anywhere in this function. Other entry types that use pages (such as article, inproceedings, etc.) all have some line similar to format.pages output which outputs the page number(s).

The pages parameter is still allowed and valid because, while the plain style doesn't use it, other styles can and do use it. So a given .bib file is usable with many different output styles.

1

I suggest you to use @inbook entry type, it's proper for these kinda references.

1
  • This is the correct answer. I gave a similar one a while back to another question, and my answer was flagged for low quality. Had to expand it a little. I'll put it here so that if someone gets to your answer, through a google search or in some way, he could follow over to mine and see WHY it is the right answer... tex.stackexchange.com/a/373777/90297
    – Elad Den
    Sep 12, 2022 at 13:23

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