groff
[Top][All Lists]
Advanced

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

Re: [Groff] General nroff/troff question regarding .bp and .ne in divers


From: Tadziu Hoffmann
Subject: Re: [Groff] General nroff/troff question regarding .bp and .ne in diversions
Date: Thu, 26 Jun 2014 22:16:09 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

> Each item I put in a temporary diversion which I use to calc
> the height. If the height exceeds the page height a .ne or .bp
> should be put in the large diversion, then the temp diversion
> is added. So the large diversion contains the heading, some
> items, .bp, some items again, ... And my page titels and
> footer should work as everywhere in the book.

You got it almost right -- using a temporary diversion for
testing the height and then appending to the main bibliography
diversion.  That's also how I would do it.

However, there is a major difference between the top-level
"page diversion" and other diversions.  The top-level diversion
can have multiple "page traps", but a diversion is limited to a
single "diversion trap" (which you may, however, move around).
Normal diversions are expected to contain formatted text, but
there is no provision for separate "pages" inside a diversion.
That's why your approach doesn't make sense in the current
*roff implementations.

For your purposes, fortunately, pagination inside the diversion
is also not needed.  (But it could be faked in principle,
see below.)  The trick is to "transparently" embed ".ne"
requests for every bibliography item, that will become active
when the main bibliography diversion is finally output (see
the attached example).  (You could also embed ".bp" requests,
but you don't need to.  If all you want to accomplish is that
an item is not split in the middle, the ".ne" is sufficient.)


Attachment: bibdiversion.ro
Description: Text document


reply via email to

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