# Biblatex authoryear dashed for entries with no year

I'm using biblatex authoryear and have multiple entries of the same author that do not have a year. When I cite them there are letters shown to distinguish them:

But in the bibliography those letters are not shown and you can only distinguish them by the title. Is it possible to show the letters in the bibliography, too?

\documentclass[a4paper,12pt]{article}%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents}{bib.bib}
@BOOK{bar1,
title = {Text One},
year = {},
author = {Firstname Lastname},
}
@BOOK{bar2,
title = {Text Two},
year = {},
author = {Firstname Lastname},
}
\end{filecontents}

\usepackage[backend=biber, style=authoryear-icomp, dashed=true]{biblatex}

\begin{document}

\cite{bar1} and \cite{bar2}

\printbibliography
\end{document}

• Feb 26 '14 at 9:31
• @karlkoeller I'm not sure that is really the problem. The problem seems to lie with biblatex not printing any date information (if it is not available) in the bibliography. (Also these books don't have a urldate) Feb 26 '14 at 10:14
• @karlkoeller Mhhh weird, it does not work here. Even with \DeclareLabeldate{\field{date}\field{eventdate} \field{origdate}\literal{nodate}} I do not get the "n.d." in the bibliography. Feb 26 '14 at 10:52
• @karlkoeller Trying the proposed duplicate answer does not work for me. Feb 26 '14 at 10:55
• @moewe I don't know what I did before and it worked, but now it doesn't work for me, either. Retracting closing vote. If the question will be closed, I'll vote for reopening. Feb 26 '14 at 10:57

By default biblatex does not print anything in the bibliography if the date is not set

\renewbibmacro*{date+extrayear}{%
\iffieldundef{\thefield{datelabelsource}year}
{}
{\printtext[parens]{%
\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}}%


You can force biblatex to always print the year

\renewbibmacro*{date+extrayear}{%
\printtext[parens]{%
\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}%


Or to only print the letter if no year is available

\renewbibmacro*{date+extrayear}{%
\iffieldundef{\thefield{datelabelsource}year}
{\printfield{extrayear}}
{\printtext[parens]{%
\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}}%


This applies to the standard mergedate=true/mergdetae=compact setting, if you have any other mergdate option in place, you might have to modify the redefinitions above.

\documentclass[a4paper,12pt]{article}%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{bar1,
title = {Text One},
year = {},
author = {Firstname Lastname},
}
@BOOK{bar2,
title = {Text Two},
year = {},
author = {Firstname Lastname},
}
\end{filecontents}

\usepackage[backend=biber, style=authoryear, dashed=true]{biblatex}

\renewbibmacro*{date+extrayear}{%
\printtext[parens]{%
\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}%

\begin{document}

\cite{bar1} and \cite{bar2}

\printbibliography
\end{document}