Article View: comp.text
Article #6166Re: Marking Output Line Position (troff)
From: Jaap Akkerhuis
Date: Fri, 14 Apr 1989 16:05
Date: Fri, 14 Apr 1989 16:05
31 lines
2243 bytes
2243 bytes
> *Excerpts from ext.nn.comp.text: 12-Apr-89 Marking Output Line Positio..*
> *Michael Morrell@hpsal2.H (995)*
> "\jx" which is supposed to mark the
> horizontal place in the output line in register x (as opposed to "\kx" which
> marks the horizontal place in the input line in register x). My troff (from
> Elan) doesn't understand "\j". Does anyone know of a troff which does
> understand this escape sequence? Considering the large number of errors in
> this book, I wouldn't be surprised if no troff has "\j"
This request was available in the old (V7) troff and not documented. It was also
buggy. It contains bogus information on the moment you are executing a .ti.
Because of these two reasons it was left out from the modern version of troff
(ditroff) on which Elan's version is based.
A more clumsy approach is to cause a break and look at the register (.n) which
gives the length of the text portion on previous ouput line, but that is not
really equivalent to the \j request..
I always liked \j, but never came around reimplementing it. There is also a
problem with this request which makes it hard. Suppose you have a \jx in a line
and are actually interpolating its value in the same output line with \nx. Due
to the fact that \nx now could have a different value, you need to realign the
line again, which will make \j need to recalculate the position. Of course \nx
now might not have the same width anymore so...
A cop-out would be that the value of x would only valid after the filled ouput
line containing \jx got printed. This is the way you want to use it most of the
time anyway (you want to set a tab on that position or something along that
line) and would make it slightly easier to implement.
jaap
Technical Details
Message-ID:
<4YFVOyy00jbYI9yW0v@andrew.cmu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!rochester!pt.cs.cmu.edu!andrew.cmu.edu!jaap+References:
<2610023@hpsal2.HP.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!rochester!pt.cs.cmu.edu!andrew.cmu.edu!jaap+ From: jaap+@andrew.cmu.edu (Jaap Akkerhuis) Newsgroups: comp.text Subject: Re: Marking Output Line Position (troff) Message-ID: <4YFVOyy00jbYI9yW0v@andrew.cmu.edu> Date: 14 Apr 89 16:05:18 GMT References: <2610023@hpsal2.HP.COM> Organization: Information Technology Center, Carnegie Mellon, Pittsburgh, PA Lines: 31 In-Reply-To: <2610023@hpsal2.HP.COM>