Book a Demo

Author Topic: Dynamic paragraph numbering in rtf-template  (Read 5962 times)

Mario Wens

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Dynamic paragraph numbering in rtf-template
« on: March 21, 2011, 11:04:38 pm »
Hello all,

I'm new to this forum though not new to EA, I've been working with versions 7.0, 7.5 and 8.0 for about five years now. I started as an Information Analyst at a new customer a few months ago, and we are trying to persuade the organisation that document generation from EA is the way to go. In order to do this a working template would be nice. Recently I ran into a problem trying to get our master document made in 7.5 work in 8.0. Let me explain the problem.

I might have worked with EA a lot, I came from an organisation that had it's templates in order, so I never had much to do with maintaining them. This new customer is different, so I had to learn on the job. We orginally had the odd problem we could not insert a Table of Content in our 7.5 template, but then we discovered that this was because we used self-defined paragraph-headers. Unfortunately the "Insert Table of Content" option only becomes active if you use the predefined 'Heading 1', 'Heading 2' etc. No problem, one might think: just use the predefined types, edit the style to suit your needs and you'd be OK.  Not so. Recently the need has come up to use dynamic paragraph numbering in our headings, and the predefined heading do not work the way we want, where self-defined headings did. The prolem lies with the secnario's in our Use Cases. This is the code we use:

[highlight]scenario >[/highlight]
2.2.      {ElemScenario.Type} scenario: {ElemScenario.Scenario}

{ElemScenario.Notes}

[highlight]< scenario[/highlight]

This works well with self-defined headers, dynamically numbering each scenario as it is found during rtf-generation. Using the 'Heading 2' (Level 2 override in the numbering) however it shows as a 'Heading 3' ("2.2.1 etc.") in the generated document. I thought I could be smart by editting the style of 'Heading 3' to the exact same as 'Heading 2' (including the Level set to 2), but it still shows as a 'Heading 3' after generation whatever I try!

The self-defined headings work fine, but there the problem is that they are not recognized as such by the Table of Content. I can make the ToC in the generated document understand that it should include these self-defined headers, but is there a way to add them to a ToC in the template itself, so they are generated rather than added manually after generation?


Is there anybody here who recognizes the problem, and better still, knows what to do about it?

Mario Wens
The Netherlands

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Dynamic paragraph numbering in rtf-template
« Reply #1 on: March 23, 2011, 11:34:47 am »
I had a similar problem a year or so ago. I think I fixed it by changing header level 2 to level 1 in the template. I seem recall EA decremented the header level by 1 for each embedded element level when it generates RTF. It doesn't look so good in the template as it appears you have same header level but the end result RTF doc it appeared fine and thats what counts ;)
Happy to help
:)

Mario Wens

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Dynamic paragraph numbering in rtf-template
« Reply #2 on: March 23, 2011, 08:37:17 pm »
Quote
It doesn't look so good in the template as it appears you have same header level but the end result RTF doc it appeared fine and thats what counts ;)

I agree. It does work for the moment, maintenancewise it is an abomination of course.

It's - sadly - not the only problem we have with the RTF-generation. The generation in 8.0 seems to be less secure with generating styles anyway than 7.5 was. A new problem we have for example is that the text of these scenarios is defined as being Arial 9pt, but generates as Times New Roman 11pt... The same text generated correctly as Arial 9pt in 7.5. The oddest thing is, there is a blank line in the text, and the very last line of the scenario, which comes after this blank line, does generate as Arial!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Dynamic paragraph numbering in rtf-template
« Reply #3 on: March 24, 2011, 08:29:00 am »
Yes going from V7.5 to V8.0 was painful for RTF generation. We had a lot of problems and pretty much had to recreate all our RTF templates again from scratch. If you do a search of the forum you'll find some folk had all sorts of problems and workarounds that got into the bowels of RTF. The first few builds of V8.0 did have a number of issues regarding RTF which have now been fixed however B864 still left some issues regarding migration of RTF templates built in V7.5. The only thing I can suggest is try recreating the templates from scratch using V8.0 and see if that fixes the issues you have.
Happy to help
:)

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Dynamic paragraph numbering in rtf-template
« Reply #4 on: March 24, 2011, 01:41:44 pm »
There are several things worth noting here in addition to the above.
We find RTF documentation is much better when Optimise for Open Office is selected.
It is crucial that all templates used in a document have EXACTLY THE SAME styles. Otherwise the combination of what RTF EA generates and the version of word does with the multiple styles is likely to cause problems
(hint, newer version of Word do better than old ones).
[size=9]As an aside I suspect there are problems in the use of RTF as an underlying format. It would be much better going forward to have a stronlgy structued format (eg ODF)[/size].
We have also observed some improvements by doing a project transfer from an old to a new repository (did I mention that using Jet 4 and upsizing to Access 2003 or 2007 may also be advantageous).
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

Mario Wens

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Dynamic paragraph numbering in rtf-template
« Reply #5 on: March 24, 2011, 07:13:57 pm »
Quote
The first few builds of V8.0 did have a number of issues regarding RTF which have now been fixed however B864 still left some issues regarding migration of RTF templates built in V7.5. The only thing I can suggest is try recreating the templates from scratch using V8.0 and see if that fixes the issues you have.

The problems arise in templates newly created in v8.0. We discarded the idea of migrating them form 7.5 to 8.0 after early tests proved desastrous. We have the advantage that the existing generic templates were not as generic as we would like for the future, and a lot of rework was planned anyway, so it's faster to do it all from scratch in 8.0. At least, that was the theory.

Mario Wens

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Dynamic paragraph numbering in rtf-template
« Reply #6 on: March 24, 2011, 07:23:27 pm »
Quote
We find RTF documentation is much better when Optimise for Open Office is selected.
It is crucial that all templates used in a document have EXACTLY THE SAME styles. Otherwise the combination of what RTF EA generates and the version of word does with the multiple styles is likely to cause problems
(hint, newer version of Word do better than old ones).

That is worth a try. Does the Optimise for Open Office have any effect when you're not using Open Office? Hey, I'm open to any suggestion. I have to make do with the software the customer uses, which is Word 2003 (11.8328.8329) SP3.

I'll do a search on the forum to read up on the possible fixes using templates after migration. In a previous project we had a desastrous migration from 7.0 to 7.5 where templates were concerned, so I was warned it might give us some headaches to go to 8.0

Thanks for the input so far, guys!

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Dynamic paragraph numbering in rtf-template
« Reply #7 on: March 25, 2011, 06:16:08 am »
Quote
Does the Optimise for Open Office have any effect when you're not using Open Office?
My understanding is that EA does not generate the document with fields everywhere (something I believe EA 9 now does). I'd have to say that Office 2007 parses EA generated documents better than 2003.
Most of all try to have exactly the same styles in every document template.


Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.