# Biblatex: How to get “Author (forthcoming)” when pubstate=forthcoming is set, instead of “Author (n.d.)”?

I am using biblatex with these options :

\usepackage[backend=biber,natbib=true,style=authoryear,language=english]{biblatex}


I have an entry whose field pubstate is set to "forthcoming".

When I cite this reference in the text, I get "Author (n.d.)", and I would like to have "Author (forthcoming)", instead.

Pretty much the same thing in the bibliography. I get : Author (n.d.) ... blablabla ... Forthcoming. And I would prefer : Author (Forthcoming): blablabla ...

I could set the "year" field to "Forthcoming". However, this is not a good solution because I am writing articles in three languages very often. And I would need to change my bibliography database evry time I start a new article in a different language.

Any ideas of how I can have this issue solved ?

Thank you very much in advance, Pierric

• Welcome to TeX.SX! 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}. – Andrew Swann Jan 16 '14 at 10:07

The usual way to do this would be to extend the list of fields considered for dates by using \DeclareLabeldate. This will you give the desired behaviour in the text, but prints the "forthcoming" at the end of the bibliography entry. Perhaps that is acceptable to you. If not then you will need the extra code below renewing the biblatex macro addendum+pubstate. This is an improved version with changes suggested by Moewe.

\documentclass{article}

\usepackage[backend=biber,natbib=true,style=authoryear,language=english]{biblatex}

\DeclareLabeldate{%
\field{date}
\field{eventdate}
\field{origdate}
\field{urldate}
\field{pubstate}
\literal{nodate}
}

\iffieldequalstr{labeldatesource}{pubstate}{}
{\newunit\newblock\printfield{pubstate}}}

\begin{document}

\citet{myart} and \citet{Xx}.

\printbibliography

\end{document}


with mybib.bib containing

@Article{Xx,
author =       {Xy, X.},
title =        {A title},
journaltitle = {Y. Journal},
date =         2000
}

@Article{myart,
author =       {Author, A. N.},
title =        {On things},
journaltitle = {J. Jour.},
pubstate =     {forthcoming}
}


Old code

If your biblatex version is old there are two macros that need updating andn you can code as follows (this was my original code):

\documentclass{article}

\usepackage[backend=biber,natbib=true,style=authoryear,language=english]{biblatex}

\DeclareLabeldate{%
\field{date}
\field{eventdate}
\field{origdate}
\field{urldate}
\field{pubstate}
\literal{nodate}
}

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

\iffieldundef{\thefield{datelabesource}year}{}
{\newunit\newblock\printfield{pubstate}}}

\begin{document}

\citet{myart} and \citet{Xx}.

\printbibliography

\end{document}

• With the new backward incompatible changes to Biblatex, \printdateextralabel should be\printlabeldateextra. See: github.com/plk/biblatex/wiki – Adam Liter Oct 17 '16 at 0:26
• @AdamLiter Many thanks - code updated and I have added the bib file. – Andrew Swann Oct 17 '16 at 9:53
• With current versions of biblatex you don't need to redefine date+extrayear I think (if I'm not missing anything). With the new date regime it is probably safer to test \iffieldequalstr{labeldatesource}{pubstate} instead of \iffieldundef{\thefield{datelabesource}year}{} in addendum+pubstate. See tex.stackexchange.com/q/386400/35864 – moewe Aug 14 '17 at 17:19
• Thank you. Unfortunately, I can't upvote again. So you will have to accept my thanks without that. I think you are missing an empty pair of braces after the \iffieldequalstr{labeldatesource}{pubstate}, currently you only have the 'false' branch. I notice that is because I copied the {} into my comment, it should have not been there, sorry for the confusion. We need to replace \iffieldundef{\thefield{datelabesource}year} by \iffieldequalstr{labeldatesource}{pubstate}. – moewe Aug 15 '17 at 14:54
• @moewe Indeed - it fell off my copy+paste - many thanks – Andrew Swann Aug 16 '17 at 8:34