[Top][All Lists]

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

RE: [Groff] Double spacing and centering pictures

From: Ted Harding
Subject: RE: [Groff] Double spacing and centering pictures
Date: Mon, 25 Jun 2001 15:19:41 +0100 (BST)

On 23-Jun-01 Max Putas wrote:
> I just wanted to know how I could go about double spacing a block of
> text. 

Two ways, one with finer control than the other.

Simple double-spacing (separating ech line from the next by a
space equal to the current line height, i.e. baseline spacing) can
be achieved by the troff request

.ls 2

(or .ls 3 for triple-spacing, etc.). This will persist until otherwise
set. Some macro packages will reset this to the default value (".ls = 1")
when starting a new paragraph. For instance, using "ms" macros, each
paragraph initialisation contains the ".ls 1" request. So you can only
make it persist by making ".ls 2" the first line of each new paragraph.
The "ms" macros do not have a register which stores the default "ls".

The alternative is to change the inter-baseline spacing itself, for which
you use

.vs N

for a spacing of N points, or else append the units designator for other
units, e.g.

.vs 2m

will space the lines by twice the "em" spacing of the current font size.
Again, this will only persist until reset, which is again likely to
happen at the start of each new paragraph (depending on the macro
package). If using "ms" macros, for instance, the default "vs" is
stored in number register VS which is initially set at 12 = 10+2
unless the point size is defined in the command line, in which
case it is pointsize + 2. To ensure that the "vs" persists, you also
need to set the number register VS, for instance

.vs 2m
.nr VS 2m

and then "vs" will be reset to 2m at each new paragraph (i.e. will not

> Also, is it possible to center PS images created by pic and grap?

These should already be centred by default.

Beware, however, that what is centred is only the image created
by line-drawing commands. If you also have text sticking out
at the sides, this will not make any difference, and so the "box"
which includes both text and drawing may well not be centred.
Generally speaking, pic has no knowledge about how much space a
piece of text is going to occupy -- only troff can find this out.

Hoping this helps,

E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 25-Jun-01                                       Time: 15:19:41
------------------------------ XFMail ------------------------------

reply via email to

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