groff
[Top][All Lists]
Advanced

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

[Groff] Page classes in groff output to support reordering of the pages.


From: Bernd Salbrechter
Subject: [Groff] Page classes in groff output to support reordering of the pages.
Date: Thu, 20 Jul 2000 22:21:40 +0200 (CEST)

Hi all!

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.

Pragnesh Sampat <address@hidden> question from Wed, 12 Jul 2000
08:41:14 -0400 pointed me to an groff related problem with that
idea.

> Has anyone used the .TC command and used to 2 groff passes to get the Table Of
> Contents in the right place in the postscript output?  The groff_mm man mage
> mentions this, but I have not tried it yet.  I am using a .TC at the end and
> get a decent contents page at the end.  Thanks,
> 
> -Pragnesh

Wouldn't it be a nice feature to include a page class into the
output. This could be put in the %%Page: comment of the PostScript output
for example. Where it can be used to reorder the pages before printing it
(The pstools didn't have such a tool yet, but it would be easy to add).

A short example for what groff should produce as PostScript (prolog,
trailer and content striped):
  %%Page: Cover.1 1
  %%Page: Body.1 2
  %%Page: Body.2 3
  %%Page: Body.3 4
  %%Page: Body.4 5
  %%Page: TableOfContence.1 6
  %%Page: TableOfContence.2 7
  %%Page: ListOfFigures.1 8
  %%Page: Index.1 9
  %%Page: Index.2 10

If the policity is to print the Cover, TableOfContence, ListOfFigures,
Body and Index in that order and start each on a odd Page. The pages
can be easy reordered with that information as well as filler pages can
be included.

Yes this needs a new interface from the macros to the groff backend.
But couldn't it be done with a additional variable handled like the
page number (not directly set!), which content groff passes to the
backend.

It wouldn't work if the parts are not numbered independent, but in
that case only a two pass solution would work.

Any thought
Bernd

PS.: I have noticed that you have switched to libpaper to get the
paper format, but thats not really solution of the problem.  The user
have to recompile it or worse all tools that use it, if he wants
to add his very private strange format.  I would suggest to use a
full featured paper capability database (like termcap and in the
same format). I started one, but use the BSD access routines. If
you are interest in it (A, B, C and D formats from 0 to 10 and
several US formats already collected) I can upload it.

reply via email to

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