home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / doc / man.macros < prev    next >
Text File  |  1993-06-07  |  4KB  |  183 lines

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