literallayout

$Revision: 1666 $

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

literallayout — A block of text in which line breaks and white space are to be reproduced faithfully

Synopsis

Mixed Content Model

literallayout ::=
(#PCDATA|footnoteref|xref|biblioref|abbrev|acronym|citation|
 citerefentry|citetitle|citebiblioid|emphasis|firstterm|
 foreignphrase|glossterm|termdef|footnote|phrase|orgname|quote|
 trademark|wordasword|personname|link|olink|ulink|action|
 application|classname|methodname|interfacename|exceptionname|
 ooclass|oointerface|ooexception|package|command|computeroutput|
 database|email|envar|errorcode|errorname|errortype|errortext|
 filename|function|guibutton|guiicon|guilabel|guimenu|guimenuitem|
 guisubmenu|hardware|interface|keycap|keycode|keycombo|keysym|
 literal|code|constant|markup|medialabel|menuchoice|mousebutton|
 option|optional|parameter|prompt|property|replaceable|
 returnvalue|sgmltag|structfield|structname|symbol|systemitem|uri|
 token|type|userinput|varname|nonterminal|anchor|author|
 authorinitials|corpauthor|corpcredit|modespec|othercredit|
 productname|productnumber|revhistory|remark|subscript|
 superscript|inlinegraphic|inlinemediaobject|inlineequation|
 synopsis|cmdsynopsis|funcsynopsis|classsynopsis|fieldsynopsis|
 constructorsynopsis|destructorsynopsis|methodsynopsis|indexterm|
 beginpage|co|coref|textobject|lineannotation)*

Attributes

Common attributes

Name

Type

Default

widthCDATANone
linenumbering
Enumeration:
numbered
unnumbered
None
languageCDATANone
xml:space
Enumeration:
preserve
None
continuation
Enumeration:
continues
restarts
None
format
Enumerated notation:
linespecific
"linespecific"
class
Enumeration:
monospaced
normal
"normal"
startinglinenumberCDATANone

Description

LiteralLayout is a verbatim environment. Unlike the other verbatim environments, it does not have strong semantic overtones and may not imply a font change.

Processing expectations

This element is displayed “verbatim”; whitespace and linebreaks within this element are significant.

Unlike ProgramListing and Screen, which usually imply a font change, LiteralLayout does not. How spaces are to be represented faithfully in a proportional font is not addressed by DocBook.

In DocBook V3.1, the Class attribute was added to give users control over the font used in LiteralLayouts. If the Class attribute is specified and its value is Monospaced, then the LiteralLayout will be presented in a monospaced font, probably the same one used for other verbatim environments. The default value for Class is Normal, meaning that no font change will occur.

Future Changes

The InterfaceDefinition element will be discarded in DocBook V4.0. It will no longer be available in the content model of this element.

Future Changes

The xml:space attribute is automatically provided in the XML DTD.

Attributes

class

Class distinguishes between literal layout environments that are presented in a monospaced font and literal layout environments that have no implicit font change.

format

The Format attribute applies the linespecific notation to all LiteralLayouts. All white space and line breaks must be preserved.

linenumbering

[4.0]Line numbering indicates whether or not the lines of a LiteralLayout are to be automatically numbered. The details of numbering (every line or only selected lines, on the left or right, etc.) are left up to the processing application. Be aware that not all processors are capable of numbering lines.

width

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

See Also

computeroutput, lineannotation, programlisting, screen, screenshot, synopsis, userinput.

Examples

<!DOCTYPE blockquote PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<blockquote>
<attribution>William Shakespeare, <citetitle>Henry V</citetitle></attribution>
<literallayout>
  O, for a muse of fire, that would ascend
The brightest heaven of invention!
A kingdom for a stage, princes to act,
And monarchs to behold the swelling scene!
</literallayout>
</blockquote>
 


  O, for a muse of fire, that would ascend
The brightest heaven of invention!
A kingdom for a stage, princes to act,
And monarchs to behold the swelling scene!

 
 --William Shakespeare, Henry V

For additional examples, see also attribution, part.