Hi Sanjoy, Sanjoy Mahajan wrote:
I tried to force an active hyperlink to be part of a bibliography entry. If the bibliography style file for that entry type uses it, maybe it will work. But I wanted to put it in the 'note' field so that I could add it to most entries. e.g.
@Book{HPL:2000, editor = {John D. Barnsford and Ann L. Brown and Rodney R. Cocking}, title = {How people learn: Brain, mind, experience, and school.}, publisher = {National Academy Press}, year = 2000, address = {Washington, DC}, edition = {expanded}, note = {http://www.nap.edu} }
Well, I use url = {http://www.nap.edu} and have in my local environment something like: %copied from bibl-a*.tex \setuppublicationlayout[article]{% in your case book [...] \insertdoi{ doi:}{.}{}% \insertbiburl{ }{.}{}% <--- added [...] } In addition, you need to patch t-bib.tex. I have the following changes in mine which should be also (in some form) in the next release of Taco's module: --- /usr/share/texmf/tex/context/bib/t-bib.tex 2006-12-08 12:46:44.000000000 +0100 +++ /system/home/tob/texmf/tex/context/bib/t-bib.tex 2007-04-19 13:42:17.000000000 +0200 @@ -497,10 +497,15 @@ \processcommacommand[\bibcommandlist]\simplebibdef +\def\insertdoi#1#2#3% + {{\bibdoifelse{\@@pb@doi}% + {\edef\ascii{\@EA\detokenize\@EA{\@@pb@doi}}% + #1\expanded{\gotoDOI{\@@pb@thekey}{\ascii}}#2}{#3}}} + \def\insertbiburl#1#2#3% - {{\bibdoifelse{\@@pb@biburl}% - {\edef\ascii{\@EA\detokenize\@EA{\@@pb@biburl}}% - #1\@EA\hyphenatedurl\@EA{\ascii}#2}{#3}}} + {{\bibdoifelse{\@@pb@biburl}% + {\edef\ascii{\@EA\detokenize\@EA{\@@pb@biburl}}% + #1\expanded{\gotoURL{\@@pb@thekey}{\ascii}}#2}{#3}}} \def\insertmonth#1#2#3% {\bibdoifelse{\@@pb@month}% @@ -641,7 +646,7 @@ \ifnum \numexpr\scratchcounter-1\relax<#2\relax \getvalue{\??pv data#1}##1% \ifnum \scratchcounter=#2\relax - \ifnum\etallimitcounter<\commalistsize \bibalternative{#1etaltext}\fi + \ifnum\etallimitcounter<\commalistsize\relax \bibalternative{#1etaltext}\fi \else \ifnum\numexpr\scratchcounter+1 = #2\relax \ifnum \commalistsize > \plustwo \bibalternative\c!finalnamesep \else \bibalternative\c!lastnamesep \fi @@ -1636,7 +1641,9 @@ \def\gotoDOI#1#2% {\ifbibinteractionelse - {\useURL[bibfoo#1][http://dx.doi.org/#2]\goto{\url[bibfoo#1]}[url(bibfoo#1)]} + {\useURL[bibfooDoi#1][#2]% + \useURL[bibfoo#1][http://dx.doi.org/#2]% + \goto{\url[bibfooDoi#1]}[url(bibfoo#1)]} {\hyphenatedurl{#2}}} \def\bibdoiref[#1]%