it's the first time I'm working with LaTex and I have some issues with the bibliography. For some references but not for all, the doi is strangely presented in a new row with a gap. How can I change that? I used a Springer template from here: https://www.springernature.com/gp/authors/campaigns/latex-author-support
Here are relevant information:
\documentclass[sn-apa]{sn-jnl}% APA Reference Style
\bibliography{sn-bibliography}
\bibliographystyle{sn-apacite}%
And here is a picture of the problem:
And here are the entries in my .bib file:
@article{Cousineau2010,
title={Outliers detection and treatment: a review.},
volume={3},
url={https://revistas.usb.edu.co/index.php/IJPR/article/view/844},
doi = {10.21500/20112084.844},
number={1},
journal={International Journal of Psychological Research},
author={Cousineau, Denis and Chartier, Sylvain},
year={2010},
pages={58–-67}
}
@book{Cramer2008,
author = {Cramer, Henriette and Evers, Vanessa and Ramlal, Satyan and {Van Someren}, Maarten and Rutledge, Lloyd and Stash, Natalia and Aroyo, Lora and Wielinga, Bob},
booktitle = {User Modeling and User-Adapted Interaction},
doi = {10.1007/s11257-008-9051-3},
number = {5},
pages = {455--496},
title = {{The effects of transparency on trust in and acceptance of a content-based art recommender}},
volume = {18},
year = {2008},
}
The Cramer reference is of type book.I want no gap between the doi of Cousineau and the rest of the references. If I change the Cousineau reference in my .bib file from article to proceeding, the doi shows correctly. How can I change the settings of article references?
Here is potentially relevant code from the sn-jnl file (line 1685):
\if@APA@refstyle%
\usepackage[natbibapa]{apacite}%
\gdef\NumBib{NO}%
\bibliographystyle{sn-apacite}%
\def\refdoi#1{\urlstyle{rm}\url{#1}}%
\renewcommand{\doiprefix}{}%
\AtBeginDocument{%
\renewcommand{\BPBI}{.}% Period between initials - command from apacite.sty }%
\setlength{\bibsep}{1em}%
\def\bibfont{\reset@font\fontfamily{\rmdefault}
\normalsize\selectfont}%
Please let me know if more information is needed to understand the issue.
Thanks a lot in advance.
sn-jnl
is not a known class (it is not in TeXLive for example), please provide a link to it. Your example also does not provide any information as to which bibtex style is used. Does adding thexurl
package help? Your problem is clearly the formating of the URL inCousineau2010
and so we need to know exactly how that text is generated and that is not possible with the date you have provided so far.apacite
is in use (it is not in your sniplet but might in the class, I haven't looked, thenapacite
changes the URL package (if loaded) at the start of the document. If neither your document or the class actually loads theurl
package, then you can get around this using\AtBeginDocument{\usepackage{xurl}}
as it then (might) come later than theapacite
changes. Problem is thatapacite
has not been updated since 2013 long beforexurl
arrived.