Showing attached Literatur in Bibtex Listing

Issue #17 new
Former user created an issue

Hello Andreas,

we would like to link in the listing to the digital copy of the literature in the attachment if it is available. The most of our literature is digital available as pdf or other formats. We are uploading them as attachments to the page where also the bib file is stored. Each filename starts with the related Bibtex-key (key_filename.ext). It would be easy to find and see literature by clicking on a link in the Bibtex-listing if this possible.

I tried a quick test, based on your code:

List<Attachment> attachments = attachmentMan.getLatestVersionsOfAttachments(ceo);

foreach cite {
     //do stuff

     Attachment relatedAttachment = null;
     for (Attachment a : attachments) {
          if (citeIDs[n] != null && !citeIDs[n].isEmpty()
               && a.getFileName().startsWith(citeIDs[n]) ) {

                   relatedAttachment = a;
                   break;
          }
     }

     if (relatedAttachment != null) {
          cite = cite + "- <ac:link><ri:attachment ri:filename=\"" + 
                relatedAttachment.getFileName() +
                "\" /></ac:link>";
     }

    //do stuff
}

Maybe this is a nice feature for others as well. Would be great if you can add it to your plugin.

Thanks, Reinhard

Comments (9)

  1. Andreas Purde repo owner

    Dear Reinhard,

    thank you for the feature request. I guess you know that you can specify a link on top the BibTeX cite referring to your attachment - however this is a manual process not an automated one as you suggest.

    I'll leave the request open to see whether it gets a sufficient number of votes.

    Kind regards

    Andreas

  2. Marco Kuper

    Hi Andreas,

    We also would like to include links into our BibTex, but not necessarily have them attached to a confluence page. Quite a few of the CSLs offer the 'url' or the 'howpublished' field, so maybe attempting to auto-convert urls to links specified in those fields would be a nice addition.

    Cheers, Marco

  3. Andreas Purde repo owner

    Dear Marco,

    you can add links to you BibTeX cite - you probably already know that.

    If I understand you right you want to add the potentially provided link in the BibTeX file automatically.?

    Kind regards

    Andreas

  4. Marco Kuper

    Hi Andreas,

    as far as I can tell I can include urls in the BibTex, but in the cite summary they don't get converted to clickable link and are just plain text urls.

    Cheers, Marco

  5. Marco Kuper

    Hi Andreas,

    yea I've got that. But I have to do that every time I include this reference in a page which not only is a bit more work (acceptable), but also means that moving references (i.e. urls) is a huge pain if that reference is linked to from multiple pages as you need to find and adjust all the links manually. For my use case this takes a lot away from the awesome benefit of having one (or a few) central BibTeX files to manage all the references.

    Cheers, Marco

  6. Andreas Purde repo owner

    Dear Marco,

    I understand. I added a different feature request as this is different from what Reinhard requested.

    As you forked simple-cite may I ask whether you plan to implement it on your own?

    Kind regards

    Andreas

  7. Marco Kuper

    Hi Andreas,

    Thanks. I will if I find the time. If successful, I can do a Pull request afterwards.

    Cheers, Marco

  8. Andreas Purde repo owner

    Dear Marco,

    I updated the branched feature request. Unfortunately the BibTeX howpublished field does not seem to evaluated by the underlying libraries. Currently I don't have an idea how to fix this with reasonable effort.

    Kind regards

    Andreas

  9. Log in to comment