} elsif ($element->{'args'} and $element->{'args'}->[0]->{'contents'}) { $multiply = 1; foreach my $content (@{$element->{'args'}->[0]->{'contents'}}) { if ($content->{'type'} and $content->{'type'} eq 'bracketed_arg') { my $prototype_text = ''; if ($content->{'contents'}) { Texinfo::Convert::Text::set_options_encoding_if_not_ascii( $self, $self->{'convert_text_options'}); $prototype_text = Texinfo::Convert::Text::convert_to_text( $content, $self->{'convert_text_options'}); Texinfo::Convert::Text::reset_options_encoding( $self->{'convert_text_options'}); } push @fractions, Texinfo::Convert::Unicode::string_width($prototype_text); } } } foreach my $fraction (@fractions) { $appended .= ''; } } } elsif ($cmdname eq 'float') { my $anchor = _output_anchor($element); $result .= $anchor . "\n" if ($anchor ne ''); } elsif ($cmdname eq 'verbatim') { push @format_elements, 'screen'; } elsif ($cmdname eq 'displaymath') { push @format_elements, 'informalequation'; push @format_elements, 'mathphrase'; } elsif ($cmdname eq 'quotation' or $cmdname eq 'smallquotation') { my $format_element; if ($element->{'extra'}) { if ($element->{'extra'}->{'authors'}) { foreach my $author (@{$element->{'extra'}->{'authors'}}) { if ($author->{'args'} and $author->{'args'}->[0]->{'contents'}) { $appended .= ''. _convert($self, $author->{'args'}->[0]) ."\n"; } } } } if ($element->{'args'} and $element->{'args'}->[0]->{'contents'}) { my $quotation_arg_text = Texinfo::Convert::Text::convert_to_text( $element->{'args'}->[0], $self->{'convert_text_options'}); if ($docbook_special_quotations{lc($quotation_arg_text)}) { $format_element = lc($quotation_arg_text); } else { $self->{'pending_prepend'} = _convert($self, $self->cdt('@b{{quotation_arg}:} ', {'quotation_arg' => $element->{'args'}->[0]})); } } $format_element = 'blockquote' if (!defined($format_element)); push @format_elements, $format_element; } elsif ($cmdname eq 'cartouche') { push @format_elements, 'sidebar'; if ($element->{'args'} and $element->{'args'}->[0]->{'contents'}) { my $title = _convert($self, $element->{'args'}->[0]); if ($title ne '') { $appended .= ''.$title.''."\n"; } } } elsif ($Texinfo::Commands::block_commands{$cmdname} eq 'format_raw') { return '' if (!$self->{'expanded_formats'}->{$cmdname}); # the context is here only for the command, so this is forgotten # once all the raw internal text has been formatted $self->{'document_context'}->[-1]->{'raw'} = 1; } elsif ($Texinfo::Commands::block_commands{$cmdname} eq 'raw' or $Texinfo::Commands::block_commands{$cmdname} eq 'menu') { return ''; } foreach my $format_element (@format_elements) { my $attribute = shift @attributes; $attribute = '' if (!defined($attribute)); $result .= "<$format_element${attribute}>"; unshift @close_format_elements, $format_element; } $result .= $appended if (defined($appended)); } } #warn " end of cmdname\n";