In your .bst
replace the function for article
with
FUNCTION {article}
{ output.bibitem
format.collaboration output
format.authors "author" output.check
format.title "title" output.check
blank.sep
crossref missing$
{ journal missing$
{}
{ format.journal add.doi "journal" output.check }
if$
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
journal missing$
{ format.eprint output
format.url output }
'skip$
if$
note output
new.sentence
format.SLACcitation output
fin.entry
}
The new bit is
journal missing$
{ format.eprint output
format.url output }
'skip$
if$
instead of
format.eprint output
format.url output
That means that now the eprint
and url
information is only printed if the journal
field is absent.
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{hyperref}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{appleby,
author = {Humphrey Appleby},
title = {On the Importance of the Civil Service},
year = {1980},
journal = {Civil Service Review},
volume = {138},
number = {3},
pages = {234-289},
archive = arXiv,
archivePrefix = {arXiv},
eprint = {1234.5689},
}
@article{elk,
author = {Anne Elk},
title = {On Brontosauruses},
year = {1972},
archive = arXiv,
archivePrefix = {arXiv},
eprint = {2234.5689},
}
@article{sigfridsson,
author = {Sigfridsson, Emma and Ryde, Ulf},
title = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journal = {Journal of Computational Chemistry},
year = 1998,
volume = 19,
number = 4,
pages = {377-395},
doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
\end{filecontents}
\begin{document}
\cite{sigfridsson,appleby,elk}
\bibliographystyle{jwsmith}
\bibliography{\jobname}
\end{document}
produces

.bib
entries that we can experiment with as well as the expected output for those entries. I spent quite a bit of time figuring out how youreprint
setup works in the first place, that time could have been massively reduced had I actually seen a few entries in action. So even for questions like this an MWE or MWEB (in this case) has its uses. – moewe Sep 11 '18 at 15:21