}
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$
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 }"
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