Modify

Opened 8 years ago

Closed 2 years ago

#453 closed enhancement (fixed)

BibTrac - BibTex support for paper references

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

Description

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 8 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 http://www.exlibrisgroup.com/sfx_openurl.htm for a bit of background.

comment:2 Changed 8 years ago by coderanger

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

comment:3 Changed 8 years ago by linetor

  • Type changed from defect to enhancement

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:
      {{{
      #!bibtex
      @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 7 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 6 years ago by WouterBolsterlee

  • Cc uws+trac-hacks@… added

comment:6 Changed 6 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 6 years ago by anonymous

  • Cc fcorreia@… added

comment:8 Changed 6 years ago by lcordier

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

comment:9 follow-up: Changed 6 years ago by lcordier

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

comment:10 in reply to: ↑ 9 Changed 6 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 5 years ago by Amfortas

  • Owner changed from anybody to Amfortas
  • Status changed from new to assigned

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 4 years ago by AdrianFritz

  • Keywords LaTeX added; latex removed

comment:13 Changed 2 years ago by anonymous

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.