1doctools_lang_cmdref(n) Documentation tools doctools_lang_cmdref(n)
2
3
4
5______________________________________________________________________________
6
8 doctools_lang_cmdref - doctools language command reference
9
11 arg text
12
13 arg_def type name ?mode?
14
15 bullet
16
17 call args
18
19 category text
20
21 class text
22
23 cmd text
24
25 cmd_def command
26
27 comment plaintext
28
29 const text
30
31 copyright text
32
33 def text
34
35 description
36
37 enum
38
39 emph text
40
41 example text
42
43 example_begin
44
45 example_end
46
47 file text
48
49 fun text
50
51 include filename
52
53 item
54
55 keywords args
56
57 lb
58
59 list_begin what
60
61 list_end
62
63 lst_item text
64
65 manpage_begin command section version
66
67 manpage_end
68
69 method text
70
71 moddesc text
72
73 namespace text
74
75 nl
76
77 opt text
78
79 opt_def name ?arg?
80
81 option text
82
83 package text
84
85 para
86
87 rb
88
89 require package ?version?
90
91 section name
92
93 sectref id ?text?
94
95 sectref-external text
96
97 see_also args
98
99 strong text
100
101 subsection name
102
103 syscmd text
104
105 term text
106
107 titledesc desc
108
109 tkoption_def name dbname dbclass
110
111 type text
112
113 uri text ?text?
114
115 usage args
116
117 var text
118
119 vset varname value
120
121 vset varname
122
123 widget text
124
125_________________________________________________________________
126
128 This document specifies both names and syntax of all the commands which
129 together are the doctools markup language, version 1. As this document
130 is intended to be a reference the commands are listed in alphabetical
131 order, and the descriptions are relatively short. A beginner should
132 read the much more informally written doctools language introduction
133 first.
134
136 arg text
137 Text markup. The argument text is marked up as the argument of a
138 command. Main uses are the highlighting of command arguments in
139 free-form text, and for the argument parameters of the markup
140 commands call and usage.
141
142 arg_def type name ?mode?
143 Text structure. List element. Argument list. Automatically
144 closes the previous list element. Specifies the data-type of the
145 described argument of a command, its name and its i/o-mode. The
146 latter is optional.
147
148 bullet Deprecated. Text structure. List element. Itemized list. See
149 item for the canonical command to open a list item in an item‐
150 ized list.
151
152 call args
153 Text structure. List element. Definition list. Automatically
154 closes the previous list element. Defines the term as a command
155 and its arguments. The first argument is the name of the com‐
156 mand described by the following free-form text, and all argu‐
157 ments coming after that are descriptions of the command's argu‐
158 ments. It is expected that the arguments are marked up with
159 arg, method, option etc., as is appropriate, and that the com‐
160 mand itself is marked up with cmd. It is expected that the for‐
161 matted term is not only printed in place, but also in the table
162 of contents of the document, or synopsis, depending on the out‐
163 put format.
164
165 category text
166 Document information. Anywhere. This command registers its plain
167 text arguments as the category this document belongs to. If this
168 command is used multiple times the last value specified is used.
169
170 class text
171 Text markup. The argument is marked up as the name of a class.
172 The text may have other markup already applied to it. Main use
173 is the highlighting of class names in free-form text.
174
175 cmd text
176 Text markup. The argument text is marked up as the name of a Tcl
177 command. The text may have other markup already applied to it.
178 Main uses are the highlighting of commands in free-form text,
179 and for the command parameters of the markup commands call and
180 usage.
181
182 cmd_def command
183 Text structure. List element. Command list. Automatically closes
184 the previous list element. The argument specifies the name of
185 the Tcl command to be described by the list element. Expected to
186 be marked up in the output as if it had been formatted with cmd.
187
188 comment plaintext
189 Text markup. The argument text is marked up as a comment stand‐
190 ing outside of the actual text of the document. Main use is in
191 free-form text.
192
193 const text
194 Text markup. The argument is marked up as a constant value. The
195 text may have other markup already applied to it. Main use is
196 the highlighting of constants in free-form text.
197
198 copyright text
199 Document information. Anywhere. The command registers the plain
200 text argument as a copyright assignment for the manpage. When
201 invoked more than once the assignments are accumulated.
202
203 def text
204 Text structure. List element. Definition list. Automatically
205 closes the previous list element. The argument text is the term
206 defined by the new list element. Text markup can be applied to
207 it.
208
209 description
210 Document structure. This command separates the header from the
211 document body. Implicitly starts a section named "DESCRIPTION"
212 (See command section).
213
214 enum Text structure. List element. Enumerated list. Automatically
215 closes the previous list element.
216
217 emph text
218 Text markup. The argument text is marked up as emphasized. Main
219 use is for general highlighting of pieces of free-form text
220 without attaching special meaning to the pieces.
221
222 example text
223 Text structure, Text markup. This command marks its argument up
224 as an example. Main use is the simple embedding of examples in
225 free-form text. It should be used if the example does not need
226 special markup of its own. Otherwise use a sequence of exam‐
227 ple_begin ... example_end.
228
229 example_begin
230 Text structure. This commands starts an example. All text until
231 the next example_end belongs to the example. Line breaks, spa‐
232 ces, and tabs have to be preserved literally. Examples cannot be
233 nested.
234
235 example_end
236 Text structure. This command closes the example started by the
237 last example_begin.
238
239 file text
240 Text markup. The argument is marked up as a file or directory,
241 i.e. in general a path. The text may have other markup already
242 applied to it. Main use is the highlighting of paths in free-
243 form text.
244
245 fun text
246 Text markup. The argument is marked up as the name of a func‐
247 tion. The text may have other markup already applied to it. Main
248 use is the highlighting of function names in free-form text.
249
250 include filename
251 Templating. The contents of the named file are interpreted as
252 text written in the doctools markup and processed in the place
253 of the include command. The markup in the file has to be self-
254 contained. It is not possible for a markup command to cross the
255 file boundaries.
256
257 item Text structure. List element. Itemized list. Automatically
258 closes the previous list element.
259
260 keywords args
261 Document information. Anywhere. This command registers all its
262 plain text arguments as keywords applying to this document. Each
263 argument is a single keyword. If this command is used multiple
264 times all the arguments accumulate.
265
266 lb Text. The command is replaced with a left bracket. Use in free-
267 form text. Required to avoid interpretation of a left bracket
268 as the start of a markup command.
269
270 list_begin what
271 Text structure. This command starts a list. The exact nature of
272 the list is determined by the argument what of the command. This
273 further determines which commands are have to be used to start
274 the list elements. Lists can be nested, i.e. it is allowed to
275 start a new list within a list element.
276
277 The allowed types (and their associated item commands) are:
278
279 arguments
280 arg_def.
281
282 commands
283 cmd_def.
284
285 definitions
286 def and call.
287
288 enumerated
289 enum
290
291 itemized
292 item
293
294 options
295 opt_def
296
297 tkoptions
298 tkoption_def
299
300 Additionally the following names are recognized as shortcuts for some
301 of the regular types:
302
303 args Short for arguments.
304
305 cmds Short for commands.
306
307 enum Short for enumerated.
308
309 item Short for itemized.
310
311 opts Short for options.
312
313 At last the following names are still recognized for backward compati‐
314 bility, but are otherwise considered to be deprecated.
315
316 arg Deprecated. See arguments.
317
318 bullet Deprecated. See itemized.
319
320 cmd Deprecated. See commands.
321
322 opt Deprecated. See options.
323
324 tkoption
325 Deprecated. See tkoptions.
326
327
328 list_end
329 Text structure. This command closes the list opened by the last
330 list_begin command coming before it.
331
332 lst_item text
333 Deprecated. Text structure. List element. Definition list. See
334 def for the canonical command to open a general list item in a
335 definition list.
336
337 manpage_begin command section version
338 Document structure. The command to start a manpage. The argu‐
339 ments are the name of the command described by the manpage, the
340 section of the manpages this manpage resides in, and the version
341 of the module containing the command. All arguments have to be
342 plain text, without markup.
343
344 manpage_end
345 Document structure. Command to end a manpage/document. Anything
346 in the document coming after this command is in error.
347
348 method text
349 Text markup. The argument text is marked up as the name of an
350 object method, i.e. subcommand of a Tcl command. The text may
351 have other markup already applied to it. Main uses are the high‐
352 lighting of method names in free-form text, and for the command
353 parameters of the markup commands call and usage.
354
355 moddesc text
356 Document information. Header. Registers the plain text argument
357 as a short description of the module the manpage resides in.
358
359 namespace text
360 Text markup. The argument text is marked up as a namespace name.
361 The text may have other markup already applied to it. Main use
362 is the highlighting of namespace names in free-form text.
363
364 nl Deprecated. Text structure. See para for the canonical command
365 to insert paragraph breaks into the text.
366
367 opt text
368 Text markup. The argument text is marked up as optional. The
369 text may have other markup already applied to it. Main use is
370 the highlighting of optional arguments, see the command arg arg.
371
372 opt_def name ?arg?
373 Text structure. List element. Option list. Automatically closes
374 the previous list element. Specifies name and arguments of the
375 option described by the list element. It is expected that the
376 name is marked up using option.
377
378 option text
379 Text markup. The argument is marked up as option. The text may
380 have other markup already applied to it. Main use is the high‐
381 lighting of options, also known as command-switches, in either
382 free-form text, or the arguments of the call and usage commands.
383
384 package text
385 Text markup. The argument is marked up as the name of a package.
386 The text may have other markup already applied to it. Main use
387 is the highlighting of package names in free-form text.
388
389 para Text structure. This command breaks free-form text into para‐
390 graphs. Each command closes the paragraph coming before it and
391 starts a new paragraph for the text coming after it. Higher-
392 level forms of structure are sections and subsections.
393
394 rb Text. The command is replaced with a right bracket. Use in free-
395 form text. Required to avoid interpretation of a right bracket
396 as the end of a markup command.
397
398 require package ?version?
399 Document information. Header. This command registers its argu‐
400 ment package as the name of a package or application required by
401 the described package or application. A minimum version can be
402 provided as well. This argument can be marked up. The usual
403 markup is opt.
404
405 section name
406 Text structure. This command starts a new named document sec‐
407 tion. The argument has to be plain text. Implicitly closes the
408 last paragraph coming before it and also implicitly opens the
409 first paragraph of the new section.
410
411 sectref id ?text?
412 Text markup. Formats a reference to the section identified by
413 id. If no text is specified the title of the referenced section
414 is used in the output, otherwise text is used.
415
416 sectref-external text
417 Text markup. Like sectref, except that the section is assumed to
418 be in a different document and therefore doesn't need to be
419 identified, nor are any checks for existence made. Only the text
420 to format is needed.
421
422 see_also args
423 Document information. Anywhere. The command defines direct
424 cross-references to other documents. Each argument is a plain
425 text label identifying the referenced document. If this command
426 is used multiple times all the arguments accumulate.
427
428 strong text
429 Deprecated. Text markup. See emph for the canonical command to
430 emphasize text.
431
432 subsection name
433 Text structure. This command starts a new named subsection of a
434 section. The argument has to be plain text. Implicitly closes
435 the last paragraph coming before it and also implicitly opens
436 the first paragraph of the new subsection.
437
438 syscmd text
439 Text markup. The argument text is marked up as the name of an
440 external command. The text may have other markup already applied
441 to it. Main use is the highlighting of external commands in
442 free-form text.
443
444 term text
445 Text markup. The argument is marked up as unspecific terminol‐
446 ogy. The text may have other markup already applied to it. Main
447 use is the highlighting of important terms and concepts in free-
448 form text.
449
450 titledesc desc
451 Document information. Header. Optional. Registers the plain text
452 argument as the title of the manpage. Defaults to the value reg‐
453 istered by moddesc.
454
455 tkoption_def name dbname dbclass
456 Text structure. List element. Widget option list. Automatically
457 closes the previous list element. Specifies the name of the
458 option as used in scripts, the name used by the option database
459 (dbname), and its class (dbclass), i.e. its type. It is expected
460 that the name is marked up using option.
461
462 type text
463 Text markup. The argument is marked up as the name of a data
464 type. The text may have other markup already applied to it. Main
465 use is the highlighting of data types in free-form text.
466
467 uri text ?text?
468 Text markup. The argument is marked up as an uri (i.e. a uniform
469 resource identifier. The text may have other markup already
470 applied to it. Main use is the highlighting of uris in free-form
471 text. The second argument, should it be present, will be inter‐
472 preted the human-readable description of the uri. In other
473 words, as its label. Without an explicit label the uri will be
474 its own label.
475
476 usage args
477 Text markup. See call for the full description, this command is
478 syntactically identical, as it is in its expectations for the
479 markup of its arguments. In contrast to call it is however not
480 allowed to generate output where this command occurs in the
481 text. The command is silent. The formatted text may only appear
482 in a different section of the output, for example a table of
483 contents, or synopsis, depending on the output format.
484
485 var text
486 Text markup. The argument is marked up as the name of a vari‐
487 able. The text may have other markup already applied to it. Main
488 use is the highlighting of variables in free-form text.
489
490 vset varname value
491 Templating. In this form the command sets the named document
492 variable to the specified value. It does not generate output.
493 I.e. the command is replaced by the empty string.
494
495 vset varname
496 Templating. In this form the command is replaced by the value of
497 the named document variable
498
499 widget text
500 Text markup. The argument is marked up as the name of a widget.
501 The text may have other markup already applied to it. Main use
502 is the highlighting of widget names in free-form text.
503
505 This document, and the package it describes, will undoubtedly contain
506 bugs and other problems. Please report such in the category doctools
507 of the Tcllib SF Trackers [http://source‐
508 forge.net/tracker/?group_id=12883]. Please also report any ideas for
509 enhancements you may have for either package and/or documentation.
510
512 doctools_intro, doctools_lang_faq, doctools_lang_intro, doc‐
513 tools_lang_syntax
514
516 doctools commands, doctools language, doctools markup, markup, semantic
517 markup
518
520 Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>
521
522
523
524
525doctools 1.0 doctools_lang_cmdref(n)