Biblatex - 定制作者年份风格?

Biblatex - 定制作者年份风格?

我正在使用 Biblatex,并且需要特定的作者年份样式。

所以我正在考虑定制 Biblatex 中现有的作者年份样式。

参考书目应如下所示:

(Levy,2015)或(Jenne,2021,第 323 页)或(Verbeek 和 Zaslove,2017)

参考书目应如下所示:

杂志文章:

Jenne, EK (2021)《民粹主义、民族主义和修正主义外交政策》。国际事务,第 91 卷,第 2 期,第 323-344 页。

书:

Levy, YB-H.(2015)非外交家:右翼民粹主义者及其外交政策(布鲁塞尔:欧洲改革中心)。

书中章节:

Verbeek, B. 和 Zaslove, A. (2017)。《民粹主义与外交政策》。载于 Kaltwasser, CR 等人 (eds.)牛津民粹主义手册(牛津:牛津大学出版社),第 489-514 页。

这是我的代码:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{filecontents}

\begin{filecontents}{ref.bib}

@article{Jenne2021,
    author = {Jenne, Erin K.},
    date-added = {2021-03-12 10:30:48 +0100},
    date-modified = {2021-03-12 10:31:33 +0100},
    doi = {10.1093/ia/iiaa230},
    journal = {International Affairs},
    number = {2},
    pages = {323-344},
    title = {Populism, nationalism and revisionist foreign policy},
    volume = {91},
    year = {2021}}


@book{Levy2015,
    address = {Brussels},
    author = {Levy, Yehuda Ben-Hur},
    date-added = {2020-12-04 11:27:23 +0100},
    date-modified = {2021-03-11 10:13:56 +0100},
    publisher = {Centre for European Reforms},
    shorttitle = {The Undiplomats},
    title = {The Undiplomats: Right-wing populists and their foreign policies},
    year = {2015}}


@incollection{Verbeek2017,
    address = {Oxford},
    author = {Verbeek, Bertjan and Zaslove, Andrej},
    booktitle = {The Oxford Handbook of Populism},
    date-added = {2020-12-15 12:21:34 +0100},
    date-modified = {2020-12-15 12:24:41 +0100},
    editor = {Rovira Kaltwasser, Crist{\'o}bal and Taggart, Paul and Ochoa Espejo, Paulina and Ostiguy, Pierre},
    pages = {489-514},
    publisher = {Oxford University Press},
    title = {Populism and Foreign Policy},
    year = {2017}}
}
\end{filecontents}

\usepackage{ebgaramond}

% package for switching quotation marks
\usepackage[style=british]{csquotes}

% giveinits --> print only initiatls of first(given) name
\usepackage[style=authoryear, giveninits, backend=biber]{biblatex}

\addbibresource{ref.bib}

% add vol. and no. to citation
\DeclareFieldFormat[article]{volume}{\bibstring{jourvol}\addnbspace #1}
\DeclareFieldFormat[article]{number}{\bibstring{number}\addnbspace #1}

\renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit{\addcomma\space}%
    \printfield{number}%
    \setunit{\addcomma\space}%
    \printfield{eid}}

\renewcommand*{\multinamedelim}{\addsemicolon\space}

\renewbibmacro*{journal+issuetitle}{%
    \usebibmacro{journal}%
    \setunit*{\addcomma\space}% was: \setunit*{\addspace}
    \iffieldundef{series}
    {}
    {\newunit
        \printfield{series}%
        \setunit{\addcomma\space}}% was: \setunit{\addspace}
    \usebibmacro{volume+number+eid}%
    \setunit{\addspace}%
    \usebibmacro{issue+date}%
    \setunit{\addcolon\space}%
    \usebibmacro{issue}%
    \newunit}
%%%

\begin{document}
Journal article \autocite[323]{Jenne2021}.

Book \autocite{Levy2015}

Chapter in Bool\autocite{Verbeek2017}

\printbibliography
\end{document}

如您所见,输出类似,但不是我想要的。

杂志文章:

Jenne, EK (2021)。“民粹主义、民族主义和修正主义外交政策”。《国际事务》,第 91 卷,第 2 期,第 323-344 页。doi:10.1093/ia/iiaa230。

  • “vol.”和“no.”开头没有大写字母

  • 年份后的标点

  • 期刊名称前的“In:”

书:

Levy, YB-H. (2015). 非外交家:右翼民粹主义者及其外交政策。布鲁塞尔:欧洲改革中心。

  • 年份后的标点

  • 标题后的标点

  • 地址和出版商不在括号中

书中章节:

Verbeek, B. 和 A. Zaslove (2017)。《民粹主义与外交政策》。引自:牛津民粹主义手册。C. Rovira Kaltwasser 等人编。牛津:牛津大学出版社,第 489–514 页。

  • 年份后的标点

  • 第二作者以名字开头

  • 标题中的标点符号前加引号

  • “在:”而不是“在”

  • 书名在编辑之前而不是之后

  • 编辑以名字而不是姓氏开头

  • 编辑后无(编辑)

  • 地址和出版商不在括号中

有谁知道符合我要求的更好的引用样式吗?或者有人能帮我进一步定制这种样式吗?

我非常期待您的回答。谢谢!

答案1

采用来自biblate-ext免责声明:我是作者的基础,大多数事情都可以通过样式的选项或其他自定义设置来解决。

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{ebgaramond}
\usepackage[style=british]{csquotes}

\usepackage[backend=biber,
  style=ext-authoryear,
  giveninits=true,
  uniquename=init,
  articlein=false,
  innamebeforetitle=true,
]{biblatex}
\usepackage{hyperref}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}

\DeclareFieldAlias{translatortype}{editortype}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}

