My student wrote a paper using the KOMA-Script report class along with the apacite.sty package. In the output, there is a part that the reviewers consider unsatisfactory. There is a line break after the letters "doi:". Reviewer insists this is unacceptable for the APA format requirements. (How people notice this kind of thing, I have no idea).

I'm back tracing the cause of the line break and I review the bbl file produced by pdflatex and bibtex.
Here is a bbl file for a small example. If you look down, you see bibtex seems to do the right thing, inserting \doi{10.1002/ejsp.504}.
\begin{thebibliography}{}
\bibitem [\protect \citeauthoryear {%
Pettigrew%
\ \BBA {} Tropp%
}{%
Pettigrew%
\ \BBA {} Tropp%
}{%
{\protect \APACyear {2008}}%
}]{%
Pettigrew&Tropp2008}
\APACinsertmetastar {%
Pettigrew&Tropp2008}%
\begin{APACrefauthors}%
Pettigrew, T\BPBI F.%
\BCBT {}\ \BBA {} Tropp, L\BPBI R.%
\end{APACrefauthors}%
\unskip\
\newblock
\APACrefYearMonthDay{2008}{}{}.
\newblock
{\BBOQ}\APACrefatitle {How does intergroup contact reduce prejudice?
Meta-analytic tests of three mediators} {How does intergroup contact reduce
prejudice? meta-analytic tests of three mediators}.{\BBCQ}
\newblock
\APACjournalVolNumPages{European Journal of Social Psychology}{38}{}{922-934}.
\newblock
\begin{APACrefDOI} \doi{10.1002/ejsp.504} \end{APACrefDOI}
\PrintBackRefs{\CurrentBib}
\end{thebibliography}
At the moment, we believe that the journal style manual forbids any linebreak between "doi" and the end of the doi itself. The desirable result is to only start a doi on a line if it will not hit the margin, otherwise linebreak and start doi on a line by itself. We are told that we'll never have a doi so long it needs a linebreak in the middle.
How is this controlled? I suspected the macro \doi introduces a space after ":", making it easy target for line breaking routines. Good guess? Where do I find the macro \doi to see how this is implemented?
I see you have discussed breaks already where people want to control break positions inside the doi itself.
Achieve Linebreak in DOI in biblatex
bibtex: URL and DOI line breaks on different characters
I think those are different questions. They seem to assume it is OK to separate "doi:" from the rest of it, but the expert says no.


apacitein your document. I've managed to answer, but an example like the one I posted would have been helpful to have. – Alan Munn Jul 19 '17 at 22:44