0

I generated a bibliography with biblatex. In one reference there seems to be a problem in splitting the Doi, so now the doi goes over the line on the right side. I tried solving this problem with different approaches that I found on this website but I couldn't figure out how to do this.

Thanks for your help!

enter image description here

\begin{filecontents}[overwrite]{references.bib}
@article{ProbelmLineBreacky,
    title = {{How to get a line breack}},
    year = {2019},
    journal = {Journal},
    author = {Smith and Mayer},
    number = {3},
    month = {9},
    pages = {69},
    volume = {7},
    publisher = {Publisher},
    url = {https://000000000},
    doi = {10.3390/something8838339},
    issn = {2227-9059},
    pmid = {31505812},
    keywords = {some}
}
\end{filecontents}

\documentclass[11pt,a4paper,titlepage,oneside]{memoir}

\usepackage[hyphens]{url} \usepackage[linkcolor=black,colorlinks=true,citecolor=black,filecolor=black]{hyperref}

\usepackage[sorting=none]{biblatex} \addbibresource[location=remote]{references.bib}

\begin{document} \printbibliography \end{document}

mar123
  • 1
  • I can't reproduce your issue either, looks fine, can you edit in images as to how it looks and make your code show the issue please? – JamesT May 23 '23 at 12:51
  • I am not sure how to do this but I added a picture of the reference concerned. DOes this help? – mar123 May 23 '23 at 12:54
  • 2
    @mar123 I can't reproduce the problem with the code as it is in the question, but maybe try the xurl package? – samcarter_is_at_topanswers.xyz May 23 '23 at 13:01
  • 4
    @mar123 -- The example code in your question doesn't match the image. If you change your example code to use the reference with the authors "Hannah Strobel et al.", that would be more likely to get a useful answer. – barbara beeton May 23 '23 at 13:45
  • 3
    As samcarter and barbara have mentioned the code posted does not reproduce the issue from the image, so it is hard to say anything with certainty. From the image it mostly looks like your problem is that your DOI contains an unbreakable sequence that is too long. You can allow breaks in the DOI (and URLs) everywhere with \usepackage{xurl}. Other options to improve the line breaking are discussed in https://tex.stackexchange.com/q/442308/35864. – moewe May 23 '23 at 15:29

1 Answers1

1

Use xurl package after biblatex.

\begin{filecontents}[overwrite]{references.bib}
@article{ProbelmLineBreacky,
    title = {Title},
    year = {2019},
    journal = {Journal},
    author = {Smith},
    number = {3},
    pages = {69},
    volume = {7},
    doi = {10.3390/something8838339},
}
\end{filecontents}

\documentclass{memoir}

\usepackage[linkcolor=black,colorlinks=true,citecolor=black,filecolor=black]{hyperref}

\usepackage{biblatex} \usepackage{xurl} % after biblatex \addbibresource{references.bib}

\begin{document} \nocite{*} \printbibliography \end{document}

enter image description here