\DeclareNameAlias{ineditor}{sortname}

\DeclareDelimFormat{nameyeardelim}{\addcomma\space}
\DeclareDelimFormat[bib]{nametitledelim}{\addspace}

\renewcommand*{\intitlepunct}{\addspace}

\renewcommand*{\volnumdelim}{\addcomma\space}
\DeclareFieldFormat[article]{volume}{\bibcpstring{jourvol}\addnbspace #1}
\DeclareFieldFormat[article]{number}{\bibcpstring{number}\addnbspace #1}

\renewcommand*{\jourvoldelim}{\addcomma\space}

\renewbibmacro*{pubinstorg+location+date}[1]{%
  \ifboolexpr{
       not test {\iflistundef{location}}
    or not test {\iflistundef{#1}}}
    {\setunit{\addspace}%
     \printtext[parens]{%
       \printlist{location}%
       \iflistundef{#1}
         {\setunit*{\locdatedelim}}
         {\setunit*{\locpubdelim}}%
       \printlist{#1}%
       \setunit*{\pubdatedelim}%
       \usebibmacro{date}%
       \newunit}}
    {}}

\DeclareFieldFormat{doi}{\url{https://doi.org/#1}}

\begin{filecontents}{\jobname.bib}
@article{Jenne2021,
  author  = {Jenne, Erin K.},
  doi     = {10.1093/ia/iiaa230},
  journal = {International Affairs},
  number  = {2},
  pages   = {323-344},
  title   = {Populism, nationalism and revisionist foreign policy},
  volume  = {91},
  year    = {2021},
}
@book{Levy2015,
  address    = {Brussels},
  author     = {Levy, Yehuda Ben-Hur},
  publisher  = {Centre for European Reforms},
  title      = {The Undiplomats},
  subtitle   = {Right-wing populists and their foreign policies},
  year       = {2015},
}
@incollection{Verbeek2017,
  address   = {Oxford},
  author    = {Verbeek, Bertjan and Zaslove, Andrej},
  booktitle = {The Oxford Handbook of Populism},
  address   = {Oxford},
  editor    = {Rovira Kaltwasser, Cristóbal and Taggart, Paul
               and Ochoa Espejo, Paulina and Ostiguy, Pierre},
  pages     = {489-514},
  publisher = {Oxford University Press},
  title     = {Populism and Foreign Policy},
  year      = {2017},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Journal article \autocite[323]{Jenne2021}.

Book \autocite{Levy2015}

Chapter in Bool \autocite{Verbeek2017}

\printbibliography
\end{document}

Jenne, EK (2021) “民粹主义、民族主义和修正主义外交政策”。《国际事务》,第 91 卷,第 2 期,第 323-344 页。https://doi.org/10.1093/ia/iiaa230。//Levy, YB-H。(2015 年)非外交官。右翼民粹主义者及其外交政策(布鲁塞尔:欧洲改革中心)。//Verbeek, B. 和 A. Zaslove (2017) “民粹主义与外交政策”。在 Rovira Kaltwasser, C. 等人(编辑)《牛津民粹主义手册》(牛津:牛津大学出版社)中,第 489-514 页。

这里使用的大多数命令应该都有相当不言自明的名称。这些biblatex-ext设置记录在文档biblatex-ext

相关内容