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.

In author-year citation/bibliography styles, multiple publications by the same author in the same year are formatted with a lowercase letter after the year: Smith 2011a ... Smith 2011b etc.

In biblatex this works fine with numeric dates, but fails with non-numeric dates like "in progress". (The natbib style I use handles these cases correctly by putting parentheses around the letter if the year field is non-numeric.) How do I do the same thing in biblatex? So the expected output is:

Smith, 2011a Smith, 2011b

Smith, in progress(a) Smith, in progress(b)

Sample file and output:

\documentclass{article}
\usepackage[style=authoryear,labelyear=true]{biblatex}
\usepackage{filecontents}
\bibliography{test}
\begin{document}
\cite{test1,test2}
\printbibliography
\begin{filecontents}{test.bib}
@unpublished{test1,
    Author = {John Smith},
    Date-Added = {2011-02-21 13:41:09 -0500},
    Date-Modified = {2011-02-21 13:42:02 -0500},
    Note = {ms. MSU},
    Title = {A great paper in progress},
    Year = {in progress}}

@unpublished{test2,
    Author = {John Smith},
    Date-Added = {2011-02-21 13:42:09 -0500},
    Date-Modified = {2011-02-21 13:42:46 -0500},
    Note = {ms. MSU},
    Title = {Another great paper in progress},
    Year = {in progress}}
\end{filecontents}
\end{document}

Output image

share|improve this question
    
Good question. :-) Note that you don't need to set labelyear=true, as this is the default for the authoryear style. –  lockstep Feb 21 '11 at 19:16
    
@lockstep So it is. I wonder if it was always so; as biblatex evolved, my code probably hasn't. –  Alan Munn Feb 21 '11 at 19:19

1 Answer 1

up vote 5 down vote accepted

This is a somewhat cruel hack, but here we go. Add the following to your preamble (EDIT: Should have scanned the manual more thoroughly -- \iffieldnums seems to be the correct test, see p. 148--149):

\DeclareFieldFormat{extrayear}{%
  \iffieldnums{labelyear}{%
    \mknumalph{#1}%
  }{%
    \mkbibparens{\mknumalph{#1}}%
  }%
}

UPDATE: I have submitted a feature request at SourceForge.net: biblatex.

UPDATE: The feature request is now pending. Philipp Lehman, author of biblatex, commented:

I'll add that even though I'm not entirely convinced that this is the way to deal with work in progress. I'd rather recommend putting "in progress" in the "pubstate" field and set a label in the "label" field.

UPDATE: This feature has been implemented in biblatex v1.3 (released March 14th, 2011).

share|improve this answer
    
Thanks! Why do you think this is a cruel hack? (It probably should be the default, but that's another issue.) Or was your cruel hack before you read the manual and edited your answer? –  Alan Munn Feb 21 '11 at 20:06
    
@Alan: Exactly. –  lockstep Feb 21 '11 at 20:07
1  
@Alan: If my solution shapes up as robust, I will submit a feature request at sourceforge.biblatex. The current state can only be an oversight. –  lockstep Feb 21 '11 at 20:09

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.