3 .\" Copyright (c) 2014 - 2017 Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
5 .\" Copyright (C) 2000 - 2006, 2008
6 .\" Free Software Foundation, Inc.
7 .\" Written by Gaius Mulley (gaius@glam.ac.uk)
9 .\" This is free software; you can redistribute it and/or modify it under
10 .\" the terms of the GNU General Public License as published by the Free
11 .\" Software Foundation; either version 2, or (at your option) any later
14 .\" This is distributed in the hope that it will be useful, but WITHOUT ANY
15 .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 .\" You should have received a copy of the GNU General Public License along
20 .\" with groff; see the file COPYING. If not, write to the Free Software
21 .\" Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
23 .\" user level guide to using the -mwww macroset
26 .TH @U_ROFF@_WWW @MAN7EXT@ "@MDATE@" "@T_ROFF@ v@VERSION@"
28 .do nr groff_www_C \n[.C]
33 .\" we need the .LK here as we use it in the middle as an example --
34 .\" once the user requests .LK then the automatic generation of links
35 .\" at the top of the document is suppressed.
41 @L_ROFF@_www \- @T_ROFF@ macros for authoring web pages
54 This manual page describes the GNU \-mwww macro package, which is part of
55 the @T_ROFF@ document formatting system.
56 The manual page is very a basic guide, and the html device driver
57 .RB ( \%@L_DEV_HTML@ )
58 has been completely rewritten but still remains as in an alpha state.
59 It has been included into the distribution so that a lot of people have a
61 Note that this macro file is automatically called (via the
69 To see the hyperlinks in action, please format this man page with the
74 Here is a summary of the functions found in this macro set.
78 \&.JOBNAME@split output into multiple files
79 \&.HX@automatic heading level cut off
80 \&.BCL@specify colours on a web page
81 \&.BGIMG@specify background image
82 \&.URL@create a url using two parameters
83 \&.FTP@create an ftp reference
84 \&.MTO@create a html email address
85 \&.FTP@create an ftp reference
86 \&.TAG@generate an html name
87 \&.IMG@include an image file
88 \&.PIMG@include png image
89 \&.MPIMG@place png on the margin and wrap text around it
92 \&.LK@emit automatically collected links.
93 \&.HR@produce a horizontal rule
94 \&.NHR@suppress automatic generation of rules.
95 \&.HTL@only generate HTML title
96 \&.HEAD@add data to <head> block
97 \&.ULS@unorder list begin
98 \&.ULE@unorder list end
99 \&.OLS@ordered list begin
100 \&.OLE@ordered list end
101 \&.DLS@definition list begin
102 \&.DLE@definition list end
103 \&.LI@insert a list item
104 \&.DC@generate a drop capital
105 \&.HTML@pass an html raw request to the device driver
106 \&.CDS@code example begin
107 \&.CDE@code example end
108 \&.ALN@place links on left of main text.
109 \&.LNS@start a new two-column table with links in the left.
110 \&.LNE@end the two-column table.
111 \&.LINKSTYLE@initialize default url attributes.
121 preprocessors is acceptable as input.
128 Split output into multiple HTML files.
129 A file is split whenever a \&.SH or \&.NH\ 1 is encountered.
130 Its argument is the file stem name for future output files.
131 This option is equivalent to
132 .BR \%@L_DEV_HTML@ 's
138 Specify the cut off depth when generating links from section headings.
139 For example, a parameter of\~2 would cause
141 to generate a list of links for
158 that no heading links should be created at all.
159 Another method for turning automatic headings off is by issuing the
160 the command line switch
166 .B .BCL foreground background active not-visited visited
167 This macro takes five parameters: foreground, background, active hypertext
168 link, hypertext link not yet visited, and visited hypertext link colour.
172 the only parameter to this macro is the background image file.
175 .B .URL url [description] [after]
178 a URL using either one, two or three arguments.
179 The first parameter is the actual URL, the second is the name of the link,
180 and the third is optional stuff to be printed immediately afterwards.
187 becomes the anchor text.
188 Hyphenation is disabled while printing the actual URL;
190 should be inserted with the
193 Here is how to encode
194 .URL http://\:foo.\:org/ "foo" :
197 .B .URL http://\[rs]:foo.\[rs]:org/ "foo" :
200 If this is processed by a device other than
208 foo \[la]\f[C]http://foo.org\f[]\[ra]:
212 The URL macro can be of any type; for example we can reference
213 .URL pic.html "Eric Raymond's pic guide"
218 .B .URL pic.html \[dq]Eric Raymond's pic guide\[dq]
222 .B .MTO address [description] [after]
223 Generate an email html reference.
224 The first argument is mandatory as the email address.
225 The optional second argument is the text you see in your browser.
226 If an empty argument is given,
229 An optional third argument is stuff printed immediately afterwards.
230 Hyphenation is disabled while printing the actual email address.
232 .MTO joe@user.org "Joe User"
233 was achieved by the following macro:
237 .B .MTO joe@user.org \[dq]Joe User\[dq]
241 Note that all the URLs actually are treated as consuming no textual space
243 This could be considered as a bug since it causes some problems.
246 inserts a zero-width character which expands to a harmless space (only if
253 .B .FTP url [description] [after]
254 indicates that data can be obtained via ftp.
255 The first argument is the url and the second is the browser text.
256 A third argument, similar to the macros above, is intended for stuff printed
257 immediately afterwards.
258 The second and the third parameter are optional.
259 Hyphenation is disabled while printing the actual URL.
260 As an example, here the location of the
261 .FTP ftp://\:ftp.gnu.org/ "GNU ftp server" .
262 The macro example above was specified by:
265 .B .FTP ftp://\[rs]:ftp.gnu.org/ \[dq]GNU ftp server\[dq] .
270 Generates an html name tag from its argument.
271 This can then be referenced using the
274 As you can see, you must precede the tag name with
276 since it is a local reference.
277 This link was achieved via placing a TAG in the URL description above;
278 the source looks like this:
287 a URL using either two or three arguments.
294 .B .IMG [\-R|\-L|\-C] filename [width] [height]
295 Include a picture into the document.
296 The first argument is the horizontal location: right, left, or center
301 Alignment is centered by default (\-C).
302 The second argument is the filename.
303 The optional third and fourth arguments are the width and height.
304 If the width is absent it defaults to 1\~inch.
305 If the height is absent it defaults to the width.
306 This maps onto an html img tag.
307 If you are including a png image then it is advisable to use the
312 .B .PIMG [\-R|\-L|\-C] filename [width [height]]
313 Include an image in PNG format.
314 This macro takes exactly the same parameters as the
316 macro; it has the advantage of working with postscript and html devices
317 also since it can automatically convert the image into the EPS format,
318 using the following programs
326 If the document isn't processed with
330 it is necessary to use the
335 .B .MPIMG [\-R|\-L] [-G gap] filename [width [height]]
336 Place a PNG image on the margin and wrap text around it.
337 The first parameters are optional.
338 The alignment: left or right
342 specifies the margin where the picture is placed at.
343 The default alignment is left
347 can be used to arrange a gap between the picture
348 and the text that wraps around it.
349 The default gap width is zero.
351 The first non-optional argument is the filename.
352 The optional following arguments are the width and height.
353 If the width is absent it defaults to 1\~inch.
354 If the height is absent it defaults to the width.
360 \&.MPIMG \-L \-G 2c foo.png 3c 1.5c
365 The height and width may also be given as percentages.
366 The PostScript device calculates the width from the
368 register and the height from the
376 \&.MPIMG \-L \-G 2c foo.png 15%
384 The numeric heading level
386 is specified by the first parameter.
387 Use this macro if your headings contain URL, FTP or MTO macros.
396 \&.URL http://groff.ffii.org (Groff)
398 \&.URL http://www.gnu.org/ GNU
401 \&.URL http://ffii.org/ FFII .
408 In this case you might wish to
409 disable automatic links to headings.
412 from the command line.
413 .\" or by using a call to `.HX 0'.
422 Force \%@L_DEV_HTML@ to place the automatically generated links at this
424 If this manual page has been processed with
428 those links can be seen right here.
433 Generate a full-width horizontal rule for
437 No effect for all other devices.
441 Suppress generation of the top and bottom rules which \%grohtml emits
446 Generate an HTML title only.
447 This differs from the
451 macro package which generates both an HTML title and an <H1> heading.
452 Use it to provide an HTML title as search engine fodder but a graphic title
454 The macro terminates when a space or break is seen (.sp, \&.br).
458 Add arbitrary HTML data to the <head> block.
459 Ignored if not processed with
467 .B ".HEAD" "\[dq]<link \[rs]"
468 .B " rel=\[dq]\[dq]icon\[dq]\[dq] \[rs]"
469 .B " type=\[dq]\[dq]image/png\[dq]\[dq] \[rs]"
470 .B " href=\[dq]\[dq]http://foo.org//bar.png\[dq]\[dq]/>\[dq]"
477 All text after this macro is treated as raw html.
478 If the document is processed without
482 then the macro is ignored.
483 Internally, this macro is used as a building block for other higher-level
494 \&. HTML <body background=\[rs]$1>
501 .B .DC l text [color]
502 Produce a drop capital.
503 The first parameter is the letter to be dropped and enlarged, the second
506 is the ajoining text whose height the first letter should not exceed.
507 The optional third parameter is the color of the dropped letter.
508 It defaults to black.
512 Start displaying a code section in constant width font.
519 .B ".ALN [color] [percentage]"
520 Place section heading links automatically to the left of the main text.
521 The color argument is optional and if present indicates which HTML
522 background color is to be used under the links.
523 The optional percentage indicates the amount of width to devote to
524 displaying the links.
525 The default values are #eeeeee and 30 for color and percentage width,
527 This macro should only be called once at the beginning of the document.
528 After calling this macro each section heading emits an HTML table consisting
529 of the links in the left and the section text on the right.
533 Start a new two-column table with links in the left column.
534 This can be called if the document has text before the first \&.SH and
536 Typically this is called just before the first paragraph and after the main
537 title as it indicates that text after this point should be positioned to the
538 right of the left-hand navigational links.
542 End a two-column table.
543 This should be called at the end of the document if \&.ALN was used.
546 .B ".LINKSTYLE color [ fontstyle [ openglyph closeglyph ] ]"
547 Initialize default url attributes to be used if this macro set is not used
548 with the HTML device.
549 The macro set initializes itself with the following call
554 \&.LINKSTYLE blue C \e[la] \e[ra]
559 but these values will be superseded by a user call to LINKSTYLE.
562 .SH SECTION HEADING LINKS
566 generates links to all section headings and places these at the top of the
570 for details of how to switch this off or alter the position).
573 .SH LIMITATIONS OF @U_DEV_HTML@
577 information is currently rendered as a PNG image.
587 .BR \%@L_ROFF@ (@MAN1EXT@),
588 .BR \%@L_TROFF@ (@MAN1EXT@)
589 .BR \%@L_DEV_HTML@ (@MAN1EXT@)
596 .MTO gaius@glam.ac.uk "Gaius Mulley"