ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: creating own hyperlinks in bibliography
Date: Fri, 27 Aug 2010 15:40:20 +0200	[thread overview]
Message-ID: <4C77C044.8080304@elvenkind.com> (raw)
In-Reply-To: <AANLkTin+7RncEHZ5R3RO6duCw96gpYCkZvv6+kXmiOOm@mail.gmail.com>

On 08/27/2010 01:00 PM, Mojca Miklavec wrote:
> Dear Taco,
>
> I would like to add some additional fields to bibliography. I know
> that I have already asked the same question twice (for url and doi)
> and each time it has been built into the core functionality, while my
> current request is "too local" to do that.
>
> 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
>
> That is very similar to what DOI does at the moment, but while DOI is
> quite international, COBISS ID is really local, but it is *the* system
> used in the whole country.
>
> Is there any simple&  safe way to achieve that?

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.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2010-08-27 13:40 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 [this message]
2010-08-27 16:02   ` Mojca Miklavec
2010-08-28  7:02     ` Otared Kavian
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=4C77C044.8080304@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=mojca.miklavec.lists@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).