Skip to main content
Inspiring
February 25, 2023
Answered

EDD ContextRule for the first Table (or another element) in a Section

  • February 25, 2023
  • 1 reply
  • 1575 views

Hello everybody!

Sorry for the question, because most of you will find it primitive :)!

I started using structure FrameMaker and created my own EDD. My EDD works quite well (at least I think so :)), but I can't solve a simple problem (due to lack of experience).

The basis of the document is the Chapter, which consists of many Sections. Each Section consists of many elements, such as Heading and then following it: Para, List, ListNumbered, Table and so on.

Each Table has a TableTitle with a simple numbering:

Autonumber format: T: Table <n+>.

I need the numbering of tables in each Section to start with the value Table 1.

I used ContextRule «Table {after Heading}», but it only works if the Table is located immediately after Heading.

I tried to use «Table {first} < Section» (and «{first} < Section»), but this ContextRule (to my surprise) doesn't work.

The question is the following:

How to correctly formulate a ContextRule for the first Table (or another element) in a Section, which is not the first element after the Section Heading?

 

Thanks in advance, regards,

Igor

    This topic has been closed for replies.
    Correct answer frameexpert

    Hello, frameexpert (unfortunately, I do not know your name)!

    Thanks for the offered help! Screenshot of EDD rule for a Section is in the attachment.

     

    Thanks in advance, regards,

    Igor


    I am making the assumption that your Section/Headings are not numbered, but things can be adjusted if necessary. Since Heading is required, make its paragraph's Autonumber format S:< =0>< =0>. This will reset your Table and Figure numbers for each Section. Now, use this for table title paragraphs:

    S:<n+>< >

    and use this for figure title paragraphs:

    S:< ><n+>

    See if this works for you.

    1 reply

    Community Expert
    February 25, 2023

    Hi Igor, your question is valid and of course you can also ask stupid questions! And I think that yours is not stupid.

    I would suggest to start the counter of your tables not with a special table format or attribute or element, but integrate the table counter into that of the first heading of your section.

    In the table numbering use the same series label as in this heading. In the heading numbering add a counter < =0>.

    In the table numbering use the same counters as in the heading and set all to < >. For the table counter add <n=0>.

    This way the first heading will set the table counter to 0. Each table does not change the numbering of the heading. The table counter is incremented by 1.

    Best regards, Winfried

    IGOR5C0CAuthor
    Inspiring
    February 25, 2023

    Hi Winfried!

    This works great! My problem is solved! Thank you!

    To my shame, I only now realized what it means «< > and < =0>» in the organization of numbering.

    Thank you again!

    But still, I am interested in the question asked: is it possible to assign the value <n=1> using EDD ContextRule for the first Table (or another element) in a Section?

     

    Thanks in advance, regards,

    Igor

    Inspiring
    February 27, 2023

    Igor,

       As you now know, there is no way to test for the first element of a particular type. This design was motivated by performance. FrameMaker is a WYSIWYG application and users expect continual formatting as they edit. The software need only make one test to determine if an element is the first (or last) in its parent. More complex expressions could require inspection of a large document (or even an entire book) leading to a very noticeable delay as changes are made.

         --Lynne