Book a Demo

Author Topic: Heading levels in RTF  (Read 6811 times)

Tejo

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Heading levels in RTF
« on: January 22, 2013, 08:41:07 pm »
I have defined the following template, that iterates over packages and diagrams, and should (??) output for each element contained in the diagram the element-name formatted as a heading-1:

[highlight]package >
diagram >
element >[/highlight]
1. {Element.Name} (as "Heading 1" style)
[highlight]< element
< diagram
child packages >
< child packages
< package[/highlight]

My project browser structure is as follows:
Package 1
  Package 2
    Diagram
      Element

I would expect this to result in a piece of RTF that contains a heading-1 line with the name of Element (ie, "1. Element").

However, what is generated is a heading-3 (formatted "1.1.1 Element"). If I generate the RTF with Package 2 as root, a heading-2 (formatted "1.1 Element") is generated.

It seems that the nested depth in the hierarchy determines which heading level is generated, instead of whether I have actually included a heading line in the template or not.

What I want is that only if I define a paragraph with a Heading style, the heading level is incremented. For example, no matter which root element I choose (Package 1 or Package 2), I want a Heading-1 level for the Element, given my template and element hierarchy.

Is this possible in EA?

Stefan Bolleininger

  • EA User
  • **
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Heading levels in RTF
« Reply #1 on: January 22, 2013, 08:46:34 pm »
Hi,

it is possible to do that within EA.

Open your template within the document template designer

open the dialog for document options

Take "Adjust heading levels" and play around with it a little bit. In my case it is switched to Heading 9.

I hope it helps

regards

Stefan
Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

Ian Mitchell

  • EA User
  • **
  • Posts: 507
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Re: Heading levels in RTF
« Reply #2 on: January 22, 2013, 11:21:30 pm »
..or have a look at eaDocX, which makes creating documents from EA MUCH simpler...
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

marcel_str

  • EA User
  • **
  • Posts: 77
  • Karma: +0/-0
    • View Profile
Re: Heading levels in RTF
« Reply #3 on: January 23, 2013, 12:36:41 am »
Another way to do this is to:

  • create a word document with all the headings and other styles and save it as RTF.
  • create a new clean template in EA
  • Right click the template and select "File" -> "Import" -> <Youre RTF file>

Then EA does all things for you (also well useable for headers and footers!).

Tejo

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Heading levels in RTF
« Reply #4 on: January 23, 2013, 07:52:29 pm »
Thank you all for your responses.

@Sethor: The "adjust heading levels" limits the deepest allowed heading. In the example at hand this may work if I put it to 1, but if the element had sub-elements which I want as H2, this approach fails..

@Ian: Good suggestion, I have experimented with it, but have some strange behaviour about which I have posted a message on the eaDocX forum.

@marcel_str: I do not see why this would in fact generate a level-1 heading for my example...

My conclusion so far is the EA does not directly support this, which disappoints me a bit. Thanks all for your answers!

Robert Sheridan

  • EA User
  • **
  • Posts: 105
  • Karma: +0/-0
    • View Profile
Re: Heading levels in RTF
« Reply #5 on: January 23, 2013, 08:48:32 pm »
I have got heading levels to work OK.  It is best if you start from a blank report format which you retain as your base template for all subsequent reports.  Set this template up with the section headings and numbering overrides as described in the user guide (a tedious process but you have to follow it).

You do have to set the level numbering separately to the section level (right click on the section heading and select paragraph - list numbering).  When you use the template it automatically recurses and so if it is outputting a sub element or package it will automatically go to the next level down

Stefan Bolleininger

  • EA User
  • **
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Heading levels in RTF
« Reply #6 on: January 23, 2013, 10:41:33 pm »
That's true, Robert is right. - That was the complete process which ahs to be followed. Mostly you are only doing it once and than copy the template  ;)

Regards

Stefan
Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

marcel_str

  • EA User
  • **
  • Posts: 77
  • Karma: +0/-0
    • View Profile
Re: Heading levels in RTF
« Reply #7 on: January 24, 2013, 01:52:33 am »
Quote
@marcel_str: I do not see why this would in fact generate a level-1 heading for my example...

I understood you want to apply some 'heading-1' style to the text in between the section markers. Am I right?

If yes:
If you import an RTF document in which all headings are fromatted the way you want, EA imports all these headings exactly like in the RTF document in your template. Then, in the RTF editor, you just select your text, set it to the heading you want, save and generate.

If no, then I don't understand what you're asking?  ;)