Tables of Contents

Asked by valczir

I'm writing (what I believe to be) a relatively complex template to be populated by a ton of data extracted from a PostGreSQL database using psycopg2. Graphs are generated, information is given, etc.

The thing is, I would really like to structure the document as follows:

Customer Cover Page
Basic Table of Contents (listing the clusters owned by this customer)
Cluster 1 Cover Page
Cluster 1 Table of Contents (listing the cluster graphs and the databases within this cluster)
Cluster 1 Graphs
Database Cover Page
Database 1 Cover Page
Database 1 Table of contents (listing the database graphs and the tables and indexes within this database)

And so on and so forth. My problem with the ToC is that oowriter at most allows me to limit each ToC to the current "chapter" (in this case, the current Cluster, as I'm using the Header 1 style for Clusters). I cannot create a database table of contents, because there seems to be no way to limit the table of contents to the database (which is a Heading 2 and a sub-section of the Cluster section). Of course, I may be wrong about this - I've only been trying to force oowriter to do my bidding for a few hours, now, and it could very well just be resisting. If anyone knows how to restrict a table of contents to a single section, or to create a toc for a heading 2, please tell me.

However, if this isn't exactly possible, I was wondering of Pod can possibly, somehow, access page numbers - so that I could do something along the lines of a table of contents. I know how many pages each section contains, so I should be able to create a table of contents programmatically as long as I can get the current page number. Can I do this? If not, is there another solution?

Question information

Language:
English Edit question
Status:
Answered
For:
Appy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
valczir (valczir-darkvein) said :
#1

Just a minor addendum: I have figured out a workaround that is satisfactory. I really would like to know if there's a way of doing this properly, but for now, I got the tables of contents to be separate enough to work for our purposes.

Basically, I added a Heading 2 labeled "Databases", and then each individual database gets a Heading 1. This means that I have "Databases" listed in the Cluster table of contents, but I don't have a list of databases (sad face). However, using Heading 1 for each database forces a new Chapter, which restricts the database ToC to just that database.

So I guess the issue is sort of solved, via a dirty hack workaround type thing. However, if anyone has any insight on a better way to do this, something that would leave a list of databases and their page numbers on the cluster ToC, I would be very appreciative.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Gaëtan Delannay (gaetan-delannay) said :
#3

As you have found yourself some satisfactory solution, I change the status of this question to "answered", so that other poeple can read it!

Can you help with this problem?

Provide an answer of your own, or ask valczir for more information if necessary.

To post a message you must log in.