如何将使用 biblatex 生成的参考文献中的书籍或论文页数前的逗号改为点?

如何将使用 biblatex 生成的参考文献中的书籍或论文页数前的逗号改为点?

我正在为 mi 大学准备论文风格,他们通常有非常特殊的格式要求。在参考文献列表中,他们也有自己的要求。我几乎可以完全解决这个问题biblatex,只剩下一件事。书籍和论文的组成部分必须用句号分隔,我可以将参考文献的所有组成部分分开,但页数(出版商、地点等)之前的中间组成部分之间的分隔除外,分隔符是逗号,必须是一个点。这是一张带有红色标记的图像,指向问题:

在此处输入图片描述

以下是作者日期 BibLaTeX 的修改代码:

\usepackage[style=authoryear,bibencoding=utf8,maxcitenames=2,firstinits=true,natbib=true,doi=false,isbn=false,backend=biber,uniquename=init,maxbibnames=99,dashed=false,uniquename=false]{biblatex}
\renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}} % insert thin spaces between author initials
\setlength\bibitemsep{1.5\itemsep} % increase spacing between entries in bibliography
\renewbibmacro{in:}{} % remove 'in:' preceding article title
\DeclareFieldFormat[article, inbook, incollection, inproceedings, patent, thesis, unpublished]{title}{#1}%no quotes around titles of chapters/article titles
\DeclareFieldFormat[article, inbook, incollection, inproceedings, patent, thesis, unpublished,book]{pages}{{\nopp#1}} %removes pp. from pages
\DeclareFieldFormat[thesis, book]{pages}{{#1} p} %removes pp. from pages
\DefineBibliographyStrings{spanish}{andothers={\it et~al\adddot}}
\usepackage{xpatch}
\xpatchbibmacro{date+extrayear}{
\printtext[parens]%
}{%
\setunit{\addperiod\space}%
\printtext%
}{}{}
\renewcommand{\multinamedelim}{\addsemicolon\space}
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon\addspace}     {\addcomma\addspace}}
\DeclareFieldFormat[article,incollection]{pages}{#1}
\renewbibmacro{in:}{\ifentrytype{article}{}    {\printtext{\bibstring{in}\intitlepunct}}}
\DeclareFieldFormat[article]{volume}{#1}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\renewbibmacro*{volume+number+eid}{
\printfield{volume}
\setunit*{\addnbthinspace}
  \printfield{number}
  \setunit*{\addcolon\space}
  \printfield{eid}
  }
\renewbibmacro*{journal+issuetitle}{
\usebibmacro{journal}%
\setunit*{\addperiod\space}%
\iffieldundef{series}
  {}
{\newunit
 \printfield{series}%
 \setunit{\addspace}}%
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\usebibmacro{issue+date}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit}
\DeclareFieldFormat[book]{title}{#1}
\DeclareFieldFormat[inbook]{booktitle}{#1} 
\DeclareFieldFormat[inbook]{title}{#1} %title without ""
\DeclareFieldFormat[article]{title}{#1} %title without ""
\DeclareFieldFormat[article]{journaltitle}{#1} %journaltitle non-italic
\DeclareFieldFormat[online]{title}{#1} %title non-italic
\DeclareFieldFormat[misc]{title}{#1}
\AtEveryBibitem{
\ifentrytype{misc}{%
 }{%
\clearfield{url}%
\clearfield{urldate}%
}%
}

我一直在试图弄清楚这一点,我阅读了该网站上的帖子,但到目前为止我还不知道该怎么做,我尝试了很多方法但都没有成功;在这件事上,我将非常感激您的帮助。

答案1

欢迎来到 TeX SX!

下面的方法应该可以解决问题:

\renewcommand*{\bibpagespunct}{\addperiod\space}

相关内容