关于 Biblatex 的两个问题:如何将 URL 移动到参考文献的最末尾,如何删除合集标题后的 .?

关于 Biblatex 的两个问题:如何将 URL 移动到参考文献的最末尾,如何删除合集标题后的 .?

我目前正在使用 BibLaTeX 的修改版本,ext-authoryear-comp风格。我通过将一些代码拼凑在一起,成功地让它看起来像这样(我使用 LyX,所以我不太熟悉使用 LaTeX 语言):

参考

但我需要删除.收藏和编辑书籍标题后面的 以及byed.使其看起来像这样:

在此处输入图片描述

此外,我需要将最后一个引用的 URL 作为列出的最后一项,并且我需要将其替换visited onaccessed on。有人有什么想法吗?

% Preview source code

%% LyX 2.2.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,british]{paper}
\usepackage{libertine-type1}
\usepackage{helvet}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\setlength{\parskip}{\bigskipamount}
\setlength{\parindent}{0pt}
\usepackage{babel}
\usepackage[unicode=true,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 0},pdfborderstyle={},backref=false,colorlinks=false]

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[style=ext-authoryear-comp,giveninits=true, urldate=long]{biblatex}
\usepackage{csquotes,xpatch} % Xpatch is needed to move (ed.) around.
\usepackage{chngcntr}
\usepackage{microtype}
\addbibresource{Complete.bib}
% Bibliography Settings for JMS
% Remove p., pp., &c.
\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat{biblabeldate}{#1}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
% Delimit year with period and no brackets.
\DeclareDelimFormat[bib]{nameyeardelim}{\addperiod\space}
% Remove In from articles.
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\addspace\nopunct}}
}
% Do not print month and day fields.
\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}
%Do not italicize inbook, article, inproceedings fields.
\DeclareFieldFormat[inbook, article, inproceedings]{title}{#1} 
% Ampersand instead of and.
\renewcommand*{\finalnamedelim}{\addspace\&\space} 
% Volume and number bold; number in brackets.
\renewcommand*{\intitlepunct}{\space}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}
}
% Ed. lowercase.
\usepackage{xpatch}
\xpatchbibmacro{byeditor+othersstrg}{\printtext}{\printtext[parens]}{}{}
\renewbibmacro*{byeditor+others}{%
  \ifnameundef{editor}
    {}
    {\usebibmacro{byeditor+othersstrg}%
     \setunit{\addspace}%
     \printnames[byeditor]{editor}%
     \clearname{editor}%
     \addcomma\addspace}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}

\usepackage{xpatch}
\xpatchbibdriver{book}{\newunit\newblock\usebibmacro{publisher+location+date}}{%
\setunit{\addspace}\newblock%
\usebibmacro{publisher+location+date}%
}{}{}

