使用 biblatex 引用@inbook:如何将作者/编辑放在书名之前?

使用 biblatex 引用@inbook:如何将作者/编辑放在书名之前?

我正在尝试使用 biblatex 引用一本书中的一章:

@inbook{ , 
  crossref{X}
}   
@book{X,
}.

这将产生以下布局的引用:

    Authors. Title. [...] In: Title. Authors. [...]

我需要在“In:”引用中交换标题和作者,即获得

    Authors. Title. [...] In: Authors. Title. [...]

有什么想法吗?谢谢。

答案1

解决方案取决于您使用的书目样式。如果它基于标准样式standard.bbx,则驱动程序的相关部分@inbook是:

\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%

对于@incollection@inproceedings

\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%

\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\usebibmacro{byeditor+others}%

书目宏bybookauthorbyeditor+others在中定义biblatex.def

要更改 之后的标题和名称列表的顺序in:,您可以重新定义每个驱动程序,并使用bybookauthor和的变体byeditor+others来抑制“by”字符串。

或者,您可以重新定义in:宏来打印和清除姓名列表。这种方法已被先前申请针对这种情况。下面是处理由或byeditor打印的姓名列表的示例。byeditor+othersbybookauthor

\documentclass{article}
\usepackage{biblatex}

\renewbibmacro*{in:}{%
  \printtext{\bibstring{in}\intitlepunct}%
  \ifnameundef{bookauthor}
    {\ifnameundef{editor}
       {\printnames{translator}%
        \setunit{\addcomma\space}%
        \usebibmacro{translator+othersstrg}%
        \clearname{translator}}
       {\printnames{editor}%
        \setunit{\addcomma\space}%
        \usebibmacro{editor+othersstrg}%
        \clearname{editor}}}
    {\ifnamesequal{author}{bookauthor}
       {}
       {\printnames{bookauthor}%
        \clearname{bookauthor}}}%
  \newunit\newblock}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inbook{inbook,
  crossref = {book},
  author = {Smith, John},
  title = {Inbook Title}}
@book{book,
  author = {Doe, John and Brown, Bob},
  title = {Book Title}}
@incollection{incollection,
  crossref = {collection},
  author = {Smith, John},
  title = {Incollection Title}}
@collection{collection,
  editor = {Doe, John and Brown, Bob},
  translator = {Smith, Jane},
  title = {Collection Title}}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{inbook,incollection}
\printbibliography
\end{document}

在此处输入图片描述

相关内容