informalexample

$Revision: 1666 $

$Date: 2002-06-12 07:19:37 -0400 (Wed, 12 Jun 2002) $

informalexample — A displayed example without a title

Synopsis

Content Model

informalexample ::=
(blockinfo?,
 (%example.mix;)+)

Attributes

Common attributes

Name

Type

Default

widthCDATANone
floatstyleCDATANone

Parameter Entities

The following parameter entities contain informalexample:

Parameter Entities
%admon.mix;%bookcomponent.content;%component.mix;
%divcomponent.mix;%example.mix;%figure.mix;
%footnote.mix;%glossdef.mix;%indexdivcomponent.mix;
%informal.class;%listpreamble.mix;%para.mix;
%qandaset.mix;%refcomponent.mix;%revdescription.mix;
%sidebar.mix;  

Description

InformalExample is a wrapper for an example without a title. Examples often contain ProgramListings or other large block elements.

Processing expectations

Formatted as a displayed block.

Note

It is an error to supply a title in the blockinfo for an informal example.

Attributes

width

Width specifies the width (in characters) of the longest line in this InformalExample (formatters may use this value to determine scaling or rotation).

See Also

equation, example, figure, informalequation, informalfigure, informaltable, table.

Examples

<!DOCTYPE informalexample PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<informalexample>
<programlisting>
sub print_content_model {
    my($self) = shift;
    local($_) = shift;
    local(*FILE) = shift;

    my(@cm) = $self->format_content_model2($_);
    foreach $_ (@cm) {
        print FILE $self->make_links($_, 1, 1), "\n";
    }
}
</programlisting>
</informalexample>
sub print_content_model {
    my($self) = shift;
    local($_) = shift;
    local(*FILE) = shift;

    my(@cm) = $self->format_content_model2($_);
    foreach $_ (@cm) {
        print FILE $self->make_links($_, 1, 1), "\n";
    }
}

For additional examples, see also screenco.