BLOG CATEGORIES



Lists & numbered paragraphs

When it comes of having numbering automation in RPE, lists are the drag&drop solution: create a list, fill the list details with text elements, and save the template …

Insert List element

Figure 1: Insert List element

Using the RPE Launcher, create a new Document Specification, and add the newly created template. Run this document, and see the results list…

Output Results

Figure 2: Output Results

Above are four different outputs (HTML, WORD, PDF and XSLFO) with lists obtained under 30 seconds after starting a blank Rational Publishing Engine instance.
Generally speaking, there has to be a default numbering for anything, so in RPE’s case, the default list numbering makes use of bullets. But the user can specify what type of numbering he needs. For this select the List element from the template, go to Properties view, expand Formatting node, and select numbering->numbering common->numbering style property.

Set Numbering Dialog

Figure 3: Set Numbering Dialog

It’s important to check what type of numbering is supported on each output. For example, WORD supports all this numbering styles.

If we change the numbering style to arabic, the output will look like this :

Numbering Style - arabic

Figure 4: Numbering Style - arabic

Of course, there is the possibility of customizing the numbering formatting, with the help of about…25 properties, most of them available for the Word output.

But now we’re interested about other area:
There can be cases when, maybe because of the data format that needs to be extracted, or for any other reason, lists need to be replaced. So, what is the element that can replace a List ? It’s about paragraphs : they support font formatting, numberings, even formatting on numberings, numbering level, and many more.

So create three paragraphs after previously created list, and set their properties as displayed below :

Paragraph Properties

Figure 5: Paragraph Properties

Thus, you “tell” RPE to write numbers to your paragraphs, so is not necessary to write that numbers manually : RPE will do it internally. You specify the numbering level, 1 in our case (you do not want to start numbering paragraphs with the number like 1.1.1, that is a level 3 numbering), and the “arabic” numbering style, meaning numbers like 1, 2, 3, 10, 25 etc.

Save the template, run the document specification again, and here they are :

Numbering on Paragraphs

Figure 6: Numbering on Paragraphs

As it can be seen from the Word output, the list and the numbered paragraphs look pretty similar, the only difference being the dot that follows every list item number.
Another difference is that, when using lists, if there are elements between them, like paragraphs, talbes, images etc, every list will reset the numbering. This is not happening with the paragraphs.

Check below :
Press Ctrl+A within the template area. Click inside a blank area within the template and hit Ctrl+V. You have doubled the content of your RPE template :

Lists and Paragraphs

Figure 7: Lists and Paragraphs

Now save and run again. Here is the final Word output :

Final Word Output

Figure 8: Final Word Output

The paragraph numbering was selected to highlight the followings : when numbered paragraphs are used, the numbering is continued within the document, but when lists are used, the numbering is reset.
In conclusion, the lists and numbered paragraphs behave quite similar, there are pro and cons on each side, but this evaluation depends on the user requirements. For the Word output, this pair works at its best in 2003 version, where paragraph numbering is visible at any numbering level (in Word 2007 works for level 1 only). If a stylesheet with numbered styles is used, than it works equally in 2003 and 2007 version.

2 Comments to “Lists & numbered paragraphs”

  1. anne.tatry@wanadoo.fr says:

    In a Rhapsody model I have a DescriptionText attribute that may contain bulleted lists. How can the bullets be reported in RPE outputs ? I have also tried DescriptionRTF and DescriptionHTML attributes but the bullets are still removed in the outputs.

  2. Ranjitha says:

    I need the numbering format as mentioned below
    [1]
    [2]
    [3] etc
    How can i get this ?

Leave a Reply to Ranjitha

(required)

(required)