[Tex/LaTex] hide hyperlink in bibtex title

bibtex

Following the post here I was wondering how can we format bibtex to use the title of the reference as a href description. That is without having to modify the bibtex entry itself.

For example using this entry as it is,

@inproceedings{DBLP:conf/osdiDeanG04,                                        
               author    = {Jeffrey Dean and Sanjay Ghemawat},                                                                        
                          title     = {MapReduce: Simplified Data Processing on Large Clusters},                              
                          booktitle = {OSDI},                                                                                 
                          year      = {2004},                                                               
                          url        = {http://www.usenix.org/events/osdi04/tech/dean.html},                                   
                          crossref  = {DBLP:conf/osdi 2004},                                                                  
                          bibsource = {DBLP, http://dblp.uni-trier.de}                                                        
                          } 

Is it possible to use the url and the title as the description of a \href{url}{title}

I have tried the following command which does not work as expected. I'm using plainnat.

  FUNCTION {format.title}
  { title empty$
      { "" }
      {"\href{" url * "}{" title "t" change.case$ "}"}
    if$
   }

Best Answer

A solution if one want to avoid using biblatex would be to use bibTools. The general idea is to create an new entry title2 with having the format \href{url}{title}. Then one need to change title to title2 in the bibliographystyle file (eg plainnat.bst see here).

I'm not sure it is the best solution but once in place it is quite convenient.

In more details:

Let's say that the followind entry is in the file test.bib.

@inproceedings{DBLP:conf/osdiDeanG04,                                        
           author    = {Jeffrey Dean and Sanjay Ghemawat},                                                                        
                      title     = {MapReduce: Simplified Data Processing on Large Clusters},                              
                      booktitle = {OSDI},                                                                                 
                      year      = {2004},                                                               
                      url        = {http://www.usenix.org/events/osdi04/tech/dean.html},                                   
                      crossref  = {DBLP:conf/osdi 2004},                                                                  
                      bibsource = {DBLP, http://dblp.uni-trier.de}                                                        
                      } 

then running the command

    bibtool --  'add.field{title2="\href{%s(url)}{%s(title)}"}' test.bib -o test1.bib

will output the file with the entry

@InProceedings{   dblp:conf/osdideang04,
      author    = {Jeffrey Dean and Sanjay Ghemawat},
      title     = {MapReduce: Simplified Data Processing on Large Clusters},
   booktitle    = {OSDI},
    year        = {2004},
    url         = {http://www.usenix.org/events/osdi04/tech/dean.html},
    crossref    = {DBLP:conf/osdi 2004},
    bibsource   = {DBLP, http://dblp.uni-trier.de},
    title2      = {\href{http://www.usenix.org/events/osdi04/tech/dean.html}{MapReduce:
      Simplified Data Processing on Large Clusters}}

}

the final step would be to replace title by title2 the bibibliographystyle file. Replace title by title2 everywhere you want the link. For instance in plainnat.bst I've replace btitle by title2 as well.