使用 \renewbibmacro 更改参考书目中的项目顺序

使用 \renewbibmacro 更改参考书目中的项目顺序

我花了两天时间定制我的参考文献,以便它们符合出版商的样式表。由于之前的讨论,我解决了不少问题,并将它们包含在我的最小工作示例中。因此,如果其他人在格式化参考书目方面遇到困难,我希望这能对他们有所帮助。

不过,还有一些小问题我仍然无法解决,如果您能给我提供任何帮助,我将非常高兴。

问题似乎是我不理解如何\renewbibmacro(参见 MWE)或\newbibmacro工作,甚至在阅读了这篇文章之后入口。我尝试创建自己的 bst 文件失败了。

在示例 1 中,我需要(出版商后的系列和卷用括号括起来,并以句号作为分隔符):

Baerman, Matthew / Greville Corbett (2010):引言:缺陷:类型学和历时性。引自:Matthew Baerman / Greville Corbett / Dunstan Brown (Hg.):有缺陷的范式。牛津:牛津大学出版社(英国学术院院刊,163),1-18。

在示例 2 中,我需要(出版商后的系列和卷用括号括起来,并以句号作为分隔符):

Dammel, Antje (2011): 动词变位转换:德语中动词屈折变体的原理。柏林/纽约:de Gruyter(Studia linguistica germanica. 103)。

在示例 3 中我需要(括号中的数字):

Fehringer, Carol (2004):形态双连词有多稳定?荷兰语和德语中 /schwa/ Ø 变体的案例研究。《日耳曼语言学杂志》16(4),285–329。

相反,我得到的是: 参考

这是我的 MWE,包括我迄今为止的解决方案,以及我尝试解决序言最后标有 ??? 的问题 1 和 2。

\documentclass[twoside]{scrbook}

\usepackage[paperwidth=17cm, paperheight=24cm, outer=2.7cm, inner=2.4cm, top=2.5cm, bottom=2.5cm,headsep=0.7cm]{geometry}
\setlength{\textheight}{19cm}
\setlength{\textwidth}{11.9cm}

\usepackage{times} %font > times
\AtBeginDocument{\fontsize{10.2}{11.9}\selectfont} %fontsize

\addtokomafont{footnote}{\fontsize{8.5bp}{10.2bp}\selectfont} %fontsize for footnotes

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

% packages for citation and bibliography
\usepackage[babel]{csquotes}
\usepackage[style=ext-authoryear-comp,
language=autobib,
autolang=hyphen, 
doi=false,isbn=false,
url=false, 
natbib=true, 
backend=biber, 
uniquename=false, 
dashed=true,
innamebeforetitle=true, %"(eds.)" after names
maxnames=99,
]{biblatex}

