From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/61278 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: creating own hyperlinks in bibliography Date: Sat, 28 Aug 2010 09:02:48 +0200 Message-ID: <331BCCD3-A2E8-4479-A550-979B997F0124@gmail.com> References: <4C77C044.8080304@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/mixed; boundary="===============1602629008==" X-Trace: dough.gmane.org 1282978991 20655 80.91.229.12 (28 Aug 2010 07:03:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Aug 2010 07:03:11 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 28 09:03:08 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OpFRU-0005l7-H7 for gctc-ntg-context-518@m.gmane.org; Sat, 28 Aug 2010 09:03:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DDA81CA5AB; Sat, 28 Aug 2010 09:03:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 68a3IVwzZptJ; Sat, 28 Aug 2010 09:03:02 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E8142CA5B0; Sat, 28 Aug 2010 09:03:01 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9B381CA5B0 for ; Sat, 28 Aug 2010 09:02:59 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 66jMyIQy2OLW for ; Sat, 28 Aug 2010 09:02:54 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 3613DCA5AB for ; Sat, 28 Aug 2010 09:02:54 +0200 (CEST) Original-Received: from mail-wy0-f169.google.com (mail-wy0-f169.google.com [74.125.82.169]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o7S72r6b005426 for ; Sat, 28 Aug 2010 09:02:53 +0200 Original-Received: by wyb36 with SMTP id 36so5363062wyb.14 for ; Sat, 28 Aug 2010 00:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:mime-version :content-type:subject:date:in-reply-to:to:references:message-id :x-mailer; bh=sTabRKJovjY/IArb+nSwWSFSDXwvl8Ax4rLksus0XwY=; b=mfqDy7WRSAAFQeBEVxQNAzmRQjNMOwl+6M/2JGCu/Dfmch5JFDTHr+kNkAEI6Jehf1 zydTbza1LhjB3XnE40/hT23Gei4NFikcSj//E1A7IMpi1rReD44HG9aHWZGONdERA44L mONONGiFO3d4Kx7Rg4UaF/F+AaBxgGcxxGFP8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=j14xxSjxzFKr9LizqjdBpHc6SONOXgG3LltoELsL3SPHZJgnkJ/4b2XriGSckUaKrx 9UfOGQZE95jGiP8TG4Y9HAUNji0puWUD4HfJhFJw55BF7g8muNF1W+LBQU85Jgwu1TYI HQET3bapXwQzaMdsXQBtYvkeLctr1UhDM4wJw= Original-Received: by 10.216.210.206 with SMTP id u56mr1890337weo.50.1282978972172; Sat, 28 Aug 2010 00:02:52 -0700 (PDT) Original-Received: from [192.168.0.102] (AOrleans-258-1-7-168.w90-8.abo.wanadoo.fr [90.8.194.168]) by mx.google.com with ESMTPS id w1sm2985140weq.25.2010.08.28.00.02.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 28 Aug 2010 00:02:51 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1081) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03CXH2RmF - a49b1fc92fce - 20100828 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:61278 Archived-At: --===============1602629008== Content-Type: multipart/alternative; boundary=Apple-Mail-2--270909263 --Apple-Mail-2--270909263 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Hi Mojca,=20 Could you please post a full example where your newly defined biblio = field works? In some occasions I have had analogous needs (references to papers on = arxive.org for instance, or other repositories. It would be handy to = know how one can add such bibliography fields. Best regards: OK On 27 ao=FBt 2010, at 18:02, Mojca Miklavec wrote: > On Fri, Aug 27, 2010 at 15:40, Taco Hoekwater wrote: >> On 08/27/2010 01:00 PM, Mojca Miklavec wrote: >>>=20 >>> Dear Taco, >>>=20 >>> I would like to add some additional fields to bibliography. >>>=20 >>> I would like to have >>>=20 >>> \newbibfield[cobissid] >>>=20 >>> \startpublication >>> [...] >>> ... >>> \cobissid{70615} >>> \stoppublication >>>=20 >>> and then I would modify \setuppublicationlayout[book] to transform = the >>> number written above into "cobiss.si-id: 70615" pointing to the >>> following URL: >>>=20 >>> = http://www.cobiss.si/scripts/cobiss?command=3DDISPLAY&base=3Dcobib&rid=3D7= 0615&lani=3DEN >>=20 >> The simple answer is: search for DOI in the bib module and do = whatever >> that does. But, just in case: >>=20 >> \unprotect >> \newbibfield[cobissid] >> \def\bibinsertcobissid#1#2#3% >> {{\bibdoifelse{\@@pb@cobissid}% >> {\edef\ascii{\@EA\detokenize\@EA{\@@pb@cobissid}}% >> #1\expanded{\goto{\@@pb@thekey}{\ascii}}#2}{#3}}} >> \protect >>=20 >> should come close to what you had in mind, you hyst have to tweak the >> \goto arguments a bit. >=20 > Thank you very much. It was of extreme help. I'm now using >=20 > \unprotect > \def\bibinsertcobissid#1#2#3% > {{\bibdoifelse{\@@pb@cobissid}% > {\edef\ascii{\@EA\detokenize\@EA{\@@pb@cobissid}}% > #1\expanded{\gotoCOBISS{\@@pb@thekey}{\ascii}}#2}{#3}}} > \protect >=20 > \def\gotoCOBISS#1#2% > {\ifbibinteractionelse > = {\useURL[bibfoo#1][http://www.cobiss.si/scripts/cobiss?command=3DDISPLAY&b= ase=3Dcobib&rid=3D#2]% > \goto{#2}[url(bibfoo#1)]}% > {#2}} >=20 > and then >=20 > \insertcobissid{ {\sc cobiss.si-id}: }{.}{}% >=20 > (Just for a reference in case that any other Cobiss user will ever > want to repeat the same.) >=20 > Now I have just remembered something that has bothered me earlier, but > I have never mentioned it so far. When interaction is off, DOI gets > written in plain text which is perfectly OK, but when interaction is > on, it gets written in typewriter font as if it was URL. I see no > reason for writing out DOI number in typewriter font since it's not > really URL on its own, it only points to some URL. This is exactly the > modification that I have done above for COBISS numbers. What do you > think about that aspect? >=20 > Thank you very much, > Mojca > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > maillist : ntg-context@ntg.nl / = http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > = __________________________________________________________________________= _________ %%%%%%%%%%%%%%%%%% Otared Kavian D=E9partement de Math=E9matiques Universit=E9 de Versailles Saint-Quentin B=E2timent Fermat 45 aveue des Etats Unis 78035 Versailles cedex T=E9l=E9phone: +33 1 39 25 46 42 Secr=E9tariat: +33 1 39 25 46 44=20 Secr=E9tariat: +33 1 39 25 46 46 e-mail: Otared.Kavian@math.uvsq.fr --Apple-Mail-2--270909263 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Hi = Mojca, 

Could you please post a full example = where your newly defined biblio field works?
In some occasions = I have had analogous needs (references to papers on arxive.org for instance, or other = repositories. It would be handy to know how one can add such = bibliography fields.

Best regards: = OK

On 27 ao=FBt 2010, at 18:02, Mojca Miklavec = wrote:

On Fri, Aug 27, 2010 at 15:40, Taco Hoekwater = wrote:
On 08/27/2010 01:00 PM, Mojca = Miklavec wrote:

Dear = Taco,

I would like to add some = additional fields to = bibliography.

I would like to = have

\newbibfield[cobissid]

\startpublication
    = [...]
    ...
    = \cobissid{70615}
\stoppublication

and then I would modify = \setuppublicationlayout[book] to transform = the
number written above into "cobiss.si-id: 70615" pointing = to the
following URL:

http://www.cobiss.si/scripts/cobiss?co= mmand=3DDISPLAY&base=3Dcobib&rid=3D70615&lani=3DEN

The simple = answer is: search for DOI in the bib module and do = whatever
that does. But, just = in case:

 \unprotect
 \newbibfield[cobissid]
 \def\bibinsertcobissid#1#2#3%
  =  {{\bibdoifelse{\@@pb@cobissid}%
      = {\edef\ascii{\@EA\detokenize\@EA{\@@pb@cobissid}}%
      =  #1\expanded{\goto{\@@pb@thekey}{\ascii}}#2}{#3}}}
  \protect

should come = close to what you had in mind, you hyst have to tweak = the
\goto arguments a = bit.

Thank you very much. It was of extreme help. = I'm now using

\unprotect
\def\bibinsertcobissid#1#2#3%
=  {{\bibdoifelse{\@@pb@cobissid}%
=      {\edef\ascii{\@EA\detokenize\@EA{\@@pb@cobis= sid}}%
=       #1\expanded{\gotoCOBISS{\@@pb@thekey}{= \ascii}}#2}{#3}}}
\protect

\def\gotoCOBISS#1#2%
=  {\ifbibinteractionelse
=    {\useURL[bibfoo#1][http://www.cobiss.si/scripts/cobiss?c= ommand=3DDISPLAY&base=3Dcobib&rid=3D#2]%
=     \goto{#2}[url(bibfoo#1)]}%
=    {#2}}

and then

=   \insertcobissid{ {\sc cobiss.si-id}: }{.}{}%

(Just = for a reference in case that any other Cobiss user will ever
want to = repeat the same.)

Now I have just remembered something that has = bothered me earlier, but
I have never mentioned it so far. When = interaction is off, DOI gets
written in plain text which is perfectly = OK, but when interaction is
on, it gets written in typewriter font as = if it was URL. I see no
reason for writing out DOI number in = typewriter font since it's not
really URL on its own, it only points = to some URL. This is exactly the
modification that I have done above = for COBISS numbers. What do you
think about that aspect?

Thank = you very much,
=    Mojca
_______________________________________________= ____________________________________
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 =  : http://foundry.sup= elec.fr/projects/contextrev/
wiki     : http://contextgarden.net
________= __________________________________________________________________________= _

Otared.Kavian@math.uvsq.fr<= /div>



= --Apple-Mail-2--270909263-- --===============1602629008== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1602629008==--