--- doc/help/texxml2latex.pl 2003/07/18 20:58:33 1.6 +++ doc/help/texxml2latex.pl 2003/07/21 15:22:14 1.7 @@ -96,7 +96,14 @@ while (my $token = $p->get_token()) system ("echo > $tmpdir/$tempfile; cat $file | podselect $section >> $tmpdir/$tempfile; cd $tmpdir; pod2latex -h1level 2 $tempfile"); my $latexFile = substr($tempfile, 0, rindex($tempfile, '.')) . '.tex'; open LATEX_FILE, $tmpdir . '/' . $latexFile; - print ; + # pod2latex inserts \labels and \indexs for every section, + # which is horrible because the section names tend to get + # reused a lot. This filters those out, so we need to do + # create our own indexes. + for () { + $_ =~ s/\\([^{]*)section(\*?)\{([^\\]+)\\label\{[^\\]+\}\\index\{([^\\]+)\}\}/\\\1section\2\{\3\}/g; + print $_; + } print "\n\n"; } }