[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    GROFF_WWW(7) manual page Table of Contents

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 (grohtml) 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 is automatically called (via the troffrc file) if you use -Thtml or -Txhtml.

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.
.JOBNAMEsplit output into multiple files
.HXautomatic heading level cut off
.BCLspecify colours on a web page
.BGIMGspecify background image
.URLcreate a url using two parameters
.FTPcreate an ftp reference
.MTOcreate a html email address
.FTPcreate an ftp reference
.TAGgenerate an html name
.IMGinclude an image file
.PIMGinclude png image
.MPIMGplace png on the margin and wrap text around it
.HnSbegin heading
.HnEend heading
.LKemit automatically collected links.
.HRproduce a horizontal rule
.NHRsuppress automatic generation of rules.
.HTLonly generate HTML title
.HEADadd data to <head> block
.ULSunorder list begin
.ULEunorder list end
.OLSordered list begin
.OLEordered list end
.DLSdefinition list begin
.DLEdefinition list end
.LIinsert a list item
.DCgenerate a drop capital
.HTMLpass an html raw request to the device driver
.CDScode example begin
.CDEcode example end
.ALNplace links on left of main text.
.LNSstart a new two-column table with links in the left.
.LNEend the two-column table.
.LINKSTYLEinitialize default url attributes.

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

Requests

If this is processed by a device other than
-Thtml or -Txhtml it appears as:
foo [la]C]http://foo.org][ra]:
The URL macro can be of any type; for example we can reference
by:
..’
  • 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 or -Txhtml). .
  • 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 The macro example above was specified by:
  • ....
    • .
    • Generates an html name tag from its argument. This can then be referenced using the 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:

      
      
      
      
      
      
      .......
    • .-|-|-
    • Include a picture into the document. The first argument is the horizontal location: right, left, or center (-R, -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.
    • .-|-|-
    • 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 or -Txhtml it is necessary to use the -U option of groff.
    • .-|--
    • Place a PNG image on the margin and wrap text around it. The first parameters are optional. The alignment: left or right (-L or -R) specifies the margin where the picture is placed at. The default alignment is left (-L). 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:

      .--..
    • 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:

      .--.
    • .
    • 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:

      
      
      
      
      
      
      
      
      
      
      
      ..... --.........
    • In this case you might wish to disable automatic links to headings. This can be done via -P-l from the command line.

    • .
    • End heading.
    • .
    • Force grohtml to place the automatically generated links at this position. If this manual page has been processed with -Thtml or -Txhtml those links can be seen right here.
    • .
    • Generate a full-width horizontal rule for -Thtml and -Txhtml. No effect for all other devices.
    • .
    • Suppress generation of the top and bottom rules which grohtml emits by default.
    • .
    • Generate an HTML title only. This differs from the TL macro of the ms macro package which generates both an HTML title and an <H1> 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).
    • .
    • Add arbitrary HTML data to the <head> block. Ignored if not processed with -Thtml or -Txhtml. Example:

      .<.. >
    • .
    • All text after this macro is treated as raw html. If the document is processed without -Thtml or -Txhtml then the macro is ignored. Internally, this macro is used as a building block for other higher-level macros.
    For example, the
    BGIMG macro is defined as

    
    
    

    Section Heading Links

    By default grohtml generates links to all section headings and places these at the top of the html document. (See for details of how to switch this off or alter the position).

    Limitations of Grohtml

    tbl information is currently rendered as a PNG image.

    Files

    /usr/share/groff/1.22.2/tmac/www.tmac

    See Also

    groff(1) , troff(1) grohtml(1) , netpbm(1)

    Author

    grohtml was written by

    Bugs

    Report bugs to the Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of groff you are using.


    Table of Contents