Book a Demo

Author Topic: Table of Contents  (Read 2899 times)

robsax

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Table of Contents
« on: April 10, 2007, 07:14:17 am »
I have been fighting with the RTF editor for some time now, but finally have almost an entire requirements doc generated directly out of EA. I have 2 issues:

When using a numbered heading inside of the <package tag, If I make the style for heading 1 have a page break before, I end up with every heading (of every level) being on a separate page. Am I doing something wrong or is this a bug?

The table of contents never generates properly. I have changed the numbering options to start with 1 (instead of the default 0), but the TOC generates with the 0 numbers. Is this a bug or is there a solution to this behavior?

Rob

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Table of Contents
« Reply #1 on: April 10, 2007, 02:30:10 pm »
Here's a bit of a wild guess:

MS Word - which is (or was until version 2007) an example of an RTF reader and parser - allows (forces, actually) styles to inherit from a parent style. You specify those settings you want to be different. I do not know if this behavior goes back to the underlying RTF, but I believe it does. (It has been too long since I studied the RTF specification in detail, and I do not have the time to look it up just now.)

If Sparx has set up the RTF templates such that headings all inherit from either Heading 1, or from the next highest heading, this would explain your situation. Having changed heading 1, each of the lower level headings would inherit the change.

If this is so, change the lower level headings; specify that there is no page break before the heading. If each one inherits from the next highest heading (which would be my guess) then you will only need to change Heading 2. If they all inherit from Heading 1, you will need to change them all.

[Please remember that I'm guessing here, but it is probably worth a try.]

David
No, you can't have it!

Jerkerus

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • Think first - order later!
    • View Profile
Re: Table of Contents
« Reply #2 on: April 10, 2007, 10:25:06 pm »
What I had to do when I encountered the same problem was to put the Page Break Before on the Heading itself rather than the style. Place the cursor on the heading and then tick the page break before from the Paragraph menu.

I use the Package name as header and this setup works for me, but it has a drawback. The TOC gets screwed up, as it also inserts the page break (meaning that the TOC is some 20 pages long...). In my case this is not a major problem, as I need to regenerate the TOC anyway in Word as it has several problems. You mentioned numbering. It also fails to restrict the number of levels (I only want two levels, but the document contains three and I have not been able to create a TOC with only two levels). So it's far from perfect, but the end result is quite nice.

robsax

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Table of Contents
« Reply #3 on: April 11, 2007, 10:42:39 am »
David,

I wish it were that easy. What you suggests sounds logical, but it unfortunately doesn't work.

Jerkerus,
This is a solution, but if I'm going to have to do work in Word anyway (to fix the TOC issues), changing the heading 1 style to include a page break in Word is no big deal.


Rob

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Table of Contents
« Reply #4 on: April 11, 2007, 11:38:58 am »
I think you're correct Rob. Sadly, this is not the best solution, but it will probably work just fine for a limited amount of work.

You could always write a short Word macro to import and update the RTF files.
No, you can't have it!