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