I encountered an issue when using the backref=page option of the hyperref package together with the natbib package with the options square,sort&compress,numbers.
If the natbib package compresses a range of references, the middle references does not show the backreference after compiling (latex,bibtex,latex,latex).

See the following short example:



\bibitem{foo} foo

\bibitem{bar} bar

\bibitem{hole} hole


Make the following patch to natbib.sty:

--- natbib.sty.old 2009-07-23 10:44:10.000000000 -0400
+++ natbib.sty  2009-11-01 17:07:53.309765500 -0500
@@ -408,6 +408,7 @@
+           \Hy@backout{\@citeb\@extra@b@citeb}%
           \advance\@tempcnta by\@ne

I have reported this to the authors of hyperref and natbib. Heiko (author of hyperref) wants this to be fixed in natbib, because this is too deeply buried in the natbib code for him to feel comfortable patching it. Patrick (author of natbib) has not responded to my emails....

  • Wouldn't \@ifundefined{Hy@backout}{}{\@citeb\@extra@b@citeb}} make it work even without hyperref? – egreg Nov 22 '11 at 23:17
  • 1
    @egreg, that doesn't seem right. Maybe you mean \@ifundefined{Hy@backout}{}{\Hy@backout{\@citeb\@extra@b@citeb}}? – Lev Bishop Nov 23 '11 at 15:04
  • Yes, of course; I forgot a bit. – egreg Nov 23 '11 at 15:43
  • 1
    it's probably easiest to just use the hypernat package – levinalex Jan 21 '14 at 21:02

There's the hypernat package that includes the patch from Lev Bishop's answer


and you should be good.

  • this solves the question. Maybe we should mark this answer as solution? – Hug Sep 16 '14 at 9:59

Delete the auxiliary files. Supress the option sort&compress and then compile your document as many times as needed in order to generate the citations with their back references; then, add the sort&compress option and compile once more to sort and compress the citation list.

  • Hmm, this is a very inconvenient workaround as I have to do so whenever I run bibtex, but thanks anyway. – user4276 Mar 16 '11 at 18:15
  • @adw: it is not so inconvenient (although I understand what you mean): load natbib like this: First line:\usepackage[square,numbers%,sort&compress% Second line: ]{natbib} process your document. running (pdf)latex+bibtex+(pdf)latex+(pdf)latex, now uncomment out the option (delete the leftmost %) and run (pdf)latex once more. – Gonzalo Medina Mar 16 '11 at 20:35
  • 2
    This approach can cause problems. If adding the sort&compress changes the pagination (which it certainly can) then you would need to run latex several times for those pagination updates to propagate through to the pagebackrefs (not to mentions table of contents, list of figures, index, \pageref{}, etc.) – Lev Bishop Nov 23 '11 at 15:07
  • @LevBishop: you're right. – Gonzalo Medina Nov 23 '11 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy