I'm trying to make sure that bibliography entries stay within the margins of the page. But annoyingly, I get entries like this sometimes, where the DOI runs off the margin:
Does anyone know a good way to stop this happening? Or whether there is something wrong with my code (quite possibly) ?
This is my code (simplified) :
\documentclass[12pt]{book}
\usepackage[a4paper, tmargin={1.75in}, bmargin={1.5in}, lmargin={1.25in}, rmargin={1.25in}]{geometry}
\usepackage{setspace}
\onehalfspacing
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\usepackage{changepage}
\usepackage{caption}
\captionsetup{format=hang, justification=raggedright, singlelinecheck=false}
\renewcommand{\footnotesize}{\fontsize{12pt}{12pt}\selectfont}
\usepackage{booktabs}
\usepackage[
backend=biber,
style=authoryear,
]{biblatex}
\addbibresource{references.bib}
\usepackage[utf8]{inputenc}
\usepackage{pdflscape}
% \usepackage{showframe}
\usepackage{adjustbox}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[labelfont=bf]{caption}
\begin{document}
\printbibliography[heading=none]
\end{document}
Many thanks


\citedirective or bib entry -- and hence cannot be used to replicate the problem you say you're experiencing. Please edit your query and post the bibtex code for the entry authored by Stedman. – Mico Jan 28 '23 at 15:22\renewcommand{\footnotesize}{\fontsize{12pt}{12pt}\selectfont}looks, to put it delicately, a tad unusual. What's the purpose of eliminating all "leading" between lines? If what you mainly want to achieve is to keep footnote material from being rendered at a size that's about 20% smaller than the regular document font size, running\renewcommand{\footnotesize}{\normalsize}should do the trick. – Mico Jan 28 '23 at 15:26biburlnumpenaltyetc. yourself and just want all URLs to break everywhere, you can load thexurlpackage": I'd give this passage a lot more visual prominence, in part because I doubt that many people have either the patience or the stomach to play around withbiburlnumpenaltyand friends. If you can make this adjustment, I'd be happy to close the present query as a duplicate. :-) – Mico Jan 29 '23 at 13:09