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.

Bug in biblatex 2.2 or older

Well, I have this document:

\documentclass[11pt]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=authoryear-luh-ipw,natbib=true]{biblatex}
\usepackage[printonlyused]{acronym}
\bibliography{eva.bib}
\begin{document}
\citep{a}

\citep{b}

\citeyearpar{a}
\citeyearpar{b}
\end{document}

with A & B being published by the same author, in the same year. LaTeX produces:

(title a, 1980a)

(title b, 1980b)

(1980)(1980)

I'd like to have the ordering character appended on the latter two year-citations. It's so simple, what am I missing?

share|improve this question
    
It's unclear because you're using a custom style and citation command. But I'd guess in your definition of \citeyearpar you can use the starred variant \citeyear* to add extrayear in the citation label. –  Audrey Aug 15 '12 at 14:39
    
@Audrey: citeyearpar is defined by biblatex –  Marco Daniel Aug 19 '12 at 15:44
    
@MarcoDaniel Yeah, I forgot about natbib aliases. We should probably add \citeyearpar* in the next release. –  Audrey Aug 19 '12 at 16:06
    
@Audrey: I asked Joseph in the chat ;-) –  Marco Daniel Aug 19 '12 at 16:07
    
@MarcoDaniel OK. You can also post an issue at github. I'm actually not sure if natbib's \citeyearpar uses extrayear. If it does we should adopt your definition here. –  Audrey Aug 19 '12 at 16:14

1 Answer 1

up vote 4 down vote accepted

The problem is the definition of \citeyearpar in the file blx-natbib.def.

The definition is:

\DeclareCiteCommand{\citeyearpar}[\mkbibparens]
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\printfield{year}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

Here you can see that the field extrayear is missing. Based on this information you can modify the complete definition as follows:

\DeclareCiteCommand{\citeyearpar}[\mkbibparens]
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\printfield{year}\printfield{extrayear}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

Next information related to your example. The command \bibliography is obsolete in combination with biblatex. The correct one is \addbibresource.

For the example below I am using the biblatex example file.

\documentclass[11pt,parskip=half]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=authoryear-luh-ipw,natbib=true,backend=biber]{biblatex}
\DeclareCiteCommand{\citeyearpar}[\mkbibparens]
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\printfield{year}\printfield{extrayear}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
%\bibliography{eva.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
\verb+\citep{knuth:ct:a}+\qquad\citep{knuth:ct:a}

\verb+\citep{knuth:ct:c}+\qquad\citep{knuth:ct:c}

\verb+\citep{knuth:ct:d}+\qquad\citep{knuth:ct:d}


\verb+\citeyearpar{knuth:ct:a}+\qquad\citeyearpar{knuth:ct:a}

\verb+\citeyearpar{knuth:ct:c}+\qquad\citeyearpar{knuth:ct:c}

\verb+\citeyearpar{knuth:ct:d}+\qquad\citeyearpar{knuth:ct:d}

\end{document}

enter image description here

share|improve this answer
    
This looks like a bug in biblatex: I'll discuss with PLK and Audrey. –  Joseph Wright Aug 19 '12 at 19:30
    
Works perfect! Thanks a lot! –  fredson Sep 2 '12 at 19:11
    
@JosephWright Is this issue still open in biblatex 2.9a? –  Jörg Nov 2 at 14:13

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.