groff
[Top][All Lists]
Advanced

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

Re: [Groff] Help with Page setup


From: Werner LEMBERG
Subject: Re: [Groff] Help with Page setup
Date: Mon, 03 Feb 2003 08:57:46 +0100 (CET)

> I have had trouble initializing this as I remember, hence the need
> for specific .1P setup, and .Pg takes over after first page.

I've eliminated that (see attachment).

> Still probs.  Sometimes the first page right hand bounding line does
> not print.  Both lines are supposed to start at the same point on
> the page, and end at the same point on the page, but sometine the
> first left line starts 1 row below the mark, with the second right
> starting where it should, at the mark, which equates to one line
> higher than the first left line .. they are not on the same row.
> Didnt have this problem on the Sun.  How do I fix this?

I suspect a bug in the old groff version.  A vertical line is put into
the current line buffer, the `partially collected line' (similar to
other output like glyphs).  Such partially collected lines are part of
the current environment.  In your original macros, you've switched to
environment 1, then wrote \L, then .ti (which flushes the partially
collected line of environment 1; this is the left line in the first
run), then returning to the previous vertical position, then \L again,
finally switching back to environment 0 -- without flushing the
partially collected line of environment 1!  Consequently, the right
line is missing on the first page, and only subsequent calls print it.
On the next run of .Pg, you are off by 1 line because the call to .in
starts a new line because there is something in the partially
collected line -- the right vertical line from the last call to .Pg.

The solution is to insert a final .br in environment 1 and using .rt
twice.


    Werner
.de 1P \" First Page setup
.  nr % \\$1
.  if o \
.    ds Pt o
.  if e \
.    ds Pt e
.  nr Np 0
.  wh 0 Pg
.  wh -1.0i Fo
..
.
.de Pg \" Page break
.  sp |0.5i
.  po 0.25i
.  ps 13.7z
.  lt 7.75i
.  vs 12
.  tl ""\s[-3]\[bu] % \[bu]"\\*[HA]"
.  tl """\\*[HB]\s[+3]"
.  tl """"
.  tl """"
.  po 0.70i
.  mk
.  ev 1
.  ll 5.25i
.  in 2.0m
.  nop \L'9.0i'
.  ti 5.24i
.  rt
.  nop \L'9.0i'
.  br
.  ev
.  rt
.  ps 8.75z
.  nm 1 1 3
.  ps 13.7z
.  vs 18
..
.
.de Fo
.  tm \\n%
.  po 0
.  ps 10
.  vs 10
.  lt 8.5i
'  sp |10.35i
.  tl ''''
'  sp 0.5
.  tl ''''
'  sp 0.25
.  tl ''''
.  po 0.70i
.  ps 13.7z
.  vs 18
'  bp
..

reply via email to

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