The modifications made by urlbst
are quite clear, so the change you want is actually not too hard (by BibTeX standards). If you open up your .bst
files, you need to search for a function called output.web.refs
. It needs modifying to read
FUNCTION {output.web.refs}
{
new.block
output.url
addeprints eprint empty$ not and
{ format.eprint output.nonnull }
'skip$
if$
adddoiresolver doi empty$ not and
{
url empty$
{ format.doi output.nonnull }
{
doiurl doi * url =
'skip$
{ format.doi output.nonnull }
if$
}
if$
}
'skip$
if$
addpubmedresolver pubmed empty$ not and
{ format.pubmed output.nonnull }
'skip$
if$
}
All that has happened here is that I've added a test for an empty URL and a second for the URL being the same as the DOI once the prefix is added.
Modified answer for UPDATE 1
It is better not to use note
. Biblatex offers the opportunity to create new fields, so I would create a new field for the url time (urltime
).
This can be done with
\begin{filecontents}{biblatex-dm.cfg}
\DeclareDatamodelFields[type=field,datatype=literal,skipout=false]{urltime}
\end{filecontents}
then for the formatting of the URL and related information a possibility is to use the following format instructions:
\DeclareFieldFormat{url}{\newline\bibstring[\MakeUppercase]{url}\addcolon\addspace\url{#1}}
\DeclareFieldFormat{urltime}{#1}
\DeclareFieldFormat{urldate}{%
\iffieldundef{urlday}
{}
{\stripzeros{\thefield{urlday}}\adddot}%
\iffieldundef{urlmonth}
{}
{\stripzeros{\thefield{urlmonth}}\adddot}%
\printfield{urlyear}%
}
\renewbibmacro{url+urldate}{%
\printfield{url}\setunit{\addcomma\addspace}
\printurldate\addcomma\addspace
\printfield{urltime}}
To change the standard punctuation, from .
(dot) to .
(comma), one can use
\renewcommand{\newunitpunct}{\adddot}
For the .
after the year,
\renewcommand{\labelnamepunct}{\addcomma}
Finally to remove the month from the label, a possible solution is to use
\AtEveryBibitem{\clearfield{month}}
Entries in the .bib
files now can contain the new urltime
field.
@online{stack,
author = {Stack},
title = {Why {\LaTeX} is science},
month = {april},
year = 2012,
url = {www.tex.stackexchange.com},
urldate = {2013-04-29},
urltime = "14.44 Uhr",
}
Please notice how properly write LaTeX in a .bib
file. In general it is best to enclose whole words in {
}
of single letters to preserve their capitalisation (and then kerning by enclosing the whole word).
Best Answer
You just need to customise the formatting
hyperref
uses. For example: