]> gitweb.michael.orlitzky.com - mjotex.git/commitdiff
mjo.bst: allow for hbadness 2000 in the bibliography.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 1 Nov 2019 15:42:56 +0000 (11:42 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 1 Nov 2019 15:42:56 +0000 (11:42 -0400)
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

diff --git a/mjo.bst b/mjo.bst
index f85e8aa4a45d03e72be55756d3b6ff6e1c7e02e3..49d98f36acc9fe4517e98729bc6deff6019f114f 100644 (file)
--- 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