# biblatex/iso690 (iso-authoryear): related entries (and other fields) missing

I'm using biblatex 3.16 (latest), biber (behind the scenes) and the biblatex-iso690 package (0.4.0, latest) that implements the iso-authoryear biblatex style.

I've noticed that various fields, notably references to related entries in the bibliography (related=) do not get printed, and I don't know why. Take the following example, which is using the default style:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Book{Keynes1936,
author      = {John Maynard Keynes},
date        = {1936},
title       = {The General Theory of Employment, Interest and Money},
location    = {London},
pagetotal   = {403},
publisher   = {MacMillan},
related     = {Keynes2018},
relatedstring = {Repr. as},
}
@Book{Keynes2018,
author      = {John Maynard Keynes},
date        = {2018},
title       = {The General Theory of Employment, Interest and Money},
isbn        = {978-3-319-70343-5},
publisher   = {Springer},
related     = {Keynes1936},
relatedtype = {reprintof},
}
\end{filecontents*}
\usepackage{biblatex}
\begin{document}
\nocite{*}
\printbibliography
\end{document}


This produces

When changing the style, i.e. using

\usepackage[style=iso-authoryear]{biblatex}


I've taken a look at the documentation for both biblatex and biblatex-iso690, but haven't found anything that would explain this behavior to me. There is nothing in the .log or .blg files that would indicate any problem.

FWIW, I'm using MikTeX and xelatex.

EDIT: this also affects other fields, such as volume= for an entry referring to one volume of a multi-volume book, language=, and likely others.

A look at the code of biblatex-iso690 shows that the bibliography drivers don't support the related feature.

The drivers in the biblatex standard styles end like this

  \setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}


but those in iso.bbx end like

  \setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}


I'm not sure why that is the case. I know that biblatex-iso690 has been around for a long time, so it might have been based on a version of the biblatex standard styles that did not have the related function. But it could also be that the related function was consciously removed, because ISO 690 has nothing to say about something like this.

You can try to get the related feature back by copying the relevant code from standard.bbx and authoryear.bbx and injecting the related-block missing from the drivers into finentry.

\documentclass{article}

\usepackage[style=iso-authoryear]{biblatex}

\providetoggle{bbx:related}
\toggletrue{bbx:related}

\makeatletter
\newbibmacro*{bbx:ifmergeddate}{\@secondoftwo}
\renewbibmacro*{date}{%
\usebibmacro{bbx:ifmergeddate}
{}
{\printdate}}%

\newcounter{bbx:relatedcount}
\newcounter{bbx:relatedtotal}

\newbibmacro*{related:init}{%
\csundef{bbx:relatedloop}}

\newbibmacro*{begrelated}{}
\newbibmacro*{endrelated}{}
\newbibmacro*{begrelatedloop}{}
\newbibmacro*{endrelatedloop}{}

\def\ifrelatedloop{%
\ifboolexpr{ test {\xifinlistcs{\strfield{entrykey}}{bbx:relatedloop}}
or test {\xifinlistcs{\strfield{clonesourcekey}}{bbx:relatedloop}} }}

\newbibmacro*{related}{%
\ifboolexpr{ test {\iffieldundef{related}} or test {\ifrelatedloop} }
{}
{\ifcsundef{begrelateddelim\strfield{relatedtype}}
{\printunit{\begrelateddelim}}
{\printunit{\csuse{begrelateddelim\strfield{relatedtype}}}}%
\usebibmacro{begrelated}%
\def\bbx@tempa{}%
\setcounter{bbx:relatedtotal}{0}%
\def\do##1{%
\entrydata{##1}{%
\ifrelatedloop
{}
{\stepcounter{bbx:relatedtotal}%
\gappto{\bbx@tempa}{##1,}}}}%
\docsvfield{related}%
\restorefield{related}{\bbx@tempa}%
\ifnumgreater{\value{bbx:relatedtotal}}{0}
\iffieldundef{clonesourcekey}
{}
\setcounter{bbx:relatedcount}{0}%
\def\do{%
\stepcounter{bbx:relatedcount}%
\ifnumgreater{\value{bbx:relatedcount}}{1}
{\ifcsundef{relateddelim\strfield{relatedtype}}
{\printunit{\relateddelim}}
{\expandafter\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\printunit
\expandafter\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter{%
\csuse{relateddelim\strfield{relatedtype}}}}}
{}}%
\ifbibmacroundef{related:\strfield{relatedtype}}
{\appto{\do}{\usebibmacro{related:default}}}
{\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}%
\iffieldformatundef{related:\strfield{relatedtype}}
{\def\bbx@tempa{related}}
{\def\bbx@tempa{related:\strfield{relatedtype}}}%
\iffieldformatundef{relatedstring:\strfield{relatedtype}}
{\def\bbx@tempb{relatedstring:default}}
{\def\bbx@tempb{relatedstring:\strfield{relatedtype}}}%
\printtext[\bbx@tempa]{%
\usebibmacro{begrelatedloop}%
\iffieldundef{relatedstring}
{\ifboolexpr{
test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}
and
test {\ifbibxstring{\thefield{relatedtype}s}}
}
{\printtext[\bbx@tempb]{%
\bibstring[\mkrelatedstringtext]{\thefield{relatedtype}s}}}
{\iffieldbibstring{relatedtype}
{\printtext[\bbx@tempb]{%
\bibstring[\mkrelatedstringtext]{\thefield{relatedtype}}}}
{}}}
{\iffieldbibstring{relatedstring}
{\printtext[\bbx@tempb]{%
\bibstring[\mkrelatedstringtext]{\thefield{relatedstring}}}}
{\printfield[\bbx@tempb]{relatedstring}}}%
\docsvfield{related}%
\usebibmacro{endrelatedloop}}}%
{}%
\usebibmacro{endrelated}}}
\makeatother

\renewbibmacro{finentry}{%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\finentry
}

\begin{filecontents*}{\jobname.bib}
@Book{Keynes1936,
author      = {John Maynard Keynes},
date        = {1936},
title       = {The General Theory of Employment, Interest and Money},
location    = {London},
pagetotal   = {403},
publisher   = {MacMillan},
related     = {Keynes2018},
relatedstring = {Repr. as},
}
@Book{Keynes2018,
author      = {John Maynard Keynes},
date        = {2018},
title       = {The General Theory of Employment, Interest and Money},
isbn        = {978-3-319-70343-5},
publisher   = {Springer},
related     = {Keynes1936},
relatedtype = {reprintof},
}
\end{filecontents*}