From b6f0006a94ae3d29739272d8467fbf278d3d5a78 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 1 Nov 2019 11:42:56 -0400 Subject: [PATCH] mjo.bst: allow for hbadness 2000 in the bibliography. It's OK if the bibliography looks a bit wonky. There's nothing you can do about it, and we don't want the hbox warnings to hide real problems. --- mjo.bst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mjo.bst b/mjo.bst index f85e8aa..49d98f3 100644 --- a/mjo.bst +++ b/mjo.bst @@ -1399,6 +1399,11 @@ FUNCTION {longest.label.pass} } EXECUTE {initialize.longest.label} ITERATE {longest.label.pass} + +% The usual default hbadness is 1000, but bibliography entries tend to +% have badnesses up to 2000. Here, we try that value instead to avoid +% spurious warnings (there's nothing the document author can do about +% them). Before we end the bibliography, we restore the original value. FUNCTION {begin.bib} { preamble$ empty$ 'skip$ @@ -1406,6 +1411,10 @@ FUNCTION {begin.bib} if$ "\begin{thebibliography}{" longest.label * "}" * write$ newline$ + "\let\originalhbadness\hbadness" + write$ newline$ + "\hbadness=2000" + write$ newline$ "\providecommand{\url}[1]{\texttt{#1}}" write$ newline$ "\providecommand{\urlprefix}{URL }" @@ -1427,7 +1436,10 @@ EXECUTE {init.state.consts} ITERATE {call.type$} FUNCTION {end.bib} { newline$ - "\end{thebibliography}" write$ newline$ + "\hbadness=\originalhbadness" + write$ newline$ + "\end{thebibliography}" + write$ newline$ } EXECUTE {end.bib} %% End of customized bst file -- 2.43.2