18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
2015-06-18 Donal K. Fellows posted on the core list the following text:
<h2>Editor</h2>
I use emacs but you can use anything you want I suppose. Probably best to not use MS Word; Notepad would be a better choice. :-)
99% of what you might ever want to do when just editing docs can be done without putting a lot of effort into rendering; that's what I usually do.
<h2>Special characters.</h2>
I have found that when trying to introduce some "fancy characters" (like å or ø) in the documentation the final html result fails to reproduce those correctly.
According to the groff_char man page (find the reference below) we see that:
<pre>
In the actual version, groff provides only 8-bit characters for
direct input and named entities for further glyphs. On ASCII
platforms, input character codes in the range 0 to 127 (decimal)
represent the usual 7-bit ASCII characters, while codes between 127
and 255 are interpreted as the corresponding characters in the latin1
(ISO-8859-1) code set by default.
</pre>
This means we can introduce some "fancy chars" like:
* å as \N'229'
* ø as \N'248'
<h2>Check formatting</h2>
I check the formatting with '<i>groff -Tutf8 -man</i>' and with '<i>make html</i>' (<i> make html-tcl HTML_INSTALL_DIR=~/test/html</i>) in the unix build tree (which doesn't use groff's -Thtml output mode because that sucks, or at least did a few years ago when I last had time to try it, and which requires an installed tclsh8.6).
There's a release of groff for cygwin apparently (according to Google) so it ought to be usable for you.
<h2>Tcl's groff subset</h2>
The main thing to beware of is that we actually use a small subset of the full power of groff, augmented with a few of our own macros (defined and "documented" in man.macros).
Please avoid using anything too exotic unless you update the HTML generator to support it.
Because of this, ‘make html’ is actually the check to use; it's pretty strict about diagnostics.
I don't bother with the winhelp converter these days; the HTML is better (as in “more recently maintained”) and everyone has a reader for the format it produces.
<hr />
Some additional resources:
* Mentioned file: [https://core.tcl.tk/tcl/artifact/0341d457d89f756d|man.macros]
* Groff help: [http://man7.org/linux/man-pages/man7/groff_man.7.html]
* Groff char help: [http://man7.org/linux/man-pages/man7/groff_char.7.html]
* A Groff manual: [http://www.premvet.co.uk/premvet/faq/roff.html]
File structure:
* Commands like .xx always at the beginning of a line.
* Comands like \xx may be within the text.
Some used markup:
|