#!/usr/bin/env perl package Texi2HTML::Config; $Texi2HTML::Config::SEPARATED_FOOTNOTES = 0; # Print footnotes on same page, not separated $Texi2HTML::Config::foot_line_and_ref = \&lilypond_foot_line_and_ref; ############################################################################# ### FOOTNOTE FORMATTING ############################################################################# # Format footnotes in a nicer way: Instead of printing the number in a separate # (nr) heading line, use the standard way of prepending nr immediately # before the fn text. sub lilypond_foot_line_and_ref($$$$$$$) { my $number_in_doc = shift; my $number_in_page = shift; my $footnote_id = shift; my $place_id = shift; my $document_file = shift; my $footnote_file = shift; my $lines = shift; my $state = shift; if ($document_file eq $footnote_file) { $document_file = $footnote_file = ''; } # FN number printed before the fn text: my $tmptxt = &$anchor($footnote_id, $document_file . "#$place_id", "$number_in_doc"); # unfortunately, the @$lines contain the already formatted footnote in the # from

...

. This means that we have to modify this string and # insert the FN number manually. The default (nr) on a separate line before # the FN text just doesn't look good. $lines->[0] =~ s/

/

$tmptxt /; print @$lines; print " Tmptxt=$tmptxt\n"; # this is a bit obscure, this allows to add an anchor only if formatted # as part of the document. $place_id = '' if ($state->{'outside_document'} or $state->{'multiple_pass'}); # return FN lines and text to be inserted in the running text (link to FN) return ($lines, &$anchor($place_id, $footnote_file . "#$footnote_id", "$number_in_doc")); } return 1;