% Colon for article pages.
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addperiod\addspace}}
\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article]{number}{\mkbibparens{\mkbibbold#1}}
%Change URL 
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
% End bibliography settings for JMS
\DeclareUnicodeCharacter{0308}{}
\DefineBibliographyExtras{UKenglish}{%
  \uspunctuation%
}

\makeatother

\begin{document}

\title{Methods and Best Practices}
\maketitle

  Blah blah

\parencite[50]{aristotle_nicomachean_1995}

\parencite[50]{arrighi_tracking_2003}

\parencite[50]{badiou_subject_2006}

\printbibliography


\end{document}

Complete.bib如下所示:

@inbook{aristotle_nicomachean_1995,
  langid = {english},
  location = {{Princeton, NJ}},
  title = {Nicomachean {{Ethics}}},
  volume = {2},
  isbn = {978-0-691-01650-4},
  shorttitle = {The Complete Works of {{Aristotle}}},
  volumes = {2},
  number = {72},
  booktitle = {The Complete Works of {{Aristotle}}: The Revised {{Oxford}} Translation},
  series = {Bollingen Series},
  publisher = {{Princeton University Press}},
  date = {1995},
  pages = {2487},
  author = {Aristotle},
  bookauthor = {Aristotle},
  editor = {Barnes, Jonathan},
  translator = {Ross, W.D. and Urmson, J.O.}
}

@article{badiou_subject_2006,
  title = {The {{Subject}} Supposed to Be a {{Christian}}: {{On Paul Ric{\oe}ur}}'s '{{Memory}}, {{History}}, {{Forgetting}}'},
  volume = {2},
  url = {http://novaojs.newcastle.edu.au/ojsbct/index.php/bct/article/viewFile/96/82},
  number = {3},
  journaltitle = {The Bible and Critical Theory},
  urldate = {2016-07-26},
  date = {2006},
  pages = {27.1-27.9},
  author = {Badiou, Alain},
  translator = {Doyle, Natalie and Toscano, Alberto},
}

@article{arrighi_tracking_2003,
  title = {Tracking Global Turbulence},
  volume = {20},
  journaltitle = {New Left Review},
  date = {2003},
  pages = {5},
  author = {Arrighi, Giovanni},
}

答案1

您可能想尝试以下代码。我更新了代码中的一些小细节(使用选项@articles从日期中删除月份和日期的“in”,使用biblatex-ext-specific\volnumdelim避免重新定义整个宏)。

editor+othersstrg可以使用而不是 ,将“ed. by”更改为“ed.” byeditor+othersstrg

\DefineBibliographyStrings{english}{urlseen={accessed on},}对于 URL 来说应该足够了。

\documentclass[a4paper,british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\usepackage[style=ext-authoryear-comp, giveninits=true, uniquename=init, date=year, urldate=long, articlein=false]{biblatex}
\usepackage{csquotes}

%\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inbook{aristotle_nicomachean_1995,
  langid = {english},
  location = {{Princeton, NJ}},
  title = {Nicomachean {{Ethics}}},
  volume = {2},
  isbn = {978-0-691-01650-4},
  shorttitle = {The Complete Works of {{Aristotle}}},
  volumes = {2},
  number = {72},
  booktitle = {The Complete Works of {{Aristotle}}: The Revised {{Oxford}} Translation},
  series = {Bollingen Series},
  publisher = {{Princeton University Press}},
  date = {1995},
  pages = {2487},
  author = {Aristotle},
  bookauthor = {Aristotle},
  editor = {Barnes, Jonathan},
  translator = {Ross, W.D. and Urmson, J.O.}
}

@article{badiou_subject_2006,
  title = {The {{Subject}} Supposed to Be a {{Christian}}: {{On Paul Ric{\oe}ur}}'s '{{Memory}}, {{History}}, {{Forgetting}}'},
  volume = {2},
  url = {http://novaojs.newcastle.edu.au/ojsbct/index.php/bct/article/viewFile/96/82},
  number = {3},
  journaltitle = {The Bible and Critical Theory},
  urldate = {2016-07-26},
  date = {2006},
  pages = {27.1-27.9},
  author = {Badiou, Alain},
  translator = {Doyle, Natalie and Toscano, Alberto},
}

@article{arrighi_tracking_2003,
  title = {Tracking Global Turbulence},
  volume = {20},
  journaltitle = {New Left Review},
  date = {2003},
  pages = {5},
  author = {Arrighi, Giovanni},
}
\end{filecontents}

\addbibresource{\jobname.bib}

% Bibliography Settings for JMS
% Remove p., pp., &c.
\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat{biblabeldate}{#1}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
% Delimit year with period and no brackets.
\DeclareDelimFormat[bib]{nameyeardelim}{\addperiod\space}

%Do not italicize inbook, article, inproceedings fields.
\DeclareFieldFormat[inbook, article, inproceedings]{title}{#1} 
% Ampersand instead of and.
\DeclareDelimFormat{finalnamedelim}{\addspace\&\space} 
% Volume and number bold; number in brackets.
\renewcommand*{\intitlepunct}{\space}

\renewcommand*{\volnumdelim}{}
% Ed. lowercase.
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\renewbibmacro*{byeditor+others}{%
  \ifnameundef{editor}
    {}
    {\setunit{\addspace}%
     \usebibmacro{editor+othersstrg}%
     \setunit{\addspace}%
     \printnames[byeditor]{editor}%
     \clearname{editor}%
     \addcomma\addspace}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}

\usepackage{xpatch}
\xpatchbibdriver{book}{\newunit\newblock\usebibmacro{publisher+location+date}}{%
\setunit{\addspace}\newblock%
\usebibmacro{publisher+location+date}%
}{}{}

% Colon for article pages.
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addperiod\addspace}}
\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article]{number}{\mkbibparens{\mkbibbold{#1}}}
%Change URL 
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
\DefineBibliographyStrings{english}{urlseen={accessed on},}
% End bibliography settings for JMS
\DeclareUnicodeCharacter{0308}{}
\DefineBibliographyExtras{UKenglish}{%
  \uspunctuation%
}

\makeatother

\begin{document}
\parencite[50]{aristotle_nicomachean_1995}

\parencite[50]{arrighi_tracking_2003}

\parencite[50]{badiou_subject_2006}

\printbibliography
\end{document}

在此处输入图片描述

相关内容