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

funcsynopsis — The syntax summary for a function definition

Synopsis

funcsynopsis ::= (infodb.titleforbidden.info, (funcprototype | funcsynopsisinfo)+)

Attribute synopsis

Common attributes and common linking attributes.

Additional attributes:

  • language

Description

A funcsynopsis contains the syntax summary of a function prototype or a set of function prototypes. The content model of this element was designed specifically to capture the semantics of most C-language function prototypes (for use in UNIX reference pages).

This is one of the few places where DocBook attempts to model as well as describe. Using funcsynopsis for languages that are unrelated to C may prove difficult.

Processing expectations

For the most part, the processing application is expected to generate all of the parentheses, semicolons, commas, and so on required in the rendered synopsis. The exception to this rule is that the spacing and other punctuation inside a parameter that is a pointer to a function must be provided in the source markup.

With sufficient author cooperation, it should be possible to mark up a function synopsis with enough clarity so that a processing system can generate either K&R-style or ANSI-style renderings.

Attributes

Common attributes and common linking attributes.

language

Identifies the language (i.e., programming language) of the content

See Also

cmdsynopsis, synopsis

Examples

There are two common presentation styles for function synopses, “K&R” style and “ANSI” style.

K&R examples

<article xmlns='http://docbook.org/ns/docbook'> ...

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