50

I am writing a paper, and I would like to be able to find out automatically how many times each reference is cited. This could either be appended to the references in a printed version, or outputted as a separate file.

I've seen Check if an entry is cited multiple times, but it focusses on checking each reference at the point of citation, while I want to do an overall count.

The reasons are twofold. Firstly, to see if any references are being 'overcited'. Secondly, if space becomes an issue, to be able to see easily which references are only being cited once and could potentially be removed with minimum fuss.

  • Only 2 answers! – Sigur Jan 9 at 21:57
50

If you're willing to switch to biblatex, you may use the citecounter feature that was added in v1.3.

\documentclass{article}

\usepackage[citecounter=true]{biblatex}

\renewcommand{\finentrypunct}{%
  \addperiod\space
  (Cited \arabic{citecounter}~time\ifnumequal{\value{citecounter}}{1}{}{s})%
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

Some text \autocite{A01}.

Some text \autocite{B02}.

Some text \autocite{A01}.

\printbibliography

\end{document}

enter image description here

  • Stangely, when I switch from style=authoryear to style=apa, most of the citation counts disappear. Any ideas on why this is happening? Perhaps I need to provide a minimal example. – PLG Jun 26 '15 at 11:26
12

You can use the backref or pagebackref options to hyperref to get links to section or page numbers after each reference in the bibliography if you don't want to switch to biblatex.

  • 1
    IIRC, the backref option doesn't tell you if a reference was cited multiple times on the same page. – lockstep Mar 24 '11 at 14:22
  • @lockstep: Yes, you're absolutely right. I should have pointed out that this just gives a rough indication of how often a reference is cited. (Also, I could have sworn I upvoted your answer...fixed.) – TH. Mar 24 '11 at 14:25
  • 8
    @lockstep: with version 1.21 or later of backref there is the \backrefalt formatting hook that gives access to the number of duplicate citations. Since version 1.33 the \backrefentrycount wrapper makes this more easily accessible. – Lev Bishop Mar 24 '11 at 15:19
1

The following worked for my natbib-powered document (it's the code OP used on How to show Not cited and Cited i times on pages ..., in the bibliography when using biblatex?). Just paste this somewhere in the preamble and you can easily see in the references which entries are the most and least cited.

\usepackage[pagebackref=true]{hyperref}
\renewcommand*{\backref}[1]{}
\renewcommand*{\backrefalt}[4] {
    \ifcase #1
        No citation in the text.
    \or
        Cited on page #2.
    \else
        Cited #1 times on pages #2.
    \fi
}

P.S.: I remember using a simpler solution a couple of years ago, IIRC there is a package that automatically does something similar to the code above.

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.