In my references, I want to allow DOI's to break on a slash '/' character (or as a last resort on any character) to avoid underfull lines like the third reference below. Note that URL's are already breaking on slashes, and DOI's are already breaking on dashes.
\documentclass{article}
\usepackage[left=1.5in,right=1.5in]{geometry}
\usepackage{natbib}
\usepackage[colorlinks,breaklinks,urlcolor=blue]{hyperref}
\usepackage{doi}
\urlstyle{rm}
\bibliographystyle{sp}
\begin{document}
\nocite{Endriss:09} \nocite{Evans:80} \nocite{Szabolcsi:10}
\bibliography{references}
\end{document}
Here are some .bib entries:
@article{Evans:80, Author={Gareth Evans}, Journal={Linguistic Inquiry}, Number={2},
Pages={337--362}, Title={Pronouns}, Url={http://www.jstor.org/stable/4178164},
Volume={11}, Year={1980}}
@book{Szabolcsi:10, Author={Anna Szabolcsi}, Doi={10.1017/CBO9780511781681},
Publisher={Cambridge University Press}, Title={Quantification}, Year={2010}}
The bibliography style file can be downloaded as part of a zip file (containing also the actually used class file) here: Instructions for S&P authors using LATEX 2ε | von Fintel | Semantics and Pragmatics.
Best Answer
If you want the “doi:” also in roman font, as it seems to me, you need to replace the package
doi
with an own command\doi
declared withurl
’s own facilities. It doesn’t matter, that it’s already defined in the class filesp.cls
. Otherwise you could also use the packageuri
. Compare also my answer here: Produce a hyperlinked DOI?.