groff
[Top][All Lists]
Advanced

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

Re: [Groff] An observation on .writem


From: Ralph Corderoy
Subject: Re: [Groff] An observation on .writem
Date: Thu, 30 Aug 2001 16:01:32 +0100

Hi Sigfrid,

> Having read Werner's mail about .writem, I started to think about
> what that request was meant to do.

       .writem stream xx
              Write the contents of the macro or string xx to the
              stream named stream.  stream must  previously  have
              been the subject of an open request.  xx is read in
              copy mode.

> This is not a question, but rather an observation. .writem isn't for
> diversions (or possibly, it's a bug.  After all, noone has been using
> it.).

That looks like an observation that turned into a question :-)  The
manual suggests macros and strings.  See if this helps.

    % cat sigfrid 
    .open f /dev/stderr
    .\" string last
    .de xx
    macro
    ..
    .di xx
    diversion
    .di
    .ds xx string
    .\"
    .tm 1
    .writem f xx
    .\"
    .\" macro last
    .di xx
    diversion
    .di
    .ds xx string
    .de xx
    macro
    ..
    .\"
    .tm 2
    .writem f xx
    .\"
    .\" diversion last
    .ds xx string
    .de xx
    macro
    ..
    .di xx
    diversion
    .di
    .\"
    .tm 3
    .writem f xx
    .\"
    .tm 4

    % ./test-groff -U <sigfrid >/dev/null
    1
    string2
    macro
    3
    4
    % 


Ralph.


reply via email to

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