1 .TH GROFF_WWW @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
2 .\" Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009
3 .\" Free Software Foundation, Inc.
4 .\" Written by Gaius Mulley (gaius@glam.ac.uk)
6 .\" This file is part of groff.
8 .\" groff is free software; you can redistribute it and/or modify it under
9 .\" the terms of the GNU General Public License as published by the Free
10 .\" Software Foundation, either version 3 of the License, or
11 .\" (at your option) any later version.
13 .\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
14 .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 .\" You should have received a copy of the GNU General Public License
19 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
21 .\" user level guide to using the -mwww macroset
24 .do nr groff_www_C \n[.C]
29 .\" we need the .LK here as we use it in the middle as an example --
30 .\" once the user requests .LK then the automatic generation of links
31 .\" at the top of the document is suppressed.
36 groff_www \- groff macros for authoring web pages
47 This manual page describes the GNU \-mwww macro package, which is part of
48 the groff document formatting system.
49 The manual page is very a basic guide, and the html device driver
51 has been completely rewritten but still remains as in an alpha state.
52 It has been included into the distribution so that a lot of people have a
54 Note that this macro file is automatically called (via the
61 To see the hyperlinks in action, please format this man page with the
65 Here is a summary of the functions found in this macro set.
69 \&.JOBNAME@split output into multiple files
70 \&.HX@automatic heading level cut off
71 \&.BCL@specify colours on a web page
72 \&.BGIMG@specify background image
73 \&.URL@create a url using two parameters
74 \&.FTP@create an ftp reference
75 \&.MTO@create a html email address
76 \&.FTP@create an ftp reference
77 \&.TAG@generate an html name
78 \&.IMG@include an image file
79 \&.PIMG@include png image
80 \&.MPIMG@place png on the margin and wrap text around it
83 \&.LK@emit automatically collected links.
84 \&.HR@produce a horizontal rule
85 \&.NHR@suppress automatic generation of rules.
86 \&.HTL@only generate HTML title
87 \&.HEAD@add data to <head> block
88 \&.ULS@unorder list begin
89 \&.ULE@unorder list end
90 \&.OLS@ordered list begin
91 \&.OLE@ordered list end
92 \&.DLS@definition list begin
93 \&.DLE@definition list end
94 \&.LI@insert a list item
95 \&.DC@generate a drop capital
96 \&.HTML@pass an html raw request to the device driver
97 \&.CDS@code example begin
98 \&.CDE@code example end
99 \&.ALN@place links on left of main text.
100 \&.LNS@start a new two-column table with links in the left.
101 \&.LNE@end the two-column table.
102 \&.LINKSTYLE@initialize default url attributes.
111 preprocessors is acceptable as input.
117 Split output into multiple HTML files.
118 A file is split whenever a .SH or .NH\ 1 is encountered.
119 Its argument is the file stem name for future output files.
120 This option is equivalent to
126 Specify the cut off depth when generating links from section headings.
127 For example, a parameter of\~2 would cause
129 to generate a list of links for
145 that no heading links should be created at all.
146 Another method for turning automatic headings off is by issuing the
147 the command line switch
153 .B .BCL foreground background active not-visited visited
154 This macro takes five parameters: foreground, background, active hypertext
155 link, hypertext link not yet visited, and visited hypertext link colour.
159 the only parameter to this macro is the background image file.
162 .B .URL url [description] [after]
165 a URL using either one, two or three arguments.
166 The first parameter is the actual URL, the second is the name of the link,
167 and the third is optional stuff to be printed immediately afterwards.
174 becomes the anchor text.
175 Hyphenation is disabled while printing the actual URL;
177 should be inserted with the
180 Here is how to encode
181 .URL http://\:foo.\:org/ "foo" :
184 .B .URL http://\[rs]:foo.\[rs]:org/ "foo" :
187 If this is processed by a device other than
194 foo \[la]\f[C]http://foo.org\f[]\[ra]:
197 The URL macro can be of any type; for example we can reference
198 .URL pic.html "Eric Raymond's pic guide"
202 .B .URL pic.html \[dq]Eric Raymond's pic guide\[dq]
206 .B .MTO address [description] [after]
207 Generate an email html reference.
208 The first argument is mandatory as the email address.
209 The optional second argument is the text you see in your browser
210 If an empty argument is given,
213 An optional third argument is stuff printed immediately afterwards.
214 Hyphenation is disabled while printing the actual email address.
216 .MTO joe@user.org "Joe User"
217 was achieved by the following macro:
220 .B .MTO joe@user.org \[dq]Joe User\[dq]
223 Note that all the URLs actually are treated as consuming no textual space
225 This could be considered as a bug since it causes some problems.
228 inserts a zero-width character which expands to a harmless space (only if
235 .B .FTP url [description] [after]
236 indicates that data can be obtained via ftp.
237 The first argument is the url and the second is the browser text.
238 A third argument, similar to the macros above, is intended for stuff printed
239 immediately afterwards.
240 The second and the third parameter are optional.
241 Hyphenation is disabled while printing the actual URL.
242 As an example, here the location of the
243 .FTP ftp://\:ftp.gnu.org/ "GNU ftp server" .
244 The macro example above was specified by:
247 .B .FTP ftp://\[rs]:ftp.gnu.org/ \[dq]GNU ftp server\[dq] .
252 Generates an html name tag from its argument.
253 This can then be referenced using the
256 As you can see, you must precede the tag name with
258 since it is a local reference.
259 This link was achieved via placing a TAG in the URL description above;
260 the source looks like this:
269 a URL using either two or three arguments.
276 .B .IMG [-R|-L|-C] filename [width] [height]
277 Include a picture into the document.
278 The first argument is the horizontal location: right, left, or center
283 Alignment is centered by default (-C).
284 The second argument is the filename.
285 The optional third and fourth arguments are the width and height.
286 If the width is absent it defaults to 1\~inch.
287 If the height is absent it defaults to the width.
288 This maps onto an html img tag.
289 If you are including a png image then it is advisable to use the
294 .B .PIMG [-R|-L|-C] filename [width [height]]
295 Include an image in PNG format.
296 This macro takes exactly the same parameters as the
298 macro; it has the advantage of working with postscript and html devices
299 also since it can automatically convert the image into the EPS format,
300 using the following programs
308 If the document isn't processed with
312 it is necessary to use the
317 .B .MPIMG [-R|-L] [-G gap] filename [width [height]]
318 Place a PNG image on the margin and wrap text around it.
319 The first parameters are optional.
320 The alignment: left or right
324 specifies the margin where the picture is placed at.
325 The default alignment is left
329 can be used to arrange a gap between the picture
330 and the text that wraps around it.
331 The default gap width is zero.
333 The first non-optional argument is the filename.
334 The optional following arguments are the width and height.
335 If the width is absent it defaults to 1\~inch.
336 If the height is absent it defaults to the width.
342 \&.MPIMG -L -G 2c foo.png 3c 1.5c
347 The height and width may also be given as percentages. The PostScript
348 device calculates the width from the
350 register and the height from the
352 register. For example:
357 \&.MPIMG -L -G 2c foo.png 15%
365 The numeric heading level
367 is specified by the first parameter.
368 Use this macro if your headings contain URL, FTP or MTO macros.
377 \&.URL http://groff.ffii.org (Groff)
379 \&.URL http://www.gnu.org/ GNU
382 \&.URL http://ffii.org/ FFII .
389 In this case you might wish to
390 disable automatic links to headings.
393 from the command line.
394 .\" or by using a call to `.HX 0'.
404 Force \%grohtml to place the automatically generated links at this position.
405 If this manual page has been processed with
409 those links can be seen right here.
415 Generate a full-width horizontal rule for
419 No effect for all other devices.
423 Suppress generation of the top and bottom rules which \%grohtml emits
428 Generate an HTML title only.
429 This differs from the
433 macro package which generates both an HTML title and an <H1> heading.
434 Use it to provide an HTML title as search engine fodder but a graphic title
436 The macro terminates when a space or break is seen (.sp, .br).
440 Add arbitrary HTML data to the <head> block.
441 Ignored if not processed with
449 .B ".HEAD" "\[dq]<link \[rs]"
450 .B " rel=\[dq]\[dq]icon\[dq]\[dq] \[rs]"
451 .B " type=\[dq]\[dq]image/png\[dq]\[dq] \[rs]"
452 .B " href=\[dq]\[dq]http://foo.org//bar.png\[dq]\[dq]/>\[dq]"
459 All text after this macro is treated as raw html.
460 If the document is processed without
464 then the macro is ignored.
465 Internally, this macro is used as a building block for other higher-level
476 \&. HTML <body background=\[rs]$1>
483 .B .DC l text [color]
484 Produce a drop capital.
485 The first parameter is the letter to be dropped and enlarged, the second
488 is the ajoining text whose height the first letter should not exceed.
489 The optional third parameter is the color of the dropped letter.
490 It defaults to black.
494 Start displaying a code section in constant width font.
501 .B ".ALN [color] [percentage]"
502 Place section heading links automatically to the left of the main text.
503 The color argument is optional and if present indicates which HTML
504 background color is to be used under the links.
505 The optional percentage indicates the amount of width to devote to
506 displaying the links.
507 The default values are #eeeeee and 30 for color and percentage width,
509 This macro should only be called once at the beginning of the document.
510 After calling this macro each section heading emits an HTML table consisting
511 of the links in the left and the section text on the right.
515 Start a new two-column table with links in the left column.
516 This can be called if the document has text before the first .SH and if .ALN
518 Typically this is called just before the first paragraph and after the main
519 title as it indicates that text after this point should be positioned to the
520 right of the left-hand navigational links.
524 End a two-column table.
525 This should be called at the end of the document if .ALN was used.
528 .B ".LINKSTYLE color [ fontstyle [ openglyph closeglyph ] ]"
529 Initialize default url attributes to be used if this macro set is not used
530 with the HTML device.
531 The macro set initializes itself with the following call
536 \&.LINKSTYLE blue C \e[la] \e[ra]
541 but these values will be superseded by a user call to LINKSTYLE.
543 .SH SECTION HEADING LINKS
546 generates links to all section headings and places these at the top of the
549 for details of how to switch this off or alter the position).
552 .SH LIMITATIONS OF GROHTML
555 information is currently rendered as a PNG image.
563 .BR groff (@MAN1EXT@),
564 .BR @g@troff (@MAN1EXT@)
565 .BR \%grohtml (@MAN1EXT@),
572 .MTO gaius@glam.ac.uk "Gaius Mulley"
577 .MTO bug-groff@\:gnu.org "Groff Bug Mailing List" .
578 Include a complete, self-contained example that will allow the bug to be
579 reproduced, and say which version of groff you are using.