在 biblatex 中的期刊名称后添加逗号

在 biblatex 中的期刊名称后添加逗号

在下面的代码中,如何在不改变样式的情况下在期刊名称后添加逗号。

\documentclass{article}
\usepackage[backend=bibtex,style=numeric-comp,firstinits=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{mynum-compbib.bib}
@article{goss1981simple,
author = "David Goss",
title = "A simple approach to the analytic continuation and values at the negative integers for the Riemann zeta function",
journal= "Proc. Am. Math. Soc.",
volume = "81",
number = "4",
pages = "513-517",
year = 1981,
}
\end{filecontents}
\addbibresource{mynum-compbib.bib}
\renewbibmacro{in:}{\addcomma\addspace}
\DeclareFieldFormat[article]{title}{#1}
\DeclareFieldFormat[unpublished]{title}{#1}
\DeclareFieldFormat[book]{title}{#1}
\DeclareFieldFormat[article]{volume}{\textbf{#1}}
\DeclareFieldFormat{pages}{#1}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\setunit*{\addcomma\addspace}%
\iffieldundef{number}{}{%
\printtext{no\adddot\addspace}%
}%
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
\begin{document}
\cite{goss1981simple}
\printbibliography
\end{document} 

目前我得到的是:

D. Goss. 黎曼 zeta 函数解析连续性和负整数值的简单方法,美国数学会志 81,第4期(1981),513-517。

我想要的是:

D. Goss. 黎曼 zeta 函数解析连续性和负整数值的简单方法,美国数学会志81,第4期(1981),513-517。

注意 Soc. 后面的逗号就是我想要的。

其次,我怎样才能将作者姓名后的句号改为逗号?谢谢

答案1

我们需要做两处改变。

首先我们需要说明的是,字段biblatex中的点journaltitle绝不是句号,而是缩写点。这可以通过\isdot在字段格式化指令后添加来实现。

\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}\isdot}

在 biblatex 中,将日记中的句号视为缩写点biblatex - 如何在句号后强制出现冒号?以便对此问题进行更彻底的解释和调查。

然后我们需要告诉biblatex在期刊名称后打印逗号,这可以通过以下方式完成

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addcomma\space}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}

在第三行中我们将其替换\setunit*{\addspace}%\setunit*{\addcomma\space}%

平均能量损失

\documentclass{article}
\usepackage[backend=bibtex,style=numeric-comp,firstinits=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{goss1981simple,
author = "David Goss",
title = "A simple approach to the analytic continuation and values at the negative integers for the Riemann zeta function",
journal= "Proc. Am. Math. Soc.",
volume = "81",
number = "4",
pages = "513-517",
year = 1981,
}
\end{filecontents}
\addbibresource{\jobname.bib}

\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}\isdot}

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addcomma\space}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}

\renewbibmacro{in:}{\addcomma\addspace}
\DeclareFieldFormat[article]{title}{#1}
\DeclareFieldFormat[unpublished]{title}{#1}
\DeclareFieldFormat[book]{title}{#1}
\DeclareFieldFormat[article]{volume}{\textbf{#1}}
\DeclareFieldFormat[article]{number}{\bibstring{number}~#1}
\DeclareFieldFormat{pages}{#1}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addcomma\addspace}%
   \printfield{number}%
   \setunit{\addcomma\space}%
   \printfield{eid}}
\begin{document}
\cite{goss1981simple}
\printbibliography
\end{document} 

enter image description here

相关内容