NAME

groff_www - groff macros for authoring web pages

SYNOPSIS

groff -mwww [ options ] file ...

DESCRIPTION

This manual page describes the GNU -mwww macro package, which is part of the groff document formatting system. The manual page is very a basic guide, and the html device driver has been completely rewritten but still remains as in an alpha state. It has been included into the distribution so that a lot of people have a chance to test it. Note that this macro file will be automatically called (via the troffrc file) if you use -Thtml.

To see the hyperlinks in action, please format this man page with the grohtml device.

Here is a summary of the functions found in this macro set.

.JOBNAME            split output into multiple files
.HX                 automatic heading level cut off;
                    $1 point for sections/headers
.BCL                specify colours on a web page
.BGIMG              specify background image
.URL                create a url using two parameters
.FTP                create an ftp reference
.MTO                create a html email address
.FTP                create an ftp reference
.TAG                generate an html name
.IMG                include an image file
.PIMG               include png image
.MPIMG              place png on the margin and
                    wrap text around it
.HnS                begin heading
.HnE                end heading
.LK                 emit automatically collected links.
.HR                 produce a horizontal rule
.NHR                suppress automatic generation of rules.
.HTL                only generate HTML title
.HEAD               add data to  block
.ULS                unorder list begin
.ULE                unorder list end
.OLS                ordered list begin
.OLE                ordered list end
.DLS                definition list begin
.DLE                definition list end
.LI                 insert a list item
.DC                 generate a drop capital
.HTML               pass an html raw request to the
                    device driver
.CDS                code example begin
.CDE                code example end

Output of the pic, eqn, refer, and tbl preprocessors is acceptable as input.

REQUESTS

.JOBNAME filename
Split output into multiple HTML files. A file is split whenever a .SH or .NH 1 is encountered. Its argument is the file stem name for future output files. This option is equivalent to grohtml's -j option.
.HX n
Specify the cut off depth when generating links from section headings. For example, a parameter of 2 would cause grohtml to generate a list of links for .NH 1 and .NH 2 but not for .NH 3. Whereas

.HX 0
will tell
grohtml that no heading links should be created at all. Another method for turning automatic headings off is by issuing the the command line switch -P-l to groff.
.BCL foreground background active not-visited visited
This macro takes five parameters: foreground, background, active hypertext link, hypertext link not yet visited, and visited hypertext link colour.
.BGIMG imagefile
the only parameter to this macro is the background image file.
.URL url [description] [after]
generates a URL using either one, two or three arguments. The first parameter is the actual URL, the second is the name of the link, and the third is optional stuff to be printed immediately afterwards. If description and after are absent then the url becomes the anchor text. Hyphenation is disabled while printing the actual URL; explicit breakpoints should be inserted with the \: escape. Here is how to encode foo :
.URL http://\:foo.\:org/ foo :
If this is processed by a device other than
-Thtml it appears as:
foo :
The URL macro can be of any type; for example we can reference
Eric Raymond's pic guide by:
.URL pic.html "Eric Raymond's pic guide"
.MTO address [description] [after]
Generate an email html reference. The first argument is mandatory as the email address. The optional second argument is the text you see in your browser If an empty argument is given, address is used instead. An optional third argument is stuff printed immediately afterwards. Hyphenation is disabled while printing the actual email address. For example, Joe User was achieved by the following macro:
.MTO joe@user.org "Joe User"
Note that all the URLs actually are treated as consuming no textual space
in groff. This could be considered as a bug since it causes some problems. To circumvent this, www.tmac inserts a zero-width character which expands to a harmless space (only if run with -Thtml).
.FTP url [description] [after]
indicates that data can be obtained via ftp. The first argument is the url and the second is the browser text. A third argument, similar to the macros above, is intended for stuff printed immediately afterwards. The second and the third parameter are optional. Hyphenation is disabled while printing the actual URL. As an example, here the location of the GNU ftp server . The macro example above was specified by:
.FTP ftp://\:ftp.gnu.org/ "GNU ftp server" .
.TAG name
Generates an html name tag from its argument. This can then be referenced using the URL <#URL> macro. As you can see, you must precede the tag name with # since it is a local reference. This link was achieved via placing a TAG in the URL description above; the source looks like this:

..TTPP
..BB UURRLL
ggeenneerraatteess
..TTAAGG UURRLL
aa UURRLL uussiinngg eeiitthheerr ttwwoo oorr tthhrreeee aarrgguummeennttss..
......
<>
.IMG [-R|-L|-C] filename [width] [height]
Include a picture into the document. The first argument is the horizontal location: right, left, or center -L, or -C). Alignment is centered by default (-C). The second argument is the filename. The optional third and fourth arguments are the width and height. If the width is absent it defaults to 1 inch. If the height is absent it defaults to the width. This maps onto an html img tag. If you are including a png image then it is advisable to use the PIMG macro.
.PIMG [-R|-L|-C] filename [width [height]]
Include an image in PNG format. This macro takes exactly the same parameters as the IMG macro; it has the advantage of working with postscript and html devices also since it can automatically convert the image into the EPS format, using the following programs of the netpbm package: pngtopnm, pnmcrop, and pnmtops. If the document isn't processed with -Thtml it is necessary to use the -U option of groff.
.MPIMG [-R|-L] [-G gap] filename [width [height]]
Place a PNG image on the margin and wrap text around it. The first parameters are optional. The alignment: left or right or -R) specifies the margin where the picture is placed at. The default alignment is left Optionally, -G gap can be used to arrange a gap between the picture and the text that wraps around it. The default gap width is zero.
The first non-optional argument is the filename. The optional following arguments are the width and height. If the width is absent it defaults to 1 inch. If the height is absent it defaults to the width. Example:

