2

The @xdata entry type and the xdata field are nice as they help us to let redundancy as low as possible, like in the following MCE where long and error prone authors' names:

  • de La Vallée Poussin, Charles-Jean Étienne Gustave Nicolas
  • Knuth, Donald Ervin

are written only once, though used in multiple references (the corresponding author fields hold in @xdatas poussin and knuth).

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{biblatex}
\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
@xdata{poussin,
  author = {de La Vallée Poussin, Charles-Jean Étienne Gustave Nicolas},
}
@xdata{knuth,
  author = {Knuth, Donald Ervin},
}

@article{poussin1896a,
  xdata   = {poussin},
  title   = {Recherches analytiques de la théorie des nombres premiers},
  journal = {Annales de la Société scientifique de Bruxelles},
  year    = {1896},
  number  = {20},
  pages   = {183-256, 281-352, 363-397}
}
@article{poussin1896b,
  xdata   = {poussin},
  title   = {Recherches analytiques de la théorie des nombres premiers},
  journal = {Annales de la Société scientifique de Bruxelles},
  year    = {1896},
  number  = {21},
  pages   = {351-368}
}

@book{knuth1984,
  xdata    = {knuth},
  title    = {The TeXbook},
  date     = {1984-01-14},
 publisher = {Addison-Wesley},
}
@book{knuth1986,
  xdata    = {knuth},
  title    = {TeX: The Program},
  date     = {1986-01-11},
 publisher = {Addison-Wesley},
}

\end{filecontents*}

\addbibresource{\jobname.bib}
\nocite{*}

\begin{document}
\printbibliography
\end{document}

So far, so good.

Now, imagine the same document contains another reference written by these two authors. Though cascading @xdata entries is supported, adding an @xdata entry poussinknuth referencing @xdata entries poussin and knuth doesn't work as expected: only the last author is taken in account:

@xdata{poussinknuth,
  xdata = {poussin,knuth},
}
@article{poussinknuth2019,
  xdata    = {poussinknuth},
  title    = {Recherches analytiques de la théorie des nombres premiers, composé avec \TeX},
  journal  = {TUGboat},
  year     = {2019},
  number   = {40},
  pubstate = {inpreparation}
}

Okay, this is not surprising, since:

@xdata{poussinknuth,
  xdata = {poussin,knuth},
}

probably does the something like:

@xdata{poussinknuth,
  xdata = {author = {de La Vallée Poussin, Charles-Jean Étienne Gustave Nicolas},author = {Knuth, Donald Ervin}}
}

Hence my question is: is it possible to have, in a biblatex's .bib file, references written by:

  • de La Vallée Poussin, Charles-Jean Étienne Gustave Nicolas
  • Knuth, Donald Ervin

both separately and together with the names of these authors written only once?

1

I guess the classic approach here (that also works with BibTeX) would be to use @strings. Multiple @strings can be concatenated with #, so you could say

author = poussin # { and } # knuth,

Your example would then look like

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{biblatex}
\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
@string{poussin = {de La Vallée Poussin, Charles-Jean Étienne Gustave Nicolas}}
@string{knuth = {Knuth, Donald Ervin}}

@article{poussin1896a,
  author  = poussin,
  title   = {Recherches analytiques de la théorie des nombres premiers},
  journal = {Annales de la Société scientifique de Bruxelles},
  year    = {1896},
  number  = {20},
  pages   = {183-256, 281-352, 363-397}
}
@article{poussin1896b,
  author  = poussin,
  title   = {Recherches analytiques de la théorie des nombres premiers},
  journal = {Annales de la Société scientifique de Bruxelles},
  year    = {1896},
  number  = {21},
  pages   = {351-368}
}
@book{knuth1984,
  author   = knuth,
  title    = {The TeXbook},
  date     = {1984-01-14},
 publisher = {Addison-Wesley},
}
@book{knuth1986,
  author   = knuth,
  title    = {TeX: The Program},
  date     = {1986-01-11},
 publisher = {Addison-Wesley},
}
@article{poussinknuth2019,
  author   = poussin # { and } # knuth,
  title    = {Recherches analytiques de la théorie des nombres premiers, composé avec \TeX},
  journal  = {TUGboat},
  year     = {2019},
  number   = {40},
  pubstate = {inpreparation}
}
\end{filecontents*}

\addbibresource{\jobname.bib}
\nocite{*}

\begin{document}
\printbibliography
\end{document}

Donald Ervin Knuth. TeX: The Program. Addison-Wesley, Jan. 11, 1986.//Donald Ervin Knuth. The TeXbook. Addison-Wesley, Jan. 14, 1984.//Charles-Jean Étienne Gustave Nicolas de La Vallée Poussin. “Recherches analytiques de la théorie des nombres premiers”. In: Annales de la Société scientifique de Bruxelles 20 (1896), pp. 183–256, 281–352, 63–397.//Charles-Jean Étienne Gustave Nicolas de La Vallée Poussin. “Recherches analytiques de la théorie des nombres premiers”. In: Annales de la Société scientifique de Bruxelles 21 (1896), pp. 351–368.//Charles-Jean Étienne Gustave Nicolas de La Vallée Poussin and Donald Ervin Knuth. “Recherches analytiques de la théorie des nombres premiers, composé avec TeX”. In: TUGboat 40 (2019). In preparation.

With xdata you indeed run into trouble when you want to concatenate xdata info for the same field. I guess resolving the

@xdata{poussinknuth,
  xdata = {poussin,knuth},
}

is highly nontrivial unless Biber starts concatenating multiple occurrences of the same field into one (in the proper fashion!) instead of discarding earlier occurrences.

  • I knew about @string with bibtex but couldn't imagine it would work with biblatex since its documentation doesn't mention it. – Denis Bitouzé May 2 '19 at 18:30
  • 1
    @DenisBitouzé In general you should be able to assume that all BibTeX idioms also work with biblatex (of course there are small differences between Biber/btparse and BibTeX, so it is often hard to know what you can assume and what you can't assume). PL decided not to document the general .bib format in the biblatex manual, and so you can't find documentation of @string or @preamble there. See also github.com/plk/biblatex/issues/370 – moewe May 2 '19 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.