| DocBook: The Definitive Guide 2.0.17 (Alpha)

# synopsis

$Revision$

$Date$

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

## Synopsis

### Mixed Content Model

    synopsis ::=
    (#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|graphic|mediaobject|co|coref|textobject|lineannotation)*

### Attributes

Common attributes

Name | Type | Default

linenumbering

Enumeration:
numbered
unnumbered

None

language | CDATA | None

xml:space

Enumeration:
preserve

None

continuation

Enumeration:
continues
restarts

None

format

Enumerated notation:
linespecific

"linespecific"

startinglinenumber | CDATA | None
label | CDATA | None

## 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.

### Parents

These elements contain synopsis: `answer`, `appendix`, `application`, `article`, `attribution`, `bibliodiv`, `bibliography`, `bibliomisc`, `blockquote`, `callout`, `caution`, `chapter`, `citation`, `citetitle`, `constraintdef`, `emphasis`, `entry`, `example`, `figure`, `firstterm`, `footnote`, `foreignphrase`, `glossary`, `glossdef`, `glossdiv`, `glosssee`, `glossseealso`, `glossterm`, `important`, `index`, `indexdiv`, `informalexample`, `informalfigure`, `itemizedlist`, `lineannotation`, `link`, `listitem`, `literallayout`, `lotentry`, `member`, `msgaud`, `msgexplan`, `msgtext`, `note`, `olink`, `orderedlist`, `para`, `partintro`, `phrase`, `preface`, `procedure`, `productname`, `programlisting`, `qandadiv`, `qandaset`, `question`, `quote`, `refentrytitle`, `refsect1`, `refsect2`, `refsect3`, `refsection`, `refsynopsisdiv`, `remark`, `revdescription`, `screen`, `screeninfo`, `sect1`, `sect2`, `sect3`, `sect4`, `sect5`, `section`, `seg`, `setindex`, `sidebar`, `simpara`, `simplesect`, `step`, `synopsis`, `taskprerequisites`, `taskrelated`, `tasksummary`, `td`, `term`, `termdef`, `th`, `tip`, `tocback`, `tocentry`, `tocfront`, `ulink`, `variablelist`, `warning`.

### Children

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

## 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

  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`.

synopfragmentref |  | systemitem

Copyright © 1999, 2000, 2001, 2002, 2003 O'Reilly & Associates, Inc. All rights reserved.