]> www.wagner.pp.ru Git - oss/ck.git/blob - doc/man.macros
Ck console graphics toolkit
[oss/ck.git] / doc / man.macros
1 '\" The definitions below are for supplemental macros used in Tcl/Tk
2 '\" manual entries.
3 '\"
4 '\" .AP type name in/out [indent]
5 '\"     Start paragraph describing an argument to a library procedure.
6 '\"     type is type of argument (int, etc.), in/out is either "in", "out",
7 '\"     or "in/out" to describe whether procedure reads or modifies arg,
8 '\"     and indent is equivalent to second arg of .IP (shouldn't ever be
9 '\"     needed;  use .AS below instead)
10 '\"
11 '\" .AS [type [name]]
12 '\"     Give maximum sizes of arguments for setting tab stops.  Type and
13 '\"     name are examples of largest possible arguments that will be passed
14 '\"     to .AP later.  If args are omitted, default tab stops are used.
15 '\"
16 '\" .BS
17 '\"     Start box enclosure.  From here until next .BE, everything will be
18 '\"     enclosed in one large box.
19 '\"
20 '\" .BE
21 '\"     End of box enclosure.
22 '\"
23 '\" .VS
24 '\"     Begin vertical sidebar, for use in marking newly-changed parts
25 '\"     of man pages.
26 '\"
27 '\" .VE
28 '\"     End of vertical sidebar.
29 '\"
30 '\" .DS
31 '\"     Begin an indented unfilled display.
32 '\"
33 '\" .DE
34 '\"     End of indented unfilled display.
35 '\"
36 '\" @(#) man.macros 1.3 95/05/06 15:19:04
37 '\"
38 '\"     # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
39 .if t .wh -1.3i ^B
40 .nr ^l \n(.l
41 .ad b
42 '\"     # Start an argument description
43 .de AP
44 .ie !"\\$4"" .TP \\$4
45 .el \{\
46 .   ie !"\\$2"" .TP \\n()Cu
47 .   el          .TP 15
48 .\}
49 .ie !"\\$3"" \{\
50 .ta \\n()Au \\n()Bu
51 \&\\$1  \\fI\\$2\\fP    (\\$3)
52 .\".b
53 .\}
54 .el \{\
55 .br
56 .ie !"\\$2"" \{\
57 \&\\$1  \\fI\\$2\\fP
58 .\}
59 .el \{\
60 \&\\fI\\$1\\fP
61 .\}
62 .\}
63 ..
64 '\"     # define tabbing values for .AP
65 .de AS
66 .nr )A 10n
67 .if !"\\$1"" .nr )A \\w'\\$1'u+3n
68 .nr )B \\n()Au+15n
69 .\"
70 .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
71 .nr )C \\n()Bu+\\w'(in/out)'u+2n
72 ..
73 '\"     # BS - start boxed text
74 '\"     # ^y = starting y location
75 '\"     # ^b = 1
76 .de BS
77 .br
78 .mk ^y
79 .nr ^b 1u
80 .if n .nf
81 .if n .ti 0
82 .if n \l'\\n(.lu\(ul'
83 .if n .fi
84 ..
85 '\"     # BE - end boxed text (draw box now)
86 .de BE
87 .nf
88 .ti 0
89 .mk ^t
90 .ie n \l'\\n(^lu\(ul'
91 .el \{\
92 .\"     Draw four-sided box normally, but don't draw top of
93 .\"     box if the box started on an earlier page.
94 .ie !\\n(^b-1 \{\
95 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
96 .\}
97 .el \}\
98 \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
99 .\}
100 .\}
101 .fi
102 .br
103 .nr ^b 0
104 ..
105 '\"     # VS - start vertical sidebar
106 '\"     # ^Y = starting y location
107 '\"     # ^v = 1 (for troff;  for nroff this doesn't matter)
108 .de VS
109 .mk ^Y
110 .ie n 'mc \s12\(br\s0
111 .el .nr ^v 1u
112 ..
113 '\"     # VE - end of vertical sidebar
114 .de VE
115 .ie n 'mc
116 .el \{\
117 .ev 2
118 .nf
119 .ti 0
120 .mk ^t
121 \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
122 .sp -1
123 .fi
124 .ev
125 .\}
126 .nr ^v 0
127 ..
128 '\"     # Special macro to handle page bottom:  finish off current
129 '\"     # box/sidebar if in box/sidebar mode, then invoked standard
130 '\"     # page bottom macro.
131 .de ^B
132 .ev 2
133 'ti 0
134 'nf
135 .mk ^t
136 .if \\n(^b \{\
137 .\"     Draw three-sided box if this is the box's first page,
138 .\"     draw two sides but no top otherwise.
139 .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
140 .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
141 .\}
142 .if \\n(^v \{\
143 .nr ^x \\n(^tu+1v-\\n(^Yu
144 \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
145 .\}
146 .bp
147 'fi
148 .ev
149 .if \\n(^b \{\
150 .mk ^y
151 .nr ^b 2
152 .\}
153 .if \\n(^v \{\
154 .mk ^Y
155 .\}
156 ..
157 '\"     # DS - begin display
158 .de DS
159 .RS
160 .nf
161 .sp
162 ..
163 '\"     # DE - end display
164 .de DE
165 .fi
166 .RE
167 .sp
168 ..