我正在尝试遵循 MHRA 规定的作者日期指南这里.我正在建设本法典草案。在样式指南第 79 页,有三位作者的引文在第二位作者之后和“and”之前有一个逗号。(如果有两个作者,“and”之前没有逗号。)我怎样才能达到这种效果?下面的代码是我目前针对 MHRA 样式编写的,它处理样式的各个方面并生成此输出:
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{doyl1975,
author = {A.I. Doyle and Elizabeth Rainey and Dudley Butler Wilson},
title = {Manuscript to Print: Tradition and Innovation in the {R}enaissance {B}ook},
date = {1975},
publisher = {University of Durham},
location = {Durham},
series = {Library Guides: Special Series},
number = {1},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\newrobustcmd{\mkbibangle}[1]{%
\begingroup
\blx@blxinit
\blx@setsfcodes
<#1>%
\endgroup}
\renewcommand*{\RNfont}{\textsc}
\DeclareDelimFormat[bib]{nameyeardelim}{\addperiod\space}
\DeclareDelimFormat[bib]{nametitledelim}{\addperiod\space}
\renewcommand*{\intitlepunct}{\addspace}
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\subtitlepunct}{\addcolon\space}
\DeclareFieldFormat{number}{\RN{#1}}
\DeclareFieldFormat[article,periodical]{pages}{#1}
\renewcommand*{\bibpagespunct}{%
\ifboolexpr{test {\ifentrytype{article}} or test {\ifentrytype{periodical}}}
{\addcolon\space}
{\addcomma\space}}
\renewbibmacro*{finentry}{} % GW added; no dot at end of reference
\renewbibmacro*{date+extrayear}{%
\iffieldundef{\thefield{datelabelsource}year}
{}
{\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}
\DeclareFieldFormat{url}{\mkbibangle{\url{#1}}}
\DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}}
\DeclareFieldFormat{doi}{\mkbibangle{\url{http://dx.doi.org/#1}}}
\renewbibmacro*{in:}{%
\ifentrytype{article}
{}
{\printtext{\bibstring{in}\intitlepunct}}}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}}%
\newunit
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\usebibmacro{issue+date}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit}
\renewbibmacro*{series+number}{%
\printfield{series}%
\setunit{\addcomma\space}%
\printfield{number}%
\newunit}
\renewbibmacro*{publisher+location+date}{%
\setunit{\addspace}%
\printtext[parens]{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}}%
\newunit}
\renewbibmacro*{doi+eprint+url}{%
\setunit{\addspace}%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\setunit{\addspace}%
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\setunit{\addspace}%
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
\DeclareBibliographyDriver{thesis}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
\setunit{\printdelim{nametitledelim}}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\printfield{note}%
\setunit{\addspace}\newblock
\printtext[parens]{%
\printfield{pubstate}%
\global\clearfield{pubstate}%
\setunit*{\addspace}%
\printfield{type}%
\newunit
\usebibmacro{institution+location+date}}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
% GW: appearance of "editor(s)"; altered from authoryear.bbx
\renewbibmacro*{editor}{%
\usebibmacro{bbx:editor}{editorstrg}}
\renewbibmacro*{editor+others}{%
\usebibmacro{bbx:editor}{editor+othersstrg}}
\newbibmacro*{bbx:editor}[1]{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\usebibmacro{bbx:dashcheck}
{\bibnamedash}
{\printnames{editor}%
\setunit{\addspace}
\usebibmacro{bbx:savehash}}%
\printtext{\usebibmacro{#1}}
\clearname{editor}%
\setunit{\adddot\addspace}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\addspace}}%
\usebibmacro{date+extrayear}}
% GW: appearance of "author(s)"; altered from authoryear.bbx
\renewbibmacro*{author}{%
\ifboolexpr{
test \ifuseauthor
and
not test {\ifnameundef{author}}
}
{\usebibmacro{bbx:dashcheck}
{\bibnamedash}
{\usebibmacro{bbx:savehash}%
\printnames{author}%
\iffieldundef{authortype}
{\setunit{\printdelim{nameyeardelim}}}
{\setunit{\addcomma\space}}}%
\iffieldundef{authortype}
{}
{\usebibmacro{authorstrg}%
\setunit{\printdelim{nameyeardelim}}}}%
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
\setunit*{\printdelim{nonameyeardelim}}}%
\usebibmacro{date+extrayear}}
% GW: get \fullcite as lastname-firstname
\DeclareCiteCommand{\fullcite}
{\usebibmacro{prenote}}
{\usedriver
{}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
% GW: create \fullcitebib command
\DeclareCiteCommand{\fullcitebib}
{\usebibmacro{prenote}}
{\usedriver
{}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
% GW: create \nptextcite (no parentheses) command
\DeclareCiteCommand{\nptextcite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
% GW: change some strings
\DefineBibliographyStrings{english}{%
% "and others" instead of "et al"
andothers = {and others},
% no dot in "eds"
editors = {eds},
% "edn" instead of "ed", with no dot after
edition = {edn},
}
% GW: brackets around "editor"
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
% GW: comma between authors'/editors' names in references
\AtBeginBibliography{%
\renewcommand{\finalnamedelim}{%
\finalandcomma%
\addcomma%
\space%
\bibstring{and}%
\space%
\newunit}%
}
% GW: compress page ranges
\DeclareFieldFormat{pages}%
{\mkcomprange[{\mkpageprefix[bookpagination]}]{#1}}
\setcounter{mincompwidth}{10}
% GW: colon in citations instead of p/pp
\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\begin{document}
\begin{quote}
This is described as `a comic-strip style of depiction which was
common in medieval book-illustration' \parencite[27]{doyl1975}.
\end{quote}
\printbibliography
\end{document}
答案1
删除您的代码
\AtBeginBibliography{%
\renewcommand{\finalnamedelim}{%
\finalandcomma%
\addcomma%
\space%
\bibstring{and}%
\space%
\newunit}%
}
并添加
\DefineBibliographyExtras{british}{\def\finalandcomma{\addcomma}}
默认情况下,英国语言设置不启用牛津逗号,但使用上面的方法您可以将其恢复。
即使参考书目中只有两个名字,也要添加“牛津逗号”
\DeclareDelimFormat[bib]{finalnamedelim}{\finalandcomma\addspace\bibstring{and}\space}
编辑:这个问题已针对 的新版本进行了编辑,并提供了更优雅的解决方案biblatex
。如果此处的解决方案对您不起作用,您可能需要考虑更新 TeX 系统。旧版本可以在编辑历史中找到。