1[comment {-*- tcl -*- doctools manpage}]
2[manpage_begin doctoc_lang_cmdref n 1.0]
3[copyright {2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
4[moddesc   {Documentation tools}]
5[titledesc {doctoc language command reference}]
6[category  {Documentation tools}]
7[description]
8[para]
9
10This document specifies both names and syntax of all the commands
11which together are the doctoc markup language, version 1.
12
13As this document is intended to be a reference the commands are listed
14in alphabetical order, and the descriptions are relatively short.
15
16A beginner should read the much more informally written
17[term {doctoc language introduction}] first.
18
19
20[section Commands]
21[list_begin definitions]
22
23
24[call [cmd comment] [arg plaintext]]
25
26Toc markup. The argument text is marked up as a comment standing
27outside of the actual text of the document. Main use is in free-form
28text.
29
30[call [cmd division_end]]
31
32Toc structure. This command closes the division opened by the last
33[cmd division_begin] command coming before it, and not yet closed.
34
35[call [cmd division_start] [arg text] [opt [arg symfile]]]
36
37Toc structure. This command opens a division in the table of
38contents. Its counterpart is [cmd division_end]. Together they allow a
39user to give a table of contents additional structure.
40
41[para]
42
43The title of the new division is provided by the argument [arg text].
44
45[para]
46
47If the symbolic filename [arg symfile] is present then the section
48title should link to the referenced document, if links are supported
49by the output format.
50
51[call [cmd include] [arg filename]]
52
53Templating. The contents of the named file are interpreted as text
54written in the doctoc markup and processed in the place of the
55include command. The markup in the file has to be self-contained. It
56is not possible for a markup command to cross the file boundaries.
57
58[call [cmd item] [arg file] [arg text] [arg desc]]
59
60Toc structure. This command adds an individual element to the table of
61contents. Each such element refers to a document. The document is
62specified through the symbolic name [arg file]. The [arg text]
63argument is used to label the reference, whereas the [arg desc]
64provides a short descriptive text of that document.
65
66[para]
67
68The symbolic names are used to preserve the convertibility of this
69format to any output format. The actual name of the file will be
70inserted by the chosen formatting engine when converting the
71input. This will be based on a mapping from symbolic to actual names
72given to the engine.
73
74[call [cmd lb]]
75
76Text. The command is replaced with a left bracket. Use in free-form
77text. Required to avoid interpretation of a left bracket as the start
78of a markup command. Its usage is restricted to the arguments of other
79markup commands.
80
81[call [cmd rb]]
82
83Text. The command is replaced with a right bracket. Use in free-form
84text. Required to avoid interpretation of a right bracket as the end
85of a markup command. Its usage is restricted to the arguments of other
86commands.
87
88[call [cmd toc_begin] [arg text] [arg title]]
89
90Document structure. The command to start a table of contents. The
91arguments are a label for the whole group of documents the index
92refers to ([arg text]) and the overall title text for the index
93([arg title]), without markup.
94
95[para]
96
97The label often is the name of the package (or extension) the
98documents belong to.
99
100[call [cmd toc_end]]
101
102Document structure. Command to end a table of contents. Anything in
103the document coming after this command is in error.
104
105[call [cmd vset] [arg varname] [arg value] ]
106
107Templating. In this form the command sets the named document variable
108to the specified [arg value]. It does not generate output. I.e. the
109command is replaced by the empty string.
110
111[call [cmd vset] [arg varname]]
112
113Templating. In this form the command is replaced by the value of the
114named document variable
115
116[list_end]
117
118[section {BUGS, IDEAS, FEEDBACK}]
119
120This document, and the package it describes, will undoubtedly contain
121bugs and other problems.
122
123Please report such in the category [emph doctools] of the
124[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}].
125
126Please also report any ideas for enhancements you may have for either
127package and/or documentation.
128
129[see_also doctoc_intro]
130[see_also doctoc_lang_intro]
131[see_also doctoc_lang_syntax]
132[see_also doctoc_lang_faq]
133[keywords markup {semantic markup}]
134[keywords {doctoc markup} {doctoc language} {doctoc commands}]
135[manpage_end]
136