1 .TH GROFF_WWW @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
2 .\" Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008
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
62 To see the hyperlinks in action, please format this man page with the
66 Here is a summary of the functions found in this macro set.
70 \&.JOBNAME@split output into multiple files
71 \&.HX@automatic heading level cut off
72 \&.BCL@specify colours on a web page
73 \&.BGIMG@specify background image
74 \&.URL@create a url using two parameters
75 \&.FTP@create an ftp reference
76 \&.MTO@create a html email address
77 \&.FTP@create an ftp reference
78 \&.TAG@generate an html name
79 \&.IMG@include an image file
80 \&.PIMG@include png image
81 \&.MPIMG@place png on the margin and wrap text around it
84 \&.LK@emit automatically collected links.
85 \&.HR@produce a horizontal rule
86 \&.NHR@suppress automatic generation of rules.
87 \&.HTL@only generate HTML title
88 \&.HEAD@add data to <head> block
89 \&.ULS@unorder list begin
90 \&.ULE@unorder list end
91 \&.OLS@ordered list begin
92 \&.OLE@ordered list end
93 \&.DLS@definition list begin
94 \&.DLE@definition list end
95 \&.LI@insert a list item
96 \&.DC@generate a drop capital
97 \&.HTML@pass an html raw request to the device driver
98 \&.CDS@code example begin
99 \&.CDE@code example end
100 \&.ALN@place links on left of main text.
101 \&.LNS@start a new two-column table with links in the left.
102 \&.LNE@end the two-column table.
103 \&.LINKSTYLE@initialize default url attributes.
112 preprocessors is acceptable as input.
118 Split output into multiple HTML files.
119 A file is split whenever a .SH or .NH\ 1 is encountered.
120 Its argument is the file stem name for future output files.
121 This option is equivalent to
127 Specify the cut off depth when generating links from section headings.
128 For example, a parameter of\~2 would cause
130 to generate a list of links for
146 that no heading links should be created at all.
147 Another method for turning automatic headings off is by issuing the
148 the command line switch
154 .B .BCL foreground background active not-visited visited
155 This macro takes five parameters: foreground, background, active hypertext
156 link, hypertext link not yet visited, and visited hypertext link colour.
160 the only parameter to this macro is the background image file.
163 .B .URL url [description] [after]
166 a URL using either one, two or three arguments.
167 The first parameter is the actual URL, the second is the name of the link,
168 and the third is optional stuff to be printed immediately afterwards.
175 becomes the anchor text.
176 Hyphenation is disabled while printing the actual URL;
178 should be inserted with the
181 Here is how to encode
182 .URL http://\:foo.\:org/ "foo" :
185 .B .URL http://\[rs]:foo.\[rs]:org/ "foo" :
188 If this is processed by a device other than
195 foo \[la]\f[C]http://foo.org\f[]\[ra]:
198 The URL macro can be of any type; for example we can reference
199 .URL pic.html "Eric Raymond's pic guide"
203 .B .URL pic.html \[dq]Eric Raymond's pic guide\[dq]
207 .B .MTO address [description] [after]
208 Generate an email html reference.
209 The first argument is mandatory as the email address.
210 The optional second argument is the text you see in your browser
211 If an empty argument is given,
214 An optional third argument is stuff printed immediately afterwards.
215 Hyphenation is disabled while printing the actual email address.
217 .MTO joe@user.org "Joe User"
218 was achieved by the following macro:
221 .B .MTO joe@user.org \[dq]Joe User\[dq]
224 Note that all the URLs actually are treated as consuming no textual space
226 This could be considered as a bug since it causes some problems.
229 inserts a zero-width character which expands to a harmless space (only if
236 .B .FTP url [description] [after]
237 indicates that data can be obtained via ftp.
238 The first argument is the url and the second is the browser text.
239 A third argument, similar to the macros above, is intended for stuff printed
240 immediately afterwards.
241 The second and the third parameter are optional.
242 Hyphenation is disabled while printing the actual URL.
243 As an example, here the location of the
244 .FTP ftp://\:ftp.gnu.org/ "GNU ftp server" .
245 The macro example above was specified by:
248 .B .FTP ftp://\[rs]:ftp.gnu.org/ \[dq]GNU ftp server\[dq] .
253 Generates an html name tag from its argument.
254 This can then be referenced using the
257 As you can see, you must precede the tag name with
259 since it is a local reference.
260 This link was achieved via placing a TAG in the URL description above;
261 the source looks like this:
270 a URL using either two or three arguments.
277 .B .IMG [-R|-L|-C] filename [width] [height]
278 Include a picture into the document.
279 The first argument is the horizontal location: right, left, or center
284 Alignment is centered by default (-C).
285 The second argument is the filename.
286 The optional third and fourth arguments are the width and height.
287 If the width is absent it defaults to 1\~inch.
288 If the height is absent it defaults to the width.
289 This maps onto an html img tag.
290 If you are including a png image then it is advisable to use the
295 .B .PIMG [-R|-L|-C] filename [width [height]]
296 Include an image in PNG format.
297 This macro takes exactly the same parameters as the
299 macro; it has the advantage of working with postscript and html devices
300 also since it can automatically convert the image into the EPS format,
301 using the following programs
309 If the document isn't processed with
313 it is necessary to use the
318 .B .MPIMG [-R|-L] [-G gap] filename [width [height]]
319 Place a PNG image on the margin and wrap text around it.
320 The first parameters are optional.
321 The alignment: left or right
325 specifies the margin where the picture is placed at.
326 The default alignment is left
330 can be used to arrange a gap between the picture
331 and the text that wraps around it.
332 The default gap width is zero.
334 The first non-optional argument is the filename.
335 The optional following arguments are the width and height.
336 If the width is absent it defaults to 1\~inch.
337 If the height is absent it defaults to the width.
343 \&.MPIMG -L -G 2c foo.png 3c 1.5c
348 The height and width may also be given as percentages. The PostScript
349 device calculates the width from the
351 register and the height from the
353 register. For example:
358 \&.MPIMG -L -G 2c foo.png 15%
366 The numeric heading level
368 is specified by the first parameter.
369 Use this macro if your headings contain URL, FTP or MTO macros.
378 \&.URL http://groff.ffii.org (Groff)
380 \&.URL http://www.gnu.org/ GNU
383 \&.URL http://ffii.org/ FFII .
390 In this case you might wish to
391 disable automatic links to headings.
394 from the command line.
395 .\" or by using a call to `.HX 0'.
405 Force \%grohtml to place the automatically generated links at this position.
406 If this manual page has been processed with
410 those links can be seen right here.
416 Generate a full-width horizontal rule for
420 No effect for all other devices.
424 Suppress generation of the top and bottom rules which \%grohtml emits
429 Generate an HTML title only.
430 This differs from the
434 macro package which generates both an HTML title and an <H1> heading.
435 Use it to provide an HTML title as search engine fodder but a graphic title
437 The macro terminates when a space or break is seen (.sp, .br).
441 Add arbitrary HTML data to the <head> block.
442 Ignored if not processed with
450 .B ".HEAD" "\[dq]<link \[rs]"
451 .B " rel=\[dq]\[dq]icon\[dq]\[dq] \[rs]"
452 .B " type=\[dq]\[dq]image/png\[dq]\[dq] \[rs]"
453 .B " href=\[dq]\[dq]http://foo.org//bar.png\[dq]\[dq]/>\[dq]"
460 All text after this macro is treated as raw html.
461 If the document is processed without
465 then the macro is ignored.
466 Internally, this macro is used as a building block for other higher-level
477 \&. HTML <body background=\[rs]$1>
484 .B .DC l text [color]
485 Produce a drop capital.
486 The first parameter is the letter to be dropped and enlarged, the second
489 is the ajoining text whose height the first letter should not exceed.
490 The optional third parameter is the color of the dropped letter.
491 It defaults to black.
495 Start displaying a code section in constant width font.
502 .B ".ALN [color] [percentage]"
503 Place section heading links automatically to the left of the main text.
504 The color argument is optional and if present indicates which HTML
505 background color is to be used under the links.
506 The optional percentage indicates the amount of width to devote to
507 displaying the links.
508 The default values are #eeeeee and 30 for color and percentage width,
510 This macro should only be called once at the beginning of the document.
511 After calling this macro each section heading emits an HTML table consisting
512 of the links in the left and the section text on the right.
516 Start a new two-column table with links in the left column.
517 This can be called if the document has text before the first .SH and if .ALN
519 Typically this is called just before the first paragraph and after the main
520 title as it indicates that text after this point should be positioned to the
521 right of the left-hand navigational links.
525 End a two-column table.
526 This should be called at the end of the document if .ALN was used.
529 .B ".LINKSTYLE color [ fontstyle [ openglyph closeglyph ] ]"
530 Initialize default url attributes to be used if this macro set is not used
531 with the HTML device.
532 The macro set initializes itself with the following call
537 \&.LINKSTYLE blue C \e[la] \e[ra]
542 but these values will be superseded by a user call to LINKSTYLE.
544 .SH SECTION HEADING LINKS
547 generates links to all section headings and places these at the top of the
550 for details of how to switch this off or alter the position).
553 .SH LIMITATIONS OF GROHTML
556 information is currently rendered as a PNG image.
564 .BR groff (@MAN1EXT@),
565 .BR @g@troff (@MAN1EXT@)
566 .BR \%grohtml (@MAN1EXT@),
573 .MTO gaius@glam.ac.uk "Gaius Mulley"
578 .MTO bug-groff@\:gnu.org "Groff Bug Mailing List" .
579 Include a complete, self-contained example that will allow the bug to be
580 reproduced, and say which version of groff you are using.