Latex bibliography with hyperlinks to PDFs
September 1, 2013 12:17 PM   Subscribe

I am an academic who is long overdue for finding a citation manager that works with my ideal workflow. Right now, I tend to generate the bibtex files by hand (ugh!), and want to automate all the fiddly database management/citation formatting issues. I have poked around with Papers, Mendeley and JabRef, but couldn't figure out how to get the features I want.

I want to create an annotated bibliography of papers that I read, written up in LaTeX, and have hyperlinks from the bibliography entries to the location of the file on my system. This way, when I want to go back and look at the paper again, I just click the link, rather than having to find the PDF on my computer, or go through the citation manager's GUI. There should be a flag in the latex document indicating whether to include these links (for my own use), or not generate them (for publication).

All of the managers I've looked at so far make it easy to get to the PDF through their GUI, but I can't figure out how to get the links that I want in the generated document. I use LaTeX (non negotiable!) on OSX (10.8) and Ubuntu (12.04). Bonus points for working with both operating systems, but either/or is acceptable.
posted by Metasyntactic to Computers & Internet (7 answers total) 3 users marked this as a favorite
 
OS X only, but I liked BibDesk. It's been a while since I've used it so I can't speak to its in-document linking ability.
posted by zsazsa at 1:40 PM on September 1, 2013 [1 favorite]


I don't understand what you want vis a vis linking. You want the program to spit out a path to where the file is stored on your hard drive? Seems pretty specialized.

Anyway, you should definitely look into BibDesk. It's easy to drag cites into your file; it files papers for you and let's you look at them, and you can also include things like MathSciNet reviews as links with the papers.

You can choose whether to drag \cite commands or the entire bibtex entry.

You can have a main file where you keep all your cites, and then you can select and export just the ones you're using in a paper in order to generate the bibtex file to submit with the article.

You can suck down cites from your favorite databases.

If you've not looked at it, you really should. I think it will do a lot of what you want. (And it's free, so no reason to not try it.)
posted by leahwrenn at 2:43 PM on September 1, 2013


Oh, and I think you can store notes attached to the citation in BibDesk. So right with the citation, you'd have a clickable copy of the paper (if you had one attached) and also your notes. So would that be good enough for your annotated bibliography needs?
posted by leahwrenn at 2:45 PM on September 1, 2013


I've been using biblatex with the doi=true option on, and hyperref installed, and that makes each doi into a link to the paper. Not the PDF, but the website at dx.doi.org/ which would have the paper. Would that work for you?

Apparently this package can also haul citations out of a number of different database types, so you could use it with one of the other solutions.

posted by Canageek at 6:18 PM on September 1, 2013


Response by poster: OK, to try to clarify what I'm looking for ....

JabRef outputs a bibliography entry in the form:

@INPROCEEDINGS{Ciocarlie2012,
author = {Ciocarlie, Matei and Hsiao, Kaijen and Leeper, Adam and Gossow, David},
title = {Mobile manipulation through an assistive home robot},
file = {:Ciocarlie2012.pdf:PDF}
}


where the file line gives the relative path to the pdf stored on my system. If I manually add a note field:

note = {\href{run:./../../References/Bosch/Ciocarlie2012.pdf}{PDF}},

This generates a link in the document that when I click on it, opens the pdf that's stored on my computer. (Very similar to the DOI thing mentioned above, but doesn't re-download it every time.) I'd like to have my citation manager do something similar. I've seen posts where other people are looking for this feature, and it seems like a nice-to-have that somebody has to have already figured out. At this point, I'm about to try to hack together a script that changes the file line to a note line, adding the correct relative path, but would much rather be able to skip the extra step and have the citation manager take care of it.

(FWIW - I've tried to use the citation managers to actually organize my papers for me and store my notes there, but my brain doesn't seem to work like that. So, any features beyond "format bibliography for me and keep track of where I've put the PDFs" aren't needed)
posted by Metasyntactic at 7:22 PM on September 1, 2013


BibDesk is very scriptable with AppleScript. It has its own local-url field that could probably be massaged into that note field by AppleScript. For example, the "script to fill the Local-Url field with the first linked file" could be adapted.
posted by zsazsa at 9:23 PM on September 1, 2013


In bibdesk the local pdf goes to field 'Local-Url'.

Now if you have this annotated bibliography tex document, and you typeset it out, there is some bibliography style and style definition file (.bst) somewhere. eg. with \bibliographystyle{splncs03} -> splncs03.bst is somewhere to be found. Now you need to find this file and make a copy of it: 'splncs03localurl.bst' and change your tex document to use \bibliographystyle{splncs03localurl}

Usually stylesheets have some default behaviour to make links from url field in bibtex files. Now you need to change this .bst to make links from local-url instead of url. Find all occurences of url that are not part of any command '\url' but look like they could be variable names. Change them to local-url. There should be at the beginning at least a list of fields that the bst document uses -- add local-url to there. Then there should be some kind of function definition that tells how to present urls. In there replace url with local-url.

Now, with luck and fiddling (.bst files can vary) you could be able to have bibliography pdf where local-url is added to each item that uses it.
posted by Free word order! at 9:16 AM on September 2, 2013


« Older Balzac's Benchwarmers   |   How do I learn to make myself happy for me, not... Newer »
This thread is closed to new comments.