groff
[Top][All Lists]
Advanced

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

RE: [Groff] Page classes in groff output to support reordering o


From: Ted Harding
Subject: RE: [Groff] Page classes in groff output to support reordering o
Date: Fri, 21 Jul 2000 10:22:45 +0100 (BST)

On 20-Jul-00 Bernd Salbrechter wrote:
> 
> I am playing around with imposition of groff generated pages
> (PostScript).
> 
> In more detail the idea is to use groff to format a document into
> well layouted pages (groff do this job quite well) and use the
> pstools to put may of that pages onto one sheet of paper, which
> get folded, stitched and trimmed to get nice booklets. The "pstools"
> need some improvement at least for no so common impositions like
> gate fold, concertina fold or 8 pages on one sheet of paper and a
> 64 page signature.

In my view it is probably not a good idea to try to incorporate this
kind of thing into groff itself. The way the main engine (gtroff) works
is strictly sequential and pages get formatted as they are encountered,
so it would need to take place either as a modification of the grops
post-processor, or in an extra post-processor placed between gtroff
and grops or following grops. The last case is, in effect, what you
are trying to do with pstools.

[By the way, is what you mean by "pstools" the same as "psutils",
which is a package I have. Below I shall refer to "psutils".]

Putting an extra post-processor between gtroff and grops would probably
not work, for all sorts of reasons, and similarly for a modification
of grops which was not equivalent to a post-processor following grops.

Furthermore, once you contemplate re-ordering pages for special purposes
there is no limit to the possible variations you may need to consider.

So my considered view is that this kind of thing is best done using
a psutils-like utility which operates directly on the PS output
from grops, whether this is a new program or an extension of pstools
itself.

One feature of groff which could be useful for this is the possibility of
selecting which pages get output by groff: the -o option does this.
For instance, -o1,3,5,7,9 would output these odd-numbered pages,
-o2,4,6,8 these even-numbered pages, etc. If anything, I would agree
that an extension to this option which gave ALL odd, or ALL even
pages without explicit listing, could be useful. However, this is already
possible in psutils [psselect] so I don't see its necessity as pressing.

Psutils has the following main programs:

psbook          rearranges pages into signatures
psselect        selects pages and page ranges
pstops          performs general page rearrangement and selection
psnup           put multiple pages per physical sheet of paper
psresize        alter document paper size
epsffit         fits an EPSF file to a given bounding box

and several perl scripts to perform various useful/necessary minor
tasks.

Another option you could consider might be (e.g. using "psselect" and
a script) to pull out each page of the final groff output as a separate
PostScript file. Each of these, since it will have a %%BoundingBox
for the whole page, should be a valid EPS file which you can then import
(even using groff!) into a document where the layout of the original
pages on the final pages is exactly what you want, for whatever purpose.

I hope this helps.
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 284 7749
Date: 21-Jul-00                                       Time: 10:22:45
------------------------------ XFMail ------------------------------

reply via email to

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