groff
[Top][All Lists]
Advanced

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

Why does simply creating a diversion produce output?


From: G. Branden Robinson
Subject: Why does simply creating a diversion produce output?
Date: Tue, 5 May 2020 06:21:47 +1000
User-agent: NeoMutt/20180716

Consider the following minimal case:

.di d
foo
.di
.rm d

As I understand it, this diversion should never be "sprung", as there is
no trap to force it out, but an output node is created (I think); an
empty-page document (of 66 lines) is created from the above input.

That's groff.

On Unix Version 7 nroff, the diversion's contents, "foo", are output
anyway.  (I've started playing with SIMH.)  Not only that, but I get 132
lines of output.  My supposition is that some kind of implicit
end-of-page trap is sprung and forces the diversion out, but on the next
page, for 2 pages total.

By contrast, the following input generates no output in either groff or
V7 nroff:

.nr a 1
.de b
foobar
..
.ds s S

I don't feel I understand diversions very well, but can someone
illuminate the above?  My expectation would be no output at all from the
above diversion input, not even a blank document.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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