biblatex 引用格式

biblatex 引用格式

我已开始使用 LaTeX 和 biblatex 来格式化我的论文。我需要我的引文看起来像:(johnson, 2010:29),即 (作者,年份:页码)。

然后我必须把一些引文改成这样(色诺芬,希腊文7.6.2),即(作者,斜体书, 部分)。

是否可以修改\autocite为这样工作?如果可以...我应该从哪里开始?我必须修改哪个文件?

答案1

您可以使用样式和对格式authoryear进行一些小修改来获取作者年份引用命令。使用钩子可以轻松定义使用标题代替年份的变体。nameyeardelimpostnote\AtNextCite

\documentclass{report}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\usepackage[colorlinks]{hyperref}

\renewcommand*{\nameyeardelim}{\nametitledelim}
\renewcommand*{\postnotedelim}{\addcolon}
\DeclareFieldFormat{postnote}{#1}

\newrobustcmd*{\citehook}{%
  \AtNextCite{%
    \renewcommand*{\postnotedelim}{\addspace}%
    \renewbibmacro*{cite:labelyear+extrayear}{%
      \iffieldundef{label}
        {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
        {}}}}

\newrobustcmd*{\autocitetitle}{\citehook\autocite}
\newrobustcmd*{\autocitetitles}{\citehook\autocites}

\addbibresource{biblatex-examples.bib}
\begin{document}
\null\vfill
Filler text \autocite[See][10--15]{aristotle:poetics}.
Filler text \autocitetitle[See][7.6.2]{aristotle:poetics}.
Filler text \autocite{aristotle:poetics,aristotle:rhetoric,kant:kpv,cms}.
Filler text \autocites[10--15]{aristotle:poetics}[25]{aristotle:rhetoric}.
Filler text \autocitetitle{aristotle:poetics,aristotle:rhetoric,kant:kpv,cms}.
Filler text \autocitetitles[7.6.2]{aristotle:poetics}{aristotle:rhetoric}.
\printbibliography
\end{document}

在此处输入图片描述

这种方法的一个优点是它适用于任何作者-年份样式。以下是使用包选项style=authoryear-icomp和的同一文档的引文输出autocite=footnote

在此处输入图片描述

要进一步自定义特定条目的引文标签,您可以使用bib 文件中的shorthandlabel字段。在示例文档中,康德的条目简写为“KpV”。这会覆盖labelnamelabelyear+ extrayear。《芝加哥格式手册》的标签为“CMS”。它仅覆盖labelname

所有引用样式更改都可以纳入\autocite,但您必须提供一些详细信息,说明哪些条目需要用标题引用。这些可以通过现有书目数据上指定的标准或通过文档序言或 bib 文件中定义的类别来区分。

相关内容