(ti)troff question - horizontal motion and drawing arguments

Bob Mcqueer bobm at rtech.UUCP
Wed Jun 4 05:13:09 AEST 1986


The troff manual I have gives \h'N' as the sequence to use for horizontal
motion.  Fine.  my question is: What kind of interpretation is done on
the string inside the single quotes?  What I want to do is embed an
expression involving the character width for constant width font, ie,
something like \h'8*\w' 'u'.  When this sort of thing didn't work, I
thought maybe nested single quote expressions were a no-no, and found
that \h'8*\(nxxu' where register xx contained \w' ' wouldn't work either.
Various backslashings of both did not help anything.

Actually the \h could be gotten around other ways, but I really would
like to know if it is possible to embed any kind of expressions in the
arguments for the \D'ldh dv' sequence.

You can probably tell that what I'm trying to do is have a preprocessor
generate some motions and drawings around some constant width text.
I would like it to work with any size CW font, hence the desire to
embed \w' ' in the arguments somehow.  I can probably manage if I have
to do a calculation into a register before every generated horizontal
draw or motion, but it makes for a lot more generated troff, and seems
clumsy.  I would like to know for sure that you can't place expressions
in the horizonatal motion and drawing functions before I give it up,
or better, what the appropriate syntax is.

Thank you in advance.

Bob McQueer
{amdahl|sun|mtxinu}!rtech!bobm



More information about the Comp.unix mailing list