I am using the superb biblatex package (with biber as backend) to typeset the bibliography of my thesis (compiled with pdflatex).
I would like to customise the formatting of @ONLINE type entries. By default biblatex formats such entries as (simplified):
Author. Title. Organisation. URl.
What I want is the following: when an entry does not have the author field set the formatting should treat the organisation field as the author:
Organisation. Title. Url.
Important: in this case the organisation field should also be used as the field to sort on.
If the both the author field and the organisation field are set it should apply the standard biblatex formatting (see above). When both are missing it should throw a warning. If only the author is set it should apply the default (organisation is optional anyway):
Author. Title. URl.
For example, I want the following entries:
@ONLINE{Android,
title = {{A}ndroid (operating system)},
url = {http://www.android.com},
organization = {{Google, Inc.}}
}
@ONLINE{DalvikVM,
title = {{D}alvik {V}irtual {M}achine},
url = {http://code.google.com/p/dalvik},
author = {{D}an {B}ornstein et al.},
organization = {{Google, Inc.}}
}
@ONLINE{Pachube,
title = {{P}achube},
url = {http://www.pachube.com},
author = {{U}sman {H}aque}
}
To be formatted as:
Dan Bornstein et al. Dalvik Virtual Machine. Google, Inc. URL: http://...
Google, Inc. Android Operating System. URL: http://...
Usman Haque. Pachube. URL: http://...
Important: notice the sorting, the Android entry is sorted by its organisation field, the others by author (lastname).
I have tried to customise the formatting myself but so far it does not work like I wanted. My effort so far:
\DeclareBibliographyDriver{online}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\iflistundef{author}
{\iflistundef{organization}
{\BibliographyWarning{No author nor organisation on Online entry}}
{\printlist{organization}}}
{\usebibmacro{author/editor+others/translator+others}}
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{version}%
\newunit
\printfield{note}%
\newunit\newblock
\iflistundef{author}
{}
{\printlist{organization}}
\newunit\newblock
\usebibmacro{date}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\usebibmacro{url+urldate}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
The problem with this is that the orgisation field is now always used as author, even if there is an author. Also, when there is an author but no organisation only the title and url are shown. Also the organisation field is not used for sorting, instead the title seems to be used.
So my example entries are formatted as:
Google, Inc. Android Operating System. URL: http://...
Google, Inc. Dalvik Virtual Machine. URL: http://...
Pachube. URL: http://...
Can anyone help me to correct my \DeclareBibliographyDriver attempt so it produces the formatting and sorting I wanted?
\iflistundef{author}with\ifnameundef{author}should fix the problem. Is there any particular reason why you're not simply using Google as a corporate author? – Audrey Aug 08 '11 at 14:03bibfile in the biblatex documentation. – Audrey Aug 12 '11 at 23:46