On Tue, May 05, 2020 at 07:59:45AM +1000, G. Branden Robinson wrote: > Subject: Re: Why does simply creating a diversion produce output? > > > > .di d > > > foo > > > .di > > > .rm d > > > > Output is only sent to the diversion when a break occurs, either > > explicitly with .br, or when enough text has been collected to fill a > > line, or in no-fill mode. Otherwise, the diversion remains empty, but > > a partially collected line exists when the end of input is > > encountered. > > I think I'd like to add that first sentence to the Texinfo manual and > groff(7). At present, the Texinfo manual simply says, "The current > partially filled line is included in the diversion."
This refers to any partially filled line occurring before the diversion starts (i.e., at the time of encountering the ".di d"). As I said in a previous message, diversions are completely separate from page traps. In my experience I use diversions most often when I need to measure the size of the output of the contents of the diversion. Then I can decide if the diversion fits in a particular place on the page, then move to that place and output the diversion's contents. In order to prevent partially filled lines going in at the beginning of the diversion, I normally begin a new environment at the start of the diversion. An alternative is to use .box instead of .di. -- Steve -- Steve Izma - Home: 35 Locust St., Kitchener, Ontario, Canada N2H 1W6 E-mail: si...@golden.net phone: 519-745-1313 cell (text only; not frequently checked): 519-998-2684 == I have always felt the necessity to verify what to many seemed a simple multiplication table. -- Ilya Ehrenburg (Soviet author and critic; he's not talking about mathematics)