Truncate the last lines of a diversion to another diversion

2023-01-05 Thread Selve
Hi, In the macro package I am working on, I want to divert some text to a region. If the region is too small, I have to recuperate the text that could not fit in and put it in another diversion, to output it later. The way I know the region is full is by a trap positioned at its end. Here is, in

Re: Truncate the last lines of a diversion to another diversion

2023-01-05 Thread Tadziu Hoffmann
Since you're already diverting into TEXT when you expect the overflow to occur, you have to use a diversion trap instead of a page trap: .ll 20m .de CUT .di \" stop diverting into TEXT... .di TEXT2 \" ...and divert into TEXT2. .. .di TEXT .dt 1v CUT \" 1v into the diversion,