ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: creating own hyperlinks in bibliography
Date: Sat, 28 Aug 2010 09:02:48 +0200	[thread overview]
Message-ID: <331BCCD3-A2E8-4479-A550-979B997F0124@gmail.com> (raw)
In-Reply-To: <AANLkTim7k6KFB6KNZct08xtQgPHbhzBAxg2uuX7Rh5YF@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3529 bytes --]

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ût 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?command=DISPLAY&base=cobib&rid=70615&lani=EN
>> 
>> 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@cobissid}}%
>       #1\expanded{\gotoCOBISS{\@@pb@thekey}{\ascii}}#2}{#3}}}
> \protect
> 
> \def\gotoCOBISS#1#2%
>  {\ifbibinteractionelse
>    {\useURL[bibfoo#1][http://www.cobiss.si/scripts/cobiss?command=DISPLAY&base=cobib&rid=#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.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

%%%%%%%%%%%%%%%%%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: Otared.Kavian@math.uvsq.fr




[-- Attachment #1.2: Type: text/html, Size: 7351 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

  reply	other threads:[~2010-08-28  7:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27 11:00 Mojca Miklavec
2010-08-27 13:40 ` Taco Hoekwater
2010-08-27 16:02   ` Mojca Miklavec
2010-08-28  7:02     ` Otared Kavian [this message]
2010-08-29 12:24       ` Mojca Miklavec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=331BCCD3-A2E8-4479-A550-979B997F0124@gmail.com \
    --to=otared@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).