August 20, 2013

Hyperref and bibtex: Linking the document title to its URL

Most of us read our papers on our computers or tablets. Though printing a paper has its own charm, I prefer to minimize the trees chopped. The one thing that I dislike in research papers is the big bibliographic entries. Yes, in the middle ages we needed to know the names of all authors, the article title, the conference or journal details, the details of the publisher, and other information to search these articles. However, I have never seen any one walk to a library and request the librarian for a copy of some journal for an article -- my father apparently had to do that but I guess I am privileged enough to use the article title followed by one of the authors to find the article. But even this is not required to get to the online copy of the article. Also remember that each google query costs at least 1 kJ of enery. So why should we waste this energy when we have hyperref? Sadly,   for some reason the default acm and ieee bst files are lazy enough to ignore the doi and url values which their own online libraries provide in the bibtex entries of articles.

This is frustrating and I wanted to use the good things present in the natbib for my thesis while still using the acm.bst file.

The following steps need to performed to ensure that the name of the paper points to URL containing the paper. I did this for the acm.bst file, however, I believe that the same steps can be used for other .bst files. 
  1. Ensure that the line indicating doi and url values present in the .bib file are parsed. The acm.bst currently does not parse the doi and url entries.
  2. Format the title such that the title of the document (name of the paper) points to the URL contained in the url or doi entry.
You need to edit the acm.bst file (or the .bst file you want) in the following manner.
Step 1 is performed by indicating that the url and doi entries need to be parsed.The text in bold need to be added at the appropriate place. I have added a diff -- this might change depending on your .bst file.
  { address


  { label }
The lines containing url and doi ensures that the values in the .bib file shall be parsed.

The code for Step 2 is as follows

FUNCTION {format.title}
{ title empty$
    { "" }
    { doi empty$
    { url empty$
        { title "t"$ }
        { "\href{" url * "}{" * title "t"$ * "}" * }
        { "\href{" doi * "}{" * title "t"$ * "}" * }
What the above code does is that it links to the url if the url is present. For entries that do not contain the url value it tries to use the doi value. Entries that do not contain the doi and url values are treated in the default manner.

The diff between the default acm.bst file on my machine and my modifications are as follows.

<     doi
<     url
< %FUNCTION {format.title}
< %{ title empty$
< %    { "" }
< %    { title "t"$ }
< %  if$
< %}
<     { doi empty$
<     { url empty$
<         { title "t"$ }
<         { "\href{" url * "}{" * title "t"$ * "}" * }
<         if$
<     }       
<         { "\href{" doi * "}{" * title "t"$ * "}" * }
<       if$
<     }
>     { title "t"$ }
Please note that you need to include the hyperref package in your tex file this change to be effective.

August 6, 2013

Astrid Winding Down

I received this email in the morning. I was using Astrid for some time now and I really liked its interface. After gmail, it was one of the most usable online tools that I came across. Sadly, it seems that the tool was so good that it was bought by Yahoo so that its engineers can try to breathe life into Yahoo.

Hi Ashwin,
Once again, we want to sincerely thank you for being an Astrid user over the years. We want to remind you that as of August 5, 2013, the Astrid service will be closing and will no longer be available.

We know that a transition can be tough, but we want to make it as easy as possible for you. Please go to this link: to download your data.

Once you have your data, we recommend you check out one of these applications. They will allow you to easily import your data, so you can pick up where you left off: Wrike, Wunderlist, Sandglaz, and

When we built Astrid, we sought to help as many people as possible become happier, healthier and more productive – and we certainly hope we helped you. Thank you again for your support.

Best regards,
Jon Paris & the Astrid Team

August 1, 2013

Refreshing bike ride

I really like the 6 km morning bike rides from my residence to the airport. The red sun and the cool sea breeze is refreshing even in days of extreme stress. A welcome addition is the splashes made by my bike when passing over puddles of water left behind by the trucks that wash the promenade in the morning. Today, after a very long time I got to see the boats sprinkling water on the stones on the beach. The sprinkles that leaked over to the promenade were a gentle reminder of the Monday's storm.