- $program_string
-@@ -244,7 +248,7 @@
-
- # Dummy title command
- # Ignore title. Title is handled through ffmpeg_begin_file().
--set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
-+texinfo_set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
- sub ffmpeg_title($$$$)
- {
- return '';
-@@ -253,6 +257,8 @@
- texinfo_register_command_formatting('titlefont',
- \&ffmpeg_title);
-
-+use lib '/usr/share/texinfo/Texinfo/Convert';
-+
- # Customized float command. Part of code borrowed from GNU Texinfo.
- sub ffmpeg_float($$$$$)
- {
-@@ -262,8 +268,9 @@
- my $args = shift;
- my $content = shift;
-
-- my ($caption, $prepended) = Texinfo::Common::float_name_caption($self,
-+my ($caption, $prepended) = Texinfo::Convert::Converter::float_name_caption($self,
- $command);
-+
- my $caption_text = '';
- my $prepended_text;
- my $prepended_save = '';
-@@ -335,24 +342,31 @@
- $caption->{'args'}->[0], 'float caption');
- }
- if ($prepended_text.$caption_text ne '') {
-- $prepended_text = $self->_attribute_class('div','float-caption'). '>'
-- . $prepended_text;
-+ $prepended_text = '' . $prepended_text;
- $caption_text .= '
';
-+
- }
-- my $html_class = '';
-- if ($prepended_save =~ /NOTE/) {
-- $html_class = 'info';
-- $prepended_text = '';
-- $caption_text = '';
-- } elsif ($prepended_save =~ /IMPORTANT/) {
-- $html_class = 'warning';
-- $prepended_text = '';
-- $caption_text = '';
-- }
-- return $self->_attribute_class('div', $html_class). '>' . "\n" .
-- $prepended_text . $caption_text . $content . '';
--}
-+ my $html_class = [];
-
-+if ($prepended_save =~ /NOTE/) {
-+ $html_class = ['info'];
-+ $prepended_text = '';
-+ $caption_text = '';
-+} elsif ($prepended_save =~ /IMPORTANT/) {
-+ $html_class = ['warning'];
-+ $prepended_text = '';
-+ $caption_text = '';
-+} elsif ($prepended_save =~ /Top/) {
-+ $html_class = [grep { $_ ne 'Top' } @$html_class]; # Remove "Top" class
-+ $prepended_text = '';
-+ $caption_text = '';
-+}
-+
-+# Set the class attribute directly in the HTML
-+return $self->html_attribute_class('div', $html_class) . '>' . "\n" .
-+ $prepended_text . $caption_text . $content . '';
-+
-+}
- texinfo_register_command_formatting('float',
- \&ffmpeg_float);
-