Opened 11 years ago

Closed 5 years ago

#453 closed enhancement (fixed)

BibTrac - BibTex support for paper references

Reported by: kurt@… Owned by: Roman Mohr
Priority: normal Component: Request-a-Hack
Severity: normal Keywords: bibtex LaTeX references citations journal
Cc: uws+trac-hacks@…, Filipe Correia Trac Release: 0.9


We would like to integrate references for journal articles and such into our documentation. It would be fantastic to be able to put pdf's into a dump some place with associated references in the database and then be able to query the references and also place citations in the wiki and tickets.

For example:

  We really need to implement the [cite:smith1989] algorithm 
  so our robot stops running into walls all the time.

That reference would be turned into a link Smith (1989) [pdf] which when clicked would take you to the reference summary and maybe the abstract, while the pdf link would give you back the pdf that you had cached.

Another useful feature would allow the user to select references from a page and export those references as one bibtex file.

Attachments (0)

Change History (13)

comment:1 Changed 10 years ago by anonymous

How would the references be resolved to resources? Would [cite:foo] be a wiki macro that triggers a lookup in a database? Would that be inside the wiki, ie a table with two columns: shortnames like "foo09" and the corresponding URIs? Or does one need another plugin that could be used to do "live" database lookups, inside the macro, to get back the URI?

Anyone implementing this should consider some kind of integration with the URI spaces that the journals themselves are using now, eg the DOI system used by Nature and others. There is also OpenURL, if you want to specifically refer to a locally-held copy of a resource instead of the journals' website. See for example for a bit of background.

comment:2 Changed 10 years ago by Noah Kantrowitz

I would assume (by the name) that the idea would be to point at a bibtex file ....

comment:3 Changed 10 years ago by linetor

Type: defectenhancement

I would assume (by the name) that the idea would be to point at a bibtex file ….

The bibtex doesn't need to be uploaded as a file, it could be pasted into a text field. But the plugin will need to parse the bibtex, find the contained references and index them using bibtex citation names.

I think a simple solution is to store the references in the ticket system. You could implement it with a WikiProcessor, a WikiMacro, and a plugin.

This is the idea:

  • Create a ticket type called 'reference'
  • For each paper, create a 'reference' ticket
    • Use the paper's title as the ticket summary
    • Paste the bibtex into the ticket description and use a bibtex WikiProcessor, like this:
      @ARTICLE {smith1989,
         author = {A.K. Smith},
          title = {BibTrac 101},
        journal = {Trac-Hacking Journal},
         volume = {1},
          pages = {123 -- 456},
           year = {1989}
    • Attach the pdf file to the ticket
  • Create a plugin to detect and parse new references and add them to an index. I think this can be done by implementing the ITicketChangeListener interface.
  • Insert the citations using a macro like [[CiteBibTex(smith1989)]]. The macro will look up 'smith1989' in the index and insert a formatted link to the appropriate 'reference' ticket.

What do you think coderanger? Will it work?

comment:4 Changed 10 years ago by anonymous

How about having two macros:

  • [[bibfile(/some/url/in/the/svn)]], which produces no output, and goes somewhere before the first citation, and
  • [[cite(smith1989)]], which produces the formatted output.

Another alternative is to have a pointer to a given bib file in the svn from the project's ini file.

comment:5 Changed 9 years ago by Wouter Bolsterlee

Cc: uws+trac-hacks@… added; anonymous removed

comment:6 Changed 9 years ago by anonymous

nice idea. but a little more thought on it is needed i believe. integration with the zotero firefox plugin would be great too.

comment:7 Changed 9 years ago by anonymous

Cc: Filipe Correia added

comment:8 Changed 8 years ago by Louis Cordier

I just added CiteMacro, I think it is a good first implementation. Comments needed.

comment:9 Changed 8 years ago by Louis Cordier

I have updated CiteMacro to generate BibTeX bibliographies so I think we can close this ticket?

comment:10 in reply to:  9 Changed 8 years ago by anonymous

Replying to lcordier:

I have updated CiteMacro to generate BibTeX bibliographies so I think we can close this ticket?

I just have seen this macro so first of all, nice implementation, thanks a lot.

But i think the idea of having such a plugin/macro is to reuse a bibtex file shared among webpages. For example, we have a bibtex file with all our references, and we use it to generate a publications page in ours group webpage. It would be nice to do the same thing with our trac service (showing the references related to the software package). There is no point on re-writing the bibtex information you already have in the wiki (also thinking on consistencies when changing things...)

So, imho the path should be the one implementing two macros (one to parse the bibtex file, the second to cite reference). I don't even know if it might be possible.

comment:11 Changed 8 years ago by Roman Mohr

Owner: changed from anybody to Roman Mohr
Status: newassigned

So time ago i created a plugin that provides bibtex support, it implements at least a part of your requests.

You can attach a bibtex file to a wiki page and cite from it or do the same from the attached repository.

The "url" key in the bibtex files is used to create a link to wherever it points.

Look atTracBib.

comment:12 Changed 6 years ago by Adrian Fritz

Keywords: LaTeX added; latex removed

comment:13 Changed 5 years ago by anonymous

Resolution: fixed
Status: assignedclosed

Modify Ticket

as closed The owner will remain Roman Mohr.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.