Code snippets that are useful for scientific / paper writing.
% Show only DOI if URL and DOI are present
% inspired by https://tex.stackexchange.com/a/154875/67042 and https://tex.stackexchange.com/a/424799/67042
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=doi,final]
\step[fieldset=url,null]
}}}
% Add metadata to the final PDF file
% https://tex.stackexchange.com/a/26530/67042
\usepackage[pdftex,
pdfauthor={Niko Heeren},
pdftitle={My title},
pdfsubject={},
pdfkeywords={},
pdfproducer={},
pdfcreator={}]{hyperref}