blob: 0bef6b6007fb5744ede748a9aad161727dd2fadc (
plain)
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
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
.\" www.tmac
.\"
.\" A simple set of macros to provide HTML documents with basic
.\" www functionality. It will work with any macro set.
.\"
.nr _C \n(.C
.cp 0
.nr www-html 0
.if '\*(.T'html' .nr www-html 1
.\"
.\"
.\"
.de HTML
. if \\n[www-html] \{\
.\" the following line makes the vertical mode leave, so to say
\&
\X^html:\\$*^
. \}
..
.de HTMLINDEX
. if \\n[www-html] \X^index:\\$*^
..
.\"
.\" BODYCOLOR - $1 is foreground color
.\" $2 is background color
.\" $3 is the color of an active hypertext link
.\" $4 is the color of a hypertext link not yet visited
.\" $5 is the color of a visited hypertext link
.\"
.de BODYCOLOR
. HTML <body text=\\$1 bgcolor=\\$2 link=\\$3 alink=\\$4 vlink=\\$5>
..
.\"
.\" BACKGROUND - $1 is the background image file
.\"
.de BACKGROUND
. HTML <body background=\\$1>
..
.\"
.\" URL - $1 is the classical underlined blue text
.\" $2 is the url
.\" $3 is optional stuff printed immediately after $3
.\"
.de URL
. ie \\n[www-html] \{\
. HTML <a href="\\$2">\\$1</a>\\$3
. \}
. el \{\
\\$1 \%\(la\fC\\$2\fP\(ra\\$3
. \}
..
.\"
.\" FTP - $1 is the classical underlined blue text
.\" $2 is the ftp url
.\" $3 is optional stuff printed immediately after $2
.de FTP
. ie \\n[www-html] \{\
. HTML <a href=\\$2>\\$1</a>\\$3
. \}
. el \{\
\\$1 \%\(la\fC\\$2\fP\(ra\\$3
. \}
..
.\"
.\" MAILTO - generate html email reference
.\" $1 is the email address (without the `mailto:' prefix)
.\" $2 is the optional name
.\" $3 is optional stuff printed immediately after $2 (resp. $1)
.\"
.\" example:
.\"
.\" Foobar has been written by
.\" .MAILTO fred@foo.bar "Fredrick Bloggs" .
.\"
.de MAILTO
.\"
.\" force reset after a potential heading by performing some motion..
.\" how do we do this --fixme--
.\" \h'\w' ''\h'-\w' '' doesn't work..
. ie \\n[www-html] \{\
. ie '\\$2'' \{\
. HTML "<a href=mailto:\\$1>\\$1</a>\\$3"
. \}
. el \{\
. HTML "<a href=mailto:\\$1>\\$2</a>\\$3"
. \}
. \}
. el \{\
. ie '\\$2'' \{\
\fC\\$1\fP\\$3
. \}
. el \{\
\\$2 \%\(la\fC\\$1\fP\(ra\\$3
. \}
. \}
..
.\"
.\" TAG - generate an html name $1
.\"
.de TAG
. HTML <a name="\\$1"></a>
..
.\"
.\" IMAGE - reference an image
.\" $1 is the image file
.\" $2 is the alignment r, l or c (center by default)
.\" $3 is the x width (default if absent 400 pixels)
.\" $4 is the y width (default if absent is the x value)
.\"
.de IMAGE
. ie \\n[www-html] \{\
. ie '\\$2'r' .HTML-TAG ".right-image"
. el \{\
. ie '\\$2'l' .HTML-TAG ".left-image"
. el .HTML-TAG ".centered-image"
. \}
. nr HTMLWIDTH 400
. if !'\\$3'' \{\
. nr HTMLWIDTH \\$3
. \}
. nr HTMLHEIGHT \\n[HTMLWIDTH]
. if !'\\$4'' \{\
. nr HTMLHEIGHT \\$4
. \}
. HTML <img src="\\$1" width=\\n[HTMLWIDTH] height=\\n[HTMLHEIGHT]>
. \}
. el \{\
. B1
\(la\fC\\$1\fP\(ra
. B2
. \}
..
.\" HTML-TAG - emit a tag for the new grohtml
.de HTML-TAG
. if \\n[www-html] \{\
.\" the following line makes the vertical mode leave, so to say
\&
\X^html-tag:\\$*^
. \}
..
.\" LINKS - emit the automatically collected links derived from section/numbered
.\" headings at this position.
.de LINKS
. HTML-TAG ".links"
..
.\"
.\" LINE - produce a horizontal line
.\"
.de LINE
. ti 0
. HTML <hr>
..
.\"
.\" supplimentary macros used by other macro sets
.\"
.\" here are some tags specially for -Tps or -Thtml when invoked by pre-html
.\" to generate png images from postscript.
.\"
.\" HTML-DO-IMAGE - tells troff to issue an image marker which can be
.\" read back by pre-html
.\"
.de HTML-DO-IMAGE
. if r ps4html .begin \{\
. image \\$2 \\$1.png
. bp
. tl ''''
\O[0]\O[1]
. \}
. if \\n[www-html] .begin \{\
. image \\$2 \\$1.png
\O[0]
. \}
..
.\"
.\" HTML-IMAGE-END - terminates an image for html
.\"
.de HTML-IMAGE-END
. if r ps4html \O[2]\O[1]\O[4]
. if \\n[www-html] \O[2]\O[1]\O[4]
..
.nr png-no 0
.\"
.\" MAKE-UNIQUE-NAME - generates another unique name
.\"
.de MAKE-UNIQUE-NAME
. nr png-no \\n[png-no]+1
. ds HTML-UNIQUE-NAME \\n(.F-auto-\\n[png-no]
..
.\"
.\" HTML-IMAGE - is the same name as a tag generated from eqn/tbl/pic.
.\" Although the tags generated via the preprocessor
.\" are given image names by pre-html and troff.
.\" The macros below can only be invoked by *other macro sets*
.\" not user troff input since the contents of macro sets are
.\" not seen by pre-html.
.\"
.de HTML-IMAGE
.\" generates a centered image
. MAKE-UNIQUE-NAME
. HTML-DO-IMAGE \\*[HTML-UNIQUE-NAME] c
..
.de HTML-IMAGE-RIGHT
. MAKE-UNIQUE-NAME
. HTML-DO-IMAGE \\*[HTML-UNIQUE-NAME] r
..
.de HTML-IMAGE-LEFT
. MAKE-UNIQUE-NAME
. HTML-DO-IMAGE \\*[HTML-UNIQUE-NAME] l
..
.de HTML-IMAGE-INLINE
. MAKE-UNIQUE-NAME
. HTML-DO-IMAGE \\*[HTML-UNIQUE-NAME] i
..
.if \n[www-html] \{\
. nh
. nr HY 0
.\}
.cp \n(_C
|