我有一個很大的bib
文件,其中一些條目沒有年份。我想避免發出警告,biber -V
以便我可以將這些條目與真正的警告區分開來。 (我並不關心這些條目的出現,引文/參考書目——它們對我來說似乎很好。)
例如,執行以下命令
\documentclass{article}
\begin{filecontents*}{\jobname.bib}
@Misc{No-date,
author = {Donald Knuth},
title = {TeXSuX},
year = {n.d.},
}
@Misc{Forthcoming,
author = {Leslie Lamport},
title = {LaTeX3},
year = {nodate},
pubstate = {forthcoming},
}
\end{filecontents*}
\usepackage[style=authoryear-ibid]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
我進入blg
文件:
[126] Utils.pm:164> WARN - year field 'nodate' in entry 'Forthcoming' is not an integer - this will probably not sort properly.
[127] Utils.pm:164> WARN - year field 'n.d.' in entry 'No-date' is not an integer - this will probably not sort properly.
省略這些year
欄位仍然會傳回錯誤。我注意到biblatex
手冊在第 4.9.2.14 節中考慮了nodate
列印方法,但我不知道如何避免與之相關的警告。
答案1
以下是基於https://github.com/plk/biblatex/issues/480
使用開發版本 Biber 2.8,您可以給出sortyear
避免此警告的方法:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Misc{No-date,
author = {Donald Knuth},
title = {TeXSuX},
year = {n.d.},
sortyear = 2017
}
@Misc{Forthcoming,
author = {Leslie Lamport},
title = {LaTeX3},
year = {nodate},
pubstate = {forthcoming},
sortyear = 2017
}
\end{filecontents*}
\usepackage[style=authoryear-ibid]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
INFO - This is Biber 2.8 (beta)
INFO - Logfile is 'document.blg'
INFO - Reading 'document.bcf'
INFO - Using all citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'document.bib' for section 0
INFO - Decoding LaTeX character macros into UTF-8
INFO - Found BibTeX data source 'document.bib'
INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized'
INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable'
INFO - Sorting list 'nyt/global/' of type 'entry' with scheme 'nyt' and locale 'en-US'
INFO - No sort tailoring available for locale 'en-US'
INFO - Writing 'document.bbl' with encoding 'ascii'
INFO - Output to document.bbl