🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.text
Article #814

Need help setting tabstops in Troff

#814
From: Sak Wathanasin
Date: Fri, 21 Mar 1986 19:22
45 lines
2147 bytes
I've been converting the w2troff program (which reads a MacWrite file &
generates troff cmds from it) to generate "raw" troff in place of the -me
macros that it used previously.  This will mean that w2troff can be used on
SysV systems.  It seems to be working, but I have a problem trying to set tab
stops to match the MacWrite rulers.

The problem is that the tabs seem to be calculated relative to the current
left indent. Consider the following troff fragment:

.po 0i
.in 1i
.ta 1i 2i 3i 4i
.ti -0.5i
tag	1	2	3	4
.br
    notag 1 2 3
.....

where everything on the tag.. and notag lines is separated by tabs.
I expected to see

  0.5i	1.0i	2.0i	3.0i 	4.0i  <- distance from left edge of paper
   |     |       |       |       |
   tag   1       2       3       4
         notag   1       2       3

instead I get
  0.5i      1.5i    2.5     3.5
   |         |       |       |
   tag       1       2       34
         notag   1       2       3

what happens is that tabs on the first line have been calculated relative to
the .ti -0.5i, so that my tab settings are really 0.5i 1.5i 2.5i 3.5i.

Regardless of whether this is a bug or a feature, can some troff wizard out
there tell me how I can set tabstops at absolute posns from the left hand edge
of the paper (I can compensate for any offsets so long as they are constant).
(I've tried .ta |1.0i |2.0i etc - the result is even weirder).

Thanks in advance,

-- 
Sak Wathanasin, U of Sussex, Cognitive Studies, Falmer, Sussex BN1 9QN, UK
uucp:...mcvax!ukc!cvaxa!sakw  arpa/janet: sakw%svga@uk.ac.ucl.cs
Technical Details
Message-ID: <194@cvaxa.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!scherzo!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!warwick!cvaxa!sakw

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!scherzo!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!warwick!cvaxa!sakw
From: sakw@cvaxa.UUCP (Sak Wathanasin)
Newsgroups: net.text
Subject: Need help setting tabstops in Troff
Message-ID: <194@cvaxa.UUCP>
Date: Fri, 21-Mar-86 14:22:22 EST
Article-I.D.: cvaxa.194
Posted: Fri Mar 21 14:22:22 1986
Date-Received: Tue, 25-Mar-86 05:10:41 EST
Organization: Univ of Sussex, Cognitive Studies, UK
Lines: 45