O'Reilly logo

DocBook 5: The Definitive Guide by Richard L. Hamilton, Norman Walsh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

cmdsynopsis — A syntax summary for a software command

Synopsis

cmdsynopsis ::= (infodb.titleforbidden.info, (arg | command | group | sbr)+, synopfragment*)

Attribute synopsis

Common attributes and common linking attributes.

Additional attributes:

  • cmdlength

  • label

  • sepchar

Description

A cmdsynopsis summarizes the options and parameters of a command started from a text prompt. This is usually a program started from the DOS, Windows, or UNIX shell prompt.

A cmdsynopsis operates under the following general model: commands have arguments that may be grouped; arguments and groups may be required or optional and may be repeated.

Processing expectations

The processing expectations of cmdsynopsis are fairly complex:

  • Arguments are generally identified with a prefix character.

    In the UNIX world, this character is almost universally the dash or hyphen, although plus signs and double dashes have become more common in recent years.

    In the DOS/Windows world, forward slashes are somewhat more common than dashes.

    The DocBook processing expectations on this point are intentionally vague. In some environments it may be most convenient to generate these characters automatically; in other environments it may be more convenient to insert them literally in the content.

    Whichever processing model you choose, note that this will be an interchange issue if you share documents with other users (see Appendix D).

  • Brackets are used to distinguish between optional, required, or plain arguments. Usually square brackets are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required