Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question

2 Answers 2

up vote 14 down vote accepted
\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

share|improve this answer
    
Cool! Thanks a lot! –  NVaughan Apr 8 '12 at 17:04
    
available in DefineBibliographyStrings shall be replaced with url otherwise it results in an error. –  mlt Nov 27 '12 at 8:52

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.

share|improve this answer
    
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 '12 at 17:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.