Including Links to Specific Pages of the Linked File at Every Item of the Skim Notes Array of a BibDesk HTML Template

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Including Links to Specific Pages of the Linked File at Every Item of the Skim Notes Array of a BibDesk HTML Template

Jan Jakob Bornheim
Hello everybody,

I believe a question that has been asked before on the mailing list (by me but also others) is how to include a link to a certain page of a PDF - the page containing a Skim note – in an HTML file created by a BibDesk template. The main problem seems to be that the Skim template is unaware of the file location on which it is run, whereas BibDesk can not display Skim notes in order (that is, it can only sort them by date created, not position on page). For anyone interested, and anyone googling the problem later, I have found a tentative solution.

At the top of my BibDesk HTML item template, I included a line

var citeKey = "<$citeKey/>"

The item template includes the Skim notes by using the <$textSkimNotes/> key.

In the default Skim template (i.e. ~/Library/Application\ Support/Skim/templates/notesTemplate.txt), the notes are templated as follows:

<script>document.write('<a href="skb://' + citeKey);</script>#<$pageIndex.numberByAddingOne/>"><$contents/></a>

If you then save the linked file containing the Skim notes before exporting the BibDesk entry, the resulting HTML will contain a sorted array of Skim notes including absolute links (in the sense of being independent of the currently active BibDesk item, they are relative insofar as moving the files obviously won’t break the links as long as BibDesk is aware of the linked files location) to the certain page of the first linked file of the publication.

This obviously only works if you have an application that is registered for the skb URL scheme and can translate the combination of cite key and number into some form of direction for Skim. For that, I use this applet: http://www.dansheffler.com/blog/2014-07-13-skim-and-bibdesk-wrap-up/

It should be noted that the resulting HTML file seems to exceed the capabilities of the BibDesk previewer, which renders the template as rich text. It does however work beautifully in a web browser.

Jan Jakob

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
Bibdesk-users mailing list
[hidden email]