4

Is there any package (perhabs a tool would be more appropiate) to generate a list of all citations for a given document? The aim would be to have a list of all sources (and the page numbers used) of a given document.

So lets say a given LaTeX document has paragraphs with bibtex citations like

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum (Smith 2012, p.12). Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet (Smith 2012, p.18). Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut agna aliquyam erat, sed diam voluptua (Miller 1999, p.12-14). At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

And I'd like to generate a list (not inside the document itself, just as a separate output) from the available sources like:

  • Miller 1999; used pages: 12-14
  • Smith 2012; used pages: 12,18

A plaintext analysis of the sources (grep or similar) won't work as there are a bunch of wrapped commands to cite with page (thanks to natbib), so I think it needs to b something which is able to intrepret the LaTeX code.

Any clues?

Detailed purpose: For our academic documents there should be a list of source material, so that every cited page can be made available in context of the document. As we are restricted due to copyright, we want to minimize the copy as much as possible. To know what to copy we need the relevant pages nevertheless.

3
  • Are natbib and bibtex requirements or would a biber/biblatex solution work?
    – StrongBad
    Oct 17, 2012 at 13:59
  • The current document is using natbib and bibtex, it's no problem to switch a few packages and wrap some commands to use different packages. As stated, the list is not supposed to be in the resulting document, so different output procedures would be just fine. Any suggestions where to look? Oct 17, 2012 at 17:38
  • It's difficult to say something without a real example of the code you're using. In particular, the form of the \cite... commands.
    – egreg
    Nov 18, 2012 at 11:18

1 Answer 1

1

One possibility is to run the document with latex or pdflatex once, and then parse the aux file. It should contain calls such as

\cite{paper1}
\cite{paper2}

Now you would have to use the bibtex file in order to retrieve the corresponding data. It all depends on what you want to do in the end with that data...

2
  • Thanks for your reply, I added the aim. The Aim in Detail: For our academic documents there should be a list of source material, so that every cited page can be made available in context of the document. As we are restricted due to copyright, we want to minimize the copy as much as possible. To know what to copy we need the relevant pages nevertheless.
    – NextThursday
    Oct 16, 2012 at 17:48
  • Regarding your solution: I got many \bibcite{*} and \citation{} in mentioned file but everything I find in the file leaves out the page numbers, i.e. the \cite[PAGENUMBER]{BIBITEM}. So this might not fit my need exactly.
    – NextThursday
    Oct 16, 2012 at 17:51

You must log in to answer this question.

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