%names in small caps
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}} 
\renewcommand*{\mkbibnamegiven}[1]{\textsc{#1}} 

%slash between authors
\renewcommand*{\finalnamedelim}{\addspace \slash \addspace} 
\renewcommand*{\multinamedelim}{\addspace \slash \addspace} 

%colon between author and title
\renewcommand*{\labelnamepunct}{\addcolon\addspace} 

%slash between several places of publication
\renewcommand*{\multilistdelim}{\addslash}
\renewcommand*{\finallistdelim}{\addslash}

%remove "pages"
\DeclareFieldFormat{pages}{#1} 

%remove quotation marks with titles
\DeclareFieldFormat[article]{title}{{#1}}
\DeclareFieldFormat[incollection]{title}{{#1}} 

%remove comma after editor(s) and before "eds)
\DeclareDelimFormat{editortypedelim}{\addspace}

%names of editors before "(eds.)"
\DeclareFieldFormat{authortype}{\mkbibparens{#1}}% 
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}% 
\DeclareFieldFormat[incollection]{editortype}{\mkbibparens{#1}}

%"(eds.)" in German without plural distinction
\DefineBibliographyStrings{german}{
  editor  = {Hg\adddot},
  editors = {Hg\adddot},}

%change font size to footnotesize (see above)
\renewcommand*{\bibfont}{\footnotesize} 

%no italics
\DeclareFieldFormat{citetitle}{\normalfont{#1}}
\DeclareFieldFormat{title}{\normalfont{#1}}
\DeclareFieldFormat{maintitle}{\normalfont{#1}}
\DeclareFieldFormat{journaltitle}{\normalfont{#1}}
\DeclareFieldFormat[incollection]{title}{#1}
\DeclareFieldFormat[incollection]{booktitle}{\normalfont{#1}}
\DeclareFieldFormat[incollection]{editor}{\normalfont{#1}}

%change order ???
\renewbibmacro*{location+publisher+series+volume}{%
  \printlist{location}%
  \setunit*{\addcolon\space}%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{series}%
  \setunit*{\addcomma\space}%
  \printlist{volume}%   
  \newunit}

\usepackage{filecontents}
\begin{filecontents}{mybib.bib}
@incollection{Baerman.2010,
 author = {Baerman, Matthew and Corbett, Greville},
 title = {Introduction: Defectiveness: Typology and Diachrony},
 pages = {1--18},
 volume = {163},
 publisher = {{Oxford University Press}},
 isbn = {978-0-19-726460-7},
 series = {Proceedings of the British Academy},
 editor = {Baerman, Matthew and Corbett, Greville and Brown, Dunstan},
 booktitle = {Defective paradigms},
 year = {2010},
 address = {Oxford}
}

@book{Dammel.2011,
 author = {Dammel, Antje},
 year = {2011},
 title = {Konjugationsklassenwandel: Prinzipien des Ab-, Um- und Ausbaus verbalflexivischer Allomorphie in germanischen Sprachen},
 keywords = {Germanische Sprachen;Verben;Allomorph},
 address = {Berlin and New York},
 volume = {103},
 publisher = {{de Gruyter}},
 isbn = {978-3-11-024034-4},
 series = {Studia linguistica germanica}
}

@article{Fehringer.2004,
 author = {Fehringer, Carol},
 year = {2004},
 title = {How stable are Morphological Doublets? A Case Study of /schwa/ {\~{}} {\O} Variants in Dutch and German},
 pages = {285--329},
 volume = {16},
 number = {4},
 issn = {1470-5427},
 journal = {Journal of Germanic Linguistics}
}  
\end{filecontents}
\addbibresource{mybib.bib}


\begin{document}

Such a nice text according to \citep{Baerman.2010, Dammel.2011, Fehringer.2004}.

\printbibliography

\end{document}

答案1

bibmacrolocation+publisher+series+volume不存在,因此(重新)定义它没有任何作用。

使用biblatex-ext您所使用的样式会调用打印位置、发布者和日期信息的相关宏pubinstorg+location+date,我们可以重新定义它以打印series+number信息。然后我们只需要让普通的series+numberbibmacro 不执行任何操作,这样我们就不会两次获取该数据。

请注意,字段的正确组合是series+number而不是series+ volume。(这是与传统 BibTeX 之间的细微差别之一,在传统 BibTeX 中,您应该使用series+volumebiblatex,而series+number是正确的。例如,参见省略卷数和期号?未出现在 Biber natbib APA 程序参考中的系列BibLaTeX:如何反转卷和系列的顺序?

number详情请@article参阅如何将期刊第 4 卷第 2 期的引用从“4:2”改为“4(2)”

把这些放在一起,并将剩余的代码更新为更现代的习语(\DeclareDelimFormat\mkbibcompletename),我们得到

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

% packages for citation and bibliography
\usepackage[autostyle]{csquotes}
\usepackage[
  backend=biber,
  style=ext-authoryear-comp,
  maxnames=99,
  uniquename=false,
  doi=false,
  isbn=false,
  url=false,
  natbib=true,
  dashed=true,
  innamebeforetitle=true,
  language=autobib,
  autolang=hyphen,
]{biblatex}

%names in small caps
\renewcommand*{\mkbibcompletename}{\textsc}

%slash between authors
\DeclareDelimFormat{finalnamedelim}{\addspace\slash\space}
\DeclareDelimAlias{multinamedelim}{finalnamedelim}

%colon between author and title
\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space}

%slash between several places of publication
\DeclareDelimFormat{multilistdelim}{\addslash}
\DeclareDelimAlias{finallistdelim}{multilistdelim}

%remove "pages"
\DeclareFieldFormat{pages}{#1}

%remove comma after editor(s) and before "eds)
\DeclareDelimFormat{editortypedelim}{\addspace}

%names of editors before "(eds.)"
\DeclareFieldFormat{authortype}{\mkbibparens{#1}}%
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}%

%"(eds.)" in German without plural distinction
\DefineBibliographyStrings{german}{
  editor  = {Hg\adddot},
  editors = {Hg\adddot},}

%change font size to footnotesize (see above)
\renewcommand*{\bibfont}{\footnotesize}

%no italics or quotation marks
\DeclareFieldFormat{citetitle}{#1}
\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat{maintitle}{#1}
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{booktitle}{#1}

\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewcommand*{\volnumdelim}{\addnbspace}

\renewbibmacro*{series+number}{}

\renewbibmacro*{pubinstorg+location+date}[1]{%
  \printlist{location}%
  \iflistundef{#1}
    {\setunit*{\locdatedelim}}
    {\setunit*{\locpubdelim}}%
  \printlist{#1}%
  \setunit*{\pubdatedelim}%
  \usebibmacro{date}%
  \iffieldundef{series}
    {}
    {\setunit*{\addspace}%
     \printtext[parens]{%
       \printfield{series}%
       \setunit*{\addperiod\space}%
       \printfield{number}}}%
  \newunit}


\begin{filecontents}{\jobname.bib}
@incollection{Baerman.2010,
  author    = {Baerman, Matthew and Corbett, Greville},
  title     = {Introduction: Defectiveness: Typology and Diachrony},
  editor    = {Baerman, Matthew and Corbett, Greville and Brown, Dunstan},
  booktitle = {Defective paradigms},
  year      = {2010},
  pages     = {1--18},
  isbn      = {978-0-19-726460-7},
  series    = {Proceedings of the British Academy},
  number    = {163},
  address   = {Oxford},
  publisher = {Oxford University Press},
}
@book{Dammel.2011,
  author    = {Dammel, Antje},
  year      = {2011},
  title     = {Konjugationsklassenwandel:
               Prinzipien des Ab-, Um- und Ausbaus
               verbalflexivischer Allomorphie in germanischen Sprachen},
  address   = {Berlin and New York},
  publisher = {de Gruyter},
  isbn      = {978-3-11-024034-4},
  series    = {Studia linguistica germanica},
  number    = {103},
  keywords  = {Germanische Sprachen;Verben;Allomorph},
}
@article{Fehringer.2004,
  author  = {Fehringer, Carol},
  year    = {2004},
  title   = {How Stable are Morphological Doublets?
             A Case Study of /schwa/ \textasciitilde{} Ø Variants in Dutch and German},
  pages   = {285--329},
  volume  = {16},
  number  = {4},
  issn    = {1470-5427},
  journal = {Journal of Germanic Linguistics},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Such a nice text according to \autocite{Baerman.2010, Dammel.2011, Fehringer.2004}.

\printbibliography
\end{document}

Baerman, Matthew / Greville Corbett (2010):引言:缺陷:类型学和历时性。在:Matthew Baerman / Greville Corbett / Dunstan Brown (Hg.):缺陷范式。牛津:牛津大学出版社(英国学术院院刊,163),1-18。Dammel, Antje (2011):动词变位的变位:德语中动词变位的 Ab-、Um- 和 Ausbaus 原则。柏林/纽约:de Gruyter(Studia linguistica germanica,103)。Fehringer, Carol (2004):形态双连词有多稳定?荷兰语和德语中 /schwa/ ~ Ø 变体的案例研究。在:日耳曼语言学杂志,16(4),285-329。

相关内容