(ti)troff question - horizontal motion and drawing arguments

Robert Stroud robert at cheviot.newcastle.ac.uk
Wed Jun 18 05:34:00 AEST 1986


On the subject of the delimiters used by pic (and tbl) in complex
motion commands, Guy Harris writes:

>Not only that, but you can use control characters as delimiters; I think
>"mm" (and maybe some other macro packages) use ^G (control-G, ASCII BEL,
>'\007') as a delimiter.  Why they chose \(ts, I dunno, unless they were
>afraid that some macro package had usurped ^G, in which chase whey they
>didn't choose ^A or some other control character, I dunno....
>-- 
>	Guy Harris
>	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
>	guy at sun.com (or guy at sun.arpa)

I found out about \(ts when I got "out of range" error messages from
troff caused by apparently bogus tbl output. After looking at the raw
troff commands, it took me ages to work out (a) what \(ts meant! (b) where
it was coming from.

We were using the device independent version of the formatting tools
(ditroff et al) and had written our own device driver for a dot matrix 
printer, missing out most of the greek characters for obvious reasons!

It turns out that if you *don't* have an entry for \(ts in your device
driving table (the -T option), these expressions don't work correctly,
even though the \(ts is being used purely as a delimiter and you have
no intention of ever using it. (Not speaking Greek, I have no idea
when a terminal sigma might be preferred over a mere sigma :-)

I don't know if this is a bug or a feature, but the problem goes away
if you add a dummy entry to your device table saying that the \(ts 
character has zero width.

I thought this was a real Gotcha - you have been warned!!

Robert Stroud,
Computing Laboratory,
University of Newcastle upon Tyne.

ARPA robert%cheviot.newcastle at ucl-cs.ARPA
UUCP ...!ukc!cheviot!robert



More information about the Comp.unix mailing list