Skip to main content
Inspiring
Feb 25, 2023 2:53 PM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
    frameexpert
    frameexpertCorrect answer
    Community Expert
    Feb 27, 2023 12:35 PM UTC

    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.

    www.frameexpert.com

    10 replies

    Community Expert
    Feb 25, 2023 3:20 PM UTC

    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

    Translate
    IGOR5C0CAuthor
    Inspiring
    Feb 25, 2023 5:13 PM UTC

    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

    Translate
    frameexpert
    Community Expert
    Community Expert
    Feb 26, 2023 12:46 PM UTC

    The {first} specification only tests if an element is the first child of its parent. There is no way to see if it is the first element of a specific kind of element in its parent.

    Translate
    www.frameexpert.com