groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Am I missing a trick?


From: Ted Harding
Subject: [Groff] Am I missing a trick?
Date: Fri, 04 Aug 2000 23:10:53 +0100 (BST)

Greetings all,

I don't know if anyone can help me with this one.

I'm looking for a method of placing text at a fixed absolute
position on the current page, by placing something at an arbitrary
point in the input. The only apparent mechanism involves the
"absolute position indicator", | .

Vertical placing seems to present no problems:

  In the course of this line, at this \Z'\v'|6i'WORD'point we ...

causes "WORD" to be printed , starting vertically below the start of
"point", 6 inches from the top of the page. This description remains true
whatever the vertical position at which "point" is printed.

On the other hand,

  In the course of this line, at this \Z'\h'|3i'WORD'point we ...

places "WORD" at a position which depends on the length of the input
line, and a different result is obtained if it is input as

  In the course of this line,
  at this \Z'\h'|3i'WORD'point we ...

This is apparently in accordance with the original UNIX description,
which I find a bit obscure, which says:

  "The absolute position indicator | may be prepended to a number N to
   generate the distance to the vertical or horizontal place N. For
   vertically oriented requests and functions, |N becomes the distance in
   basic units from the current vertical place _on_the_page_ ... to the
   vertical place N. For all other requests and functions, |N becomes
   the distance from the current horizontal place _on_the_input_line_
   to the horizontal place N."

Hence, it seems, horizontal distance is computed fron the start of the
word "In" in the first example, and from the start of the word "at"
in the second. Since the word "point" is printed at the same position
in the _output_ line in each case, this has the effect that the resulting
horizontal position of "WORD" depends on where you break the input line.

What I would want to achieve with something like

  In the course of this line, at this \Z'\h'|3i'WORD'point we ...

is to place "WORD" 3 inches from the lefthand edge of the text (i.e.
from the page-offset). If that could be achieved, then something like

  In the course of this line, at this \Z'\h'|3i'\v'|6i'WORD'point we ...

would place "WORD" 6 inches from the top and 3 inches from the left,
wherever the word "point" happened to be printed on the page and
wherever the input line happened to be broken.

If that cannot be achieved, then I'm afraid groff could not claim to
be able to "place any mark you like at any position you like on the page";
and that is something I would like to be able to claim ...

I hope someone has a good suggestion!

Best wishes to all,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 284 7749
Date: 04-Aug-00                                       Time: 23:10:53
------------------------------ XFMail ------------------------------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]