synopsis

$Revision: 1.3 $

$Date: 2002/06/12 11:18:40 $

synopsis — A general-purpose element for representing the syntax of commands or functions

Synopsis

Mixed Content Model

synopsis ::=
(#PCDATA|footnoteref|xref|abbrev|acronym|citation|citerefentry|
 citetitle|emphasis|firstterm|foreignphrase|glossterm|footnote|
 phrase|orgname|quote|trademark|wordasword|personname|link|olink|
 ulink|action|application|classname|methodname|interfacename|
 exceptionname|ooclass|oointerface|ooexception|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|graphic|mediaobject|co|coref|textobject|lineannotation)*

Attributes

Common attributes

Name

Type

Default

linenumbering
Enumeration:
numbered
unnumbered
None
languageCDATANone
continuation
Enumeration:
continues
restarts
None
format
Enumerated notation:
linespecific
"linespecific"
startinglinenumberCDATANone
labelCDATANone

Description

A Synopsis is a verbatim environment for displaying command, function, and other syntax summaries.

Unlike CmdSynopsis and FuncSynopsis which have a complex interior structure, Synopsis is simply a verbatim environment.

Processing expectations

This element is displayed “verbatim”; whitespace and linebreaks within this element are significant. Synopsis elements are usually displayed in a fixed width font.

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.

Attributes

format

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

label

Label specifies an identifying number or string that may be used in presentation.

linenumbering

[4.0]Line numbering indicates whether or not the lines of a Synopsis 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.

See Also

cmdsynopsis, computeroutput, funcsynopsis, lineannotation, literallayout, programlisting, screen, screenshot, userinput.

Examples

<!DOCTYPE synopsis PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<synopsis>
chgrp [-R [-H | -L | -P]] [-f] group file...
</synopsis>
chgrp [-R [-H | -L | -P]] [-f] group file...
<!DOCTYPE synopsis PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<synopsis>
int max(int int1, int int2);
</synopsis>
int max(int int1, int int2);

For additional examples, see also optional, refentry, reference.