# biblatex: getting rid of ›nodate‹ where it's inappropriate

biblatex now has the habit of printing an (n.d.) ("no date") when a publication doesn't come with a date of publication specified, as is the case sometimes with grey literature and other obscure formats.

This is all fine IMHO, except in one kind of case; one that I come across very often in my every-day work.

As a historian, a lot of the material I'm citing is @UNPUBLISHED: records, handwritings, all kinds of papers that were never (meant to be) published. They might have a (very precise) date on them, but that's not a date of publication, and, what's more important: when working with records from archives, you don't create a bibliography entry for every single document you're citing. Instead, the bibliography entry is a reference to a larger chunk of records sitting in an archive's basement. Usually, that chunk corresponds to the agency that produced, or is producing, those records. It has some kind of identifier (much like a library call number), but it does not have a date, which just wouldn't make sense. The exact document is given in the \cite only, it's addressed via the record number within that chunk, and the sheet number within the record.

I'd like to know how to get back to biblatex's old behavior of not printing anything when no date is present -- at least for @UNPUBLISHED. I know I can modify that entry type's bibliography driver, but maybe there's a more elegant way.

I also want to encourage the biblatex team to re-consider that issue. If the field year is defined as »the year of publication« (§2.2.2), is something that was never published really lacking that kind of information? Wouldn't it make more sense to make that field optional?

\documentclass{scrartcl}
\usepackage{filecontents}
\usepackage[style=authoryear]{biblatex}
\begin{filecontents*}{testbib.bib}
%this entry represents the 2500 running meters of records left behind by the Prussian Ministry of Education, 1807--1935
@UNPUBLISHED{Kultus,
author = {{Akten des preußischen Ministeriums der Geistlichen-, Unterrichts- und Medicinal-Angelegenheiten}},
address = {Geheimes Staatsarchiv Preußischer Kulturbesitz, Berlin: I. HA Rep. 76},
shorthand = {Kultus},
}
\end{filecontents*}
\bibliography{testbib}

\begin{document}
blabla\footnote{said Prussia's Minister of Education in 1812 \parencite[Nr. 123, sheet 456]{Kultus}}

\printbibliography
\end{document}

• My impression is that you need a new type, say @bunchofdocuments with a dedicated driver for it, rather than abusing @unpublished. – egreg Sep 29 '13 at 21:16
• Yes, if you use this regularly, extend the data model with a new entry type, copy the @unpublished driver and modify it to drop the date. – PLK Sep 30 '13 at 8:06
• okay, that's 3 out of 3 replies in favor of creating a new entry type, which is certainly the most elegant way I guess. Will do that, using @moewe's suggestions. PS: I still think it's odd for @unpublished to have its year field as a must :) – Nils L Sep 30 '13 at 8:19

## 1 Answer

In my opinion, in this particular case it would not be too confusing (or wrong) to add the date field (this also applies to the third solution below).

@UNPUBLISHED{Kultus,
author = {{Akten des preußischen Ministeriums der Geistlichen-, Unterrichts- und Medicinal-Angelegenheiten}},
address = {Geheimes Staatsarchiv Preußischer Kulturbesitz, Berlin: I. HA Rep. 76},
date = {1807/1935},
shorthand = {Kultus},
}


If you want to stick with @unpublished, you can simply modify a few macros provided by biblatex to drop the date label, if the entry type is @unpublished and no proper date field is defined.

Add this to your preamble.

\renewbibmacro*{date+extrayear}{%
\ifboolexpr{
test {\iffieldundef{labelyear}}
or
(test {\ifentrytype{unpublished}}
and
(test {\iffieldundef{year}} and test {\iffieldundef{origyear}}))
}
{}
{\printtext[parens]{\printdateextralabel}}}

\newbibmacro*{cite:labelyear+extrayear}{%
\ifboolexpr{
test {\iffieldundef{labelyear}}
or
(test {\ifentrytype{unpublished}}
and
(test {\iffieldundef{year}} and test {\iffieldundef{origyear}}))
}
{}
{\printtext[bibhyperref]{%
\printfield{labelyear}%
\printfield{extrayear}}}}


NB Note that modifying authoryear's date macros is quite a delicate matter, as it very much depends on your mergedate setting which macro is to be modified in what way. The modifications above work rather well with margedate=true (= mergedate=compact), which is the standard setting. For other mergedate settings remember the field to be suppressed is labelyear (and extrayear); it should be sufficient to replace \iffieldundef{labelyear} by our extended conditional above in most cases.

It might also be a good idea to define a new entrytype @archivedocs. In that case you will not have to abuse the author field.

This type supports author, title and all of the other standard @unpublished fields; it certainly also supports date and year. But it adds archive and sign; the location field now refers to the archive.

We need to let biber and biblatex know about the new fields via authoryear.dbx. Then, of course, we need to define a new driver for @archivedocs. For the archive and sign, we have a new macro, {archive+location+sign}. To address the date issue, we modify the date macros as above (same caveats apply).

The MWE

\documentclass[ngerman]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage{babel}
\usepackage{filecontents}
\usepackage[style=authoryear]{biblatex}
\begin{filecontents*}{\jobname.bib}
@archivedocs{Kultus,
title     = {Akten des preußischen Ministeriums der Geistlichen-, Unterrichts- und Medicinal-Angelegenheiten},
location  = {Berlin},
sign      = {I. HA Rep. 76},
archive   = {Geheimes Staatsarchiv Preußischer Kulturbesitz},
shorthand = {Kultus},
%date      = {1807/1935},
}
\end{filecontents*}
\bibliography{\jobname}

\begin{filecontents*}{authoryear.dbx}
\ProvidesFile{authoryear.dbx}

\DeclareDatamodelFields[type=field,datatype=literal]{archive}
\DeclareDatamodelFields[type=field,datatype=literal]{sign}
\DeclareDatamodelEntryfields[archivedocs]{archive,sign}

\DeclareDatamodelConstraints[archivedocs]{
\constraint[type=mandatory]{
\constraintfield{title}
\constraintfield{archive}
}
}
\end{filecontents*}

\DeclareFieldFormat[archivedocs]{citetitle}{#1}
\DeclareFieldFormat[archivedocs]{title}{#1}

\newbibmacro*{archive+location+sign}{%
\printfield{archive}%
\setunit*{\addcomma\space}%
\printlist{location}%
\setunit{\addcolon\space}%
\printfield{sign}%
\newunit}

\DeclareBibliographyDriver{archivedocs}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\printfield{howpublished}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\usebibmacro{archive+location+sign}%
\newunit\newblock
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}

\renewbibmacro*{date+extrayear}{%
\ifboolexpr{
test {\iffieldundef{labelyear}}
or
(test {\ifentrytype{archivedocs}}
and
(test {\iffieldundef{year}} and test {\iffieldundef{origyear}}))
}
{}
{\printtext[parens]{\printdateextralabel}}}

\newbibmacro*{cite:labelyear+extrayear}{%
\ifboolexpr{
test {\iffieldundef{labelyear}}
or
(test {\ifentrytype{archivedocs}}
and
(test {\iffieldundef{year}} and test {\iffieldundef{origyear}}))
}
{}
{\printtext[bibhyperref]{%
\printfield{labelyear}%
\printfield{extrayear}}}}

\begin{document}
blabla\footnote{said Prussia's Minister of Education in 1812 \parencite[Nr. 123, sheet 456]{Kultus}}
\nocite{*}
\printbibliography
\end{document}