diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index 35c1d8bf7f8..61c2ff17912 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -182,6 +182,14 @@ sub make_nav_panel {
return $s;
}
+sub add_child_links {
+ my $toc = add_real_child_links(@_);
+ $toc =~ s|\s*[aA]>||g;
+ $toc =~ s/ NAME=\"tex2html\d+\"\s*href=/ href=/gi;
+ $toc =~ s|(\s*
)?||gi;
+ return $toc;
+}
+
sub get_version_text {
if ($PACKAGE_VERSION ne '' && $t_date) {
return (""