Skip to content
Tcl Source Code Changes To Proposed changes to the Tcl/Tk manual pages
Login

Changes To Proposed changes to the Tcl/Tk manual pages

Changes to "Proposed changes to the Tcl/Tk manual pages" between 2026-11-14 11:59:06 and 2026-11-29 21:55:42

1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18




19

20
21
22
23

24
25

26
27
28
29
30
31
32
1
2
3
4
5
6
7
8

9
10
11

12
13
14
15
16
17
18
19
20
21

22
23
24
25

26
27

28
29
30
31
32
33
34
35








-



-
+





+
+
+
+
-
+



-
+

-
+







This page proposes some changes to the content of the Tcl (and Tk) manual pages, as follow-up to [TIP 700](wiki:branch/tip-700).

# General changes

## Overall structure/outline of manual pages

The sections (first level of the outline) of the manual pages should be the same in all cases and follow this order:

- Name
- Synopsis
- Description (subsections for each subcommand)
- ... (additional sections possible here for individual pages needing them)
- Examples (subsections for grouping examples, if needed)
- Examples (subsections for grouping examples, if needed; there should always be more than just one example)
- Portability issues (if applicable)
- History (this one could describe which parts of the command were introduced/changed in which version of Tcl)
- See also -> now in metadata, so can be placed dynamically depending on the output format
- Keywords -> now in metadata, so can be placed dynamically depending on the output format

Note, that there is no "Name" section anymore. The name is already in the document title (YAML frontmatter of the markdown pages). The text after the dash in the "Name" section can be used as a subtitle in YAML. For the C API pages, such as short descriptive subtitle is missing and should be written (and the current list of functions removed from the title). Title and subtitle can then be inserted into the rendered HTML or nroff in the best possible place.

The "Synopsis" section should have one line per possible syntax, alphabetically sorted. This way, when viewing the page as nroff format, users can have a kind of quick reference there.

The description section should contain one subsection for each subcommand. The title of such a subsection is the name of the command and the subcommand (e.g. "string match" or "tk busy") and the content of the section would give the exact detailed syntax, sometimes with more than one possibility.
The "Description" section should contain one subsection for each subcommand, alphabetically sorted. The title of such a subsection is the name of the command and the subcommand (e.g. "string match" or "tk busy") and the content of the section would give the exact detailed syntax, sometimes with more than one possibility.

## Example code

Each manual page should have at least one example for the basic usage of a command
Each manual page should have at least two examples for the basic usage of a command.

The code examples use different ways of showing resulting values (sometimes after the code line in italics, sometimes in a new line with an arrow in front). This should be unified and made visually pleasing.
Currently, the code examples use different ways of showing resulting values (sometimes after the code line in italics, sometimes in a new line with an arrow in front). This should be unified and made visually pleasing. It should be possible to open examples in CloudTK, so that you can click on a button in an example, then you get CloudTK and will see the example running. That reinforces that all examples need some unification as to how they represent their return values (see the wiki page again for the details).

## Representing optional arguments

Unify the way of representing optional repeating arguments; we have e.g.

- `foreach varlist1 list1 ?varlist2 list2 ...? body` (one instance of the repetitive option)
- `linsert list index ?element element ...?` (two instances)
︙