[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Suggestion for images in groff/gpic, current state
From: |
Egil Kvaleberg |
Subject: |
Re: [Groff] Suggestion for images in groff/gpic, current state |
Date: |
03 Dec 2002 11:09:07 +0100 |
On Tue, 2002-12-03 at 09:35, Werner LEMBERG wrote:
> Can someone please post the results of the following:
>
> M
> .tm .w == \n[.w]
> i
> .tm .w == \n[.w]
> \w'a'
> .tm .w == \n[.w]
> \w'aa'
> .tm .w == \n[.w]
>
> With `troff -Tps' I get
>
> .w == 8890
> .w == 2780
> .w == 5000
> .w == 5000
Unix V7 on a PDP-11 gives:
$ cat test
M
.tm .w = \n(.w
i
.tm .w = \n(.w
\w'a'
.tm .w = \n(.w
\w'aa'
.tm .w = \n(.w
$ troff test
.w = 20
.w = 20
.w = 20
.w = 20
$
Apperantly, this does not work. .w is probably not really valid beyond
the current input line, and is probably set to the width of a space
(ending the lines with \c did no difference, btw).
To test this, I did:
$ cat test2
\kaM\kb\h'\n(.wu'\kc
.tm a = \na
.tm b = \nb
.tm c = \nc
$ troff test2
a = 0
b = 58
c = 116
$
Which means .w does the expected thing in this case. To test the
connection between \w and .w, I did:
$ cat test3
\kaM\h'\w!MMMM!u'\kb\h'\n(.wu'\kc
.tm a = \na
.tm b = \nb
.tm c = \nc
$ troff test3
a = 0
b = 290
c = 522
$
Appearantly, .w in this case takes on the value of the horizontal
movement. But is it due to \w or \h? Lets try:
$ cat test4
\kaM\h'1i'\kb\h'\n(.wu'\kc
.tm a = \na
.tm b = \nb
.tm c = \nc
$ troff test4
a = 0
b = 490
c = 922
$
Appearantly, the term "last character printed" also includes \h''.
Trying \v'', it turns out that this is also included, the width
obviously always being 0:
$ cat test5
\kaM\v'1i'\kb\h'\n(.wu'\kc
.tm a = \na
.tm b = \nb
.tm c = \nc
$ troff test5
a = 0
b = 58
c = 58
$
I did in fact not come up with any method of actually testing if \w
influences .w per se, since I found no way of invoking \w without
influencing .w by other means. So it all becomes a very academic
exercise. I would believe \w does not touch .w.
I'm quite hard pressed to believe that anyone has ever relied on the
above behaviour, so I suggest leaving groff exactly as it is. I can
always ask around, though.
Egil
--
Email: address@hidden
Voice/videophone: +47 22523641 Voice: +47 92022780 Fax: +47 22525899
Mail: Egil Kvaleberg, Husebybakken 14A, 0379 Oslo, Norway
Home: http://www.kvaleberg.com/
- Re: [Groff] Suggestion for images in groff/gpic, current state, Werner LEMBERG, 2002/12/01
- Re: [Groff] Suggestion for images in groff/gpic, current state, Egil Kvaleberg, 2002/12/01
- Re: [Groff] Suggestion for images in groff/gpic, current state, Werner LEMBERG, 2002/12/01
- Re: [Groff] Suggestion for images in groff/gpic, current state, Egil Kvaleberg, 2002/12/02
- Re: [Groff] Suggestion for images in groff/gpic, current state, Werner LEMBERG, 2002/12/03
- Re: [Groff] Suggestion for images in groff/gpic, current state, Egil Kvaleberg, 2002/12/03
- Re: [Groff] Suggestion for images in groff/gpic, current state,
Egil Kvaleberg <=
- Re: [Groff] Suggestion for images in groff/gpic, current state, Werner LEMBERG, 2002/12/04
- Re: [Groff] Suggestion for images in groff/gpic, current state, Ralph Corderoy, 2002/12/09
- Re: [Groff] Suggestion for images in groff/gpic, current state, Werner LEMBERG, 2002/12/11
- Re: [Groff] Suggestion for images in groff/gpic, current state, Werner LEMBERG, 2002/12/03