1GROFF_WWW(7) Miscellaneous Information Manual GROFF_WWW(7)
2
3
4
5
6
8 groff_www - groff macros for authoring web pages
9
10
12 groff -mwww [ options ] file ...
13
15 This manual page describes the GNU -mwww macro package, which is part
16 of the groff document formatting system. The manual page is very a
17 basic guide, and the html device driver (grohtml) has been completely
18 rewritten but still remains as in an alpha state. It has been included
19 into the distribution so that a lot of people have a chance to test it.
20 Note that this macro file will be automatically called (via the troffrc
21 file) if you use -Thtml.
22
23 To see the hyperlinks in action, please format this man page with the
24 grohtml device.
25
26 Here is a summary of the functions found in this macro set.
27 .HX automatic heading level cut off;
28 $1 point for sections/headers
29 .BCL specify colours on a web page
30 .BGIMG specify background image
31 .URL create a url using two parameters
32 .FTP create an ftp reference
33 .MTO create a html email address
34 .FTP create an ftp reference
35 .TAG generate an html name
36 .IMG include an image file
37 .PIMG include png image
38 .MPIMG place png on the margin and
39 wrap text around it
40 .HnS begin heading
41 .HnE end heading
42 .LK emit automatically collected links.
43 .HR produce a horizontal rule
44 .NHR suppress automatic generation of rules.
45 .HTL only generate HTML title
46 .ULS unorder list begin
47 .ULE unorder list end
48 .LI insert a list item
49 .DC generate a drop capital
50 .HTML pass an html raw request to the
51 device driver
52
53 Output of the pic, eqn, refer, and tbl preprocessors is acceptable as
54 input.
55
57 HX Specify the cut off depth when generating links from section
58 headings. For example, a parameter of 2 would cause grohtml to
59 generate a list of links for .NH 1 and .NH 2 but not for .NH 3.
60 Whereas
61
62 .HX 0
63
64 will tell grohtml that no heading links should be created at
65 all. Another method for turning automatic headings off is by
66 issuing the the command line switch -P-l to groff.
67
68 BCL This macro takes five parameters: foreground, background, active
69 hypertext link, hypertext link not yet visited, and visited
70 hypertext link colour.
71
72 BGIMG the only parameter to this macro is the background image file.
73
74 URL generates a URL using either two or three arguments. The first
75 parameter is the actual URL, the second is the name of the link,
76 and the third is optional stuff to be printed immediately after‐
77 wards. Hyphenation is disabled while printing the actual URL;
78 explicit breakpoints should be inserted with the \: escape.
79 Here is how to encode foo ⟨http://foo.org/⟩:
80
81 .URL http://\:foo.\:org/ foo :
82
83 If this is processed by a device other than -Thtml it appears
84 as:
85
86 foo ⟨http://foo.org⟩:
87
88 The URL macro can be of any type; for example we can reference
89 Eric Raymond's pic guide ⟨pic.html⟩ by:
90
91 .URL pic.html "Eric Raymond's pic guide"
92
93 MTO Generate an email html reference. The first argument is manda‐
94 tory as the email address. The optional second argument is the
95 text you see in your browser, and an optional third argument is
96 stuff printed immediately afterwards. Hyphenation is disabled
97 while printing the actual email address. For example, Joe User
98 ⟨joe@user.org⟩ was achieved by the following macro:
99
100 .MTO joe@user.org "Joe User"
101
102 Note that all the URLs actually are treated as consuming no tex‐
103 tual space in groff. This could be considered as a bug since it
104 causes some problems. To circumvent this, www.tmac inserts a
105 zero-width character which expands to a harmless space (only if
106 run with -Thtml).
107
108 FTP indicates that data can be obtained via ftp. The first argument
109 is the url and the second is the browser text. A third argu‐
110 ment, similar to the macros above, is intended for stuff printed
111 immediately afterwards. The second and the third parameter are
112 optional. Hyphenation is disabled while printing the actual
113 URL. As an example, here the location of the GNU ftp server
114 ⟨ftp://ftp.gnu.org/⟩. The macro example above was specified by:
115
116 .FTP ftp://\:ftp.gnu.org/ "GNU ftp server" .
117
118 TAG Generates an html name tag from its argument. This can then be
119 referenced using the URL ⟨0⟩ macro. As you can see, you must
120 precede the tag name with # since it is a local reference. This
121 link was achieved via placing a TAG in the URL description
122 above; the source looks like this:
123
124 .TP
125 .B URL
126 generates
127 .TAG URL
128 a URL using either two or three arguments.
129 ...
130
131 IMG Include a picture into the document. The first argument is the
132 horizontal location: right, left, or center (-R, -L, or -C).
133 The second argument is the filename. The optional third and
134 fourth arguments are the width and height. If the width is
135 absent it defaults to 1 inch. If the height is absent it
136 defaults to the width. This maps onto an html img tag. If you
137 are including a png image then it is advisable to use the PIMG
138 macro.
139
140 PIMG Include an image in PNG format. This macro takes exactly the
141 same parameters as the IMG macro; it has the advantage of work‐
142 ing with postscript and html devices also since it can automati‐
143 cally convert the image into the EPS format, using the following
144 programs of the netpbm package: pngtopnm, pnmcrop, and pnmtops.
145 If the document isn't processed with -Thtml it is necessary to
146 use the -U option of groff.
147
148 MPIMG Place a PNG image on the margin and wrap text around it. The
149 first parameter is the alignment: left or right (-L or -R). The
150 second argument is the filename. The optional third and fourth
151 arguments are the width and height. If the width is absent it
152 defaults to 1 inch. If the height is absent it defaults to the
153 width.
154
155 HnS Begin heading. The heading level is specified by the first
156 parameter. Use this macro of your headings contain URLs. Exam‐
157 ple:
158
159 .HnS 1
160 .HR
161 GNU Troff
162 .URL http://groff.ffii.org (Groff)
163 — a
164 .URL http://www.gnu.org/ GNU
165 project.
166 Hosted by
167 .URL http://ffii.org/ FFII .
168 .HR
169 .HnE
170
171 HnE End heading.
172
173 LK Force grohtml to place the automatically generated links at this
174 position. If this manual page has been processed with -Thtml
175 those links can be seen right here.
176
178 By default grohtml generates links to all section headings and places
179 these at the top of the html document. (See LINKS ⟨0⟩ for details of
180 how to switch this off or alter the position).
181
182 HR Generate a full-width horizontal rule.
183
184 NHR Suppress generation of the top and bottom rules which grohtml
185 emits by default.
186
187 HTL Generate an HTML title only. This differs from the TL macro of
188 the ms macro package which generates both an HTML title and an
189 H1 heading. Use it to provide an HTML title as search engine
190 fodder but a graphic title in the document.
191
192 HTML All text after this macro is treated as raw html. If the docu‐
193 ment is processed without -Thtml then the macro is ignored.
194 Internally, this macro is used as a building block for other
195 higher-level macros.
196
197 For example, the BGIMG macro is defined as
198
199 .de BGIMG
200 . HTML <body background=\$1>
201 ..
202
203 DC Produce a drop capital. The first parameter is the letter to be
204 dropped and enlarged, the second parameter is the ajoining text
205 whose height the first letter should not exceed. The optional
206 third parameter is the color of the dropped letter.
207
209 tbl information is currently rendered as a PNG image.
210
212 /usr/share/groff/1.18.1.4/tmac/www.tmac
213
215 groff(1), troff(1) grohtml(1), netpbm(1)
216
218 grohtml was written by Gaius Mulley ⟨gaius@glam.ac.uk⟩
219
221 Report bugs to the Groff Bug Mailing List ⟨bug-groff@gnu.org⟩. Include
222 a complete, self-contained example that will allow the bug to be repro‐
223 duced, and say which version of groff you are using.
224
225
226
227Groff Version 1.18.1.4 15 April 2002 GROFF_WWW(7)