apsrev4-1.bst 引文中最后一段文字与句号之间有多余的空格

apsrev4-1.bst 引文中最后一段文字与句号之间有多余的空格

apsrev4-1.bst 书目样式(适用于具有两个链接(期刊和 arxiv)的情况)在最后一段文本的结尾和句点之间放置了额外的空格。仅当最后一段文本是“arxiv”链接的一部分时才会发生这种情况。apsrev4-1.bst 属于标准发行版。

通常,空格会导致参考行和句号之间出现换行符,从而在后续行上形成“寡妇句号”。

APS(美国物理学会)帮助台说这是一个错误,我应该编辑.bbl 文件,我可以这样做。

有人知道如何纠正 apsrev4-1.bst 文件吗?

\documentclass[11pt]{report}

%
% Font management.. matching Word
%
\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage[pagestyles]{titlesec}
%
% Bibliography format
%
\usepackage[numbers,square,comma,sort&compress,merge]{natbib}
%
% For hyperlinks
%
\usepackage{hyperref}
\usepackage[all]{hypcap}
%
% Set some colors
%
\hypersetup{
pdftitle = {References for LZ CDR},
colorlinks=true,
breaklinks=true,
linkcolor=blue,
anchorcolor=blue,
citecolor=blue,
filecolor=blue,
menucolor=blue,
urlcolor=blue,
}
%
% Set size... took trial and error to match Word
%
\usepackage{geometry}
\geometry{letterpaper,portrait,margin=1in}
\addtolength{\textheight}{-0.20in}
\addtolength{\footskip}{0.10in}
%
% here just set reference counter at 9...
% examples need have two-digit ref #
%
\let\oldthebibliography=\thebibliography
 \let\oldendthebibliography=\endthebibliography
 \renewenvironment{thebibliography}[1]{%
 \oldthebibliography{#1}%
 \setcounter{NAT@ctr}{9}%
}{\oldendthebibliography}

%
% The document begins
%
\begin{document}
\nocite{Santos:2011ju}
\nocite{Akimov:2006qw}
\nocite{Lebedenko:2009xe}
\nocite{Araujo:2011as}
\nocite{Akerib:2012ys}
\bibliographystyle{apsrev4-1}
\bibliography{TheFive}

\end{document}


@article{Akimov:2006qw,
  author         = "Akimov, D. {\relax Yu}. and others",
  title          = "{The ZEPLIN-III dark matter detector: instrument design,
                    manufacture and commissioning}",
  collaboration  = "ZEPLIN-III",
  journal        = "Astropart. Phys.",
  volume         = "27",
  year           = "2007",
  pages          = "46-60",
  doi            = "10.1016/j.astropartphys.2006.09.005",
  eprint         = "astro-ph/0605500",
  archivePrefix  = "arXiv",
  primaryClass   = "astro-ph",
  SLACcitation   = "%%CITATION=ASTRO-PH/0605500;%%"
}
@article{Santos:2011ju,
  author         = "Santos, E. and others",
  title          = "{Single electron emission in two-phase xenon with
                    application to the detection of coherent neutrino-nucleus
                    scattering}",
  collaboration  = "ZEPLIN-III",
  journal        = "J. High Energy Phys.",
  volume         = "12",
  year           = "2011",
  pages          = "115",
  doi            = "10.1007/JHEP12(2011)115",
  eprint         = "1110.3056",
  archivePrefix  = "arXiv",
  primaryClass   = "physics.ins-det",
  SLACcitation   = "%%CITATION=ARXIV:1110.3056;%%"
}
@article{Lebedenko:2009xe,
  author         = "Lebedenko, V. N. and others",
  title          = "{Limits on the spin-dependent WIMP-nucleon cross-sections
                    from the first science run of the ZEPLIN-III experiment}",
  collaboration  = "ZEPLIN-III",
  journal        = "Phys. Rev. Lett.",
  volume         = "103",
  year           = "2009",
  pages          = "151302",
  doi            = "10.1103/PhysRevLett.103.151302",
  eprint         = "0901.4348",
  archivePrefix  = "arXiv",
  primaryClass   = "hep-ex",
  SLACcitation   = "%%CITATION = ARXIV:0901.4348;%%"
}
@article{Araujo:2011as,
  author         = "Ara{\'u}jo, H. M. and others",
  title          = "{Radioactivity Backgrounds in ZEPLIN-III}",
  collaboration  = "ZEPLIN-III",
  journal        = "Astropart. Phys.",
  volume         = "35",
  year           = "2012",
  pages          = "495-502",
  doi            = "10.1016/j.astropartphys.2011.11.001",
  eprint         = "1104.3538",
  archivePrefix  = "arXiv",
  primaryClass   = "physics.ins-det",
  SLACcitation   = "%%CITATION = ARXIV:1104.3538;%%"
}
@article{Akerib:2012ys,
  author         = "Akerib, D. S. and others",
  title          = "{The Large Underground Xenon (LUX) Experiment}",
  collaboration  = "LUX",
  journal        = "Nucl. Instrum. Meth.",
  volume         = "A704",
  year           = "2013",
  pages          = "111-126",
  doi            = "10.1016/j.nima.2012.11.135",
  eprint         = "1211.3788",
  archivePrefix  = "arXiv",
  primaryClass   = "physics.ins-det",
  SLACcitation   = "%%CITATION = ARXIV:1211.3788;%%"
}

答案1

该空格来自"{" swap$ * "} " *删除format.eprint (在 bst 文件的本地副本中,您可以将其报告给 APS)后面的空格,因此}看起来像

FUNCTION {format.eprint}
{
  eprint duplicate$ empty$
  control.eprint #0 <
  or
    { pop$ "" }
    {
      duplicate$
      ""
        archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ *
        "/" *
        swap$ *
        "{" swap$ * "} " *
      swap$
      ""
        archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ *
        swap$ *
        primaryClass  duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ *
        "{" swap$ * "}" *
      *
      eprint.command swap$ *
    }
  if$
}

可能我没有注意到上面每个需要添加空格或不添加空格的地方(条件逻辑有点扭曲:-),所以一个更安全的解决方法可能是允许添加空格,但在添加句号之前删除它们。这只是意味着改变

FUNCTION {bbl.shut} { "\BibitemShut " }

FUNCTION {bbl.shut} { "\unskip\BibitemShut " }

相关内容