Here is a a solution which requires biblatex 2.3 and biber 1.3 (both in DEV on SF). Firstly, let's allow a new "AUTOURL" field in all entries so we can populate this as we probably don't want to use the URL field as it can be printed in the bibliography. We can change our driver to test for the AUTOURL field and to add a hyperlink on the title or whatever. Here I'm concentrating just on generating the url data for this.
Add this to your biblatex-dm.cfg
\DeclareDatamodelEntryfields{autourl}
\DeclareDatamodelFields[type=field, datatype=uri]{autourl}
Now we do the real work with the biber sourcemap feature which is better than hard-coding all this as we can then create arbitrary URLs:
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite]{
\step[fieldset=autourl, fieldvalue={http://scholar.google.com/scholar?q="}]
\step[fieldsource=title]
\step[fieldset=autourl, origfieldval, append]
\step[fieldset=autourl, fieldvalue={"+author:}, append]
\step[fieldsource=author, match=\regexp{\A([^,]+)\s*,}]
\step[fieldset=autourl, fieldvalue={$1}, append]
\step[fieldset=autourl, fieldvalue={&as_ylo=}, append]
\step[fieldsource=year]
\step[fieldset=autourl, origfieldval, append]
\step[fieldset=autourl, fieldvalue={&as_yhi=}, append]
\step[fieldset=autourl, origfieldval, append]
}
}
}
Biber will also URL escape any UTF-8 or LaTeX char macros which end up in the URL due to splicing in parts of other fields so you don't have to worry about that.
This results in a field in the .bbl like this:
Which you can reference as the "AUTOURL" field in some logic such as the TITLE field format to add it as a hyperref link. To take a simple example:
\DeclareFieldFormat{title}{\href{\thefield{autourl}}{#1}}
Here is a more sophisticated example that works for all entry types in their default configuration without changing it and uses the auto-generated URL only when no custom one is available:
\DeclareFieldFormat{title}{\iffieldundef{url}{\href{\thefield{autourl}}{\mkbibemph{#1}}}{\href{\thefield{url}}{\mkbibemph{#1}}}}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{\iffieldundef{url}{\href{\thefield{autourl}}{\mkbibquote{#1\isdot}}}{\href{\thefield{url}}{\mkbibquote{#1\isdot}}}}
\DeclareFieldFormat[suppbook,suppcollection,suppperiodical]{title}{\iffieldundef{url}{\href{\thefield{autourl}}{#1}}{\href{\thefield{url}}{#1}}}
Only the url
field is used to replace autourl
, not URLs generated from doi
or eprint
. A production version should also respect \ifhyperref
and should be made more robust against missing fields.
The verbose
style and its variants follow an authortitle
-style bibliography, which is closely based on the standard style defined in standard.bbx
.
From this file you can see that the punctuation preceding publication dates are set by a few different bibliography macros, depending on the entry type: issue+date
for @article
, publisher+location+date
for most books, institution+location+date
for reports and theses, organization+location+date
for @misc
, and location+date
for @booklet
and @unpublished
.
In issue+date
publication dates are already set in parentheses. To remove punctuation before the page reference you can redefine the \bibpagespunct
command from biblatex.def
in your preamble:
\renewcommand*{\bibpagespunct}{%
\ifentrytype{article}{\addspace}{\addcomma\space}}
To remove page prefixes (e.g. "p." and "pp.") add:
\DeclareFieldFormat{page}{#1}
\DeclareFieldFormat{pages}{#1}
The comma preceding the publication date in other entry types can originate from a few different places. For example in publisher+location+date
:
\newbibmacro*{publisher+location+date}{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}% <- HERE
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}% <- OR HERE
\usebibmacro{date}%
\newunit}
Same goes for the other *location+date
macros. To remove the commas change all relevant instances of \addcomma\space
to \addspace
in your redefinitions. Otherwise you can use the following dirty trick (at your own risk):
\renewbibmacro*{date}{\setunit{\addspace}\printdate}
In all these publications dates, if you are just wanting to print the publication year add the following to your preamble.
\AtEveryBibitem{%
\clearfield{month}%
\clearfield{day}}
\AtEveryCitekey{%
\clearfield{month}%
\clearfield{day}}
Your last request about use of shortauthor
and shorttitle
in citations would be better addressed as a new question. It needs to be clarified anyway.
Best Answer
As others have written, it is not clear how you are using this. Suppose for example you have that bib entry in a file
url.bib
and then justThat will give a result similar to the one you got. Maybe this is how you have done it. In that case you should have noticed that there was a warning when you ran Bibtex:
That is, this default style doesn't know about the
@online
entry type. (So it shows the normal fields in some normal way, but really doesn't know about thaturl
field.)The traditional way of entering entries like this in Bibtex is like
Use
\usepackage{url}
in your document to get the\url
command.There may be other Bibtex styles that define an entry type
@online
but chances are you've seen this because Biblatex has such an entry field. So this LaTeX file using Biblatex can use a bib file with the entry you cited.