20

I have a couple of questions on biblatex.

First: When I use the urldate field in a biblatex entry, I get as a result the following string (e.g.):

. . . (visited on 01/02/2012).

With \DefineBibliographyStrings{english} I can change the label visited on, but cannot change the fact that the resulting string is included within parentheses. Is there a way to remove them?

Second: When typesetting biblatex entries that contain URLs, the result (in authoryear-comp, at least) always prints in small caps the label "url:". Is there a way to change it to something like "Available at"? I tried unsuccessfully the following:

\DefineBibliographyStrings{english}{
  url = {Available at}
  }

Cheers!

2 Answers 2

20
\documentclass{article}

\usepackage{biblatex}

\NewBibliographyString{available}

\DefineBibliographyStrings{english}{%
  available = {available at},
}

\DeclareFieldFormat{url}{\bibstring{available}\addcolon\space\url{#1}}

\DeclareFieldFormat{urldate}{\addcomma\space\bibstring{urlseen}\space#1}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
  url = {tex.stackexchange.com},
  urldate = {2012-04-08},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here

1
  • available in DefineBibliographyStrings shall be replaced with url otherwise it results in an error.
    – mlt
    Nov 27, 2012 at 8:52
11

All formats of biblatex defined in the file biblatex.def which is part of the documentation.

First:

The default format of the field urldate is:

\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}

To remove the parentheses use:

\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}

Second:

Works like the first method.

The default of biblatex.def is:

\DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\url{#1}}

whereby \mkbibacro prints acronyms in small caps if possible. So there is no bibliography string url. You can define one and uses as usual.

1
  • Great, thanks! What if I wanted to remove the space before "Retrieved:" (e.g., if wanted ", retrieved ")? I tried the following solution: \DeclareFieldFormat{urldate}{\hspace{-1ex}, retrieved\space#1}, but there must be a more elegant one, I assume.
    – NVaughan
    Apr 8, 2012 at 17:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .