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'm using biblatex with my own Bibstyle based on verbose Style.

\usepackage[bibstyle=mystyle,citestyle=mystyle,natbib=true]{biblatex}

Now I need the urldate shown in cite. But I can't find a way to do this.

I tried

\printfield{urldate}

But nothing.

\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat{formaturl}{\newline #1}
\DeclareFieldFormat{abrufurl}{\addcomma\space Abruf am #1}

\renewbibmacro*{url+urldate}{%
     \printtext[formaturl]{%
   \printfield{url}}%
     \printtext[abrufurl]{%
       \printfield{urldate}}%
}

Anyone could Help?

share|improve this question
    
urldate isn't a field in the .bbl - it is split into the component urlyear/urlmonth/urlday by the backend. See the biblatex manual. That's why the pseudo-field macros like \printurldate exist. –  PLK Jun 22 '12 at 14:01
add comment

1 Answer

up vote 6 down vote accepted

At least with the standard verbose style, it works if you replace \printfield{urldate} with \printurldate. You might also want to change the format of urldate and load (as recommended in the biblatex manual) the babel package, here with the ngerman option.

\documentclass{article}

\usepackage[ngerman]{babel}

\usepackage[style=verbose]{biblatex}

\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat{urldate}{#1}
\DeclareFieldFormat{formaturl}{\newline #1}
\DeclareFieldFormat{abrufurl}{\addcomma\space Abruf am #1}

\renewbibmacro*{url+urldate}{%
     \printtext[formaturl]{%
   \printfield{url}}%
     \printtext[abrufurl]{%
       \printurldate}%
}

\usepackage{filecontents}

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

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

Instead of defining a new format including the string "Abruf am", you may also redefine existing bibliography strings:

\documentclass{article}

\usepackage[ngerman]{babel}

\usepackage[style=verbose]{biblatex}

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

\DefineBibliographyStrings{german}{%
  urlseen = {Abruf am},
}

\usepackage{filecontents}

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

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

Output for both examples:

enter image description here

share|improve this answer
1  
OK, this solves the problem. I used @ online for the definition - with @ misc urldate is used. THX –  PascalTurbo May 23 '12 at 14:20
add comment

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.