Article View: comp.text
Article #4005Re: troff floating display blows away centering of caption
From: Michael Morrell
Date: Sat, 05 Sep 1987 04:39
Date: Sat, 05 Sep 1987 04:39
41 lines
1816 bytes
1816 bytes
In article <425@methods.UUCP> owen@methods.UUCP (Owen Plowman Mr. Tech.) writes:
>pair. All is okay so far. The kicker is that, if I have some "pic"
>specifications in my figure, I have to use ".DF CB" in order to get a
>result that is centered on the page. But, this blows the centering of
>the caption all over the place. Usually, the left part of the caption
>is aligned with the leftmost item of the picture.
As I understand the CB option to .DF (or .DS), it finds the widest line
in the display (which includes the caption in your case), centers that
and then left justifies all the other lines with respect to that widest
line. I would not use this. My pic documentation says that the preferred
way to get centered pictures is to redefine .PS and .PE. I use the
following:
.de PS \" centered pic start
.if t .sp .3
.in (\\n(.lu-\\$2u)/2u
.ne \\$1u
..
.de PE \" centered pic end
.in
.if t .sp .5
..
Then, one can simply use .DF with no arguments:
.DF
.PS
some
picture
here
.PE
.FG "picture caption"
.DE
The .PS and .PE macros can also be defined so that the pic centering
can be done on a case by case basis (each picture can be centered or
not). Hope this helps,
Michael Morrell
{ucbvax,hplabs}!hpda!morrell
Technical Details
Message-ID:
<2610002@hpsal2.HP.COM>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!hpda!hpsal2!morrellReferences:
<425@methods.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!hpda!hpsal2!morrell From: morrell@hpsal2.HP.COM (Michael Morrell) Newsgroups: comp.text Subject: Re: troff floating display blows away centering of caption Message-ID: <2610002@hpsal2.HP.COM> Date: Sat, 5-Sep-87 00:39:00 EDT Article-I.D.: hpsal2.2610002 Posted: Sat Sep 5 00:39:00 1987 Date-Received: Sun, 6-Sep-87 09:45:08 EDT References: <425@methods.UUCP> Organization: Hewlett Packard, Cupertino Lines: 41