我在论文中使用 biblatex-chicago 引用一些网站时遇到了问题。例如,我引用了几个维基百科页面,但都没有日期,因此显示为“nd”。
到目前为止一切顺利,但现在我文本中的每个引用都显示为“(Wikipedia,nd)”,而没有区分不同的来源,因为没有通常的 a、b、c、... 的年份。
我的代码如下:
\documentclass[11pt]{article}
\usepackage[authordate,
backend=biber,
maxbibnames=999,
maxcitenames=2,
uniquelist=false,
noibid,
sorting=nyt]{biblatex-chicago}
\addbibresource{masterthesis.bib}
\makeatletter
\AtEveryBibitem{\global\undef\bbx@lasthash}
\makeatother
\begin{document}
\parencite{wiki-rurbanisation}
\parencite{wiki-gdp}
\printbibliography
\end{document}
这在文本中产生:
我如何才能让文本中出现类似“(Wikipedia, nd-a)(Wikipedia, nd-b)”或“(Wikipedia-a, nd)(Wikipedia-b, nd)”的内容?
提前致谢!
答案1
我不知道 CMS 对此有何评论,但这可能是您想告诉维护者的事情biblatex-chicago
。(即使严格来说 CMS 坚持不对未注明日期的来源使用消歧义字母,但为用户提供消除这些引文歧义的选项可能是一个明智的想法。)您可以在第一页找到联系地址biblatex-chicago
文档。
这是在标准设置下可以正确执行操作的解决方法。它可能无法在所有不同选项下工作biblatex-chicago
(这就是为什么您要告知维护者。)
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[authordate,
backend=biber,
maxbibnames=999,
maxcitenames=2,
uniquelist=false,
noibid,
]{biblatex-chicago}
\makeatletter
\AtEveryBibitem{\global\undef\bbx@lasthash}
\DeclareFieldFormat{extradate}{%
\iffieldnums{labelyear}
{}
{-}%
\mknumalph{#1}}
\renewbibmacro*{standard+labelyear+extrayear}{%
\ifthenelse{\iffieldundef{labelyear}\OR%
\iffieldequalstr{labelyear}{nodate}}% or new declaration ???
{\ifboolexpr{%
test {\ifentrytype{misc}}%
or
test {\ifentrytype{dataset}}%
or
not togl {cms@nodates}}%
{}%
{\bibstring{nodate}%
\printfield{extradate}}}%
{\iffieldundef{year}%
{\iffieldundef{eventyear}%
{\iffieldundef{origyear}%
{\iffieldundef{userd}%
{\ifboolexpr{%
togl {cms@nodates}%
and
not test {\ifentrytype{misc}}%
and
not test {\ifentrytype{dataset}}%
}%
{\bibstring{nodate}}%
{}}%
{\printurldateextra%
\usebibmacro{clear+datefield}{url}}}%
{\printorigdateextra%
\usebibmacro{clear+datefield}{orig}}}%
{\printeventdateextra%
\usebibmacro{clear+datefield}{event}}}%
{\printdateextra%
\usebibmacro{clear+datefield}{}}}}%
\renewbibmacro*{cite:standard+labelyear+extrayear}{%
\ifthenelse{\iffieldundef{labelyear}\OR%
\iffieldequalstr{labelyear}{nodate}}%
{\ifboolexpr{%
test {\ifentrytype{misc}}%
or
test {\ifentrytype{dataset}}%
or
not togl {cms@nodates}%
}%
{}%
{\printtext[cmsyearhyper]{\bibstring{nodate}\printfield{extradate}}}}% For CMS?
{\printtext[cmsyearhyper]{%
\iffieldundef{year}%
{\iffieldundef{eventyear}%
{\iffieldundef{origyear}%
{\iffieldundef{userd}%
{\ifboolexpr{%
togl {cms@nodates}%
and
not test {\ifentrytype{misc}}%
and
not test {\ifentrytype{dataset}}%
}%
{\bibstring{nodate}}%
{}}%
{\printurldateextra}}%
{\printorigdateextra}}%
{\printeventdateextra}}%
{\printdateextra}}}}%
\makeatother
\begin{filecontents}[overwrite]{\jobname.bib}
@online{elk:bronto,
author = {Anne Elk},
title = {A Theory on Brontosauruses},
url = {https://example.edu/~elk/bronto.pdf},
}
@online{elk:other,
author = {Anne Elk},
title = {A Theory on Other Sauruses},
url = {https://example.edu/~elk/other.pdf},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{elk:bronto}
ipsum \autocite{elk:other}
Lorem \autocite{knuth:ct:b}
ipsum \autocite{knuth:ct:c}
\printbibliography
\end{document}