I have created a few aliases of bibliography types, e.g. standard
is a report
or software
is online
. Now, when using such types in my bib file and enabled --validate-datamodel
, I get warnings like:
Datamodel: Entry 'Spread' (thesis.bib): Invalid field 'url' for entrytype 'software'
How can I make biber happy about this again? Any way to enhance the data model for the aliases?
MWE
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{test.bib}
@standard{RFC4627,
date = {2006},
editor = {IETF},
number = {4627},
title = {The application/json Media Type for {JavaScript} Object Notation ({JSON})},
type = {RFC},
url = {http://www.ietf.org/rfc/rfc4627.txt},
urldate = {2016-09-08}
}
@software{Spread,
label = {Spread},
title = {The Spread Toolkit},
url = {http://www.spread.org/},
urldate = {2016-09-08}
}
\end{filecontents}
\usepackage[backend=biber,style=alphabetic]{biblatex}
\DeclareBibliographyAlias{software}{online}
\DeclareBibliographyAlias{standard}{report}
\bibliography{test}
\begin{document}
\nocite{*}
\printbibliography{}
% should still work
\printbibliography[heading=bibintoc,type=software,title={List of Software Packages}]{}
\end{document}
Compiled using latexmk with the following latexmkrc
:
$pdf_mode = 1;
$pdflatex = 'pdflatex -shell-escape -interaction=nonstopmode';
$biber = 'biber --validate-datamodel %O %S';
\DeclareBibliographyAlias
is in a way on the fly forbiblatex
. Biber does not know about it, in particular Biber's data model has no way of knowing about it and so it doesn't validate. You can use sourcemapping as described in the end of my answer for a 'Biber-proof' aliasing.\printbibliography[heading=bibintoc,type=software,title={List of Software Packages}]{}
. This list is empty now and instead software ends up in the normal bibliography, which I filter as\printbibliography[heading=bibintoc,nottype=software]{}
. Any way to make this work again?