简单的方法

简单的方法

有没有办法使用 biblatex 中的任何 \cite 命令来生成以下输出(更具体地说,biblatex-chicago 使用 authordate 样式)?

Doe 写道... (2015,123)

我尝试过

\parencite[writes...][123]{Doe2015}

但这给了我以下结果:

Doe(写道......2015,123)

一位 MWE 表示:

\documentclass{article}
\usepackage[authordate,backend=biber]{biblatex-chicago}
\usepackage{filecontents}
\addbibresource{\jobname.bib}

\begin{filecontents*}{\jobname.bib}

@book{Doe2015 ,
author = {Doe, John},
title = {My book},
year = {2015},
}

\end{filecontents*}

\begin{document}

... which as Doe has demonstrated (2015, 123) ...


... which as \textcite[123]{Doe2015} has demonstrated ...


\printbibliography{}

\end{document}

答案1

我会使用\citeauthor\citeyear。参见第一个例子。
但是,如果同一作者在同一年出版了多部出版物,这种方法就会失败。然后可以定义一种特定的引用样式\citelabelyear。参见第二个例子。

简单的方法

示例输出

\documentclass{article}
\usepackage[authordate,backend=biber]{biblatex-chicago}
\usepackage{filecontents}
\addbibresource{\jobname.bib}

\begin{filecontents*}{\jobname.bib}

@book{Doe2015 ,
author = {Doe, John},
title = {My book},
year = {2015},
}

\end{filecontents*}

\begin{document}

\dots which as Doe has demonstrated (2015, 123) \dots


\dots which as \citeauthor{Doe2015} has demonstrated
(\citeyear[123]{Doe2015}) \dots


\printbibliography{}

\end{document}

使用新的 cite 命令

这里根据内部宏\DeclareCiteCommand建立一个样式:biblatex-chicagocite:labelyear+extrayear

示例引用输出

\documentclass{article}
\usepackage[authordate,backend=biber]{biblatex-chicago}

\DeclareCiteCommand{\citelabelyear}
  {\usebibmacro{cite:init}%
    \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
    \usebibmacro{cite:labelyear+extrayear}}
  {}
  {\usebibmacro{postnote}}

\usepackage{filecontents}
\addbibresource{\jobname.bib}

\begin{filecontents*}{\jobname.bib}

@book{Doe2015,
author = {Doe, John},
title = {My book},
year = {2015},
}

@book{Doe2015a ,
author = {Doe, John},
title = {My book},
year = {2015},
}

\end{filecontents*}

\begin{document}
\nocite{*}
\dots which as Doe has demonstrated (2015, 123) \dots


\dots which as \citeauthor{Doe2015} has demonstrated
(\citeyear[123]{Doe2015}) \dots

\dots which as \citeauthor{Doe2015} also showed
(\citelabelyear[123]{Doe2015})

\printbibliography{}

\end{document}

相关内容