[l2h] bib & natbib patches
Bruce R Miller
Bruce R Miller <bruce.miller@nist.gov>
Fri, 08 Oct 1999 18:24:55 -0400
Hi all;
It looks like BibTex found an even more clever place to
break lines! If a bibitem gets split up like this:
\bibitem[\protect\citeauthoryear{Olver}{Olver}{1974}]{%
Olver74}
F.~W.~J. Olver (1974).
...
the $comment_mark does NOT get stripped out of the $cite_key.
Somehow the default bibliography style manages to find a proper
entry (from aux ??; the internals.pl file gets extra entries),
but natbib.perl does not.
Consequently, the citation link is broken.
A fix would be to insert the line:
$cite_key =~ s/($comment_mark\d*.*\n)?//g;
after $cite_key = &missing_braces unless ...
in sub do_real_bibitem (in latex2html, natbib.perl,
and any other bibliographic style files).
Another problem is that there's been a change to natbib.perl that
looses the authors names. When I hacked it up last year,
I put in:
$short =~ s/$next_pair_pr_rx/$2/go; # Remove excess braces
That's now been changed to:
$_ = $short;
s/$next_pair_pr_rx//o;
if (!($2 eq $cite_key))
{$short =$2; $short =~ s/$OP[^\#>]*$CP//go; }
Undoubtedly the patch is there for a good reason, but
unfortunately, if there are NO excess braces, it assigns undef
to $short (and $long later on). Maybe the s/.../ could be brought
into the if(s/..//o && !($2 eq $cite_key)) ??
Thanks;
OBTW; Ross; it was great meeting you at TUG!
--
bruce.miller@nist.gov
http://math.nist.gov/~BMiller/