# Several strings in one biblatex-field — multiple references

As I understand it, biblatex-fields as eprint and related accept one and only string/key, though I want them to refer to two or more items/addresses.

To give an example which might make it clear what I mean (the example needs three runs: latex --> biber --> latex):

\begin{filecontents}{MyBib.bib}
@Article{Barney:Notes,
author =   {Rachel Barney},
title =    {Notes on Plato on the \mkbibemph{Kalon} and the Good},
journaltitle = {Classical Philology},
year =     2010,
commentator =  {Paula Gottlieb},
eprint =   {10.1086/657026, 10.1086/659326}, %the first number is
% the article, the second one the
% comment, which I want to appear in one entry
eprinttype =   {jstor},
volume =   105,
number =   4,
pages =    {363-77, 378-80} % the same as with eprint
}

@Article{Derrida:Pharmacie1-1,
author =   {Jacques Derrida},
title =    {La pharmacie de Platon},
journaltitle = {Tel Quel},
year =     1968,
volume =   32,
pages =    {3-48}
}

@Article{Derrida:Pharmacie1-2,
author =   {Jacques Derrida},
title =    {La pharmacie de Platon},
journaltitle = {Tel Quel},
year =     1968,
volume =   33,
pages =    {18-59}
}

@InBook{Derrida:Pharmacie2,
title =    {La pharmacie de Platon},
year =     1993,
bookauthor =   {Jacques Derrida},
author =   {Jacques Derrida},
gender =   {sm},
booktitle =    {La Diss{\'e}mination},
bookauthor =   {Jacques Derrida},
publisher =    {{\'E}dition Points},
location =     {Paris},
pages =    {77-213}, % perhaps: {77-148, 149-213}
related =  {Derrida:Pharmacie1-1}, % both articles are reprinted in one book,
% the unity of the deconstructed separation, which might duly be called
% the voice of the separated unification as voiced deconstruction
% of no-pposites
related =      {Derrida:Pharmacie1-2},
relatedstring ={Nachdruck von}
}
\end{filecontents}
\documentclass{scrartcl}
\usepackage{filecontents}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\input{ix-utf8enc.dfu}
\usepackage[english]{babel}
\usepackage{xpatch}
\usepackage[pdftex]{hyperref}
\usepackage{csquotes}
\usepackage[style=philosophy-modern, sorting=nyvt,
backend=biber, citetracker=constrict,
opcittracker=constrict,
idemtracker=constrict, relatedformat=parens,
autolang=hyphen, clearlang=true]{biblatex}
\addbibresource{MyBib.bib}
\begin{document}

\nocite{*}
\printbibliography
\end{document}


If I separate the two keys with a comma in the Derrida-case, I get the reference two times, separated by a line-break.

• It works fine, it just needs three runs: latex --> biber --> latex – Alexander Wittmann Mar 16 '14 at 20:18
• In Derrida:Pharmacie2, you will have to put both related entry into one related field (separated by a comma, of course), otherwise Biber will only take the last occurrence of the field and will ignore all previous (I would have expected a warning by Biber, but there was none. You can see this behaviour very clearly, if you add a second (different) author field to an entry.). You might like to use relatedtype = {reprintfrom} or relatedtype = {reprintof} instead of manually specifying the relatedstring. – moewe Mar 17 '14 at 7:21
• I'm not sure whether Barney:Notes is the actual real-world example where you would like to have two DOIs, but if it is: don't. The two DOIs refer two totally distinct articles. Granted, they both appear in the same issue of the same journal, deal with "to kalon" and "to agathon", and the latter is a reply to the former; but that's it - they certainly should not be crammed together into one entry. (Also I feel that Mrs. Gottlieb's work is not just a commentary, it is a "response" (cf. the title).) You might consider a separate entry for "Response to Barney" and add related info to it. – moewe Mar 17 '14 at 7:46
• Re Barney:Notes: I'd rather have a longer bibliography where Mrs Gottlieb gets properly mentioned as an author and not a commentator, than a confusing entry of two DOIs and page reference in one. (I would have suggested putting the two entries in one @set, see §3.11.5 Entry Sets of the biblatex documentation, but philosophy-modern really does not get along with @sets: It just ignored the set here.) An alternative solution would involve redefining the datamodel and all styles would probably not be worth it. – moewe Mar 18 '14 at 18:10
• A longer bibliography where things can be found is better than a shorter one that is hard to use. Bibliographies should be judged on their usefulness, not on their length... – jon Mar 18 '14 at 18:37

## 1 Answer

To get the two crossrefs right, just put them into the same crossref field. To cite my comment above

you will have to put both related entries into one related field (separated by a comma, of course), otherwise Biber will only take the last occurrence of the field and will ignore all previous (I would have expected a warning by Biber, but there was none. You can see this behaviour very clearly if you add a second (different) author field to an entry.)

@InBook{Derrida:Pharmacie2,
title         = {La pharmacie de Platon},
year          = 1993,
bookauthor    = {Jacques Derrida},
author        = {Jacques Derrida},
gender        = {sm},
booktitle     = {La Diss{\'e}mination},
bookauthor    = {Jacques Derrida},
publisher     = {{\'E}dition Points},
location      = {Paris},
pages         = {77-213}, % perhaps: {77-148, 149-213}
related       = {Derrida:Pharmacie1-1,Derrida:Pharmacie1-2},
relatedtype   = {reprintof},
%relatedstring = {Nachdruck von}
}


Since you wrote relatedstring ={Nachdruck von}, relatedtype = {reprintof} seems fitting here.

It seems to me though that the default related macro in biblatex-philosophy is slightly messed up, reprintof also gets mangled, so we will have to tell biblatex what to do with it instead:

\newbibmacro*{related:reprintof}[1]{%
\entrydata*{#1}{%
\usedriver
{\ifnameundef{savedauthor}
{\ifnameundef{savededitor}
{}
{\ifnamesequal{editor}{savededitor}
{\clearname{editor}}
{}}}
{\ifnamesequal{author}{savedauthor}
{\clearname{author}}
{}}%
\renewbibmacro*{related:init}{}%
\DeclareNameAlias{sortname}{default}%
\ifbibmacroundef{date+extrayear}
{}
{\renewbibmacro*{date+extrayear}{}%
\renewbibmacro*{date}{\printdate}}%
\renewbibmacro*{pageref}{}}
{\thefield{entrytype}}}}


If we further redefine the standard related:default to

\renewbibmacro*{related:default}[1]{%
\entrydata*{#1}{%
\usedriver
{\renewcommand*{\labelnamepunct}{\addcolon\space}%
\renewbibmacro*{author/translator+others}{\printnames{author}}%
\iffieldsequal{savedjournaltitle}{journaltitle}%
{\renewbibmacro*{journal}{\bibstring{ibidem}}%
\ifboolexpr{test {\iffieldsequal{savedvolume}{volume}} and test {\iffieldsequal{savednumber}{number}}}
{\renewbibmacro*{volume+number+eid}{}}
{}%
}
{}
\ifnameundef{savedauthor}
{\ifnameundef{savededitor}
{}
{\ifnamesequal{editor}{savededitor}
{\clearname{editor}}
{}}}
{\ifnamesequal{author}{savedauthor}
{\clearname{author}}
{}}%
\renewbibmacro*{related:init}{}%
\DeclareNameAlias{sortname}{default}%
\ifbibmacroundef{date+extrayear}
{}
{\renewbibmacro*{date+extrayear}{}%
\renewbibmacro*{date}{\printdate}}%
\renewbibmacro*{pageref}{}}
{\thefield{entrytype}}}}


Update related:default now prints an ibidem notice if the journal of the related entry is the same as the journal of the parent entry.

And treat the Barney:Notes as follows, note that Gottlieb:response is a dataonly, and the related field of Barney:Notes referring to Gottlieb:response

@Article{Barney:Notes,
author =   {Rachel Barney},
title =    {Notes on Plato on the \mkbibemph{Kalon} and the Good},
journaltitle = {Classical Philology},
year =     2010,
doi =   {10.1086/657026},
volume =   105,
number =   4,
pages =    {363-377},
related={Gottlieb:response},
relatedstring = {Commentary:},
}

@Article{Gottlieb:response,
author =   {Paula Gottlieb},
title =    {Response to Barney},
journaltitle = {Classical Philology},
year =     2010,
doi =   {10.1086/659326},
volume =   105,
number =   4,
pages =    {378-380},
options = {dataonly},
}


We can get quite a desirable output, I think.

MWE

\documentclass{scrartcl}
\usepackage{filecontents}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{xpatch}
\usepackage[pdftex]{hyperref}
\usepackage{csquotes}
\usepackage{filecontents}
\usepackage[style=philosophy-modern, sorting=nyvt,
backend=biber, citetracker=constrict,
opcittracker=constrict,
idemtracker=constrict, relatedformat=parens,
autolang=hyphen, clearlang=true]{biblatex}

\begin{filecontents*}{\jobname.bib}
@Article{Barney:Notes,
author =   {Rachel Barney},
title =    {Notes on Plato on the \mkbibemph{Kalon} and the Good},
journaltitle = {Classical Philology},
year =     2010,
doi =   {10.1086/657026},
volume =   105,
number =   4,
pages =    {363-377},
related={Gottlieb:response},
relatedstring = {Commentary:},
}

@Article{Gottlieb:response,
author =   {Paula Gottlieb},
title =    {Response to Barney},
journaltitle = {Classical Philology},
year =     2010,
doi =   {10.1086/659326},
volume =   105,
number =   4,
pages =    {378-380},
options = {dataonly},
}

@Article{Derrida:Pharmacie1-1,
author =   {Jacques Derrida},
title =    {La pharmacie de Platon},
journaltitle = {Tel Quel},
year =     1968,
volume =   32,
pages =    {3-48}
}

@Article{Derrida:Pharmacie1-2,
author =   {Jacques Derrida},
title =    {La pharmacie de Platon},
journaltitle = {Tel Quel},
year =     1968,
volume =   33,
pages =    {18-59}
}

@InBook{Derrida:Pharmacie2,
title =    {La pharmacie de Platon},
year =     1993,
bookauthor =   {Jacques Derrida},
author =   {Jacques Derrida},
gender =   {sm},
booktitle =    {La Diss{\'e}mination},
bookauthor =   {Jacques Derrida},
publisher =    {{\'E}dition Points},
location =     {Paris},
pages =    {77-213}, % perhaps: {77-148, 149-213}
related =  {Derrida:Pharmacie1-1,Derrida:Pharmacie1-2},
relatedtype = {reprintof},
%relatedstring ={Nachdruck von}
}
\end{filecontents*}

\newbibmacro*{related:reprintof}[1]{%
\entrydata*{#1}{%
\usedriver
{\ifnameundef{savedauthor}
{\ifnameundef{savededitor}
{}
{\ifnamesequal{editor}{savededitor}
{\clearname{editor}}
{}}}
{\ifnamesequal{author}{savedauthor}
{\clearname{author}}
{}}%
\renewbibmacro*{related:init}{}%
\DeclareNameAlias{sortname}{default}%
\ifbibmacroundef{date+extrayear}
{}
{\renewbibmacro*{date+extrayear}{}%
\renewbibmacro*{date}{\printdate}}%
\renewbibmacro*{pageref}{}}
{\thefield{entrytype}}}}

\renewcommand*{\relateddelim}{\adddot\space}

%\renewbibmacro*{related:clearauthors}{}

\renewbibmacro*{related:default}[1]{%
\entrydata*{#1}{%
\usedriver
{\renewcommand*{\labelnamepunct}{\addcolon\space}%
\renewbibmacro*{author/translator+others}{\printnames{author}}%
\iffieldsequal{savedjournaltitle}{journaltitle}%
{\renewbibmacro*{journal}{\bibstring{ibidem}}%
\ifboolexpr{test {\iffieldsequal{savedvolume}{volume}} and test {\iffieldsequal{savednumber}{number}}}
{\renewbibmacro*{volume+number+eid}{}}
{}%
}
{}
\ifnameundef{savedauthor}
{\ifnameundef{savededitor}
{}
{\ifnamesequal{editor}{savededitor}
{\clearname{editor}}
{}}}
{\ifnamesequal{author}{savedauthor}
{\clearname{author}}
{}}%
\renewbibmacro*{related:init}{}%
\DeclareNameAlias{sortname}{default}%
\ifbibmacroundef{date+extrayear}
{}
{\renewbibmacro*{date+extrayear}{}%
\renewbibmacro*{date}{\printdate}}%
\renewbibmacro*{pageref}{}}
{\thefield{entrytype}}}}

\addbibresource{\jobname.bib}
\begin{document}

\nocite{*}
\printbibliography
\end{document}


The solutions here might be somewhat fragile and might break in other use cases. But the default handling of related entries in philosophy-modern does seem to contain some bugs and sly redefinitions I had to counter.

• Exellent! But isn't idemtracker supposed to do the job of what you get by redefining related with savedauthor ...? If idemtracker actually did it, then ibidtracker could replace Classical Philology, S. 378--380 by ebd./ibid., S. 378--80. – Alexander Wittmann Mar 20 '14 at 12:01
• @AlexanderWittmann Normally, idemtracker and friends are supposed to help shorten citations (esp. verbose citations), not the bibliography in itself. (Note though, that idemtracker will not help here as it compares author/editor names not journals.) It might be possible on a different route though, let me investigate. – moewe Mar 20 '14 at 12:05
• @AlexanderWittmann OK, have a look at the edited answer, if the related journal is the same as the parent entry's journal, ibidem is printed (strictly speaking this is not fully correct since ibidem normally refers to an entire work and not just a part of it, maybe loccit would have been better; I admit though in German it kind of works). I have not yet thoroughly analysed the implications of this change thanks to a lack of test cases, but let me know what you think. – moewe Mar 20 '14 at 12:18
• @AlexanderWittmann In the bibliography these saved... test take the role of a far more advanced kind of ...tracker (ibidtracker would not help here, since it "[e]xpands to true if the entry currently being processed is the same as the last one, and to false otherwise.", p. 176, § 4.6.1 Data Commands of the biblatex documentation, emphasis mine). – moewe Mar 20 '14 at 12:24