1 .TH GROFF_WWW @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
2 .\" Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
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 2, or (at your option) any later
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 along
19 .\" with groff; see the file COPYING. If not, write to the Free Software
20 .\" Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
22 .\" user level guide to using the -mwww macroset
25 .do nr groff_www_C \n[.C]
30 .\" we need the .LK here as we use it in the middle as an example --
31 .\" once the user requests .LK then the automatic generation of links
32 .\" at the top of the document is suppressed.
37 groff_www \- groff macros for authoring web pages
48 This manual page describes the GNU \-mwww macro package, which is part of
49 the groff document formatting system.
50 The manual page is very a basic guide, and the html device driver
52 has been completely rewritten but still remains as in an alpha state.
53 It has been included into the distribution so that a lot of people have a
55 Note that this macro file is automatically called (via the
60 To see the hyperlinks in action, please format this man page with the
64 Here is a summary of the functions found in this macro set.
68 \&.JOBNAME@split output into multiple files
69 \&.HX@automatic heading level cut off
70 \&.BCL@specify colours on a web page
71 \&.BGIMG@specify background image
72 \&.URL@create a url using two parameters
73 \&.FTP@create an ftp reference
74 \&.MTO@create a html email address
75 \&.FTP@create an ftp reference
76 \&.TAG@generate an html name
77 \&.IMG@include an image file
78 \&.PIMG@include png image
79 \&.MPIMG@place png on the margin and wrap text around it
82 \&.LK@emit automatically collected links.
83 \&.HR@produce a horizontal rule
84 \&.NHR@suppress automatic generation of rules.
85 \&.HTL@only generate HTML title
86 \&.HEAD@add data to <head> block
87 \&.ULS@unorder list begin
88 \&.ULE@unorder list end
89 \&.OLS@ordered list begin
90 \&.OLE@ordered list end
91 \&.DLS@definition list begin
92 \&.DLE@definition list end
93 \&.LI@insert a list item
94 \&.DC@generate a drop capital
95 \&.HTML@pass an html raw request to the device driver
96 \&.CDS@code example begin
97 \&.CDE@code example end
98 \&.ALN@place links on left of main text.
99 \&.LNS@start a new two-column table with links in the left.
100 \&.LNE@end the two-column table.
101 \&.LINKSTYLE@initialize default url attributes.
110 preprocessors is acceptable as input.
116 Split output into multiple HTML files.
117 A file is split whenever a .SH or .NH\ 1 is encountered.
118 Its argument is the file stem name for future output files.
119 This option is equivalent to
125 Specify the cut off depth when generating links from section headings.
126 For example, a parameter of\~2 would cause
128 to generate a list of links for
144 that no heading links should be created at all.
145 Another method for turning automatic headings off is by issuing the
146 the command line switch
152 .B .BCL foreground background active not-visited visited
153 This macro takes five parameters: foreground, background, active hypertext
154 link, hypertext link not yet visited, and visited hypertext link colour.
158 the only parameter to this macro is the background image file.
161 .B .URL url [description] [after]
164 a URL using either one, two or three arguments.
165 The first parameter is the actual URL, the second is the name of the link,
166 and the third is optional stuff to be printed immediately afterwards.
173 becomes the anchor text.
174 Hyphenation is disabled while printing the actual URL;
176 should be inserted with the
179 Here is how to encode
180 .URL http://\:foo.\:org/ "foo" :
183 .B .URL http://\[rs]:foo.\[rs]:org/ "foo" :
186 If this is processed by a device other than
191 foo \[la]\f[C]http://foo.org\f[]\[ra]:
194 The URL macro can be of any type; for example we can reference
195 .URL pic.html "Eric Raymond's pic guide"
199 .B .URL pic.html \[dq]Eric Raymond's pic guide\[dq]
203 .B .MTO address [description] [after]
204 Generate an email html reference.
205 The first argument is mandatory as the email address.
206 The optional second argument is the text you see in your browser
207 If an empty argument is given,
210 An optional third argument is stuff printed immediately afterwards.
211 Hyphenation is disabled while printing the actual email address.
213 .MTO joe@user.org "Joe User"
214 was achieved by the following macro:
217 .B .MTO joe@user.org \[dq]Joe User\[dq]
220 Note that all the URLs actually are treated as consuming no textual space
222 This could be considered as a bug since it causes some problems.
225 inserts a zero-width character which expands to a harmless space (only if
230 .B .FTP url [description] [after]
231 indicates that data can be obtained via ftp.
232 The first argument is the url and the second is the browser text.
233 A third argument, similar to the macros above, is intended for stuff printed
234 immediately afterwards.
235 The second and the third parameter are optional.
236 Hyphenation is disabled while printing the actual URL.
237 As an example, here the location of the
238 .FTP ftp://\:ftp.gnu.org/ "GNU ftp server" .
239 The macro example above was specified by:
242 .B .FTP ftp://\[rs]:ftp.gnu.org/ \[dq]GNU ftp server\[dq] .
247 Generates an html name tag from its argument.
248 This can then be referenced using the
251 As you can see, you must precede the tag name with
253 since it is a local reference.
254 This link was achieved via placing a TAG in the URL description above;
255 the source looks like this:
264 a URL using either two or three arguments.
271 .B .IMG [-R|-L|-C] filename [width] [height]
272 Include a picture into the document.
273 The first argument is the horizontal location: right, left, or center
278 Alignment is centered by default (-C).
279 The second argument is the filename.
280 The optional third and fourth arguments are the width and height.
281 If the width is absent it defaults to 1\~inch.
282 If the height is absent it defaults to the width.
283 This maps onto an html img tag.
284 If you are including a png image then it is advisable to use the
289 .B .PIMG [-R|-L|-C] filename [width [height]]
290 Include an image in PNG format.
291 This macro takes exactly the same parameters as the
293 macro; it has the advantage of working with postscript and html devices
294 also since it can automatically convert the image into the EPS format,
295 using the following programs
303 If the document isn't processed with
305 it is necessary to use the
310 .B .MPIMG [-R|-L] [-G gap] filename [width [height]]
311 Place a PNG image on the margin and wrap text around it.
312 The first parameters are optional.
313 The alignment: left or right
317 specifies the margin where the picture is placed at.
318 The default alignment is left
322 can be used to arrange a gap between the picture
323 and the text that wraps around it.
324 The default gap width is zero.
326 The first non-optional argument is the filename.
327 The optional following arguments are the width and height.
328 If the width is absent it defaults to 1\~inch.
329 If the height is absent it defaults to the width.
335 \&.MPIMG -L -G 2c foo.png 3c 1.5c
340 The height and width may also be given as percentages. The PostScript
341 device calculates the width from the
343 register and the height from the
345 register. For example:
350 \&.MPIMG -L -G 2c foo.png 15%
358 The numeric heading level
360 is specified by the first parameter.
361 Use this macro if your headings contain URL, FTP or MTO macros.
370 \&.URL http://groff.ffii.org (Groff)
372 \&.URL http://www.gnu.org/ GNU
375 \&.URL http://ffii.org/ FFII .
382 In this case you might wish to
383 disable automatic links to headings.
386 from the command line.
387 .\" or by using a call to `.HX 0'.
397 Force \%grohtml to place the automatically generated links at this position.
398 If this manual page has been processed with
400 those links can be seen right here.
406 Generate a full-width horizontal rule for
408 No effect for all other devices.
412 Suppress generation of the top and bottom rules which \%grohtml emits
417 Generate an HTML title only.
418 This differs from the
422 macro package which generates both an HTML title and an <H1> heading.
423 Use it to provide an HTML title as search engine fodder but a graphic title
425 The macro terminates when a space or break is seen (.sp, .br).
429 Add arbitrary HTML data to the <head> block.
430 Ignored if not processed with
436 .B ".HEAD" "\[dq]<link \[rs]"
437 .B " rel=\[dq]\[dq]icon\[dq]\[dq] \[rs]"
438 .B " type=\[dq]\[dq]image/png\[dq]\[dq] \[rs]"
439 .B " href=\[dq]\[dq]http://foo.org//bar.png\[dq]\[dq]/>\[dq]"
446 All text after this macro is treated as raw html.
447 If the document is processed without
449 then the macro is ignored.
450 Internally, this macro is used as a building block for other higher-level
461 \&. HTML <body background=\[rs]$1>
468 .B .DC l text [color]
469 Produce a drop capital.
470 The first parameter is the letter to be dropped and enlarged, the second
473 is the ajoining text whose height the first letter should not exceed.
474 The optional third parameter is the color of the dropped letter.
475 It defaults to black.
479 Start displaying a code section in constant width font.
486 .B ".ALN [color] [percentage]"
487 Place section heading links automatically to the left of the main text.
488 The color argument is optional and if present indicates which HTML
489 background color is to be used under the links.
490 The optional percentage indicates the amount of width to devote to
491 displaying the links.
492 The default values are #eeeeee and 30 for color and percentage width,
494 This macro should only be called once at the beginning of the document.
495 After calling this macro each section heading emits an HTML table consisting
496 of the links in the left and the section text on the right.
500 Start a new two-column table with links in the left column.
501 This can be called if the document has text before the first .SH and if .ALN
503 Typically this is called just before the first paragraph and after the main
504 title as it indicates that text after this point should be positioned to the
505 right of the left-hand navigational links.
509 End a two-column table.
510 This should be called at the end of the document if .ALN was used.
513 .B ".LINKSTYLE color [ fontstyle [ openglyph closeglyph ] ]"
514 Initialize default url attributes to be used if this macro set is not used
515 with the HTML device.
516 The macro set initializes itself with the following call
521 \&.LINKSTYLE blue C \e[la] \e[ra]
526 but these values will be superseded by a user call to LINKSTYLE.
528 .SH SECTION HEADING LINKS
531 generates links to all section headings and places these at the top of the
534 for details of how to switch this off or alter the position).
537 .SH LIMITATIONS OF GROHTML
540 information is currently rendered as a PNG image.
548 .BR groff (@MAN1EXT@),
549 .BR @g@troff (@MAN1EXT@)
550 .BR \%grohtml (@MAN1EXT@),
557 .MTO gaius@glam.ac.uk "Gaius Mulley"
562 .MTO bug-groff@\:gnu.org "Groff Bug Mailing List" .
563 Include a complete, self-contained example that will allow the bug to be
564 reproduced, and say which version of groff you are using.