我希望“Besucht am:”仅在使用 URL 时才出现在参考书目中。不幸的是,“Besucht am: + 日期”出现在所有来源中,而且有数百个...
这是我的代码:
\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[backend=biber, citestyle=authoryear-icomp, bibstyle=authoryear, sorting=nyt,
hyperref=true, uniquename=false,]{biblatex}
这里是我的库中的两个例子 - 只有第一个应该有“Besucht am: date”:
@misc{Stiewe.2015,
author = {M{\"u}ller, Eckhard and Stiewe, Christian},
year = {2015},
title = {Anwendungspotential thermoelektrischer Generatoren in station{\"a}ren Systemen Chancen f{\"u}r NRW: Studie im Auftrag des Ministeriums f{\"u}r Innovation, Wissenschaft, Forschung des Landes Nordrhein-Westfalen},
url = {https://elib.dlr.de/100251/},
keywords = {Anwendungspotential NRW;TEG},
urldate = {2021-02-22}, %JJJJ-MM-TT
editor = {{Deutsches Zentrum für Luft- und Raumfahrt e.V.}},
institution = {{Institute of Materials Research - Thermoelectric Materials and Systems}},
file = {673c3516-1a8e-4110-b4d2-7dccfe87d67a:C\:\\Users\\user\\AppData\\Local\\Swiss Academic Software\\Citavi 6\\ProjectCache\\mubvzqt50zkfv8qpidh93k7mxrtrdnpo3gt0y1\\Citavi Attachments\\673c3516-1a8e-4110-b4d2-7dccfe87d67a.pdf:pdf}
}
@article{Rosch.2021,
abstract = {npj Flexible Electronics, doi:10.1038/s41528-020-00098-1},
author = {R{\"o}sch, Andres Georg and Gall, Andr{\'e} and Aslan, Silas and Hecht, Matthias and Franke, Leonard and Mallick, Md. Mofasser and Penth, Lara and Bahro, Daniel and Friderich, Daniel and Lemmer, Uli},
year = {2021},
title = {Fully printed origami thermoelectric generators for energy-harvesting},
urldate = {2021-02-22},
pages = {1--8},
volume = {5},
number = {1},
journal = {npj Flexible Electronics},
doi = {10.1038/s41528-020-00098-1},
file = {772ca64a-a60f-4800-be17-b8d2f74ebcae:C\:\\Users\\user\\AppData\\Local\\Swiss Academic Software\\Citavi 6\\ProjectCache\\mubvzqt50zkfv8qpidh93k7mxrtrdnpo3gt0y1\\Citavi Attachments\\772ca64a-a60f-4800-be17-b8d2f74ebcae.pdf:pdf}
}
多谢! :)
答案1
URL 访问日期对于不稳定的 URL 有意义,但对于稳定的 DOI(甚至相当稳定的 elib URL)则不那么有意义。乌尔丽克·菲舍尔urldate
评论说,如果你不想要它,那么简单地从文件中删除它是有意义的.bib
。如果这不可能,这里有另一种方法,使用 Biber sourcemaps 来摆脱它
\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[notfield=url, final]
\step[fieldset=urldate, null]
}
}
}
\begin{filecontents}{\jobname.bib}
@report{Stiewe.2015,
author = {Müller, Eckhard and Stiewe, Christian},
year = {2015},
title = {Anwendungspotential thermoelektrischer Generatoren
in stationären Systemen},
subtitle = {Chancen für NRW},
titleaddon = {Studie im Auftrag des Ministeriums
für Innovation, Wissenschaft, Forschung
des Landes Nordrhein-Westfalen},
type = {DLR-Forschungsbericht},
url = {https://elib.dlr.de/100251/},
urldate = {2021-02-22},
institution = {Deutsches Zentrum für Luft- und Raumfahrt e.V.,
Institut für Werkstoff-Forschung},
location = {Köln},
}
@article{Rosch.2021,
author = {Rösch, Andres Georg and Gall, André and Aslan, Silas
and Hecht, Matthias and Franke, Leonard
and Mallick, Md. Mofasser and Penth, Lara
and Bahro, Daniel and Friderich, Daniel and Lemmer, Uli},
year = {2021},
title = {Fully printed origami thermoelectric generators for energy-harvesting},
urldate = {2021-02-22},
pages = {1--8},
volume = {5},
number = {1},
journal = {npj Flexible Electronics},
doi = {10.1038/s41528-020-00098-1},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{sigfridsson,Stiewe.2015,Rosch.2021}
\printbibliography
\end{document}
注意对您的条目所做的更改,Stiewe.2015
以使其更具biblatex
-y。
对源图代码的简短解释性注释
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[notfield=url, final]
\step[fieldset=urldate, null]
}
}
}
- 第一个
\step
检查是否存在url
字段(notfield=url
),否则停止(final
)。 \step
现在,仅在没有字段时才执行第二个操作url
,并将urldate
(fieldset=urldate
)设置为null
,即删除它。
有关 sourcemap 语法和示例的更多详细信息,请参阅文档biblatex
, §4.5.3动态修改数据,第 196-208 页(在 v3.16 中)。