[Top][All Lists]

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

Re: [Groff] sqtroff / groff diffs - escape sequences

From: Werner LEMBERG
Subject: Re: [Groff] sqtroff / groff diffs - escape sequences
Date: Wed, 13 Feb 2002 08:49:38 +0100 (CET)

> > I presume I can get the current position from a register
> > and draw the box with explicit positions instead?
> Not conveniently, and it's tricky. Nor is it clear why you
> need to. However, \n[.h] (as in Unix troff) is the "current
> text baseline high-water mark", i.e. essentially your vertical
> position from the top of the page. The escape sequence \kX
> marks the current horizontal _inout_ place in register X,
> and this may not be the same as the horizontal position
> in the output.

An the register \n[hp] gives you the horizontal position at the input
line -- this is a groff extension.

> Note, again, that the
> command \D'nnn' has a side-effect that the current point moves
> right by nnn machine units, so usually you will want to undo that.
> Either use \Z'\D'f nnn'', which ensures no motion regardless
> of nnn, or use \D'f nnn'\h'-nnnu'.

With groff 1.18, \D'f ...' no longer causes motion.

> To change the colour of text requires a different approach.  It's
> straightforward with PostScript, since you can plant the PostScript
> setgray and setrgbcolor commands using the \X'ps: setgray'
> (0<= <= 1, where 0 = black and 1 = white); and \X'ps: r g b
> setgrbcolor' where r, g, b are also between 0 and 1. "setgray" and
> "setrgbcolor" will change the gray-level or colour of everything..

Ted, the new colour support in groff is really a reason to upgrade :-)

Colour changing should be done with \m and \M for foreground and
background colours, respectively.  Again, this is new in version 1.18
which hasn't been released yet.


reply via email to

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