我刚刚开始使用 Biblatex,我正在努力弄清楚如何在发行号之后和年份之前为文章添加逗号。
我的脚注引用如下所示:
它看起来应该是这样的:
这是我的 MWE:
\begin{filecontents}{my-bib.bib}
@article{Lubbers.2002,
author = {Lubbers, Marcel and Gijsberts, M{\'e}rove and Scheepers, Peer},
year = {2002},
title = {{E}xtreme {R}ight-{W}ing {V}oting in {W}estern {E}urope},
pages = {345--378},
volume = {41},
number = {3},
issn = {03044130},
journal = {European Journal of Political Research}
}
\end{filecontents}
\documentclass[11pt]{scrartcl}
\usepackage[margin= 1in]{geometry}
\usepackage[backend=bibtex, style=verbose-trad3, isbn=false, doi=false, firstinits=true, citepages=suppress]{biblatex}
\usepackage[style=british]{csquotes}
% Commas as separators
\renewcommand*{\newunitpunct}{\addcomma\space}
\usepackage{xpatch}
% No dot before number of articles
\xpatchbibmacro{volume+number+eid}{%
\setunit*{\adddot}%
}{%
}{}{}
% Number of articles in parentheses
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
% Comma before and after journal volume
\renewbibmacro*{volume+number+eid}{%
\setunit*{\addcomma\space}% NEW
\printfield{volume}%
% \setunit*{\adddot}% DELETED
\setunit*{\addcomma\space}% NEW
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
% Prefixes for journal volume and number
\DeclareFieldFormat[article]{volume}{\bibstring{volume}~#1}% volume of a journal
\DeclareFieldFormat[article]{number}{\bibstring{number}~#1}% number of a journal
% Comma before date; date not in parentheses
\renewbibmacro*{issue+date}{%
\setunit*{\addcomma\space}% NEW
% \printtext[parens]{% DELETED
\iffieldundef{issue}
{\usebibmacro{date}}
{\printfield{issue}%
\setunit*{\addspace}%
% \usebibmacro{date}}}% DELETED
\usebibmacro{date}}% NEW
\newunit}
\bibliography{my-bib}
\begin{document}
Test\autocite{Lubbers.2002}.
\printbibliography
\end{document}
我想在文章的发行号后添加一个逗号。有人知道该如何解决吗?
答案1
在这里你:修补journal+issuetitle
:
\begin{filecontents}{my-bib.bib}
@article{Lubbers.2002,
author = {Lubbers, Marcel and Gijsberts, M{\'e}rove and Scheepers, Peer},
year = {2002},
title = {{E}xtreme {R}ight-{W}ing {V}oting in {W}estern {E}urope},
pages = {345--378},
volume = {41},
number = {3},
issn = {03044130},
journal = {European Journal of Political Research}
}
\end{filecontents}
\documentclass[11pt]{scrartcl}
\usepackage[margin= 1in]{geometry}
\usepackage[backend=bibtex, style=verbose-trad3, isbn=false, doi=false, firstinits=true, citepages=suppress]{biblatex}
\usepackage[style=british]{csquotes}
% Commas as separators
\renewcommand*{\newunitpunct}{\addcomma\space}
\usepackage{xpatch}
% Comma before issue + date
\xpatchbibmacro{journal+issuetitle}{%
\setunit{\addspace}%
\usebibmacro{issue+date}}%
{\setunit{\addcomma\addspace}%
\usebibmacro{issue+date}}%
{}{}
% No dot before number of articles
\xpatchbibmacro{volume+number+eid}{%
\setunit*{\adddot}%
}{%
}{}{}
% Number of articles in parentheses
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
% Comma before and after journal volume
\renewbibmacro*{volume+number+eid}{%
\setunit*{\addcomma\space}% NEW
\printfield{volume}%
% \setunit*{\adddot}% DELETED
\setunit*{\addcomma\space}% NEW
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
% Prefixes for journal volume and number
\DeclareFieldFormat[article]{volume}{\bibstring{volume}~#1}% volume of a journal
\DeclareFieldFormat[article]{number}{\bibstring{number}~#1}% number of a journal
% Comma before date; date not in parentheses
\renewbibmacro*{issue+date}{%
\setunit*{\addcomma\space}% NEW
% \printtext[parens]{% DELETED
\iffieldundef{issue}
{\usebibmacro{date}}
{\printfield{issue}%
\setunit*{\addspace}%
% \usebibmacro{date}}}% DELETED
\usebibmacro{date}}% NEW
\newunit}
\bibliography{my-bib}
\begin{document}
\vspace*{6in}
Test\autocite{Lubbers.2002}.
\printbibliography
\end{document}