3

The apsrev4-1.bst bibliography style (for cases with two links (journal and arxiv)) puts extra spaces between the end of the last text and the period. Only happens when the last text is part of an `arxiv' link. apsrev4-1.bst is in standard distributions.

Often the space results in a line break between the reference line and the period, creating a `widowed period' on the subsequent line.

The APS (American Physical Society) help desk says this is a bug, and that I should edit the .bbl file, which I can do.

Does anyone know how to correct the apsrev4-1.bst file?

\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;%%"
}
3

The space comes "{" swap$ * "} " * in from format.eprint remove (in a local copy of the bst file, you could report it to the APS) the space after the } so it looks like

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$
}

It's possible that I didn't catch every place where a space needs to be added or not added in the above (the conditional logic is a bit contorted:-) so a perhaps safer fix is to instead of the above allow spaces to be added but remove them before adding the full stop. this just means changing

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

to

FUNCTION {bbl.shut} { "\unskip\BibitemShut " }
4
  • I found two instances of the "} " string; I find that replacing the second (as you suggested) or both seem identical, for a file of 64 references I use. There might be an situation where the two are different, but I haven't sought it out. The second solution with the \unskip gives an error upon (from scratch) the second tex-ish compilation.
    – HNN
    Aug 30 '15 at 16:06
  • @HNN can you show the error you get from unskip? Aug 30 '15 at 18:22
  • (./main.bbl luaotfload | load : Lookup/name: "TimesNewRoman" -> "Times New Roman.ttf" luaotfload | load : Lookup/name: "TimesNewRoman" -> "Times New Roman Bold.ttf" ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.54 \emph {et~al.}}]{Santos:2011ju} % ? q
    – HNN
    Aug 30 '15 at 20:41
  • @HNN thanks... hmm missing item, that's odd. Still I guess APS could fix it from there if you were to report it pointing them at this question. Easier for them as they have more test files:-) Aug 30 '15 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.