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 would like to have Biblatex print only the year of a publication in the bibliography. Currently it shows the year, month and day.

The "date" option (e.g. date=iso8601) can't do that.

share|improve this question
    
Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Benedikt Bauer Jan 8 '13 at 11:42
    
But the situation is really nothing special. Biblatex ALWAYS prints the full date (if provided) in the bibliography. This is not an error or something. I think a MWE is rather elaborate here, since citations are involved... –  HWende Jan 8 '13 at 11:46
    
Maybe date=iso8601 can't do it, but date=year seems to work fine for me. That option might be relatively new. –  Rob Kennedy Jun 6 at 15:08
add comment

1 Answer

up vote 7 down vote accepted

In analogy to Disable month in biblatex bibliography? you can just disable the month and day fields with the commands

\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}

For a short moment there came to my mind that there could be a caveat with the urldate field that declares when a URL has been checked, but biblatex even takes care of this. The urldate is still printed as full date. Compare the MWE and its output below:

\begin{filecontents}{test.bib}
@BOOK{test,
author= {A. Author},
title = {A Title for a Book},
date = {2012-10-08}
},
@ONLINE{test2,
author = {A. Author},
title = {Some title},
url = {http://example.com},
urldate = {2013-01-08}
}
\end{filecontents}

\documentclass{article}
\usepackage{biblatex}
\addbibresource{test.bib}

\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}

\begin{document}
\nocite{*}

\printbibliography
\end{document}

enter image description here

Is this what you intend to do? If not, please provide a MWE to work with.

share|improve this answer
1  
Perfect! I was not aware of a "\clearfield" command. Thank you so much! (Also, you proved me wrong on the 'elaborate' MWE!) –  HWende Jan 8 '13 at 12:18
1  
The basic idea behind the MWE is to be only as elaborate as necessary. In many cases (I have to admit, not here) one finds the source of the problem by oneself or can at least limit it to a much smaller amount of code which makes it easier to ask the right question then. –  Benedikt Bauer Jan 8 '13 at 12:41
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.