> Is anyone aware of a means by which floating point arithmetic > and formating can be computed either within groff or in a > preprocessor (ala eqn, tbl, etc.)?
Don't know whether this qualifies as "within groff", but you can always call any of the various system utilities (and it has the advantage that it can operate on numbers generated within the groff run, whereas a preprocessor would need the values already beforehand). Example: .\" unsafe .sp 3c sqrt(2) = .sy dc -e '20k2vp' >system.out .so system.out .sy dc -e '[.ds xx ]P5k2vp' >system.out .so system.out .br \m[red]\v'-.25m'\D'l 1c 0'\v'.25m'\m[] \(<- this is a 1-cm-line .br \m[red]\v'-.25m'\D'l \*(xxc 0'\v'.25m'\m[] \(<- this is a sqrt(2)-cm-line .sy rm system.out _______________________________________________ Groff mailing list [email protected] http://lists.gnu.org/mailman/listinfo/groff
