1# -*- tcl -*- 2# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net> 3 4# Support package. Container for the man.macros needed by the nroff 5# export plugins when instructed to inline the commands the 6# documentation is using. 7 8# # ## ### ##### ######## ############# ##################### 9## Requirements 10 11package require Tcl 8.4 ; # Required Core 12 13namespace eval ::doctools::nroff::man_macros { 14 # Contents of the file we carry 15 variable c {} 16} 17 18proc ::doctools::nroff::man_macros::contents {} { 19 variable c 20 return $c 21} 22 23set ::doctools::nroff::man_macros::c {'\" The definitions below are for supplemental macros used in Tcl/Tk 24'\" manual entries. 25'\" 26'\" .AP type name in/out ?indent? 27'\" Start paragraph describing an argument to a library procedure. 28'\" type is type of argument (int, etc.), in/out is either "in", "out", 29'\" or "in/out" to describe whether procedure reads or modifies arg, 30'\" and indent is equivalent to second arg of .IP (shouldn't ever be 31'\" needed; use .AS below instead) 32'\" 33'\" .AS ?type? ?name? 34'\" Give maximum sizes of arguments for setting tab stops. Type and 35'\" name are examples of largest possible arguments that will be passed 36'\" to .AP later. If args are omitted, default tab stops are used. 37'\" 38'\" .BS 39'\" Start box enclosure. From here until next .BE, everything will be 40'\" enclosed in one large box. 41'\" 42'\" .BE 43'\" End of box enclosure. 44'\" 45'\" .CS 46'\" Begin code excerpt. 47'\" 48'\" .CE 49'\" End code excerpt. 50'\" 51'\" .VS ?version? ?br? 52'\" Begin vertical sidebar, for use in marking newly-changed parts 53'\" of man pages. The first argument is ignored and used for recording 54'\" the version when the .VS was added, so that the sidebars can be 55'\" found and removed when they reach a certain age. If another argument 56'\" is present, then a line break is forced before starting the sidebar. 57'\" 58'\" .VE 59'\" End of vertical sidebar. 60'\" 61'\" .DS 62'\" Begin an indented unfilled display. 63'\" 64'\" .DE 65'\" End of indented unfilled display. 66'\" 67'\" .SO 68'\" Start of list of standard options for a Tk widget. The 69'\" options follow on successive lines, in four columns separated 70'\" by tabs. 71'\" 72'\" .SE 73'\" End of list of standard options for a Tk widget. 74'\" 75'\" .OP cmdName dbName dbClass 76'\" Start of description of a specific option. cmdName gives the 77'\" option's name as specified in the class command, dbName gives 78'\" the option's name in the option database, and dbClass gives 79'\" the option's class in the option database. 80'\" 81'\" .UL arg1 arg2 82'\" Print arg1 underlined, then print arg2 normally. 83'\" 84'\" RCS: @(#) $Id: nroff_manmacros.tcl,v 1.2 2009/04/29 02:09:46 andreas_kupries Exp $ 85'\" 86'\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. 87.if t .wh -1.3i ^B 88.nr ^l \n(.l 89.ad b 90'\" # Start an argument description 91.de AP 92.ie !"\\$4"" .TP \\$4 93.el \{\ 94. ie !"\\$2"" .TP \\n()Cu 95. el .TP 15 96.\} 97.ta \\n()Au \\n()Bu 98.ie !"\\$3"" \{\ 99\&\\$1 \\fI\\$2\\fP (\\$3) 100.\".b 101.\} 102.el \{\ 103.br 104.ie !"\\$2"" \{\ 105\&\\$1 \\fI\\$2\\fP 106.\} 107.el \{\ 108\&\\fI\\$1\\fP 109.\} 110.\} 111.. 112'\" # define tabbing values for .AP 113.de AS 114.nr )A 10n 115.if !"\\$1"" .nr )A \\w'\\$1'u+3n 116.nr )B \\n()Au+15n 117.\" 118.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n 119.nr )C \\n()Bu+\\w'(in/out)'u+2n 120.. 121.AS Tcl_Interp Tcl_CreateInterp in/out 122'\" # BS - start boxed text 123'\" # ^y = starting y location 124'\" # ^b = 1 125.de BS 126.br 127.mk ^y 128.nr ^b 1u 129.if n .nf 130.if n .ti 0 131.if n \l'\\n(.lu\(ul' 132.if n .fi 133.. 134'\" # BE - end boxed text (draw box now) 135.de BE 136.nf 137.ti 0 138.mk ^t 139.ie n \l'\\n(^lu\(ul' 140.el \{\ 141.\" Draw four-sided box normally, but don't draw top of 142.\" box if the box started on an earlier page. 143.ie !\\n(^b-1 \{\ 144\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' 145.\} 146.el \}\ 147\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' 148.\} 149.\} 150.fi 151.br 152.nr ^b 0 153.. 154'\" # VS - start vertical sidebar 155'\" # ^Y = starting y location 156'\" # ^v = 1 (for troff; for nroff this doesn't matter) 157.de VS 158.if !"\\$2"" .br 159.mk ^Y 160.ie n 'mc \s12\(br\s0 161.el .nr ^v 1u 162.. 163'\" # VE - end of vertical sidebar 164.de VE 165.ie n 'mc 166.el \{\ 167.ev 2 168.nf 169.ti 0 170.mk ^t 171\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' 172.sp -1 173.fi 174.ev 175.\} 176.nr ^v 0 177.. 178'\" # Special macro to handle page bottom: finish off current 179'\" # box/sidebar if in box/sidebar mode, then invoked standard 180'\" # page bottom macro. 181.de ^B 182.ev 2 183'ti 0 184'nf 185.mk ^t 186.if \\n(^b \{\ 187.\" Draw three-sided box if this is the box's first page, 188.\" draw two sides but no top otherwise. 189.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 190.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c 191.\} 192.if \\n(^v \{\ 193.nr ^x \\n(^tu+1v-\\n(^Yu 194\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c 195.\} 196.bp 197'fi 198.ev 199.if \\n(^b \{\ 200.mk ^y 201.nr ^b 2 202.\} 203.if \\n(^v \{\ 204.mk ^Y 205.\} 206.. 207'\" # DS - begin display 208.de DS 209.RS 210.nf 211.sp 212.. 213'\" # DE - end display 214.de DE 215.fi 216.RE 217.sp 218.. 219'\" # SO - start of list of standard options 220.de SO 221.SH "STANDARD OPTIONS" 222.LP 223.nf 224.ta 4c 8c 12c 225.ft B 226.. 227'\" # SE - end of list of standard options 228.de SE 229.fi 230.ft R 231.LP 232See the \\fBoptions\\fR manual entry for details on the standard options. 233.. 234'\" # OP - start of full description for a single option 235.de OP 236.LP 237.nf 238.ta 4c 239Command-Line Name: \\fB\\$1\\fR 240Database Name: \\fB\\$2\\fR 241Database Class: \\fB\\$3\\fR 242.fi 243.IP 244.. 245'\" # CS - begin code excerpt 246.de CS 247.RS 248.nf 249.ta .25i .5i .75i 1i 250.. 251'\" # CE - end code excerpt 252.de CE 253.fi 254.RE 255.. 256.de UL 257\\$1\l'|0\(ul'\\$2 258..} 259 260package provide doctools::nroff::man_macros 0.1 261return 262