|
DocBook: The Definitive GuideBy Norman Walsh & Leonard Muellner1st Edition October 1999 1-56592-580-7, Order Number: 5807 652 pages, $36.95 , Includes CD-ROM |
| DocBook: The Definitive Guide | ||
|---|---|---|
| Prev | Next | |
ProgramListing ::= ((COLineAnnotation#PCDATAFootnoteRefXRefAbbrevAcronym CitationCiteRefEntryCiteTitleEmphasisFirstTerm ForeignPhraseGlossTermFootnotePhraseQuoteTrademark WordAsWordLinkOLinkULinkActionApplicationClassName CommandComputerOutputDatabaseEmailEnVarErrorCodeErrorName ErrorTypeFilenameFunctionGUIButtonGUIIconGUILabelGUIMenu GUIMenuItemGUISubmenuHardwareInterfaceInterfaceDefinition KeyCapKeyCodeKeyComboKeySymLiteralConstantMarkup MediaLabelMenuChoiceMouseButtonMsgTextOptionOptional ParameterPromptPropertyReplaceableReturnValueSGMLTag StructFieldStructNameSymbolSystemItemTokenTypeUserInput VarNameAnchorAuthorAuthorInitialsCorpAuthorModeSpec OtherCreditProductNameProductNumber RevHistoryComment SubscriptSuperscriptInlineGraphicInlineMediaObject InlineEquationSynopsisCmdSynopsisFuncSynopsisIndexTerm)+)
Common attributes
|
Name |
Type |
Default |
| Width | NUMBER | None |
| Format |
Enumerated notation: linespecific |
"linespecific" |
Both the start- and end-tags are required for this element.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A ProgramListing is a verbatim environment for program source or source fragment listings. ProgramListing s are often placed in Example s or Figure s so that they can be cross-referenced from the text.
Formatted as a displayed block. This element is displayed "verbatim"; whitespace and linebreaks within this element are significant. ProgramListing s are usually displayed in a fixed width font.
Other markup within a ProgramListing is recognized. Contrast this with systems like LaTeX, in which verbatim environments disable markup recognition. If you want to disable markup recognition, you must use a CDATA section :
<programlisting> <![CDATA[ This is a programlisting so white space and line breaks are significant. But it is also a CDATA section so <emphasis>tags</emphasis> and &entities; are not recognized. The only markup that is recognized is the end-of-section marker, which is two "]"'s in a row followed by a >. ]]> </programlisting>
Two markup tags have special significance in ProgramListing s: CO and LineAnnotation . A CO identifies the location of a Callout . A LineAnnotation is a comment, added by the documentor --not the programmer.
This element is displayed "verbatim"; whitespace and linebreaks within this element are significant.
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.
These elements contain ProgramListing:
Answer
,
Appendix
,
Article
,
BiblioDiv
,
Bibliography
,
BlockQuote
,
Callout
,
Caption
,
Caution
,
Chapter
,
Colophon
,
Dedication
,
entry
,
Example
,
Figure
,
Footnote
,
Glossary
,
GlossDef
,
GlossDiv
,
Important
,
Index
,
IndexDiv
,
InformalExample
,
InformalFigure
,
LegalNotice
,
ListItem
,
MsgExplan
,
MsgText
,
Note
,
Para
,
PartIntro
,
Preface
,
Procedure
,
The following elements occur in ProgramListing: Abbrev , Acronym , Action , Anchor , Application , Author , AuthorInitials , Citation , CiteRefEntry , CiteTitle , ClassName , CmdSynopsis , CO , Command , Comment , ComputerOutput , Constant , CorpAuthor , Database , Email , Emphasis , EnVar , ErrorCode , ErrorName , ErrorType , Filename , FirstTerm , Footnote , FootnoteRef , ForeignPhrase , FuncSynopsis , Function , GlossTerm , GUIButton , GUIIcon , GUILabel , GUIMenu , GUIMenuItem , GUISubmenu , Hardware , IndexTerm , InlineEquation , InlineGraphic , InlineMediaObject , Interface , InterfaceDefinition , KeyCap , KeyCode , KeyCombo , KeySym , LineAnnotation , Link , Literal , Markup , MediaLabel , MenuChoice , ModeSpec , MouseButton , MsgText , OLink , Option , Optional , OtherCredit , Parameter , Phrase , ProductName , ProductNumber , Prompt , Property , Quote , Replaceable , ReturnValue , RevHistory , SGMLTag , StructField , StructName , Subscript , Superscript , Symbol , Synopsis , SystemItem , Token , Trademark , Type , ULink , UserInput , VarName , WordAsWord , XRef .
In some contexts, the following elements are allowed
In some contexts, the following elements are excluded: Acronym , Footnote , IndexTerm .
The Format attribute applies the linespecific notation to all ProgramListing s. All white space and line breaks must be preserved.
Width
specifies the width (in
ComputerOutput , LineAnnotation , LiteralLayout , Screen , ScreenShot , Synopsis , UserInput
For examples, see Example , InformalExample , ProgramListingCO .
| Prev | Home | Next |
| ProductNumber | Up | ProgramListingCO |
Back to: DocBook: The Definitive Guide
1999, O'Reilly & Associates, Inc.