From owner-freebsd-questions Wed Mar 14 6:40:43 2001 Delivered-To: freebsd-questions@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 4531937B718 for ; Wed, 14 Mar 2001 06:40:14 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f2EEdmN47842; Wed, 14 Mar 2001 16:39:48 +0200 (EET) (envelope-from ru) Date: Wed, 14 Mar 2001 16:39:48 +0200 From: Ruslan Ermilov To: Lev Serebryakov Cc: All Subject: Re: man printed as book (troff question, really). Message-ID: <20010314163948.A31970@sunbay.com> Mail-Followup-To: Lev Serebryakov , All References: <4178095365.20010314140706@arcadia.spb.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <4178095365.20010314140706@arcadia.spb.ru>; from Lev.Serebryakov@arcadia.spb.ru on Wed, Mar 14, 2001 at 02:07:06PM +0300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 14, 2001 at 02:07:06PM +0300, Lev Serebryakov wrote: > Hello All, > > I want to print some big mans as booklets. So, I use: > > man -t | psbook | psnup -2 -pa4 -Pa4 | lpr > > Ok, it works. But page numbers and other headers and footers is not > good for such printing -- page numbers are on one side (on left side > of each page), for example. > > Is it possible to say troff to generate footers and headers situable > for booklet printing? `man troff' don't answer on this question. > It's not the troff(1) who controls the layout of headers and footers, but the macro package. Manual pages are written using two packages, -man and -mdoc. -man has the following feature: : -rD1 Double-sided printing. Footers for even and odd : pages are formatted differently. -mdoc did not have this feature, but it was easy to implement (see patch attached). After applying this patch, the page could be formatted with -rD1 for double-sided printing: % groff -man -rD1 Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: doc-common =================================================================== RCS file: /home/ncvs/src/contrib/groff/tmac/doc-common,v retrieving revision 1.21.2.16 diff -u -p -r1.21.2.16 doc-common --- doc-common 2001/02/22 07:25:49 1.21.2.16 +++ doc-common 2001/03/14 14:34:52 @@ -282,7 +282,14 @@ . pL . if !\\n(cR \{\ ' sp \\n(Fmu -. tl @\\*(Hs\\*(oS\fP@\\*(Vs\\*(dD\fP@%@ +. ie \\nD \{\ +. ie o \ +. tl @%@\\*(Vs\\*(dD\fP@\\*(Hs\\*(oS\fP@ +. el \ +. tl @\\*(Hs\\*(oS\fP@\\*(Vs\\*(dD\fP@%@ +. \} +. el \ +. tl @\\*(Hs\\*(oS\fP@\\*(Vs\\*(dD\fP@%@ ' bp . \} . ev --2fHTh5uZTiUOsy+g-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message