Some block elements are used to mark other block of text or special
kind of in-line text. The DTD is very permissive, to assure maximum
compatibility with Texinfo, but this may change in the future. The
following table list these elements, included the special element
pre
, used to insert in-line preformatted text, and
exdent
, used inside pre
to obtain an exdented
line.
Element | Attribute | Content | Description or Texinfo equivalence
|
exdent | in-line | @exdent
| |
pre | in-line | preformatted text
| |
quotation | block | @quotation
| |
display | block or pre
| @display
| |
smalldisplay | block or pre
| @smalldisplay
| |
example | block or pre
| @example
| |
smallexample | block or pre
| @smallexample
| |
flushleft | in-line | @flushleft
| |
flushright | in-line | @flushright
| |
lisp | block or pre
| @lisp
| |
smalllisp | block or pre
| @smalllisp
| |
cartouche | block or pre
| @cartouche
| |
format | block or pre
| @format
| |
smallformat | block or pre
| @smallformat
| |
texinfo | literal Texinfo | embedded literal Texinfo code
|
Use like this:
<example> <p>Hello everybody</p> <p>Hello to the world</p> </example>
In this case the example
element contains preformatted
text (please not the use of two SGML entities, lt
and
gt
):
<example> <pre> #!/usr/bin/perl while ($line = <STDIN>) { chomp $line; print ("$line\r\n"); } </pre> </example>
If it is necessary to include a preformatted literal text, do like
this (please note that there is no need to hide <
and
>
):
<example> <pre> <![CDATA[ #!/usr/bin/perl while ($line = <STDIN>) { chomp $line; print ("$line\r\n"); } ]]> </pre> </example>