我需要在 LaTeX 中添加文内引用,以便将结果显示为作者(年份:页码)
期望结果:
根据 Scott & McFeaters (2011: 116) 的说法,战场考古学已经发展成为一个可靠的研究领域。
我的主页包含以下包参考
\RequirePackage[
backend=biber,
style=authoryear,
isbn=false,
doi=false,
url=false,
giveninits=true
]{biblatex}
\DeclareDelimFormat{finalnamedelim}{\addspace\&\space}
我的代码是:
According to \autocite[116]{scott_and_mcfeaters_2011}, battlefield archaeology has evolved into a reliable field of study
我的 bib 文件中的文章是:
@article{scott_and_mcfeaters_2011,
title = {The Archaeology of Historic Battlefields: A History and Theoretical Development in Conflict Archaeology},
volume = {19},
doi = {10.1007/s10814-010-9044-8},
pages = {103--132},
number = {1},
journaltitle = {Journal of Archaeological Research},
author = {Scott, Douglas and McFeaters, Andrew},
date = {2011},
}
但是我得到的结果是:
根据(Scott & McFeaters 2011: 116),战场考古学已经发展成为一个可靠的研究领域
上述引用对于段末引用来说是正确的,但我需要文内引用 Scott & McFeaters (2011: 116)
答案1
使用 ,您可以获得您喜欢的格式\textcite
。
因此,您只需将 设置\autocite
为\textcite
即可进行内联引用:
\DeclareAutoCiteCommand{inline}{\textcite}{\textcite}
您可以同时拥有两种引用类型。您可以使用 获得(作者、年份)\parencite
。
以下是完整的 MWE:
\begin{filecontents*}[overwrite]{references.bib}
@article{scott_and_mcfeaters_2011,
title = {The Archaeology of Historic Battlefields: A History and Theoretical Development in Conflict Archaeology},
volume = {19},
doi = {10.1007/s10814-010-9044-8},
pages = {103--132},
number = {1},
journaltitle = {Journal of Archaeological Research},
author = {Scott, Douglas and McFeaters, Andrew},
date = {2011},
}
\end{filecontents*}
\documentclass{article}
\RequirePackage[
backend=biber,
style=authoryear,
isbn=false,
doi=false,
url=false,
giveninits=true
]{biblatex}
\DeclareDelimFormat{finalnamedelim}{\addspace\&\space}
\DeclareAutoCiteCommand{inline}{\textcite}{\textcite}
% from https://tex.stackexchange.com/a/66395/101651:
\renewcommand*{\postnotedelim}{\addcolon\addspace}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\addbibresource{references.bib}
\begin{document}
With text cite: \textcite[116]{scott_and_mcfeaters_2011}
With auto cite:
According to \autocite[116]{scott_and_mcfeaters_2011}, battlefield archaeology has evolved into a reliable field of study
You can have both citation type \parencite[116]{scott_and_mcfeaters_2011}.
\printbibliography
\end{document}