I'm writing my thesis and use the ext-authoryear stile with biblatex. (Unfortunately I have to make a lot of manual adjustments to fulfill the committee's "style" requirements.)
In my bibliography I use biburlnumpenalty to break the DOI to prevent it from being longer than the rest of the text. Unfortunately this does produce orphans in some cases - sometimes single digits on a new line. Is there a way to prevent those orphans? Or do I have to live with one of those two unelegant looks?
MWE
\documentclass[
paper=a4,
12pt,
BCOR=0.5cm,
twoside=false,
bibliography=totoc,
abstract=true,
%draft,
open=right,
headings=normal,
]
{scrreprt}
%
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{setspace}
\onehalfspacing
\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\ofoot*{\pagemark}
\usepackage[autostyle]{csquotes}
\usepackage{etoolbox}
\usepackage[
backend=biber,
style=ext-authoryear,
useprefix=true,
urldate=iso,
seconds=true,
articlein=false,
innamebeforetitle=true,
introcite=label,
sorting=nyt,
dashed=false,
maxcitenames=2,
mincitenames=1,
maxbibnames=999,
giveninits=true,
terseinits=true,
uniquename=init,
uniquelist=false,
isbn=false,
url=false
]
{biblatex}
\setlength{\bibitemsep}{6pt}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{default}{family-given}
\DeclareFieldFormat[article, incollection, online]{title}{#1}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\DeclareFieldFormat{biblabeldate}{#1}
\DeclareFieldFormat{journaltitle}{#1\isdot}
\DeclareFieldFormat{booktitle}{#1}
\DeclareFieldFormat[article]{volume}{#1}
\DeclareFieldFormat{pages}{#1}
\DeclareNameAlias{default}{family-given}
\AtEveryBibitem{\clearfield{note}}
\AtEveryBibitem{\clearfield{abstract}}
\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{extradate}}
\AtEveryCitekey{\clearfield{doi}}
%\setcounter{biburlnumpenalty}{100} % <---------------------------
\urlstyle{same}
\patchcmd{\bibsetup}{\interlinepenalty=5000}{\interlinepenalty=10000}{}{}
\DeclareDelimFormat{multicitedelim}{\addcomma\addspace}
\DeclareDelimFormat[bib]{finalnamedelim}{\addcomma\addspace}
\renewcommand{\revsdnamepunct}{}
\DeclareDelimFormat{volnumdelim}{}
\DeclareDelimFormat[bib]{nameyeardelim}{\adddot\space}
\DeclareDelimFormat{jourvoldelim}{\addcomma\addspace}
\renewcommand*{\bibpagespunct}{
\ifboolexpr{(test {\ifentrytype{article}})}
{\addcolon}
{\addcomma\space}}
\DeclareFieldFormat{bbx@introcite}{\mkbibbrackets{#1}}
\DeclareDelimFormat[bbx@introcite]{nameyeardelim}{\space}
\UndeclareInnerCiteDelims{bbx@introcite}
\renewcommand*{\introcitepunct}{\quad}
\setlength\bibitemsep{1.5\itemsep}
\AtIntrocite{\DeclareFieldFormat{linkallcite}{#1}}
\DeclareFieldFormat{linkallcite}{%
\DeclareFieldFormat{bibhyperref}{##1}%
\bibhyperref{#1}%
}
\letbibmacro{cite:orig}{cite}
\renewbibmacro{cite}{%
\printtext[linkallcite]{%
\usebibmacro{cite:orig}}}
\usepackage[%
unicode=true,
linkcolor=red,
citecolor=green,
%pdfborderstyle={/S/U/W 1},
bookmarksopen=true,
bookmarksopenlevel=2,
%bookmarksnumbered=true,
pdfdisplaydoctitle=true,
%hidelinks=true,
linktoc=all,
hypertexnames=false,
breaklinks=true
]
{hyperref}
\begin{filecontents}{bib.bib}
@Article{Shen2016,
author = {Shen, H. N. and Lu, C. L. and Yang, H. H.},
journal = {Critical Care Medicine},
title = {Risk of Recurrence After Surviving Severe Sepsis: A Matched Cohort Study},
year = {2016},
issn = {1530-0293 (Electronic)
0090-3493 (Linking)},
month = oct,
number = {10},
pages = {1833--1841},
volume = {44},
doi = {10.1097/CCM.0000000000001824},
publisher = {Ovid Technologies (Wolters Kluwer Health)},
type = {Journal Article},
url = {https://www.ncbi.nlm.nih.gov/pubmed/27120256},
}
@InCollection{Ferrans2004,
author = {Ferrans, Carol Estwing},
booktitle = {Outcomes Assessment in Cancer: Measures, Methods and Applications},
publisher = {Cambridge University Press},
title = {Definitions and conceptual models of quality of life},
year = {2004},
address = {Cambridge},
editor = {Lipscomb, Joseph and Gota, Carolyn C. and Snyder, Claire},
month = dec,
pages = {14--30},
doi = {10.1017/CBO9780511545856.002},
}
\end{filecontents}
\bibliography{bib}
\begin{document}
\pagenumbering{arabic}
Citing \parencite{Ferrans2004}
Citing \parencite{Shen2016}
\printbibliography
\end{document}




\biburlnumskipfor now before trying more radical measures - I'll have to check again when the bibliography is complete.Could you please explain the syntax a bit more, because for me
– Christian König Jun 28 '20 at 10:18\biburlnumskip=0mu plus 1mu minus 1muadds up to 0 and I don't understand why it does something at all.0mu plus 1mu minus 1muis a space of 0mu that can (if required for example for nicer line breaking) stretch by up to 1mu (that's theplusbit) and shrink by up to 1mu (theminusbit). See for example https://tex.stackexchange.com/q/64756/35864. – moewe Jun 28 '20 at 11:01