..MMPPIIMMGG --LL --GG 22cc ffoooo..ppnngg 33cc 11..55cc
The height and width may also be given as percentages. The PostScript
device calculates the width from the .l register and the height from the .p register. For example:

..MMPPIIMMGG --LL --GG 22cc ffoooo..ppnngg 1155%%
.HnS n
Begin heading. The numeric heading level n is specified by the first parameter. Use this macro if your headings contain URL, FTP or MTO macros. Example:

..HHnnSS 11
..HHRR
GGNNUU TTrrooffff
..UURRLL hhttttpp::////ggrrooffff..ffffiiii..oorrgg ((GGrrooffff))
---- aa
..UURRLL hhttttpp::////wwwwww..ggnnuu..oorrgg// GGNNUU
pprroojjeecctt..
HHoosstteedd bbyy
..UURRLL hhttttpp::////ffffiiii..oorrgg// FFFFIIII ..
..HHRR
..HHnnEE
In this case you might wish to
disable automatic links to headings. This can be done via -P-l from the command line.

.HnE
End heading.
.LK
Force grohtml to place the automatically generated links at this position. If this manual page has been processed with -Thtml those links can be seen right here.
.HR
Generate a full-width horizontal rule for -Thtml. No effect for all other devices.
.NHR
Suppress generation of the top and bottom rules which grohtml emits by default.
.HTL
Generate an HTML title only. This differs from the TL macro of the ms macro package which generates both an HTML title and an

heading. Use it to provide an HTML title as search engine fodder but a graphic title in the document. The macro terminates when a space or break is seen (.sp, .br).
.HEAD
Add arbitrary HTML data to the block. Ignored if not processed with -Thtml. Example:

.HEAD "
  rel=""icon"" \
  type=""image/png"" \
  href=""http://foo.org//bar.png""/>"
<> <>..HHTTMMLL<> <> AAllll tteexxtt aafftteerr tthhiiss mmaaccrroo iiss ttrreeaatteedd aass rraaww hhttmmll.. IIff tthhee ddooccuummeenntt iiss pprroocceesssseedd wwiitthhoouutt <>--TThhttmmll<> tthheenn tthhee mmaaccrroo iiss iiggnnoorreedd.. IInntteerrnnaallllyy,, tthhiiss mmaaccrroo iiss uusseedd aass aa bbuuiillddiinngg bblloocckk ffoorr ootthheerr hhiigghheerr--lleevveell mmaaccrrooss.. <> <><> FFoorr eexxaammppllee,, tthhee <> <>BBGGIIMMGG<> mmaaccrroo iiss ddeeffiinneedd aass <> <><> <> <> <> ..ddee BBGGIIMMGG .. HHTTMMLL <> .... <> <> <>..DDCC ll tteexxtt [[ccoolloorr]]<> <> PPrroodduuccee aa ddrroopp ccaappiittaall.. TThhee ffiirrsstt ppaarraammeetteerr iiss tthhee lleetttteerr ttoo bbee ddrrooppppeedd aanndd eennllaarrggeedd,, tthhee sseeccoonndd ppaarraammeetteerr <>tteexxtt<> iiss tthhee aajjooiinniinngg tteexxtt wwhhoossee hheeiigghhtt tthhee ffiirrsstt lleetttteerr sshhoouulldd nnoott eexxcceeeedd.. TThhee ooppttiioonnaall tthhiirrdd ppaarraammeetteerr iiss tthhee ccoolloorr ooff tthhee ddrrooppppeedd lleetttteerr.. IItt ddeeffaauullttss ttoo bbllaacckk.. <> <>..CCDDSS<> <> SSttaarrtt ddiissppllaayyiinngg aa ccooddee sseeccttiioonn iinn ccoonnssttaanntt wwiiddtthh ffoonntt.. <> <>..CCDDEE<> <> EEnndd ccooddee ddiissppllaayy <> <> SSEECCTTIIOONN HHEEAADDIINNGG LLIINNKKSS <> BByy ddeeffaauulltt <>ggrroohhttmmll<> ggeenneerraatteess lliinnkkss ttoo aallll sseeccttiioonn hheeaaddiinnggss aanndd ppllaacceess tthheessee aatt tthhee ttoopp ooff tthhee hhttmmll ddooccuummeenntt.. ((SSeeee LLIINNKKSS <<##LLKK>> ffoorr ddeettaaiillss ooff hhooww ttoo sswwiittcchh tthhiiss ooffff oorr aalltteerr tthhee ppoossiittiioonn)).. <> LLIIMMIITTAATTIIOONNSS OOFF GGRROOHHTTMMLL <> <> <>ttbbll<> iinnffoorrmmaattiioonn iiss ccuurrrreennttllyy rreennddeerreedd aass aa PPNNGG iimmaaggee.. <> FFIILLEESS <> //uussrr//sshhaarree//ttmmaacc//wwwwww..ttmmaacc <> SSEEEE AALLSSOO <> <>ggrrooffff((11))<> <>ttrrooffff((11))<> <>ggrroohhttmmll((11))<> <>nneettppbbmm((11))<> <> AAUUTTHHOORR <> <>ggrroohhttmmll<> wwaass wwrriitttteenn bbyy GGaaiiuuss MMuulllleeyy <> <> BBUUGGSS <> RReeppoorrtt bbuuggss ttoo tthhee GGrrooffff BBuugg MMaaiilliinngg LLiisstt <>.. IInncclluuddee aa ccoommpplleettee,, sseellff--ccoonnttaaiinneedd eexxaammppllee tthhaatt wwiillll aallllooww tthhee bbuugg ttoo bbee rreepprroodduucceedd,, aanndd ssaayy wwhhiicchh vveerrssiioonn ooff ggrrooffff yyoouu aarree uussiinngg.. <> <>