Re: [NTG-context] active urls in bibliographies

2007-04-25 Thread Sanjoy Mahajan
Thanks for the minimal example you sent me (offlist), which worked
great.

> If your question is of interest to others as well, please add an
> entry to the Wiki!

I modified it only slightly and have wikified it at
.  When the
patched t-bib.tex is part of the ConTeXt release, I'll modify the wiki
directions accordingly.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] active urls in bibliographies

2007-04-24 Thread Sanjoy Mahajan
Tobias,

Thanks for the patches.  I put them together but didn't get a url at
all in the reference.  But, the patch to t-bib.tex caused 'patch' to
complain:

  patching file t-bib.tex
  patch:  malformed patch at line 3: --- 498,497 

So I patched it by hand, and maybe the problem lies in that I messed
up the hand patching of t-bib.tex.  Could you send me the patch
(either on- or off-list) as an attachment?  Then I'll try again, and
if that fails I'll post a minimal example and only wikify once it's
working.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] active urls in bibliographies

2007-04-24 Thread Taco Hoekwater


Tobias Burnus wrote:
> 
> 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:

There will be a bugfix release a week or two after this year's
eurobachotex, with this patch included as well as a number of
other items in my backlog.

Best wishes,

Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] active urls in bibliographies

2007-04-24 Thread Tobias Burnus
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.0 
+0100
+++ /system/home/tob/texmf/tex/context/bib/t-bib.tex2007-04-19 
13:42:17.0 +0200
@@ -497,10 +497,15 @@

 \processcommacommand[\bibcommandlist]\simplebibdef

+\def\insertdoi#1#2#3%
+ {{\bibdoifelse{\@@[EMAIL PROTECTED]
+[EMAIL PROTECTED]@EA{\@@[EMAIL PROTECTED]
+ #1\expanded{\gotoDOI{\@@[EMAIL PROTECTED]
+
 \def\insertbiburl#1#2#3%
-{{\bibdoifelse{\@@[EMAIL PROTECTED]
-   [EMAIL PROTECTED]@EA{\@@[EMAIL PROTECTED]
-[EMAIL PROTECTED]@EA{\ascii}#2}{#3}}}
+ {{\bibdoifelse{\@@[EMAIL PROTECTED]
+[EMAIL PROTECTED]@EA{\@@[EMAIL PROTECTED]
+ #1\expanded{\gotoURL{\@@[EMAIL PROTECTED]

 \def\insertmonth#1#2#3%
   {\bibdoifelse{\@@[EMAIL PROTECTED]
@@ -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]%

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] active urls in bibliographies

2007-04-23 Thread Sanjoy Mahajan
[This must be a FAQ, and if so I'll put it on the wiki]  

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}
}

As above, the URL comes out normal (i.e. not hyperlinked).  I couldn't
get the 'biburl' field to do the magic (even with \setupinteraction
started), maybe because I'd need to reprogram the .bst to use it.  Also
various combinations of \useURL and \goto did not work.  e.g. This
failed:

\useURL[someurl][http://www.someurl.org][][http://www.someurl.org]

@Book{HPL:2000,
{...
  note = {\goto[someurl]}
...
}

That fails with

! Argument of \dogoto has an extra }.
 
\par 
 
   }
\doattributes ...name [EMAIL PROTECTED] \endcsname \fi {#4}
  \dostopattributes 
 ...esetapublication {HPL:2000}\strut }}
  \egroup \ifdim \wd 4=\zero...

\secondoftwoarguments #1#2->#2
  
\dosomelistelement ...hss \dostoplistattributes }}
  \endgraf \nointerlineskip ...
...
l.208 \placepublications[criterium=all]


Any thoughts appreciated!

-Sanjoy

`Intellectual property is intellectual theft.'
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___