Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2001 16:39:48 +0200
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        Lev Serebryakov <Lev.Serebryakov@arcadia.spb.ru>
Cc:        All <freebsd-questions@FreeBSD.ORG>
Subject:   Re: man printed as book (troff question, really).
Message-ID:  <20010314163948.A31970@sunbay.com>
In-Reply-To: <4178095365.20010314140706@arcadia.spb.ru>; from Lev.Serebryakov@arcadia.spb.ru on Wed, Mar 14, 2001 at 02:07:06PM %2B0300
References:  <4178095365.20010314140706@arcadia.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <name> | psbook | psnup -2 -pa4 -Pa4 | lpr <keys>
>   
>   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 <name>


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010314163948.A31970>