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 an @inbook reference in my bibtex library with an unknown year. Since I use the bibLaTeX authoryear citation style with some customizations my normal citations (with known year) look like:

Author1/Author2/Author3 (year)

But when there is no year defined it will display the title of the reference where it should be:

Author1/Author2/Author3

What do I have to redefine in order to change this behavior?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can load the xpatch package and then "patch" the cite bib macro as follows:

\xpatchbibmacro{cite}{\usebibmacro{cite:label}}{\printnames{labelname}}{}{}

CAVEAT: It might be possible to have bibliography entries where there is no author nor year. In such cases, what you propose result in an empty reference (nothing is going to be printed). A more substantial change is need to handle such cases, namely:

\newbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\ifnameundef{labelname}
          {\usebibmacro{cite:label}}
          {\printnames{labelname}}%
          \setunit{\addspace}}
       {\printnames{labelname}%
        \setunit{\nameyeardelim}}%
     \usebibmacro{cite:labelyear+extrayear}}
    {\usebibmacro{cite:shorthand}}}
share|improve this answer
    
Perfekt answer! Thanks! –  Nicholas Jan 17 '13 at 13:04

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.