如何在 biblatex-chicago 中使用 citeyear 打印 origdate?

如何在 biblatex-chicago 中使用 citeyear 打印 origdate?

使用“options = {cmsdate=on}”,biblatex-chicago 中的 textcite 和 parencite 将仅打印文本中的 origdate。我该如何让 citeyear 做到这一点?它只打印日期。

\documentclass{article}
\usepackage[authordate,backend=biber]{biblatex-chicago}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{hume1739,
  author       = {David Hume},
  editor       = {David Fate Norton},
  title        = {A Treatise of Human Nature},
  publisher    = {Oxford University Press},
  year         = 2000,
  address      = {Oxford},
  options      = {cmsdate=on},
  origdate     = {1739/1740}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}

textcite: \textcite[111]{hume1739}

citeyear: \citeyear[111]{hume1739}

\printbibliography[heading=bibintoc]

\end{document}

答案1

\citeyearbiblatex是提供的通用引用命令不是修改后biblatex-chicago-它实际上只是打印该date字段。

为了获得您想要的行为,您必须修改它的定义以便它知道等等origyear

在下面的代码中,我重新定义了\citeyear它,以便检查是否origyear存在,如果存在则打印origdate,否则打印date

边注:日期字段有点特殊biblatex(请参阅手册 4.2.4.3),因此语法有点奇怪。如果你想了解更多,请阅读那里。


\documentclass{article}
\usepackage[authordate, backend=biber]{biblatex-chicago}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{hume1739,
  author       = {David Hume},
  editor       = {David Fate Norton},
  title        = {A Treatise of Human Nature},
  publisher    = {Oxford University Press},
  year         = 2000,
  address      = {Oxford},
  options      = {cmsdate=on},
  origdate     = {1739/1740}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\DeclareCiteCommand{\citeyear} %lifted from biblatex.def
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
   {% modified from here
   \iffieldundef{origyear}
       {\printfield{year}}
       {\printorigdate}
   }% to here
  {\multicitedelim}
  {\usebibmacro{postnote}}



\begin{document}

citeyear: \citeyear[111]{hume1739}

cite \cite{hume1739}
textcite: \textcite[111]{hume1739}



\printbibliography[heading=bibintoc]

\end{document}

答案2

只需改用\autocite*{}即可。

相关内容