[Tex/LaTex] APS (phys rev) bibliography without URL link

bibtex

Phys Rev journals offer direct BibTeX output for each paper e.g. as here that is very handy to just copy-paste in a BibTeX file:

@article{EXP_stack,
  title = {Calculation of Multichannel Reactions in the Four-Nucleon System above Breakup Threshold},
  author = {Deltuva, A. and Fonseca, A. C.},
  journal = {Phys. Rev. Lett.},
  volume = {113},
  issue = {10},
  pages = {102502},
  numpages = {5},
  year = {2014},
  month = {Sep},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevLett.113.102502},
  url = {http://link.aps.org/doi/10.1103/PhysRevLett.113.102502}
}

and when you cite it, it will appear e.g. as 26th entry:

[26] A. Deltuva and A. C. Fonseca, Phys. Rev. Lett. 113, 102502
(2014), URL http://link.aps.org/doi/
10.1103/PhysRevLett.113.102502.

This by default has also the URL at the end which is indeed very useful to include for easy access. But for the final version to submit, it should not have it.

Question: How can I exclude the URL? Even when I get the .bbl file from BibTeX and copy-paste it at the end of LaTeX file, this remains. Obviously, I don't want to remove them by hand/sed/grep from my main BibTeX file.

As a 99 % solution, I found that adding these lines

\def\urlprefix{}
\def\url#1{}

removes JUST the URL but the , and . remain so the output is:

[26] A. Deltuva and A. C. Fonseca, Phys. Rev. Lett. 113, 102502
(2014), .

Any idea of a clean solution?

\documentclass[aps,prl,twocolumn]{revtex4-1}
\begin{document}
\title{Stack Question}
\author{John Smith}
\maketitle
How to cite now? \cite{EXP_stack}
\bibliography{stack}
\bibliographystyle{apsrev}
\end{document}

Best Answer

The solution I found is to modify the .bst file.

Look for apsrev.bst on your system and make a copy of it in the directory containing the document you're working on, naming it apsrev-nourl.bst.

Open this file with any text editor and look for format.url; then change

FUNCTION {format.url}
{ url empty$
    { "" }
    { "\urlprefix\url{" url * "}" * }
  if$
}

into

FUNCTION {format.url}{ "" }

This will consume the item without producing any output. Change

\bibliographystyle{apsrev}

into

\bibliographystyle{apsrev-nourl}

and run pdflatex+bibtex+pdflatex. This is the result:

enter image description here

Related Question