1docidx_lang_intro(n)          Documentation tools         docidx_lang_intro(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       docidx_lang_intro - docidx language introduction
9

DESCRIPTION

11       This  document  is  an informal introduction to version 1 of the docidx
12       markup language based on a multitude of examples. After reading this  a
13       writer should be ready to understand the two parts of the formal speci‐
14       fication, i.e. the docidx language syntax specification and the  docidx
15       language command reference.
16
17   FUNDAMENTALS
18       While  the  docidx  markup  language  is  quite similar to the doctools
19       markup language, in the broadest terms possible, there is one key  dif‐
20       ference. An index consists essentially only of markup commands, with no
21       plain text interspersed between them, except for whitespace.
22
23       Each markup command is a Tcl command surrounded by a matching pair of [
24       and  ].  Inside  of  these delimiters the usual rules for a Tcl command
25       apply with regard to  word  quotation,  nested  commands,  continuation
26       lines, etc. I.e.
27
28           ... [key {markup language}] ...
29
30
31         ... [manpage thefile \\
32                 {file description}] ...
33
34
35   BASIC STRUCTURE
36       The most simple document which can be written in docidx is
37
38           [index_begin GROUPTITLE TITLE]
39           [index_end]
40
41
42       Not  very  useful,  but valid. This also shows us that all docidx docu‐
43       ments consist of only one part where we will list alll keys  and  their
44       references.
45
46       A  more  useful  index will contain at least keywords, or short 'keys',
47       i.e. the phrases which were indexed. So:
48
49       [index_begin GROUPTITLE TITLE]
50       [key markup]
51       [key {semantic markup}]]
52       [key {docidx markup}]
53       [key {docidx language}]
54       [key {docidx commands}]
55       [index_end]
56
57
58       In the above example the command key is used  to  declare  the  keyword
59       phrases we wish to be part of the index.
60
61       However  a  truly  useful index does not only list the keyword phrases,
62       but will also contain references to documents associated with the  key‐
63       words.  Here  is  a  made-up  index  for all the manpages in the module
64       base64:
65
66       [index_begin tcllib/base64 {De- & Encoding}]
67       [key base64]
68       [manpage base64]
69       [key encoding]
70       [manpage base64]
71       [manpage uuencode]
72       [manpage yencode]
73       [key uuencode]
74       [manpage uuencode]
75       [key yEnc]
76       [manpage yencode]
77       [key ydecode]
78       [manpage yencode]
79       [key yencode]
80       [manpage yencode]
81       [index_end]
82
83
84       In the above example the command manpage is used inserts references  to
85       documents,  using  symbolic  file names, with each command belonging to
86       the last key command coming before it.
87
88       The other command to insert references is url. In contrast  to  manpage
89       it  uses explicit (possibly format-specific) urls to describe the loca‐
90       tion of the referenced document. As such this command is  intended  for
91       the  creation  of  references  to external documents which could not be
92       handled in any other way.
93
94   ADVANCED STRUCTURE
95       In all previous examples we fudged a bit regarding the markup  actually
96       allowed to be used before the index_begin command opening the document.
97
98       Instead of only whitespace the two templating commands include and vset
99       are also allowed, to enable the writer to either set and/or import con‐
100       figuration  settings relevant to the table of contents. I.e. it is pos‐
101       sible to write
102
103       [include FILE]
104       [vset VAR VALUE]
105       [index_begin GROUPTITLE TITLE]
106       [index_end]
107
108       Even more important, these two commands are allowed  anywhere  where  a
109       markup command is allowed, without regard for any other structure.
110
111       [index_begin GROUPTITLE TITLE]
112       [include FILE]
113       [vset VAR VALUE]
114       [index_end]
115
116       The  only  restriction  include has to obey is that the contents of the
117       included file must be valid at the place of the inclusion. I.e. a  file
118       included  before  index_begin  may contain only the templating commands
119       vset and include, a file included after a key may contain  only  manape
120       or url references, and other keys, etc.
121
122   ESCAPES
123       Beyond the 6 commands shown so far we have two more available.  However
124       their function is not the marking up of index structure, but the inser‐
125       tion  of characters, namely [ and ].  These commands, lb and rb respec‐
126       tively, are required because our use of [ and ] to bracket markup  com‐
127       mands makes it impossible to directly use [ and ] within the text.
128
129       Our  example  of  their use are the sources of the last sentence in the
130       previous paragraph, with some highlighting added.
131
132         ...
133         These commands, [cmd lb] and [cmd lb] respectively, are required
134         because our use of [lb] and [rb] to bracket markup commands makes it
135         impossible to directly use [lb] and [rb] within the text.
136         ...
137
138

FURTHER READING

140       Now that this document has been digested the reader, assumed  to  be  a
141       writer of documentation should be fortified enough to be able to under‐
142       stand the formal docidx language syntax  specification  as  well.  From
143       here  on  out  the docidx language command reference will also serve as
144       the detailed specification and cheat sheet for all  available  commands
145       and their syntax.
146
147       To  be  able to validate a document while writing it, it is also recom‐
148       mended to familiarize oneself with Tclapps' ultra-configurable dtp.
149
150       On the other hand, docidx is perfectly suited for the automatic genera‐
151       tion  from  doctools documents, and this is the route Tcllib's easy and
152       simple dtplite goes, creating an index for a set  of  documents  behind
153       the scenes, without the writer having to do so on their own.
154

BUGS, IDEAS, FEEDBACK

156       This  document,  will  undoubtedly  contain  bugs  and  other problems.
157       Please report such in the category doctools of the Tcllib  SF  Trackers
158       [http://sourceforge.net/tracker/?group_id=12883].   Please  also report
159       any ideas for enhancements you may have.
160

SEE ALSO

162       docidx_intro, docidx_lang_cmdref, docidx_lang_syntax
163

KEYWORDS

165       docidx commands, docidx language, docidx markup, docidx syntax, markup,
166       semantic markup
167
169       Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>
170
171
172
173
174doctools                              1.0                 docidx_lang_intro(n)
Impressum