groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Re: html docs


From: Werner LEMBERG
Subject: Re: [Groff] Re: html docs
Date: Sat, 01 Jan 2000 10:45:45 GMT

> .de HTML
> .if '\*(.T'html' \X^html:\\$*^
>     ??????????????????????????
> ..

I strongly suggest that you read the troff manual (available from the
late Richard Stevens's home page)!  This is basic troff...

  .if <sep>xxx<sep>yyy<sep> blablabla:

    if `xxx' is the same as `yyy' do `blablabla'.  So: if `\*(.T'
    (this variable returns the current device) is HTML, then do the
    rest of the line.

    \X^blablaba^ puts stuff directly into the (intermediate) troff
    output file.  Later on, the output device `grohtml' scans the
    troff output file for strings starting with `html:' which will be
    output verbatim to the final HTML document (as documented in
    design.ms).

    The variable \\$* returns the rest of the line after the macro:

      .HTML foo bar

      -> `\\$*' contains `foo bar'

    In macros, you must double the backslash, thus the two slashes.

> .de BODYCOLOR
> .   HTML <body text=\\$1 bgcolor=\\$2 link=\\$3 alink=\\$4 vlink=\\$5>
>                     ??           ??        ??         ??         ??
> ..

`\\$1' is the first parameter given to the `.BODYCOLOR' macro, `\\$2'
the second, and so on.

> etc., etc., and on, and on, ad infinitum, ad infinausium.

It's sometimes *very* difficult to read groff macro files, I know, but
Gaius has inserted a lot of comments into tmac.arkup which should help
to understand his HTML-specific stuff.


    Werner


reply via email to

[Prev in Thread] Current Thread [Next in Thread]