3

The journal I am submitting to wants datasets to be listed in the reference as

[dataset] Authors; Year; Dataset title; Data repository or archive; Version (if any); Persistent identifier (e.g. DOI),

where "[dataset]" at the beginning is literal. The type of other references (articles, books, etc) does not need to be prefixed in this way.

biblatex has a @dataset entry type, and I have gotten close to the target using this:

\documentclass{article}
\usepackage[style=apa]{biblatex}

\begin{filecontents}{\jobname.bib}
@dataset{test,
  author = {The Author},
  title = {Very Big and Important Dataset},
  year = {2020},
  doi = {XX.XXXX/XXX.XXXX.XXXXXXXX},
  publisher = {Dryad}}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
  Text \parencite{test}.

  \printbibliography
\end{document}

enter image description here

This looks pretty good, but how can I get the [dataset] added to the beginning?

4
  • 2
    Before you go down the rabbit hole of a biblatex solution, double check with the journal that they can accept biblatex submissions. biblatex requires a different workflow than classical BibTeX or thebibliography and may not be supported by all publishers. See tex.stackexchange.com/q/12175/35864
    – moewe
    Mar 13, 2020 at 14:44
  • 1
    Should the "[dataset]" you want to add to the beginning alter the sorting? Should your example entry be sorted under "A" for author or under "d" for "dataset"? (I would find it quite unfortunate to start off the entry with something that has no influence on sorting.)
    – moewe
    Mar 13, 2020 at 14:46
  • Good point that they may not accept it anyway; I should check.
    – brendan
    Mar 13, 2020 at 14:48
  • My understanding is that it should not influence the sorting. It is not included in the in-line citations, so it would be difficult to find the appropriate reference for (Author, 2020) if it was alphabetized under D for Dataset.
    – brendan
    Mar 13, 2020 at 14:50

1 Answer 1

3

With most biblatex styles you can hook into the beginning of the entry by redefining the bibmacro begentry. Then it's just a matter of checking the entry type and printing a suitable string.

The original definition of begentry can be found in apa.bbx (ll. 673-674).

\documentclass{article}
\usepackage[style=apa]{biblatex}

\NewBibliographyString{dataset}

\DefineBibliographyStrings{english}{
  dataset = {dataset},
}

\renewbibmacro{begentry}{%
  \ifkeyword{meta}{\textsuperscript{*}}{}%
  \ifentrytype{dataset}
    {\bibstring[\mkbibbrackets]{dataset}%
     \setunit{\addspace}}
    {}%
}

\begin{filecontents}{\jobname.bib}
@dataset{test,
  author    = {The Author},
  title     = {Very Big and Important Dataset},
  year      = {2020},
  doi       = {XX.XXXX/XXX.XXXX.XXXXXXXX},
  publisher = {Dryad},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  Text \autocite{test}.

  \printbibliography
\end{document}

[Dataset] Author, T. (2020). Very big and important dataset. Dryad. https://doi.org/XX.XXXX/XXX.XXXX.XXXXXXXX

I don't think this kind of markup is particularly useful. Most readers who care can probably tell that the entry is a data set fairly quickly anyway. What I find most problematic about this is that the "[dataset]" visually shields the "Author 2020" in the bibliography, but "Author 2020" is relevant for sorting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .