[reportlab-users] question about keepWithNext and multibuild

Andy Robinson andy at reportlab.com
Tue Sep 23 12:43:17 EDT 2008


2008/9/23 adam hyde <adam at flossmanuals.net>:

> So we are really needing to build a TOC without multipass. We just pick

> up on h1 headings using Pisa as this is the only depth required in a

> book TOC for our purposes. If anyone has a nice snippet for producing a

> TOC without multipass we would very much appreciate it.


I've been meaning to create a teaching example for this and a
higher-level table-of-contents widget for weeks, but have not found
the time. (we have such examples in RML, relying on some syntactic
sugar, but not in Platypus). However the 2.2.1 release and new web
site ought to come first though - it might be another 2-3 weeks.

Don't worry though - we, too, want to create our own manuals more
sanely, ideally using ReST and Sphinx or something similar, so we will
definitely be doing something to make single-pass indexes and tables
easier.

If anyone else has the time and energy to play with this first, the trick is to
create a little flowable for a "table of contents page number" which
consumes just enough space for a couple of digits and calls
canvas.doForm(...); and then to put another zero-sized flowable at the
end of the story to actually define what said form should look like.

- Andy


More information about the reportlab-users mailing list