I'd like to refer to an article which has apparently been accepted for publication by a journal but yet to be published (other than unofficially on the arXiv).
To do so, I'm using the pubstate
field.
Unfortunately, there's no official date scheduled for publication.
This means my bibliography entries end up with a pair of brackets surrounding an empty string.
(Note that I'm using authortitle
style.)
In this situation, is it possible to have biblatex say print "(forthcoming)" in place of a missing date?
Attempted solution
I tried to solve this problem as follows. Here's a MWE:
\begin{filecontents}{\jobname.bib}
@article{example1,
title = "My first article",
author = "A. N. Author",
journal = "Journal of Stuff",
pubstate = "inpreparation",
}
@article{example2,
title = "My second article",
crossref = "example1",
pubstate = "submitted",
}
@article{example3,
title = "My third article",
crossref = "example1",
pubstate = "forthcoming"
}
@article{example4,
title = "My fourth article",
crossref = "example1",
pubstate = "inpress"
}
@article{example5,
title = "My fifth article",
crossref = "example1",
pubstate = "prepublished"
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authortitle,backend=biber]{biblatex}
\addbibresource{\jobname}
\addbibresource{biblatex-examples.bib}
\begin{document}
Here's my long-winded citation: \cites{example1}{example2}{example3}{example4}{example5}.
Here's one from the \texttt{biblatex} example: \cite{springer}.
\printbibliography
\end{document}
I did some searching and came across an answer of Andrew Swann.
Unfortunately I'm trying to use this with the authortitle
style rather than authordate
.
After some more searching and reading the biblatex manual, I attempted to use the pubstate as a `fake date' if no date was provided.
I added the following to the preamble.
\renewbibmacro*{date}{%
\ifboolexpr{ test {\iffieldundef{date}} and not test {\iffieldundef{pubstate}} }%
{\printfield{pubstate}}%
{\printfield{date}}%
}
\renewbibmacro*{addendum+pubstate}{%
\printfield{addendum}%
}
The result was mixed.
This makes the undated references behave as I had intended. Unfortunately I managed to wipe out the date for the Springer reference. Is there a better (correct?) way to deal with this using biblatex?