[TUHS] pic's One-way Information Flow. (Was: SNOBOL and RATSNO)

Ralph Corderoy ralph at inputplus.co.uk
Thu Aug 11 17:37:45 AEST 2022

Hi Larry,

> Also agree with the "box that fits this text" problem, pic really
> could use a sizeof("this text in the current font/point size/line
> spacing") that returns x,y.  But I don't see how to do that because
> pic doesn't have that info, pic would need to be able to ask troff
> what those are.

Rather than work out the coordinates of everything, could pic punt some
of that downstream to troff by producing expressions which rest on
variables set by troff to, say, the width of a diversion.  The order of
evaluation presented to troff would obviously have to be topological on
the dependencies which bars cycles.  It would add elasticity to a

The other approach would be a multi-pass effort where pic initially
assumes unknown dimensions, like some text's width, but also outputs
troff which will store the actual width for input to pic on future runs.

Cheers, Ralph.

More information about the TUHS mailing list