I have a large number of sources and I find Mandeley a very useful tool to generate the .bib file. However, Mendeley does not support the extra capabilities of biblatex. While you can classify documents as "patent" or "web page" in Mendeley, it will all be exported as "misc". e.g.
Web page:
@misc{Label1,
abstract = {...},
author = {...},
file = {:...:pdf},
institution = {...},
title = {{...}},
url = {http://....pdf},
year = {...}
}
Patent: (Note stupid Mendeley does not export the patent number, while it's specified)
@misc{Label2,
abstract = {....},
author = {...},
file = {:...:pdf},
institution = {...},
title = {{...}},
year = {...}
}
Seeing the capabilities of biblatex, is there a way to re-interpret the entry type? Something like:
\DeclareStyleSourcemap{%
\maps[datatype=bibtex, overwrite=true]{%
\map{%
\pertype{misc}%
\step[entrynewtype=patent]%
\step[fieldsource=url, final]%
\step[entrynewtype=online]
}%
}%
}
But this code doesn't seem to work…
Consider this example:
\documentclass{article}
\usepackage[style=science,article-title=true]{biblatex}
%\usepackage{csquotes}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{Johannes2007,
author = {Johannes, Michael S. and Polson, Nick},
title = {{Particle Filtering and Parameter Learning}},
url = {http://www.ssrn.com/abstract=983646},
month = {10},
year = {2007}
}
@misc{Pronk2013,
author = {Pronk, Serverius Petrus Paulus and Musch, Guido Josef and Maass, Henning and Aubert, Xavier Louis Marie Antoine and Most, Else Inger Stapel},
institution = {Koninklijke Philips N.V.},
number = {{WO 2013/132454 A1}},
title = {{Generating a circadian time difference}},
year = {2013}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Text \cite{Pronk2013} More Text \cite{Johannes2007}
\printbibliography
\end{document}
Will show
While changing it to types online
and patent
will show
Especially significant is that the latter only shows the all-important patent number.
(However, in the latter case, I'm missing the title of the patent, and the date of the online document… sigh)
Best Answer
Converts all
@misc
s with URLs to@online
and all other@misc
s to@patent
. Additionally theinstitution
field is copied over toholder
, since@patent
does not recognise theinstitution
field.biblatex-science
does not print theholder
orinstitution
field, so the last mapping step, while conceptually nice, does not really cause any difference in output in your specific example.Would be slightly closer to your suggestion. If you want to change the entry type, you need
typesource
andtypetarget
. That means we can do away with\pertype
if we addfinal
to the first step. The first step converts all@misc
s to@patent
. The second step filters all@patent
s with URLs and converts those to@online
. With your set-up this should be equivalent to the the other suggestion.edit Switched to user-level command
\DeclareSourcemap
.\DeclareStyleSourcemap
should only be used in styles (.bbx
or.cbx
files).