DocBook: The Definitive Guide

docbook: the definitive guide
By Norman Walsh & Leonard Muellner
1st Edition October 1999
1-56592-580-7, Order Number: 5807
652 pages, $36.95 , Includes CD-ROM

DocBook: The Definitive Guide


CmdSynopsis -- A syntax summary for a software command


Content Model

CmdSynopsis ::= ((Command|Arg|Group|SBR)+,  SynopFragment*)


Common attributes




SepcharCDATA" "

Tag Minimization

Both the start- and end-tags are required for this element.

Parameter Entities



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.

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.


These elements contain CmdSynopsis: Answer, Appendix, Application, Article, Attribution, BiblioDiv, Bibliography, BiblioMisc, BlockQuote, Callout, Caution, Chapter, Citation, CiteTitle, Comment, Emphasis, entry, Example, Figure, Footnote, ForeignPhrase, Glossary, GlossDef, GlossDiv, GlossSee, GlossSeeAlso, GlossTerm, Important, Index, IndexDiv, InformalExample, InformalFigure, LineAnnotation, Link, ListItem, LiteralLayout, LoTentry, Member, MsgAud, MsgExplan, MsgText, Note, OLink, Para, PartIntro, Phrase, Preface, Procedure, ProductName, ProgramListing, QandADiv, QandASet, Question, Quote, RefEntryTitle, RefSect1, RefSect2, RefSect3, RefSynopsisDiv, Screen, ScreenInfo, Sect1, Sect2, Sect3, Sect4, Sect5, Section, Seg, SetIndex, Sidebar, SimPara, SimpleSect, Step, Synopsis, Term, Tip, ToCback, ToCentry, ToCfront, ULink, Warning.


The following elements occur in CmdSynopsis: Arg, Command, Group, SBR, SynopFragment.

In some contexts, the following elements are allowed anywhere: BeginPage, IndexTerm.



CmdLength indicates displayed length of the command; this information may be used to intelligently indent command synopses which extend beyond one line.


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


SepChar specifies the character (a space by default) that should separate the Command and its top-level arguments.

See Also

Arg, FuncSynopsis, Group, RefSynopsisDiv, SBR, SynopFragment, SynopFragmentRef, Synopsis


<!DOCTYPE cmdsynopsis PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <cmdsynopsis>   <command>cd</command>   <arg choice=req><replaceable>directory</replaceable></arg> </cmdsynopsis>

cd {directory}

<!DOCTYPE cmdsynopsis PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <cmdsynopsis>   <command>cal</command>   <arg>-j</arg>   <arg>-y</arg>   <arg>month <arg>year</arg></arg> </cmdsynopsis>

cal [-j] [-y] [month [year]]

<!DOCTYPE cmdsynopsis PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <cmdsynopsis>   <command>chgrp</command>   <arg>-R      <group>       <arg>-H</arg>       <arg>-L</arg>       <arg>-P</arg>     </group>   </arg>   <arg>-f</arg>   <arg choice=plain><replaceable>group</replaceable></arg>   <arg rep=repeat choice=plain><replaceable>file</replaceable></arg> </cmdsynopsis>

chgrp [-R [-H | -L | -P] ] [-f] group file...

<!DOCTYPE cmdsynopsis PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <cmdsynopsis>   <command>emacs</command>   <arg>-t <replaceable>file</replaceable></arg>   <arg>-q</arg>   <arg>-u <replaceable>user</replaceable></arg>   <arg>+<replaceable>number</replaceable></arg>   <arg rep=repeat>-f <replaceable>function</replaceable></arg>   <sbr>   <arg rep=repeat>-l <replaceable>file</replaceable></arg>   <arg rep=repeat choice=plain><replaceable>file</replaceable></arg> </cmdsynopsis>

emacs [-t file] [-q] [-u user] [+number] [-f function...]
[-l file...] file...

Note the use of SBR in this example to force line breaks at reasonable places in the synopsis.

For additional examples, see also SynopFragment.


Back to: DocBook: The Definitive Guide

O'Reilly Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies

© 1999, O'Reilly & Associates, Inc.

DocBook. The Definitive Guide
DocBook 5: The Definitive Guide
ISBN: 0596805020
EAN: 2147483647
Year: 1999
Pages: 412
Authors: Walsh Norman, Richard L. Hamilton

Similar book on Amazon
DocBook XSL: The Complete Guide (4th Edition)
DocBook XSL: The Complete Guide (4th Edition)
XSLT, 2nd Edition
XSLT, 2nd Edition
XSLT Cookbook: Solutions and Examples for XML and XSLT Developers, 2nd Edition
XSLT Cookbook: Solutions and Examples for XML and XSLT Developers, 2nd Edition
XML: Visual QuickStart Guide (2nd Edition)
XML: Visual QuickStart Guide (2nd Edition) © 2008-2017.
If you may any questions please contact us: