Biblatex:更改 @book 类型条目中的标题和编辑者的顺序

Biblatex:更改 @book 类型条目中的标题和编辑者的顺序

我正在处理一份提交给大学的文档,现在我必须更改某些样式(主要是引用和参考书目),这些样式是由发布文档的出版商设置的。

给定的情况如下:
有两种参考书目条目:

  • 来源primary,由相应 bib 条目中的关键字标识,以及
  • 参考,通过关键字 来标识secondary

不同的条目属于不同的书目。样式更改请求应仅影响来源即包含关键字 的条目primary

要求基本上是,条目应以 开头,title后面editor跟着 。条目还应按标题排序。

我已经实现了按标题排序(请参阅下面的 MWE)。我目前的理解是,此请求仅影响类型@book和的 bib 条目@mvbook,因为出现的其他类型已经满足标准。
还值得注意的是,中的所有条目sources都没有作者。

以下是 MWE:

\documentclass{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{filecontents}
\begin{filecontents}{bibliography.bib}
    @book{adamofbremen_history_2002,
    title = {Adam of {{Bremen}}, {{History}} of the {{Archbishops}} of {{Hamburg-Bremen}}},
    editor = {Tschan, Francis J.},
    date = {2002},
    location = {{New York}},
    keywords = {2 PDF/Book,5: cited,primary}
    }

    @incollection{abbooffleury_passio_1972,
    title = {Abbo: Passio Sancti Eadmundi},
    booktitle = {Three Lives of English Saints},
    editor = {Winterbottom, Michael},
    date = {1972},
    pages = {67--87},
    location = {{Toronto}},
    langid = {latin},
    keywords = {2 PDF/Book,5: cited,primary}
    }

    @mvbook{friis-jensen_saxo_2014,
    title = {Saxo {{Grammaticus}}, {{Gesta Danorum}}. {{The History}} of the {{Danes}}},
    editor = {Friis-Jensen, Karsten},
    translator = {Fisher, Peter},
    date = {2014},
    series = {Oxford Medieval Texts},
    volume = {1},
    location = {{New York}},
    isbn = {978-0-19-820523-4},
    volumes = {2},
    keywords = {2 PDF/Book,5: cited,primary,Sources}
    }

    % secondary

    @book{adams_scandinavia_2004,
    title = {Scandinavia and {{Europe}} 800-1350: {{Contact}}, {{Conflict}}, and {{Coexistence}}},
    shorttitle = {Scandinavia and {{Europe}} 800 - 1350},
    editor = {Adams, Jonathan and Holman, Katherine},
    date = {2004},
    series = {Medieval Texts and Cultures of {{Northern Europe}}},
    number = {4},
    location = {{Turnhout}},
    isbn = {2-503-51085-X},
    pagetotal = {369},
    keywords = {1 get,2 PDF/Book,Context and Review,secondary}
    }
\end{filecontents}
\usepackage[backend=biber, style=ext-authortitle-ibid, isbn=false]{biblatex} % comment in when running reference analysis
\addbibresource{bibliography.bib}

\DeclareSortingScheme{byTitle}{
    \sort{\field{title}}
    \sort{\field{name}}
    \sort{\field{year}}
}

\renewbibmacro*{title+editor}{%
    \usebibmacro{title}%
    \newunit
    \printtext[parens]{\usebibmacro{byeditor+others}}%
    \clearname{editor}%
    \newunit
}

\begin{document}
    A primary source of type \emph{incollection}.\footnote{\cite{abbooffleury_passio_1972}.}

    A primary source of type \emph{book}.\footnote{\cite{adamofbremen_history_2002}.}

    A primary source of type \emph{mvbook}.\footnote{\cite{friis-jensen_saxo_2014}.}

    A secondary source.\footnote{\cite{adams_scandinavia_2004}.}

    \newrefcontext[sorting=byTitle]
    \printbibliography[keyword={primary}, title={Sources}, heading=subbibintoc]

    \newrefcontext[sorting=nyt]
    \printbibliography[keyword={secondary}, title={References}, heading=subbibintoc]
\end{document}

其结果为以下 PDF:

在此处输入图片描述

带有类型的条目@incollection基本上就是我需要实现的,标题前没有“In:”。

例如,@book条目应该是:
Adam of Bremen, History of the Archbishops of Hamburg-Bremen. Ed. by Francis J. Tschan. New York, 2002.

附言:我已经更改了参考书目的许多样式,我将其省略以专注于主要任务。但这些更改可能会对给定解决方案的结果产生负面影响,我稍后会提到这一点,并编辑我的问题。

答案1

useeditor对于不应editor在主名称位置显示的条目,您可以将每个条目选项设置为 false。

\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[backend=biber, style=ext-authortitle-ibid, isbn=false]{biblatex}

\DeclareSortingScheme{byTitle}{
  \sort{\field{title}}
  \sort{\field{name}}
  \sort{\field{year}}
}

\begin{filecontents}{\jobname.bib}
@book{adamofbremen_history_2002,
  title    = {Adam of {Bremen}, {History} of the {Archbishops} of {Hamburg-Bremen}},
  editor   = {Tschan, Francis J.},
  date     = {2002},
  location = {New York},
  keywords = {2 PDF/Book,5: cited,primary},
  options   = {useeditor=false},
}
@incollection{abbooffleury_passio_1972,
  title     = {Abbo: Passio Sancti Eadmundi},
  booktitle = {Three Lives of English Saints},
  editor    = {Winterbottom, Michael},
  date      = {1972},
  pages     = {67--87},
  location  = {Toronto},
  langid    = {latin},
  keywords  = {2 PDF/Book,5: cited,primary},
}
@mvbook{friis-jensen_saxo_2014,
  title      = {Saxo {Grammaticus}, {Gesta Danorum}. {The History} of the {Danes}},
  editor     = {Friis-Jensen, Karsten},
  translator = {Fisher, Peter},
  date       = {2014},
  series     = {Oxford Medieval Texts},
  volume     = {1},
  location   = {New York},
  isbn       = {978-0-19-820523-4},
  volumes    = {2},
  keywords   = {2 PDF/Book,5: cited,primary,Sources},
  options    = {useeditor=false},
}
% secondary
@book{adams_scandinavia_2004,
  title      = {Scandinavia and {Europe} 800-1350: {Contact}, {Conflict}, and {Coexistence}},
  shorttitle = {Scandinavia and {Europe} 800 - 1350},
  editor     = {Adams, Jonathan and Holman, Katherine},
  date       = {2004},
  series     = {Medieval Texts and Cultures of {Northern Europe}},
  number     = {4},
  location   = {Turnhout},
  isbn       = {2-503-51085-X},
  pagetotal  = {369},
  keywords   = {1 get,2 PDF/Book,Context and Review,secondary}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  A primary source of type \emph{incollection}.\footnote{\cite{abbooffleury_passio_1972}.}

  A primary source of type \emph{book}.\footnote{\cite{adamofbremen_history_2002}.}

  A primary source of type \emph{mvbook}.\footnote{\cite{friis-jensen_saxo_2014}.}

  A secondary source.\footnote{\cite{adams_scandinavia_2004}.}

  \newrefcontext[sorting=byTitle]
  \printbibliography[keyword={primary}, title={Sources}, heading=subbibintoc]

  \newrefcontext[sorting=nyt]
  \printbibliography[keyword={secondary}, title={References}, heading=subbibintoc]
\end{document}

“Abbo:Passio Sancti Eadmundi”。收录于:《英国圣徒的三个生命》。迈克尔·温特伯顿 (Michael Winterbottom) 编。多伦多,1972 年,第 67-87 页。亚当·不来梅 (Adam of Bremen),《汉堡-不来梅大主教史》。弗朗西斯·J·查恩 (Francis J. Tschan) 编。纽约,2002 年。萨克索·格拉玛提库斯 (Saxo Grammaticus),《丹麦人的历史》。卡尔斯滕·弗里斯-延森 (Karsten Friis-Jensen) 编。彼得·费舍尔 (Peter Fisher) 译。第 1 卷。第 2 卷。牛津中世纪文本。纽约,2014 年。

您也可以根据每个类型设置此选项,但是您需要确保使用正确的条目类型@collection来进行此类工作adams_scandinavia_2004

\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[backend=biber, style=ext-authortitle-ibid, isbn=false]{biblatex}

\DeclareSortingScheme{byTitle}{
  \sort{\field{title}}
  \sort{\field{name}}
  \sort{\field{year}}
}

\ExecuteBibliographyOptions[book,mvbook]{useeditor=false}

\begin{filecontents}{\jobname.bib}
@book{adamofbremen_history_2002,
  title    = {Adam of {Bremen}, {History} of the {Archbishops} of {Hamburg-Bremen}},
  editor   = {Tschan, Francis J.},
  date     = {2002},
  location = {New York},
  keywords = {2 PDF/Book,5: cited,primary},
}
@incollection{abbooffleury_passio_1972,
  title     = {Abbo: Passio Sancti Eadmundi},
  booktitle = {Three Lives of English Saints},
  editor    = {Winterbottom, Michael},
  date      = {1972},
  pages     = {67--87},
  location  = {Toronto},
  langid    = {latin},
  keywords  = {2 PDF/Book,5: cited,primary},
}
@mvbook{friis-jensen_saxo_2014,
  title      = {Saxo {Grammaticus}, {Gesta Danorum}. {The History} of the {Danes}},
  editor     = {Friis-Jensen, Karsten},
  translator = {Fisher, Peter},
  date       = {2014},
  series     = {Oxford Medieval Texts},
  volume     = {1},
  location   = {New York},
  isbn       = {978-0-19-820523-4},
  volumes    = {2},
  keywords   = {2 PDF/Book,5: cited,primary,Sources},
}
% secondary
@collection{adams_scandinavia_2004,
  title      = {Scandinavia and {Europe} 800--1350},
  subtitle   = {Contact, Conflict, and Coexistence},
  editor     = {Adams, Jonathan and Holman, Katherine},
  date       = {2004},
  series     = {Medieval Texts and Cultures of {Northern Europe}},
  number     = {4},
  location   = {Turnhout},
  isbn       = {2-503-51085-X},
  pagetotal  = {369},
  keywords   = {1 get,2 PDF/Book,Context and Review,secondary}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  A primary source of type \emph{incollection}.\footnote{\cite{abbooffleury_passio_1972}.}

  A primary source of type \emph{book}.\footnote{\cite{adamofbremen_history_2002}.}

  A primary source of type \emph{mvbook}.\footnote{\cite{friis-jensen_saxo_2014}.}

  A secondary source.\footnote{\cite{adams_scandinavia_2004}.}

  \newrefcontext[sorting=byTitle]
  \printbibliography[keyword={primary}, title={Sources}, heading=subbibintoc]

  \newrefcontext[sorting=nyt]
  \printbibliography[keyword={secondary}, title={References}, heading=subbibintoc]
\end{document}

答案2

根据@moewe提供的解决方案我在文件useeditor=false中有条件地以以下方式添加了选项.tex

\DeclareSourcemap{
    \maps[datatype = bibtex]{
        \map{
            % select only entries with a keyword `primary`
            \step[fieldsource = keywords, match = \regexp{\bprimary\b}, final]
            % Restricts all \steps to type `book` and `mvbook`
            \pertype{book}
            \pertype{mvbook}
            % add a key `options` to the bib entry with the value `useeditor=false`
            \step[fieldset=options, fieldvalue={useeditor=false}]
        }
    }
}

我这样做是为了让参考书目的数据源(来自外部工具)没有关于条目格式的信息,因为该数据源用于具有不同格式的不同出版物的多个分支。

相关内容