1

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). apacite doi line break

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.

1
  • Instead of posting code fragments (and especially the generated bibliography code), it would be much more useful to post a minimal example showing how you are using apacite in 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, 2017 at 22:44

1 Answer 1

3

The following seems to work. I've added a negative kern to the redefinition because the ~ itself seemed to add too much space.

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Landau2007,
    Author = {Landau, Idan},
    Doi = {10.1162/ling.2007.38.3.485},
    Journal = {Linguistic Inquiry},
    Number = {3},
    Pages = {485-483},
    Title = {{EPP} Extensions},
    Volume = {38},
    Year = {2007},
}
\end{filecontents*}
\usepackage{apacite}
\bibliographystyle{apacite}
\renewcommand{\doiprefix}{doi:~\kern-1pt}
\begin{document}
\cite{Landau2007}
\bibliography{\jobname}
\end{document}

Without the redefinition:

enter image description here

With the redefinition:

enter image description here

1
  • Thanks. Students here tell me that there is not supposed to be any space after the colon, that "doi:" is like "http:". So your kern is helpful.
    – pauljohn32
    Jul 21, 2017 at 14:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .