[reportlab-users] Table of Contents and Style
Dinu Gherman
gherman at darwin.in-berlin.de
Mon Apr 21 09:11:00 EDT 2008
Bradley Young:
> [...] It seems to me that a single style would be enough to set the
> default, but this would break backwards compatibility (if one uses the
> levelStyle array). If backwards compatibility is important, then the
> alternate is to allow the user to supply a "base" ParagraphStyle()
> object, and the levelZeroParaStyle would use that as a starting point
> (to make it easier to change fonts, etc.).
>
> Comments or questions welcomed; I'd be happy to submit a patch (I'd
> prefer the non-backwards compatible version; the hard coded variables
> at the beginning of the file (levelZeroParaStyle, etc.) seem wonky.)
I agree that a single style might be easier in many cases. In other
cases I can imagine having a need for different styles for different
levels.
I would also like to see a different TOC with more columns, e.g. in
order to apply even more fine-grained styling to chapter numbers,
compared to chapter titles. The current implementation does e.g. not
allow seperate right-justified chapter numbers. That's probably some-
thing I'll need to write myself.
If you got more responses than me on that subject or have some other
implementation, please let me know. I'm always curious for alterna-
tive ReportLab implementations.
BTW, backward compatibility does not seem to be a big issue here,
since these TOCs don't seem to get much attention, AFAICT from the
userguide and the responses on this list.
Regards,
Dinu
More information about the reportlab-users
mailing list