[Top][All Lists]

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

Re: [Groff] Am I missing a trick?

From: Paco Andres Verdu
Subject: Re: [Groff] Am I missing a trick?
Date: Sat, 5 Aug 2000 21:49:15 +0200 (CEST)

Hi Ted,

On Fri, 4 Aug 2000 address@hidden wrote:

> 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", | .

> 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

        You could try to use the .k register (which holds the current
horizontal position to calculate the relative distance at which to print
the string) as in this macro :

        \" po (Print at Offset) macro
        \" First parameter is the distance from the left margin
        \" second parameter is the string to print at that distance
        \" This macro preserves the current position if the string to
        \" print doesn't alters the vertical position.
        .de po
        .nr çb \n(.k
        .nr ça \\$1
        .nr ça -\\n(.k
>   In the course of this line, at this \Z'\h'|3i'\v'|6i'WORD'point we ...

  With this macro your sample line will look like this :
In the course of this line, at this
.po 3i WORD
point we ...


Paco Andrés Verdú                                     address@hidden
Alicante (Spain)                                              

reply via email to

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