groff
[Top][All Lists]
Advanced

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

RE: [Groff] double-side page shifting for groff -ms?


From: Ted Harding
Subject: RE: [Groff] double-side page shifting for groff -ms?
Date: Tue, 13 Feb 2001 23:33:58 -0000 (GMT)

On 13-Feb-01 Alexy Khrabrov wrote:
> 
> groff -t -e -msg groff.ms
> 
> And/or, what is the easiest way to shift the
> resulting odd PS pages?  (That would apply to all
> single-sided PS outputs now intended for
> double-sided printing, not just groff's, so this
> is a semi-relevant question).

This is an example of how to do it (adjust the page offsets to
suit your taste). It involves redefining the "PT" macro from
tmac.s (since you are using ms macros): you should do this at
the start of your document, rather than in tmac.s itself:

  .de PT
  .ie o \{\
  .nr PO 1.625i
  .po 1.625i
  .\}
  .el \{\
  .nr PO 0.625i
  .po 0.625i
  .\}
  .ie \\n%=1 .if \\n[pg*P1] .tl \\*[pg*OH]
  .el \{\ 
  .       ie o .tl \\*[pg*OH]
  .       el .tl \\*[pg*EH]
  .\}
  ..

The change involves inserting the extra lines 2-9; the rest
(from ".ie \\n%=1" onwards) is as in the original. This has the
effect (as written) that for odd-numbered pages (.ie o ... )
there is a page-offset of 1.625 inches and for even-numbered
pages (.el ... ) an offset of 0.625 inches, which is about right
for A4 paper with a 6-inch line length. (The default page offset
is 1 inch for all pages, which would better be 1.125 inches for
A4 paper.)

The page-number in the "title" line is then centred over the
printed text.

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 284 7749
Date: 13-Feb-01                                       Time: 23:33:58
------------------------------ XFMail ------------------------------

reply via email to

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