format(n) 1.0 doctools "Documentation tools"

NAME

format - Specification of simple tcl markup for manpages

SYNOPSIS

manpage_begin command section version
manpage_end
moddesc desc
titledesc desc
description
require pkg ?version?
section name
para
see_also args
keywords args
arg text
cmd text
opt text
emph text
strong text
comment text
sectref text
syscmd text
method text
option text
widget text
fun text
type text
package text
class text
var text
file text
uri text
term text
const text
nl
lb
rb
example_begin
example_end
example text
list_begin what
list_end
bullet
enum
lst_item text
call args
arg_def type name ?mode?
opt_def name ?arg?
cmd_def command
tkoption_def name dbname dbclass
usage args

DESCRIPTION

This manpage specifies

  1. The overall format of manpages using this markup, and

  2. the tcl commands used as the markup

The manpage format described here is simpler than TMML, but convertible into it (and other formats, like HTML and nroff).

The tcl sources of this manpage can serve as an example for all of the markup described by it. Every possible construct (with the exception of require) is used here.

OVERVIEW

Commands

manpage_begin command section version
This command begins a manpage. Nothing is allowed to precede it. Arguments are the name of the command described by the manpage, the section of the manpages this manpages lives in, the version of the module containing the command, the name of the module itself and two descriptions, one short for the command and one a bit longer for the module. Both have to fit on one line.

manpage_end
This command closes a manpage. Nothing is allowed to follow it.

moddesc desc
This command is required and comes after manpage_begin, but before either require or description. Its argument provides a one-line description of the module described by the manpage.

titledesc desc
This command is optional and comes after manpage_begin, but before either require or description. Its argument provides a one-line expansion of the title for the manpage. If this command is not used the manpage processor has to use information from moddesc instead.

description
This command separates the header part of the manpage from the main body. Only require, moddesc, or titledesc may precede it.

require pkg ?version?
May occur only between manpage_begin and description. Is used to list the packages which are required for the described command to be operational.

section name
Used to structure the body of the manpage into named sections. This command is not allowed inside of a list or example. It implicitly closes the last paragraph before the command and also implicitly opens the first paragraph of the new section.

para
Used to structure sections into paragraphs. Must not be used inside of a list or example.

see_also args
Creates a section SEE ALSO containing the arguments as cross-references. Must not be used inside of a list or example.

keywords args
Creates a section KEYWORDS containing the arguments as words indexing the manpage. Must not be used inside of a list or example.

arg text
Declares that the marked text is the name of a command argument.

cmd text
Declares that the marked text is the name of a command.

opt text
Declares that the marked text is something optional. Most often used in conjunction with arg to denote optional command arguments.

emph text
One way to emphasize text in a general manner.

strong text
Another way to emphasize text in a general manner.

comment text
Declares that the marked text is a comment.

sectref text
Declares that the marked text is a section reference.

syscmd text
Declares that the marked text is a system command.

method text
Declares that the marked text is a object method.

option text
Declares that the marked text is a option.

widget text
Declares that the marked text is a widget.

fun text
Declares that the marked text is a function.

type text
Declares that the marked text is a data type.

package text
Declares that the marked text is a package.

class text
Declares that the marked text is a class.

var text
Declares that the marked text is a variable.

file text
Declares that the marked text is a file .

uri text
Declares that the marked text is a uri.

term text
Declares that the marked text is a unspecific terminology.

const text
Declares that the marked text is a constant value.

nl
Vertical space to separate text without breaking it into a new paragraph.

lb
Introduces a left bracket into the output.

rb
Introduces a right bracket into the output. The bracket commands are necessary as plain brackets are used to denote the beginnings and endings of the formatting commands.

example_begin
Formats subsequent text as a code sample: line breaks, spaces, and tabs are preserved and, where appropriate, text is presented in a fixed-width font.

example_end
End of a code sample block.

example text
Formats text as a multi-line block of sample code. text should be enclosed in braces.

list_begin what
Starts new list of type what. The allowed types (and their associated item commands) are:

bullet
bullet
enum
enum
definitions
lst_item and call

arg
arg_def
cmd
cmd_def
opt
opt_def
tkoption
tkoption_def
list_end
Ends the list opened by the last list_begin.

bullet
Starts a new item in a bulleted list.

enum
Starts a new item in an enumerated list.

lst_item text
Starts a new item in a definition list. The argument is the term to be defined.

call args
Starts a new item in a definition list, but the term defined by it is a command and its arguments.

arg_def type name ?mode?
Starts a new item in an argument list. Specifies the data-type of the described argument, its name and possibly its i/o-mode.

opt_def name ?arg?
Starts a new item in an option list. Specifies the name of the option and possible (i.e. optional) arguments.

cmd_def command
Starts a new item in a command list. Specifies the name of the command.

tkoption_def name dbname dbclass
Starts a new item in a widget option list. Specifies the name of the option, i.e. the name used in scripts, name used by the option database, and the class (type) of the option.

usage args
Defines a term to be used in the table of contents or synopsis section, depending on the format. This command is silent, as it doesn't add any text to the output as a direct result of the call. It merely defines data to appear in another section.

SEE ALSO

expander(n), formatter(n), mpexpand(n)

KEYWORDS

manpage, TMML, HTML, nroff, conversion, markup